diff mbox series

[ovs-dev,v3] ofproto-dpif: Increase dp_hash default max buckets.

Message ID 20211118205046.140404-1-mkp@redhat.com
State Accepted
Headers show
Series [ovs-dev,v3] ofproto-dpif: Increase dp_hash default max buckets. | expand

Checks

Context Check Description
ovsrobot/apply-robot warning apply and check: warning
ovsrobot/github-robot-_Build_and_Test success github build: passed

Commit Message

Mike Pattrick Nov. 18, 2021, 8:50 p.m. UTC
Currently when a user creates an openflow group with with multiple
buckets without specifying a selection type, the efficient dp_hash is
only selected if the user is creating fewer than 64 buckets. But when
dp_hash is explicitly selected, up to 256 buckets are supported.

While up to 64 buckets seems like a lot, certain OVN/Open Stack
workloads could result in the user creating more than 64 buckets. For
example, when using OVN to load balance. This patch increases the
default maximum from 64 to 256.

This change to the default limit doesn't affect how many buckets are
actually created, that is specified by the user when the group is
created, just how traffic is distributed across buckets.

---
Changes in v2:
   - Clarified change in manpage

Changes in v3:
   - Updated NEWS file

Signed-off-by: Mike Pattrick <mkp@redhat.com>
---
 NEWS                     | 4 ++++
 ofproto/ofproto-dpif.c   | 4 ++--
 utilities/ovs-ofctl.8.in | 5 +++--
 3 files changed, 9 insertions(+), 4 deletions(-)

Comments

0-day Robot Nov. 18, 2021, 8:58 p.m. UTC | #1
Bleep bloop.  Greetings Mike Pattrick, I am a robot and I have tried out your patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


checkpatch:
ERROR: Author Mike Pattrick <mkp@redhat.com> needs to sign off.
Lines checked: 75, Warnings: 0, Errors: 1


Please check this out.  If you feel there has been an error, please email aconole@redhat.com

Thanks,
0-day Robot
Ilya Maximets Dec. 3, 2021, 5:46 p.m. UTC | #2
On 11/18/21 21:50, Mike Pattrick wrote:
> Currently when a user creates an openflow group with with multiple
> buckets without specifying a selection type, the efficient dp_hash is
> only selected if the user is creating fewer than 64 buckets. But when
> dp_hash is explicitly selected, up to 256 buckets are supported.
> 
> While up to 64 buckets seems like a lot, certain OVN/Open Stack
> workloads could result in the user creating more than 64 buckets. For
> example, when using OVN to load balance. This patch increases the
> default maximum from 64 to 256.
> 
> This change to the default limit doesn't affect how many buckets are
> actually created, that is specified by the user when the group is
> created, just how traffic is distributed across buckets.
> 
> ---
> Changes in v2:
>    - Clarified change in manpage
> 
> Changes in v3:
>    - Updated NEWS file
> 
> Signed-off-by: Mike Pattrick <mkp@redhat.com>

Thanks, Mike and Gaetan!

I moved the 'Signed-off-by' to the correct place and added 'Acked-by'
from Gaetan from v2, since there was no code changes.

With that, applied.

Best regards, Ilya Maximets.
diff mbox series

Patch

diff --git a/NEWS b/NEWS
index 434ee570f..912e27c9e 100644
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,10 @@  Post-v2.16.0
    - ovs-dpctl and 'ovs-appctl dpctl/':
      * New commands 'cache-get-size' and 'cache-set-size' that allows to
        get or configure linux kernel datapath cache sizes.
+   - OpenFlow:
+     * Default selection method for select groups with up to 256 buckets is
+       now dp_hash. Previously this was limited to 64 buckets. This change is
+       mainly for the benefit of OVN load balancing configurations.
 
 
 v2.16.0 - 16 Aug 2021
diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
index cba49a99e..bc3df8ea1 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -5152,9 +5152,9 @@  group_set_selection_method(struct group_dpif *group)
     if (selection_method[0] == '\0') {
         VLOG_DBG("No selection method specified. Trying dp_hash.");
         /* If the controller has not specified a selection method, check if
-         * the dp_hash selection method with max 64 hash values is appropriate
+         * the dp_hash selection method with max 256 hash values is appropriate
          * for the given bucket configuration. */
-        if (group_setup_dp_hash_table(group, 64)) {
+        if (group_setup_dp_hash_table(group, 256)) {
             /* Use dp_hash selection method with symmetric L4 hash. */
             group->selection_method = SEL_METHOD_DP_HASH;
             group->hash_alg = OVS_HASH_ALG_SYM_L4;
diff --git a/utilities/ovs-ofctl.8.in b/utilities/ovs-ofctl.8.in
index 2017c6eba..94a55dbc5 100644
--- a/utilities/ovs-ofctl.8.in
+++ b/utilities/ovs-ofctl.8.in
@@ -1083,8 +1083,9 @@  This field is optional for \fBadd\-group\fR, \fBadd\-groups\fR and
 otherwise.  If no selection method is specified, Open vSwitch up to
 release 2.9 applies the \fBhash\fR method with default fields. From
 2.10 onwards Open vSwitch defaults to the \fBdp_hash\fR method with symmetric
-L3/L4 hash algorithm, unless the weighted group buckets cannot be mapped to
-a maximum of 64 dp_hash values with sufficient accuracy.
+L3/L4 hash algorithm, as long as the weighted group buckets can be mapped to
+dp_hash values with sufficient accuracy. In 2.10 this was restricted to a
+maximum of 64 buckets, and in 2.17 the limit was raised to 256 buckets.
 In those rare cases Open vSwitch 2.10 and later fall back to the \fBhash\fR
 method with the default set of hash fields.
 .RS