diff mbox

[ovs-dev,v2] datapath-windows: Fix GENEVE option header

Message ID 20170306161632.9428-1-aserdean@cloudbasesolutions.com
State Accepted
Headers show

Commit Message

Alin Serdean March 6, 2017, 4:16 p.m. UTC
From: Alin Serdean <aserdean@cloudbasesolutions.com>

The GENEVE option header is defined in big endian, however we support only
little endian on Windows at the moment.

This patch changes the GENEVE option header into little endian.

Found while testing.

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Yin Lin <linyi@vmware.com>
---
v2: Change commit title and message as suggested by:
    Guru Shetty <guru@ovn.org>
intended for: master, branch-2.7
---
 datapath-windows/ovsext/Geneve.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Gurucharan Shetty March 6, 2017, 5:19 p.m. UTC | #1
On 6 March 2017 at 08:16, Alin Serdean <aserdean@cloudbasesolutions.com>
wrote:

> From: Alin Serdean <aserdean@cloudbasesolutions.com>
>
> The GENEVE option header is defined in big endian, however we support only
> little endian on Windows at the moment.
>
> This patch changes the GENEVE option header into little endian.
>
> Found while testing.
>
> Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
> Acked-by: Yin Lin <linyi@vmware.com>
>
Applied, thanks.


> ---
> v2: Change commit title and message as suggested by:
>     Guru Shetty <guru@ovn.org>
> intended for: master, branch-2.7
> ---
>  datapath-windows/ovsext/Geneve.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/datapath-windows/ovsext/Geneve.h b/datapath-windows/ovsext/
> Geneve.h
> index be8a834..019c0dd 100644
> --- a/datapath-windows/ovsext/Geneve.h
> +++ b/datapath-windows/ovsext/Geneve.h
> @@ -71,10 +71,10 @@ typedef struct GeneveOptionHdr {
>      UINT32   optionClass:16;
>      /* Format of data contained in the option. */
>      UINT32   type:8;
> -    /* Reserved. */
> -    UINT32   reserved:3;
>      /* Length of option in int32 excluding the option header. */
>      UINT32   length:5;
> +    /* Reserved. */
> +    UINT32   reserved:3;
>  } GeneveOptionHdr;
>
>  #define GENEVE_CRIT_OPT_TYPE (1 << 7)
> --
> 2.10.2.windows.1
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
diff mbox

Patch

diff --git a/datapath-windows/ovsext/Geneve.h b/datapath-windows/ovsext/Geneve.h
index be8a834..019c0dd 100644
--- a/datapath-windows/ovsext/Geneve.h
+++ b/datapath-windows/ovsext/Geneve.h
@@ -71,10 +71,10 @@  typedef struct GeneveOptionHdr {
     UINT32   optionClass:16;
     /* Format of data contained in the option. */
     UINT32   type:8;
-    /* Reserved. */
-    UINT32   reserved:3;
     /* Length of option in int32 excluding the option header. */
     UINT32   length:5;
+    /* Reserved. */
+    UINT32   reserved:3;
 } GeneveOptionHdr;
 
 #define GENEVE_CRIT_OPT_TYPE (1 << 7)