[ovs-dev] [PATCH] datapath-windows: Fix small bug in MPLS
Sairam Venugopal
vsairam at vmware.com
Thu Feb 11 00:23:27 UTC 2016
Acked-by: Sairam Venugopal <vsairam at vmware.com>
On 2/10/16, 4:14 PM, "Alin Serdean" <aserdean at cloudbasesolutions.com>
wrote:
>The keylen is not properly updated in the case of MPLS, directly causing
>the
>hash to be calculated improperly.
>
>Signed-off-by: Alin Gabriel Serdean <aserdean at cloudbasesolutions.com>
>---
> datapath-windows/ovsext/DpInternal.h | 1 +
> datapath-windows/ovsext/Flow.c | 1 +
> 2 files changed, 2 insertions(+)
>
>diff --git a/datapath-windows/ovsext/DpInternal.h
>b/datapath-windows/ovsext/DpInternal.h
>index 72e9b20..c094f32 100644
>--- a/datapath-windows/ovsext/DpInternal.h
>+++ b/datapath-windows/ovsext/DpInternal.h
>@@ -174,6 +174,7 @@ typedef __declspec(align(8)) struct OvsFlowKey {
> #define OVS_IPV6_KEY_SIZE (sizeof (Ipv6Key))
> #define OVS_ARP_KEY_SIZE (sizeof (ArpKey))
> #define OVS_ICMPV6_KEY_SIZE (sizeof (Icmp6Key))
>+#define OVS_MPLS_KEY_SIZE (sizeof (MplsKey))
>
> typedef struct OvsFlowStats {
> Ovs64AlignedU64 packetCount;
>diff --git a/datapath-windows/ovsext/Flow.c
>b/datapath-windows/ovsext/Flow.c
>index c22e8cf..5eec513 100644
>--- a/datapath-windows/ovsext/Flow.c
>+++ b/datapath-windows/ovsext/Flow.c
>@@ -1931,6 +1931,7 @@ OvsExtractFlow(const NET_BUFFER_LIST *packet,
> const MPLSHdr *mpls;
> MplsKey *mplsKey = &flow->mplsKey;
> ((UINT64 *)mplsKey)[0] = 0;
>+ flow->l2.keyLen += OVS_MPLS_KEY_SIZE;
>
> /*
> * In the presence of an MPLS label stack the end of the L2
>--
>1.9.5.msysgit.0
>_______________________________________________
>dev mailing list
>dev at openvswitch.org
>http://openvswitch.org/mailman/listinfo/dev
More information about the dev
mailing list