Again please move the keylen reset upwards before the keylen gets updated.

We could do as you propose Nithin. Although hash is applicable from my 
knowledge only in the case of bonding.

We could simply just align the structure "OvsFlowKey" to 8 and make sure we 
initialize the members properly that would be better in the future IMO. Thus 
resulting we only set the members we receive from the userspace in this 
particular case recircId.

Alin.

> -----Mesaj original-----
> De la: dev [mailto:dev-boun...@openvswitch.org] În numele Nithin Raju
> Trimis: Tuesday, March 29, 2016 5:43 PM
> Către: Sairam Venugopal <vsai...@vmware.com>; dev@openvswitch.org
> Subiect: Re: [ovs-dev] [PATCH] datapath-windows: Remove unnecessary
> keylen computation in Flow.c
> 
> Let¹s go in the order in which the various fields in OvsFlowKey are laid out.
> Let¹s setup ŒdestKey->recircId¹ and ŒdestKey->dpHash¹ after the L2
> headers.
> 
> Also, you want to combine this with the fix in the other patch during hash
> computation. They all go together.
> 
> 
> -----Original Message-----
> From: dev <dev-boun...@openvswitch.org> on behalf of Sairam Venugopal
> <vsai...@vmware.com>
> Date: Friday, March 25, 2016 at 11:41 AM
> To: "dev@openvswitch.org" <dev@openvswitch.org>
> Subject: [ovs-dev] [PATCH] datapath-windows: Remove unnecessary
> keylen        computation in Flow.c
> 
> >destKey->l2.keylen gets reset after this line. This change
> >doesn't help with hash computation and can be removed. This is what
> >destKey->l2.keyLen gets set to:
> >
> >destKey->l2.keyLen = OVS_WIN_TUNNEL_KEY_SIZE + OVS_L2_KEY_SIZE
> >                         - destKey->l2.offset;
> >
> >Signed-off-by: Sairam Venugopal <vsai...@vmware.com>
> >---
> > datapath-windows/ovsext/Flow.c | 2 --
> > 1 file changed, 2 deletions(-)
> >
> >diff --git a/datapath-windows/ovsext/Flow.c
> >b/datapath-windows/ovsext/Flow.c index d49697c..004c54a 100644
> >--- a/datapath-windows/ovsext/Flow.c
> >+++ b/datapath-windows/ovsext/Flow.c
> >@@ -1382,12 +1382,10 @@ _MapKeyAttrToFlowPut(PNL_ATTR *keyAttrs,
> >
> >     if (keyAttrs[OVS_KEY_ATTR_RECIRC_ID]) {
> >         destKey->recircId =
> >NlAttrGetU32(keyAttrs[OVS_KEY_ATTR_RECIRC_ID]);
> >-        destKey->l2.keyLen += sizeof(destKey->recircId);
> >     }
> >
> >     if (keyAttrs[OVS_KEY_ATTR_DP_HASH]) {
> >         destKey->dpHash =
> NlAttrGetU32(keyAttrs[OVS_KEY_ATTR_DP_HASH]);
> >-        destKey->l2.keyLen += sizeof(destKey->dpHash);
> >     }
> >
> >     /* ===== L2 headers ===== */
> >--
> >2.5.0.windows.1
> >
> >_______________________________________________
> >dev mailing list
> >dev@openvswitch.org
> >https://urldefense.proofpoint.com/v2/url?u=http-
> 3A__openvswitch.org_mai
> >lma
> >n_listinfo_dev&d=BQIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-
> YihVMNtXt-uEs&r
> >=pN
> >HQcdr7B40b4h6Yb7FIedI1dnBsxdDuTLBYD3JqV80&m=oRGQX3o3i3alWuYX8
> DM0Rq2_Ree
> >DJO
> 4aL_3CkyeAp40&s=89cOfCUZyjbS3g8Nk_phUFg5pgZHZKTGNV2rkS550zc&e=
> 
> _______________________________________________
> 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