Re: [Qemu-devel] [PATCH 3/4] qemu:virtio-net: Add support for qemu_vlan_rxfilter

Paul Brook
2009-02-15T16:25:46Z

> The callback you suggest for devices requesting an inbound filter will
> infinite-loop when there's two such devices on the same vlan bus,
> because each time the callback is called, that device will re-issue
> its filter request which triggers the callback on the other similar
> device. Back and forth.
>
> To avoid the infinite loop, the vlan code in the middle (if that's
> where you want it, and I agree) has to distinguish between no inbound
> filters requested by attached devices, and multiple incompatible
> inbound filters requested by attached devices.

Of course.

As I've said repeatedly, the only sane way to implement this is if you isolate
individual devices from this kind of implementation detail. If you're API
doesn't do that then it's wrong.

Paul