Re: [PATCH net] net: lan78xx: Disable hardware vlan filtering in promiscuous mode

2020-11-19 Thread Jakub Kicinski
On Thu, 19 Nov 2020 16:37:51 +0100 Markus Blöchl wrote: > Implementation > == > > I then tried to come up with a solution in net/core that would > universally disable vlan filtering in promiscuous mode. Thanks for taking a look! > Removing the features in `netdev_fix_features` is eas

Re: [PATCH net] net: lan78xx: Disable hardware vlan filtering in promiscuous mode

2020-11-19 Thread Vladimir Oltean
On Thu, Nov 19, 2020 at 04:37:51PM +0100, Markus Blöchl wrote: > > There might be an entire discussion about how promiscuity does _not_ > > mean "deliver all packets to the CPU" that might be of interest to you: > > https://lkml.org/lkml/2019/8/29/255 > > If I glanced over this discussion correctly

Re: [PATCH net] net: lan78xx: Disable hardware vlan filtering in promiscuous mode

2020-11-19 Thread Markus Blöchl
On Sat, Nov 14, 2020 at 08:11:03PM +0200, Vladimir Oltean wrote: > On Thu, Nov 12, 2020 at 11:53:15AM +0100, Markus Blöchl wrote: > > From what I can see, most other drivers use a special hardware register > > flag to enable promiscuous mode, which overrules all other filters. > > Yes, but it may

Re: [PATCH net] net: lan78xx: Disable hardware vlan filtering in promiscuous mode

2020-11-14 Thread Vladimir Oltean
On Thu, Nov 12, 2020 at 11:53:15AM +0100, Markus Blöchl wrote: > From what I can see, most other drivers use a special hardware register > flag to enable promiscuous mode, which overrules all other filters. Yes, but it may not mean what you think. > e.g. from the ASIX AX88178 datasheet: > > PRO

Re: [PATCH net] net: lan78xx: Disable hardware vlan filtering in promiscuous mode

2020-11-12 Thread Jakub Kicinski
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 filte

Re: [PATCH net] net: lan78xx: Disable hardware vlan filtering in promiscuous mode

2020-11-12 Thread Alexander Duyck
On Wed, Nov 11, 2020 at 7:43 AM Jakub Kicinski wrote: > > On Tue, 10 Nov 2020 16:39:58 +0100 Markus Blöchl wrote: > > The rx-vlan-filter feature flag prevents unexpected tagged frames on > > the wire from reaching the kernel in promiscuous mode. > > Disable this offloading feature in the lan7800 c

Re: [PATCH net] net: lan78xx: Disable hardware vlan filtering in promiscuous mode

2020-11-12 Thread Markus Blöchl
On Wed, Nov 11, 2020 at 06:47:27PM +0200, Vladimir Oltean wrote: > On Wed, Nov 11, 2020 at 07:56:58AM -0800, Florian Fainelli wrote: > > The semantics of promiscuous are pretty clear though, and if you have a > > NIC with VLAN filtering capability which could prevent the stack from > > seeing *all*

Re: [PATCH net] net: lan78xx: Disable hardware vlan filtering in promiscuous mode

2020-11-11 Thread Ido Schimmel
On Wed, Nov 11, 2020 at 07:43:41AM -0800, Jakub Kicinski wrote: > On Tue, 10 Nov 2020 16:39:58 +0100 Markus Blöchl wrote: > > The rx-vlan-filter feature flag prevents unexpected tagged frames on > > the wire from reaching the kernel in promiscuous mode. > > Disable this offloading feature in the la

Re: [PATCH net] net: lan78xx: Disable hardware vlan filtering in promiscuous mode

2020-11-11 Thread Vladimir Oltean
On Wed, Nov 11, 2020 at 06:47:27PM +0200, Vladimir Oltean wrote: > On Wed, Nov 11, 2020 at 07:56:58AM -0800, Florian Fainelli wrote: > > The semantics of promiscuous are pretty clear though, and if you have a > > NIC with VLAN filtering capability which could prevent the stack from > > seeing *all*

Re: [PATCH net] net: lan78xx: Disable hardware vlan filtering in promiscuous mode

2020-11-11 Thread Vladimir Oltean
On Wed, Nov 11, 2020 at 07:56:58AM -0800, Florian Fainelli wrote: > The semantics of promiscuous are pretty clear though, and if you have a > NIC with VLAN filtering capability which could prevent the stack from > seeing *all* packets, that would be considered a bug. I suppose that you > could not

Re: [PATCH net] net: lan78xx: Disable hardware vlan filtering in promiscuous mode

2020-11-11 Thread Florian Fainelli
On 11/11/2020 7:43 AM, Jakub Kicinski wrote: > On Tue, 10 Nov 2020 16:39:58 +0100 Markus Blöchl wrote: >> The rx-vlan-filter feature flag prevents unexpected tagged frames on >> the wire from reaching the kernel in promiscuous mode. >> Disable this offloading feature in the lan7800 controller wh

Re: [PATCH net] net: lan78xx: Disable hardware vlan filtering in promiscuous mode

2020-11-11 Thread Jakub Kicinski
On Tue, 10 Nov 2020 16:39:58 +0100 Markus Blöchl wrote: > The rx-vlan-filter feature flag prevents unexpected tagged frames on > the wire from reaching the kernel in promiscuous mode. > Disable this offloading feature in the lan7800 controller whenever > IFF_PROMISC is set and make sure that the ha

Re: [PATCH net] net: lan78xx: Disable hardware vlan filtering in promiscuous mode

2020-11-10 Thread Jakub Kicinski
On Tue, 10 Nov 2020 16:39:58 +0100 Markus Blöchl wrote: > The rx-vlan-filter feature flag prevents unexpected tagged frames on > the wire from reaching the kernel in promiscuous mode. > Disable this offloading feature in the lan7800 controller whenever > IFF_PROMISC is set and make sure that the ha

[PATCH net] net: lan78xx: Disable hardware vlan filtering in promiscuous mode

2020-11-10 Thread Markus Blöchl
The rx-vlan-filter feature flag prevents unexpected tagged frames on the wire from reaching the kernel in promiscuous mode. Disable this offloading feature in the lan7800 controller whenever IFF_PROMISC is set and make sure that the hardware features are updated when IFF_PROMISC changes. Signed-of