From patchwork Fri Oct 15 02:05:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Pattrick X-Patchwork-Id: 1541249 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=E6FjxmMm; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HVqPR0Qsqz9t0Y for ; Fri, 15 Oct 2021 13:06:01 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 401C282980; Fri, 15 Oct 2021 02:05:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kjV3XGBT8vUi; Fri, 15 Oct 2021 02:05:58 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id 8A47C80C95; Fri, 15 Oct 2021 02:05:57 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 5CA5DC0011; Fri, 15 Oct 2021 02:05:57 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists.linuxfoundation.org (Postfix) with ESMTP id B75F3C000D for ; Fri, 15 Oct 2021 02:05:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 8DE3D40012 for ; Fri, 15 Oct 2021 02:05:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp2.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.com Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cO48VWhsmkaN for ; Fri, 15 Oct 2021 02:05:54 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id 2D51340001 for ; Fri, 15 Oct 2021 02:05:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634263553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YAkfuNYPambPhHwEpKBkI9dSPJbb2H90lEyiv8eL0+s=; b=E6FjxmMmz3U5VMFyWMyFfXH8+XG9DR2kv0VsfmlCFImoUPItUl0qGdDJO5OWBRP8skWDys x9n4FEL9gTGmPRbSG4uhiK6NepRjspJfF8sYaCV6W64dxVar/bsnvzasOBONV4eB6Vb9FU vBXJtUyRkQBiNaK9xoyXUCaOG5V/tik= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-569-5zuiUEQYM7GJyVpQ7yCsww-1; Thu, 14 Oct 2021 22:05:51 -0400 X-MC-Unique: 5zuiUEQYM7GJyVpQ7yCsww-1 Received: by mail-qk1-f199.google.com with SMTP id x3-20020a05620a448300b0045e3e24de82so5849775qkp.3 for ; Thu, 14 Oct 2021 19:05:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:user-agent :mime-version:content-transfer-encoding; bh=YAkfuNYPambPhHwEpKBkI9dSPJbb2H90lEyiv8eL0+s=; b=wdBOSu2igKURTm8FWkvW6VRtAqWWix7zNnaZgY5o+HeUsM9BfGdUAiLtiM628aPvmd 92rcttX0xbw4ZSKNRIkNcxZcgzpycsaV5JY3j+VkyaOy/S8XO1cwt3ON5XQv7K7MEoyj ZSDdrGk+pOVXoNKE5kSBssa2/C4zcFV9u63jPRWItbaEMQZAcKI/LQ9yIIq5SE8dvTSo 6mHvx3jCWwXJvFLDrAHcZIIQf0QcPofEJUoVSWBWmkIJDhHaNMaVG7WHXMDpqTQjHmqg GP7M5lx5ldME9PTevKzQ0+ikHrwMxU8E25nXRDZVNGxN0XgodlHEeuoKRcHVdFGScH/W 2G4g== X-Gm-Message-State: AOAM532XWpxwL6JTGsvNQI8r30jpdaSTMxx/kPQEJdLxWqlFa3jl3yq7 KGcfL8pjyeEJUwDQJyIJweQul/GM/9aU8X/AvJg/m98xZcLIxYnCCX1jn28yChQ7X2o7c7tFC2C FJo9VoMecb14NuQUctMwdrJZT/OLNnGfmTR9Ma9u9uH1H63dIPQTwYjBLsQ== X-Received: by 2002:a05:6214:410f:: with SMTP id kc15mr9149934qvb.39.1634263550804; Thu, 14 Oct 2021 19:05:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPn8qtEo49a85CO5YVcWbsCBagYoicC//ZVeflv6eMGHsGEWY2wht7a+sRunV2VzOp/G6mfg== X-Received: by 2002:a05:6214:410f:: with SMTP id kc15mr9149917qvb.39.1634263550538; Thu, 14 Oct 2021 19:05:50 -0700 (PDT) Received: from [10.20.239.127] (199-167-117-1.ppp.storm.ca. [199.167.117.1]) by smtp.googlemail.com with ESMTPSA id t26sm1832595qkg.40.2021.10.14.19.05.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Oct 2021 19:05:50 -0700 (PDT) Message-ID: From: Mike Pattrick To: "dev@openvswitch.org" Date: Thu, 14 Oct 2021 22:05:48 -0400 User-Agent: Evolution 3.40.0-1 MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mkp@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH] ofproto-dpif: Increase dp_hash default max buckets X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Currently when a user creates an open flow group with with multiple buckets without specifying a selection type, the efficient dp_hash is only selected if there are fewer than 64 buckets. But when dp_hash is explicitly selected, up to 256 buckets are supported. While 64 buckets seems like a lot, certain OVN/Open Stack workloads could result in more than 64 buckets. For example, when using OVN to load balance. This patch increases the maximum default from 64 to 256. Signed-off-by: Mike Pattrick --- ofproto/ofproto-dpif.c | 4 ++-- utilities/ovs-ofctl.8.in | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index cba49a99e..6e8ec50ae 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, 0)) { /* 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..f5e3963cf 100644 --- a/utilities/ovs-ofctl.8.in +++ b/utilities/ovs-ofctl.8.in @@ -1084,7 +1084,7 @@ 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. +a maximum of 256 dp_hash values with sufficient accuracy. 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