On 15 Feb 2023, at 21:04, Ilya Maximets wrote:

> On 1/11/23 19:36, Michael Santana wrote:
>>
>>
>> On 1/5/23 08:56, Eelco Chaudron wrote:
>>> Instead of using all zero stats when executing a revalidate for missed
>>> dp flows, use the last known stats to avoid odd statistics being used.
>>>
>>> As these zero stats are stored in the ukey, the next time revalidate_ukey()
>>> is called the delta between the new stats and the zero stats is used, which
>>> would cause an additional increase in total packets/bytes.
>> Okay, this makes a lot more sense. If we set it to 0 then it would be as if 
>> all the stats were suddenly dropped to 0 which is not the case. Using the 
>> the last known value makes more sense.
>>>
>>> In addition if the 'ofproto-dpif-upcall: Don't set statistics to 0 when
>>> they jump back' patch get's applied, the packet count will become
>>> even more exotic, as 0 - 'a few packets' results in a huge value
>>> for stats to be pushed.
>>>
>>> Signed-off-by: Eelco Chaudron <[email protected]>
>> Acked-by: Michael Santana <[email protected]>
>>> ---
>>>   ofproto/ofproto-dpif-upcall.c |    2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c
>>> index be3c894b4..886ba54b8 100644
>>> --- a/ofproto/ofproto-dpif-upcall.c
>>> +++ b/ofproto/ofproto-dpif-upcall.c
>>> @@ -2879,7 +2879,7 @@ revalidator_sweep__(struct revalidator *revalidator, 
>>> bool purge)
>>>                   } else {
>>>                       struct dpif_flow_stats stats;
>>>                       COVERAGE_INC(revalidate_missed_dp_flow);
>>> -                    memset(&stats, 0, sizeof stats);
>>> +                    memcpy(&stats, &ukey->stats, sizeof stats);
>>>                       result = revalidate_ukey(udpif, ukey, &stats, 
>>> &odp_actions,
>>>                                                reval_seq, &recircs);
>>>                   }
>>>
>
> I don't know which branch this patch is based on, but it's
> certainly not master or anything down to 2.17.  And I'm not
> sure how our CI was able to apply it...
>
> Anyway, I rebased it manually and applied.
> Backported down to 2.17.

Thanks, yes I might have based this on top of some of the other revalidator 
fixes I was working on :(

> Thanks!
>
> Best regards, Ilya Maximets.

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to