I'd like to pick up this patch and rework it based on your suggestions. Need it for [1]. Most opinions seem to be pointing to a generic software mac filtering in the VLAN layer with hw support if necessary. Here's what I had in mind: - For the generic mac filtering we can use something similar to VirtIONet's mac_table. - Make receive_filter a callback in NetClientInfo. NIC's that don't support filtering can use a generic_receive_filter based on the mac table (but should be turned off by default). - For hw filtering support I'm not sure how to validate the "interesting" setup with a tap/macvtap and virtio-net on top of it. - Of course, this needs to be documented as "best effort" filtering. Just like the virtio-net mac table.
Please give me your feedback. Thanks. [1] - http://www.linux-kvm.org/page/GuestProgrammableMacVlanFiltering -- Dragos