netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH net] vxlan: fix incorrect RCO bit in VXLAN header
@ 2015-12-04 12:54 Jiri Benc
  2015-12-04 16:43 ` Tom Herbert
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jiri Benc @ 2015-12-04 12:54 UTC (permalink / raw)
  To: netdev; +Cc: Thomas Graf, Tom Herbert

Commit 3511494ce2f3d ("vxlan: Group Policy extension") changed definition of
VXLAN_HF_RCO from 0x00200000 to BIT(24). This is obviously incorrect. It's
also in violation with the RFC draft.

Fixes: 3511494ce2f3d ("vxlan: Group Policy extension")
Cc: Thomas Graf <tgraf@suug.ch>
Cc: Tom Herbert <therbert@google.com>
Signed-off-by: Jiri Benc <jbenc@redhat.com>
---
This code is, unfortunately, in the tree since 4.0. Not sure whether we can
change it now. On the other hand, we're in violation with the RFC draft and
collide with VXLAN-GPE flags assignment which defines this bit as OAM flag.

Opinions welcome, especially by Tom and Thomas.
---
 include/net/vxlan.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/net/vxlan.h b/include/net/vxlan.h
index c1c899c3a51b..e289ada6adf6 100644
--- a/include/net/vxlan.h
+++ b/include/net/vxlan.h
@@ -79,7 +79,7 @@ struct vxlanhdr {
 };
 
 /* VXLAN header flags. */
-#define VXLAN_HF_RCO BIT(24)
+#define VXLAN_HF_RCO BIT(21)
 #define VXLAN_HF_VNI BIT(27)
 #define VXLAN_HF_GBP BIT(31)
 
-- 
1.8.3.1

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

* Re: [RFC PATCH net] vxlan: fix incorrect RCO bit in VXLAN header
  2015-12-04 12:54 [RFC PATCH net] vxlan: fix incorrect RCO bit in VXLAN header Jiri Benc
@ 2015-12-04 16:43 ` Tom Herbert
  2015-12-04 17:06   ` Jiri Benc
  2015-12-05 23:16 ` David Miller
  2015-12-07 15:46 ` Thomas Graf
  2 siblings, 1 reply; 7+ messages in thread
From: Tom Herbert @ 2015-12-04 16:43 UTC (permalink / raw)
  To: Jiri Benc; +Cc: Linux Kernel Network Developers, Thomas Graf, Tom Herbert

On Fri, Dec 4, 2015 at 4:54 AM, Jiri Benc <jbenc@redhat.com> wrote:
> Commit 3511494ce2f3d ("vxlan: Group Policy extension") changed definition of
> VXLAN_HF_RCO from 0x00200000 to BIT(24). This is obviously incorrect. It's
> also in violation with the RFC draft.
>
> Fixes: 3511494ce2f3d ("vxlan: Group Policy extension")
> Cc: Thomas Graf <tgraf@suug.ch>
> Cc: Tom Herbert <therbert@google.com>
> Signed-off-by: Jiri Benc <jbenc@redhat.com>
> ---
> This code is, unfortunately, in the tree since 4.0. Not sure whether we can
> change it now. On the other hand, we're in violation with the RFC draft and
> collide with VXLAN-GPE flags assignment which defines this bit as OAM flag.
>
> Opinions welcome, especially by Tom and Thomas.

Thanks Jiri!

What a mess VXLAN has become. There are no guidelines or order in
defining these reserved bits! If anyone is looking to do some work in
encapsulation please consider bringing up VXLAN-GPE/NSH in the stack,
hopefully that world will be better....

Acked-by: Tom Herbert <tom@herbertland.com>

> ---
>  include/net/vxlan.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/net/vxlan.h b/include/net/vxlan.h
> index c1c899c3a51b..e289ada6adf6 100644
> --- a/include/net/vxlan.h
> +++ b/include/net/vxlan.h
> @@ -79,7 +79,7 @@ struct vxlanhdr {
>  };
>
>  /* VXLAN header flags. */
> -#define VXLAN_HF_RCO BIT(24)
> +#define VXLAN_HF_RCO BIT(21)
>  #define VXLAN_HF_VNI BIT(27)
>  #define VXLAN_HF_GBP BIT(31)
>
> --
> 1.8.3.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [RFC PATCH net] vxlan: fix incorrect RCO bit in VXLAN header
  2015-12-04 16:43 ` Tom Herbert
@ 2015-12-04 17:06   ` Jiri Benc
  2015-12-04 17:13     ` Tom Herbert
  0 siblings, 1 reply; 7+ messages in thread
From: Jiri Benc @ 2015-12-04 17:06 UTC (permalink / raw)
  To: Tom Herbert; +Cc: Linux Kernel Network Developers, Thomas Graf

On Fri, 4 Dec 2015 08:43:59 -0800, Tom Herbert wrote:
> What a mess VXLAN has become. There are no guidelines or order in
> defining these reserved bits! If anyone is looking to do some work in
> encapsulation please consider bringing up VXLAN-GPE/NSH in the stack,
> hopefully that world will be better....

I'm actually working right now on VXLAN-GPE implementation (and tons of
cleanups in the vxlan code) which is the reason I noticed this bug.

> Acked-by: Tom Herbert <tom@herbertland.com>

Thanks. David, as this was submitted as RFC, should I resubmit?
Provided that you're okay with the patch, of course; it changes the
on-wire format which should not be taken lightly, even though the
current behavior is incorrect.

 Jiri

-- 
Jiri Benc

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

* Re: [RFC PATCH net] vxlan: fix incorrect RCO bit in VXLAN header
  2015-12-04 17:06   ` Jiri Benc
@ 2015-12-04 17:13     ` Tom Herbert
  2015-12-07 10:48       ` Jiri Benc
  0 siblings, 1 reply; 7+ messages in thread
From: Tom Herbert @ 2015-12-04 17:13 UTC (permalink / raw)
  To: Jiri Benc; +Cc: Linux Kernel Network Developers, Thomas Graf

On Fri, Dec 4, 2015 at 9:06 AM, Jiri Benc <jbenc@redhat.com> wrote:
> On Fri, 4 Dec 2015 08:43:59 -0800, Tom Herbert wrote:
>> What a mess VXLAN has become. There are no guidelines or order in
>> defining these reserved bits! If anyone is looking to do some work in
>> encapsulation please consider bringing up VXLAN-GPE/NSH in the stack,
>> hopefully that world will be better....
>
> I'm actually working right now on VXLAN-GPE implementation (and tons of
> cleanups in the vxlan code) which is the reason I noticed this bug.
>
That's awesome! One favor, can you make sure VXLAN-GPE works with IPv6
from the start. :-)

Also, I'll need to spin an I-D for RCO in VXLAN-GPE. Do you see any
reason to use a different bit for it?

Tom

>> Acked-by: Tom Herbert <tom@herbertland.com>
>
> Thanks. David, as this was submitted as RFC, should I resubmit?
> Provided that you're okay with the patch, of course; it changes the
> on-wire format which should not be taken lightly, even though the
> current behavior is incorrect.
>
>  Jiri
>
> --
> Jiri Benc

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

* Re: [RFC PATCH net] vxlan: fix incorrect RCO bit in VXLAN header
  2015-12-04 12:54 [RFC PATCH net] vxlan: fix incorrect RCO bit in VXLAN header Jiri Benc
  2015-12-04 16:43 ` Tom Herbert
@ 2015-12-05 23:16 ` David Miller
  2015-12-07 15:46 ` Thomas Graf
  2 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2015-12-05 23:16 UTC (permalink / raw)
  To: jbenc; +Cc: netdev, tgraf, therbert

From: Jiri Benc <jbenc@redhat.com>
Date: Fri,  4 Dec 2015 13:54:03 +0100

> Commit 3511494ce2f3d ("vxlan: Group Policy extension") changed definition of
> VXLAN_HF_RCO from 0x00200000 to BIT(24). This is obviously incorrect. It's
> also in violation with the RFC draft.
> 
> Fixes: 3511494ce2f3d ("vxlan: Group Policy extension")
> Cc: Thomas Graf <tgraf@suug.ch>
> Cc: Tom Herbert <therbert@google.com>
> Signed-off-by: Jiri Benc <jbenc@redhat.com>
> ---
> This code is, unfortunately, in the tree since 4.0. Not sure whether we can
> change it now. On the other hand, we're in violation with the RFC draft and
> collide with VXLAN-GPE flags assignment which defines this bit as OAM flag.
> 
> Opinions welcome, especially by Tom and Thomas.

Applied and queued up for -stable.

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

* Re: [RFC PATCH net] vxlan: fix incorrect RCO bit in VXLAN header
  2015-12-04 17:13     ` Tom Herbert
@ 2015-12-07 10:48       ` Jiri Benc
  0 siblings, 0 replies; 7+ messages in thread
From: Jiri Benc @ 2015-12-07 10:48 UTC (permalink / raw)
  To: Tom Herbert; +Cc: Linux Kernel Network Developers, Thomas Graf

<On Fri, 4 Dec 2015 09:13:28 -0800, Tom Herbert wrote:
> That's awesome! One favor, can you make sure VXLAN-GPE works with IPv6
> from the start. :-)

Absolutely. I've not spent so much effort adding IPv6 counterparts to
various vxlan stuff to submit vxlan-gpe for IPv4 only :-)

> Also, I'll need to spin an I-D for RCO in VXLAN-GPE. Do you see any
> reason to use a different bit for it?

As for the flags, VXLAN-GBP, VXLAN-GPE and VXLAN-RCO are compatible
with each other. It's not possible to use GBP and GPE together because
the group policy id and the next protocol field are overlapping but
it's possible to distinguish whether it's GBP or GPE based on the
flags.

There should be no problem using GPE and RCO together (at least now,
when this patch is applied). It needs to be explicitly configured as
such when creating the interface, though.

 Jiri

-- 
Jiri Benc

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

* Re: [RFC PATCH net] vxlan: fix incorrect RCO bit in VXLAN header
  2015-12-04 12:54 [RFC PATCH net] vxlan: fix incorrect RCO bit in VXLAN header Jiri Benc
  2015-12-04 16:43 ` Tom Herbert
  2015-12-05 23:16 ` David Miller
@ 2015-12-07 15:46 ` Thomas Graf
  2 siblings, 0 replies; 7+ messages in thread
From: Thomas Graf @ 2015-12-07 15:46 UTC (permalink / raw)
  To: Jiri Benc; +Cc: netdev, Tom Herbert

On 12/04/15 at 01:54pm, Jiri Benc wrote:
> Commit 3511494ce2f3d ("vxlan: Group Policy extension") changed definition of
> VXLAN_HF_RCO from 0x00200000 to BIT(24). This is obviously incorrect. It's
> also in violation with the RFC draft.
> 
> Fixes: 3511494ce2f3d ("vxlan: Group Policy extension")
> Cc: Thomas Graf <tgraf@suug.ch>
> Cc: Tom Herbert <therbert@google.com>
> Signed-off-by: Jiri Benc <jbenc@redhat.com>

Thanks for fixing this up Jiri. Sorry about the mess Tom.

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

end of thread, other threads:[~2015-12-07 15:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-04 12:54 [RFC PATCH net] vxlan: fix incorrect RCO bit in VXLAN header Jiri Benc
2015-12-04 16:43 ` Tom Herbert
2015-12-04 17:06   ` Jiri Benc
2015-12-04 17:13     ` Tom Herbert
2015-12-07 10:48       ` Jiri Benc
2015-12-05 23:16 ` David Miller
2015-12-07 15:46 ` Thomas Graf

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