All of lore.kernel.org
 help / color / mirror / Atom feed
* DSA: some questions regarding TX forwarding offload
@ 2021-10-05  8:54 Alvin Šipraga
  2021-10-05 10:12 ` Vladimir Oltean
  0 siblings, 1 reply; 16+ messages in thread
From: Alvin Šipraga @ 2021-10-05  8:54 UTC (permalink / raw)
  To: netdev; +Cc: Vladimir Oltean, Florian Fainelli, Andrew Lunn

Hi,

I am trying to implement TX forwarding offload for my in-progress 
rtl8365mb DSA driver. I have some questions which I could use some 
clarification on. They might be specific to my hardware, which is also 
OK, but then some advice on how to proceed would be helpful.

Q1. Can the tagging driver somehow retrieve a port mask from the DSA 
switch driver in order to assemble the CPU->switch tag on xmit? Is there 
some infrastructure in place to share such data between the two drivers?

Q2. Is it expected by DSA that two isolated ports (e.g. two ports 
belonging to two separate bridges) can be members of the same VLAN 
without issue?

Background: The RTL8365MB's CPU tag includes an ALLOW field followed by 
a "port mask" field. If ALLOW=1 then - based on the VLAN tag in the 
frame and the port mask - the switch will automatically replicate the 
frame and egress it on all suitable ports, but only ports which are in 
the port mask.

If ALLOW=1, and if the port mask is all zeroes or all ones, then the 
switch will make its forwarding decision based only on the VLAN tag in 
the frame (if any). Now consider a configuration as follows:

         br0            br1
          +              +
          |              |
      +---+---+      +---+---+
      |       |      |       |
     swp0    swp1   swp2    swp3

... with both bridges containing switch port(s) belonging to the same 
VLAN n. How should I prevent - with TX forwarding offload - a packet 
with VID=n from being egressed on a port on the opposite bridge which 
belongs to the same VLAN n?

In the above scenario, either I must refine the CPU tag "port mask" 
(hence Q1), or I must restrict the hardware configuration in some way 
(hence Q2), or I must conclude that TX forwarding offload is not 
possible with these constraints, or there is some alternative solution 
or nuance that I have not thought of.

Thank you in advance,

	Alvin

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-10-07 16:06 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-05  8:54 DSA: some questions regarding TX forwarding offload Alvin Šipraga
2021-10-05 10:12 ` Vladimir Oltean
2021-10-05 12:06   ` Alvin Šipraga
2021-10-05 13:29     ` Vladimir Oltean
2021-10-05 13:37       ` Vladimir Oltean
2021-10-05 14:38       ` Alvin Šipraga
2021-10-05 15:25         ` Vladimir Oltean
2021-10-06 16:16           ` Alvin Šipraga
2021-10-07  9:47             ` Vladimir Oltean
2021-10-07 11:22               ` Alvin Šipraga
2021-10-07 11:34                 ` Vladimir Oltean
2021-10-07 14:15                   ` Alvin Šipraga
2021-10-07 16:06                     ` Vladimir Oltean
2021-10-06  2:50   ` Florian Fainelli
2021-10-06 23:15     ` Tobias Waldekranz
2021-10-07  1:08     ` Vladimir Oltean

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.