diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2020-09-26 22:32:02 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-27 00:17:58 +0300 |
commit | c3975400c8014e39f7f272808377c97c906c8cee (patch) | |
tree | 73341881ceee1fb5bc9797b19bb568d8d55af5f7 /include | |
parent | 2d44b097bbb9d0af0f3b94304fee4b639ab14171 (diff) | |
download | linux-c3975400c8014e39f7f272808377c97c906c8cee.tar.xz |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/dsa.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h index d16057c5987a..46019edc32cb 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -84,6 +84,12 @@ struct dsa_device_ops { unsigned int overhead; const char *name; enum dsa_tag_protocol proto; + /* Some tagging protocols either mangle or shift the destination MAC + * address, in which case the DSA master would drop packets on ingress + * if what it understands out of the destination MAC address is not in + * its RX filter. + */ + bool promisc_on_master; }; /* This structure defines the control interfaces that are overlayed by the |