[ovs-dev] [PATCH] ovs: fix the bug of bucket counter is not updated

Ilya Maximets i.maximets at samsung.com
Tue Mar 26 08:16:19 UTC 2019


> On Thu, Mar 21, 2019 at 10:41:05AM +0800, solomon wrote:
>> Ben Pfaff wrote:
>> > On Wed, Mar 20, 2019 at 08:16:18PM +0800, Li Wei wrote:
>> >>
>> >> After inserting/removing a bucket, we don't update the bucket counter.
>> >> When we call ovs-ofctl dump-group-stats br-int, a panic happened.
>> > 
>> > Thanks for the patch!  It looks correct to me.  Thank you for adding a
>> > test, too.
>> > 
>> > I took a closer look and I saw that 'n_buckets' is not very useful,
>> > because it is only used in cases where the code is already
>> > O(n_buckets).  I think that we can just remove it.  Then it cannot get
>> > out-of-sync.  What do you think of this variation of your patch?
>> 
>> 
>> ovs_list_size() will traversing the list to get the total length.
>> 
>> In our custom scheduling algorithms (eg wrr, least-connection), 
>> we need to know the total number of buckets before traversing the bucket list to hit target bucket. 
>> so, it is traversed twice.
>> 
>> If the number of buckets reaches 100+, there are tens of thousands of groups, don't this modification affect performance?
>> 
>> I hope to keep n_buckets in struct ofgroup.
> 
> OK.
> 
> I applied the original to master and backported as far as branch-2.6.

This patch broke the testsuite on branches 2.6 to 2.10.

Best regards, Ilya Maximets.


More information about the dev mailing list