On 5 Jan 2023, at 12:42, Ilya Maximets wrote:

> On 1/5/23 11:48, Eelco Chaudron wrote:
>>
>>
>> On 4 Jan 2023, at 19:36, Michael Santana wrote:
>>
>>> On 12/22/22 03:58, 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.
>>> This feels like it's missing some context. What kind of statistics are you 
>>> seeing with using all zeros?
>>
>> Not sure I understand your question, but we put in zero stats when calling 
>> revalidate_ukey(), i.e., memset(&stats, 0, sizeof stats).
>>
>> This is all internal revalidate handling, we do not see any stats from a 
>> user perspective.
>
> I guess the question was: What kind of bad behavior you see
> when stats are zeroed out?  i.e. more details on the motivation
> for the patch.  At least, that is what I would ask.
>
> This information might be very useful in the commit message
> for someone trying to debug similar issues or just trying to
> understand what is going on in this code.  It's hard to tell
> right away why zero stats are bad in this scenario.

ACK, will send a v2 with some more clarification.

>
> Best regards, Ilya Maximets.
>
>>
>>>>
>>>> Signed-off-by: Eelco Chaudron <[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 464c304a8..7144b2945 100644
>>>> --- a/ofproto/ofproto-dpif-upcall.c
>>>> +++ b/ofproto/ofproto-dpif-upcall.c
>>>> @@ -2878,7 +2878,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, false);
>>>>                   }
>>>>

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

Reply via email to