Ok. Thanks for the review.

-----Original Message-----
From: dev <dev-boun...@openvswitch.org> on behalf of Yin Lin
<yinli...@gmail.com>
Date: Wednesday, August 31, 2016 at 5:05 PM
To: Nithin Raju <nit...@vmware.com>
Cc: "dev@openvswitch.org" <dev@openvswitch.org>
Subject: Re: [ovs-dev] [PATCH] datapath-windows: remove invalid ASSERT
in      Flow.c

>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
>> 
>>https://urldefense.proofpoint.com/v2/url?u=http-3A__openvswitch.org_mailm
>>an_listinfo_dev&d=CwIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=
>>pNHQcdr7B40b4h6Yb7FIedI1dnBsxdDuTLBYD3JqV80&m=ttBbDaTv1p_PPtq4qgnL0BbIb9O
>>T_rkW3AWb7P0lzFM&s=rBwNPWqgmC58QLqBHyPye8euC456dxuFXuLoDXANbZY&e=
>>
>_______________________________________________
>dev mailing list
>dev@openvswitch.org
>https://urldefense.proofpoint.com/v2/url?u=http-3A__openvswitch.org_mailma
>n_listinfo_dev&d=CwIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=pN
>HQcdr7B40b4h6Yb7FIedI1dnBsxdDuTLBYD3JqV80&m=ttBbDaTv1p_PPtq4qgnL0BbIb9OT_r
>kW3AWb7P0lzFM&s=rBwNPWqgmC58QLqBHyPye8euC456dxuFXuLoDXANbZY&e= 

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to