]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: allow drivers to request promiscuous mode on master
authorVladimir Oltean <vladimir.oltean@nxp.com>
Sat, 26 Sep 2020 19:32:02 +0000 (22:32 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 26 Sep 2020 21:17:58 +0000 (14:17 -0700)
commit3baedef2e4fe187ebb7ac235a0603f47168fac4e
tree73341881ceee1fb5bc9797b19bb568d8d55af5f7
parent5697ff8b83d3b1db8cb5cfd765d9666f13826a3a
net: dsa: allow drivers to request promiscuous mode on master

Currently DSA assumes that taggers don't mess with the destination MAC
address of the frames on RX. That is not always the case. Some DSA
headers are placed before the Ethernet header (ocelot), and others
simply mangle random bytes from the destination MAC address (sja1105
with its incl_srcpt option).

Currently the DSA master goes to promiscuous mode automatically when the
slave devices go too (such as when enslaved to a bridge), but in
standalone mode this is a problem that needs to be dealt with.

So give drivers the possibility to signal that their tagging protocol
will get randomly dropped otherwise, and let DSA deal with fixing that.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/dsa.h
net/dsa/master.c