Section "Flooding L2 domain" says, to avoid duplicated flooding, if
skb->offload_fwd_mark is matched with dev->skb_mark, the kernel will
drop the packet. However, the relevant code in __dev_queue_xmit
compares skb->offload_fwd_mark with dev->offload_fwd_mark, not
dev->skb_mark. I guess the text is wrong.
Signed-off-by: Ryota Ozaki <redacted>
---
Documentation/networking/switchdev.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@@ -286,8 +286,8 @@ otherwise there will be duplicate packets on the wire. To avoid duplicate packets, the device/driver should mark a packet as already forwarded using skb->offload_fwd_mark. The same mark is set on the device ports in the domain using dev->offload_fwd_mark. If the skb->offload_fwd_mark-is non-zero and matches the forwarding egress port's dev->skb_mark, the kernel-will drop the skb right before transmit on the egress port, with the+is non-zero and matches the forwarding egress port's dev->offload_fwd_mark,+the kernel will drop the skb right before transmit on the egress port, with the understanding that the device already forwarded the packet on same egress port. The driver can use switchdev_port_fwd_mark_set() to set a globally unique mark for port's dev->offload_fwd_mark, based on the port's parent ID (switch ID) and
Hi,
On Mon, Oct 10, 2016 at 08:15:39PM +0900, Ryota Ozaki wrote:
quoted hunk
Section "Flooding L2 domain" says, to avoid duplicated flooding, if
skb->offload_fwd_mark is matched with dev->skb_mark, the kernel will
drop the packet. However, the relevant code in __dev_queue_xmit
compares skb->offload_fwd_mark with dev->offload_fwd_mark, not
dev->skb_mark. I guess the text is wrong.
Signed-off-by: Ryota Ozaki <redacted>
---
Documentation/networking/switchdev.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@@ -286,8 +286,8 @@ otherwise there will be duplicate packets on the wire. To avoid duplicate packets, the device/driver should mark a packet as already forwarded using skb->offload_fwd_mark. The same mark is set on the device ports in the domain using dev->offload_fwd_mark. If the skb->offload_fwd_mark-is non-zero and matches the forwarding egress port's dev->skb_mark, the kernel-will drop the skb right before transmit on the egress port, with the+is non-zero and matches the forwarding egress port's dev->offload_fwd_mark,+the kernel will drop the skb right before transmit on the egress port, with the
understanding that the device already forwarded the packet on same egress port.
The driver can use switchdev_port_fwd_mark_set() to set a globally unique mark
for port's dev->offload_fwd_mark, based on the port's parent ID (switch ID) and
--
2.7.4
On Mon, Oct 10, 2016 at 10:49 PM, Ido Schimmel [off-list ref] wrote:
Hi,
On Mon, Oct 10, 2016 at 08:15:39PM +0900, Ryota Ozaki wrote:
quoted
Section "Flooding L2 domain" says, to avoid duplicated flooding, if
skb->offload_fwd_mark is matched with dev->skb_mark, the kernel will
drop the packet. However, the relevant code in __dev_queue_xmit
compares skb->offload_fwd_mark with dev->offload_fwd_mark, not
dev->skb_mark. I guess the text is wrong.
Signed-off-by: Ryota Ozaki <redacted>
---
Documentation/networking/switchdev.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@@ -286,8 +286,8 @@ otherwise there will be duplicate packets on the wire. To avoid duplicate packets, the device/driver should mark a packet as already forwarded using skb->offload_fwd_mark. The same mark is set on the device ports in the domain using dev->offload_fwd_mark. If the skb->offload_fwd_mark-is non-zero and matches the forwarding egress port's dev->skb_mark, the kernel-will drop the skb right before transmit on the egress port, with the+is non-zero and matches the forwarding egress port's dev->offload_fwd_mark,+the kernel will drop the skb right before transmit on the egress port, with the
Thanks for the pointer. I'll follow the rule next time.
Thanks,
ozaki-r
Thanks!
quoted
understanding that the device already forwarded the packet on same egress port.
The driver can use switchdev_port_fwd_mark_set() to set a globally unique mark
for port's dev->offload_fwd_mark, based on the port's parent ID (switch ID) and
--
2.7.4