On Wed, 11 Nov 2020 07:43:41 -0800 Jakub Kicinski wrote: > > In order to receive those tagged frames it is necessary to manually > > disable > > rx vlan filtering using ethtool ( `ethtool -K ethX rx-vlan-filter off` > > or > > corresponding ioctls ). Setting all bits in the vlan filter table to 1 > > is > > an even worse approach, imho. > > > > As a user I would probably expect that setting IFF_PROMISC should be > > enough > > in all cases to receive all valid traffic. > > Therefore I think this behaviour is a bug in the driver, since other > > drivers (notably ixgbe) automatically disable rx-vlan-filter when > > IFF_PROMISC is set. Please correct me if I am wrong here. > > I've been mulling over this, I'm not 100% sure that disabling VLAN > filters on promisc is indeed the right thing to do. The ixgbe doing > this is somewhat convincing. OTOH users would not expect flow filters > to get disabled when promisc is on, so why disable vlan filters? > > Either way we should either document this as an expected behavior or > make the core clear the features automatically rather than force > drivers to worry about it. > > Does anyone else have an opinion, please?
Okay, I feel convinced that we should indeed let all vlan traffic thru, thanks everyone! :) Markus could you try to come up with a patch for the net/core/dev.c handling which would clear NETIF_F_HW_VLAN_CTAG_FILTER and NETIF_F_HW_VLAN_STAG_FILTER automatically so the drivers don't have to worry? Whatever the driver chooses to do to disable vlan filtering is a separate discussion AFAICT.