Re: [ovs-dev] [PATCH 2/2] odp-util: Do not rewrite fields with the same values as matched

2019-01-10 Thread Eli Britstein
You are right. I'll fix it. On 1/10/2019 9:35 PM, Yifeng Sun wrote: Hi, When I try to understand this patch, I feel there may be some issue in this loop below. It looks like each loop is doing the same thing. Can you please take a look? +for (i = 0; i < size; i++) +if

Re: [ovs-dev] [PATCH 2/2] odp-util: Do not rewrite fields with the same values as matched

2019-01-10 Thread Yifeng Sun
Hi, When I try to understand this patch, I feel there may be some issue in this loop below. It looks like each loop is doing the same thing. Can you please take a look? +for (i = 0; i < size; i++) +if (memcmp(pkey0, pkey1, size) == 0) +memset(pmask, 0, size);

[ovs-dev] [PATCH 2/2] odp-util: Do not rewrite fields with the same values as matched

2019-01-10 Thread Eli Britstein
To improve performance and avoid wasting resources for HW offloaded flows, do not rewrite fields that are matched with the same value. Signed-off-by: Eli Britstein Reviewed-by: Roi Dayan --- lib/odp-util.c| 110 +- tests/mpls-xlate.at |