Re: [Qemu-devel] [PATCH 0/5][RFC] virtio-net: MAC filtering

Anthony Liguori
2009-01-09T20:00:50Z

Paul Brook wrote:
>>>> A concern here is the growing size of the virtio-net I/O port space
>>>> config. This series brings it up to 256 bytes with PCI resource
>>>>
>>> This is one reason why IO ports are a reallybad idea. Use memory mapped
>>> register spaces like any other sane system and you won't have a problem.
>>>
>> IO ports are much faster for notification than MMIO in KVM which is why
>> the space is currently IO ports. It was never meant to hold very large
>> amounts of data.
>>
>
> Huh, I'm surprised it makes any real difference. Other that initial setup,
> isn't it just used to "kick" the devieonce after new dscriptors have been
> added to the ring buffer? I'd expect to be a fairly expensive operation
> (bouncing back to userspace).
>

It's about 2x as expensive to go to userspace but only probably 1.5x
expensive to do MMIO compared to PIO. In the grand scheme of things,
I'm not sure that it matters that much. It's relatively simple for
someone to try out the change and do some benchmarking.

The tougher thing is providing backwards compatible support.

Regards,

Anthony Liguori

> Paul
>