Hi Nithin,

Instead of removing the assertion, can you change it to:

ASSERT(!key->tunKey.dst || offset == OvsGetFlowL2Offset(&key->tunKey));

I fixed it for OvsLookupFlow but somehow overlooked OvsHashFlow in my
Geneve patch.

Best regards,
Yin Lin

On Wed, Aug 31, 2016 at 3:33 AM, Nithin Raju <nit...@vmware.com> wrote:

> Since the Geneve changes, the key->l2.offset will no longer be 0 when
> the tunnel key is valid within the OVS flow key. key->l2.offset would
> be determined by the amount of tunnel options.
>
> Signed-off-by: Nithin Raju <nit...@vmware.com>
> ---
>  datapath-windows/ovsext/DpInternal.h | 9 ++++++---
>  datapath-windows/ovsext/Flow.c       | 1 -
>  2 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/datapath-windows/ovsext/DpInternal.h
> b/datapath-windows/ovsext/DpInternal.h
> index 22599a0..f62fc55 100644
> --- a/datapath-windows/ovsext/DpInternal.h
> +++ b/datapath-windows/ovsext/DpInternal.h
> @@ -157,17 +157,20 @@ typedef union OvsIPv4TunnelKey {
>      uint64_t attr[NUM_PKT_ATTR_REQUIRED];
>  } OvsIPv4TunnelKey; /* Size of 280 byte. */
>
> -__inline uint8_t TunnelKeyGetOptionsOffset(const OvsIPv4TunnelKey *key)
> +static __inline uint8_t
> +TunnelKeyGetOptionsOffset(const OvsIPv4TunnelKey *key)
>  {
>      return TUN_OPT_MAX_LEN - key->tunOptLen;
>  }
>
> -__inline uint8_t* TunnelKeyGetOptions(OvsIPv4TunnelKey *key)
> +static __inline uint8_t *
> +TunnelKeyGetOptions(OvsIPv4TunnelKey *key)
>  {
>      return key->tunOpts + TunnelKeyGetOptionsOffset(key);
>  }
>
> -__inline uint16_t TunnelKeyGetRealSize(OvsIPv4TunnelKey *key)
> +static __inline uint16_t
> +TunnelKeyGetRealSize(OvsIPv4TunnelKey *key)
>  {
>      return sizeof(OvsIPv4TunnelKey) - TunnelKeyGetOptionsOffset(key);
>  }
> diff --git a/datapath-windows/ovsext/Flow.c b/datapath-windows/ovsext/
> Flow.c
> index 7a57f96..439fb28 100644
> --- a/datapath-windows/ovsext/Flow.c
> +++ b/datapath-windows/ovsext/Flow.c
> @@ -2595,7 +2595,6 @@ OvsHashFlow(const OvsFlowKey *key)
>      UINT8 *start;
>
>      ASSERT(key->tunKey.dst || offset == sizeof(OvsIPv4TunnelKey));
> -    ASSERT(!key->tunKey.dst || offset == 0);
>      start = (UINT8 *)key + offset;
>      return OvsJhashBytes(start, size, 0);
>  }
> --
> 2.6.2
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to