netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] doc: fix wrongly referencing dev->skb_mark
@ 2016-10-10 11:15 Ryota Ozaki
  2016-10-10 13:49 ` Ido Schimmel
  0 siblings, 1 reply; 3+ messages in thread
From: Ryota Ozaki @ 2016-10-10 11:15 UTC (permalink / raw)
  To: netdev

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 <ozaki.ryota@gmail.com>
---
 Documentation/networking/switchdev.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/networking/switchdev.txt b/Documentation/networking/switchdev.txt
index 31c3911..d4124a0 100644
--- a/Documentation/networking/switchdev.txt
+++ b/Documentation/networking/switchdev.txt
@@ -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

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

* Re: [PATCH] doc: fix wrongly referencing dev->skb_mark
  2016-10-10 11:15 [PATCH] doc: fix wrongly referencing dev->skb_mark Ryota Ozaki
@ 2016-10-10 13:49 ` Ido Schimmel
  2016-10-11 15:47   ` Ryota Ozaki
  0 siblings, 1 reply; 3+ messages in thread
From: Ido Schimmel @ 2016-10-10 13:49 UTC (permalink / raw)
  To: Ryota Ozaki; +Cc: netdev

Hi,

On Mon, Oct 10, 2016 at 08:15:39PM +0900, Ryota Ozaki wrote:
> 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 <ozaki.ryota@gmail.com>
> ---
>  Documentation/networking/switchdev.txt | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/networking/switchdev.txt b/Documentation/networking/switchdev.txt
> index 31c3911..d4124a0 100644
> --- a/Documentation/networking/switchdev.txt
> +++ b/Documentation/networking/switchdev.txt
> @@ -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

I think your tree isn't up to date. The flooding mechanism (and this
document) were modified in commit 6bc506b4fb06 ("bridge: switchdev: Add
forward mark support for stacked devices")
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6bc506b4fb065eac3d89ca1ce37082e174493d9e

Also, in the future, please specify to which tree (net, net-next) your
patch should go. See:
https://www.kernel.org/doc/Documentation/networking/netdev-FAQ.txt
(under "How do I indicate which tree (net vs. net-next) my patch
should be in?").

Thanks!

>  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
> 

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

* Re: [PATCH] doc: fix wrongly referencing dev->skb_mark
  2016-10-10 13:49 ` Ido Schimmel
@ 2016-10-11 15:47   ` Ryota Ozaki
  0 siblings, 0 replies; 3+ messages in thread
From: Ryota Ozaki @ 2016-10-11 15:47 UTC (permalink / raw)
  To: Ido Schimmel; +Cc: netdev

On Mon, Oct 10, 2016 at 10:49 PM, Ido Schimmel <idosch@idosch.org> wrote:
> Hi,
>
> On Mon, Oct 10, 2016 at 08:15:39PM +0900, Ryota Ozaki wrote:
>> 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 <ozaki.ryota@gmail.com>
>> ---
>>  Documentation/networking/switchdev.txt | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/Documentation/networking/switchdev.txt b/Documentation/networking/switchdev.txt
>> index 31c3911..d4124a0 100644
>> --- a/Documentation/networking/switchdev.txt
>> +++ b/Documentation/networking/switchdev.txt
>> @@ -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
>
> I think your tree isn't up to date. The flooding mechanism (and this
> document) were modified in commit 6bc506b4fb06 ("bridge: switchdev: Add
> forward mark support for stacked devices")
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6bc506b4fb065eac3d89ca1ce37082e174493d9e

Oh, right. I forgot to rebase my branch after the 4.9 merge period
and saw the file as of 4.8.

>
> Also, in the future, please specify to which tree (net, net-next) your
> patch should go. See:
> https://www.kernel.org/doc/Documentation/networking/netdev-FAQ.txt
> (under "How do I indicate which tree (net vs. net-next) my patch
> should be in?").

Thanks for the pointer. I'll follow the rule next time.

Thanks,
  ozaki-r

>
> Thanks!
>
>>  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
>>

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

end of thread, other threads:[~2016-10-11 15:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-10 11:15 [PATCH] doc: fix wrongly referencing dev->skb_mark Ryota Ozaki
2016-10-10 13:49 ` Ido Schimmel
2016-10-11 15:47   ` Ryota Ozaki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).