Thread (24 messages) 24 messages, 3 authors, 2020-09-26

Re: [PATCH v2 net-next 02/16] net: dsa: allow drivers to request promiscuous mode on master

From: Andrew Lunn <andrew@lunn.ch>
Date: 2020-09-26 17:47:06

On Sat, Sep 26, 2020 at 08:30:54PM +0300, Vladimir Oltean wrote:
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).
...
So give drivers the possibility to signal that their tagging protocol
will get randomly dropped otherwise, and let DSA deal with fixing that.
quoted hunk ↗ jump to hunk
@@ -317,6 +317,13 @@ struct dsa_switch {
 	 */
 	bool			mtu_enforcement_ingress;
 
+	/* 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;
+
 	size_t num_ports;
 };
Hi Vladimir

I actually think this is a property of the tagger, not the DSA
driver. In fact, DSA drivers never handle actual frames, they are all
about the control plane, not the data plane. So i think this bool
should be in the tagger structure, dsa_device_ops.

       Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help