aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/networking/switchdev.txt14
1 files changed, 12 insertions, 2 deletions
diff --git a/Documentation/networking/switchdev.txt b/Documentation/networking/switchdev.txt
index c5d7ade10ff2..9825f32a8634 100644
--- a/Documentation/networking/switchdev.txt
+++ b/Documentation/networking/switchdev.txt
@@ -279,8 +279,18 @@ and unknown unicast packets to all ports in domain, if allowed by port's
279current STP state. The switch driver, knowing which ports are within which 279current STP state. The switch driver, knowing which ports are within which
280vlan L2 domain, can program the switch device for flooding. The packet should 280vlan L2 domain, can program the switch device for flooding. The packet should
281also be sent to the port netdev for processing by the bridge driver. The 281also be sent to the port netdev for processing by the bridge driver. The
282bridge should not reflood the packet to the same ports the device flooded. 282bridge should not reflood the packet to the same ports the device flooded,
283XXX: the mechanism to avoid duplicate flood packets is being discuseed. 283otherwise there will be duplicate packets on the wire.
284
285To avoid duplicate packets, the device/driver should mark a packet as already
286forwarded using skb->offload_fwd_mark. The same mark is set on the device
287ports in the domain using dev->offload_fwd_mark. If the skb->offload_fwd_mark
288is non-zero and matches the forwarding egress port's dev->skb_mark, the kernel
289will drop the skb right before transmit on the egress port, with the
290understanding that the device already forwarded the packet on same egress port.
291The driver can use switchdev_port_fwd_mark_set() to set a globally unique mark
292for port's dev->offload_fwd_mark, based on the port's parent ID (switch ID) and
293a group ifindex.
284 294
285It is possible for the switch device to not handle flooding and push the 295It is possible for the switch device to not handle flooding and push the
286packets up to the bridge driver for flooding. This is not ideal as the number 296packets up to the bridge driver for flooding. This is not ideal as the number