Ben Pfaff wrote: > 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.
hi Ben,this patch depends on commit 0b4caa2eba22a516a312e7b404107eaebe618ee1 (ofp-group: support to insert bucket with weight value for select type)on branch-2.10. Could you pick commit 0b4caa2eba22 into brnach-2.10 also? > _______________________________________________ > dev mailing list > [email protected] > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
