From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 66F84A0540 for ; Thu, 7 Jul 2022 09:56:08 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5F39B427F0; Thu, 7 Jul 2022 09:56:08 +0200 (CEST) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id 689D44282B for ; Thu, 7 Jul 2022 09:56:06 +0200 (CEST) Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 31E0D40A8D for ; Thu, 7 Jul 2022 07:56:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1657180566; bh=ulwrIpj8jGtDTsoqYTPL9gGc2dWsJbApmcp+1FG5Fwk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=fj+QT1t89Ff9lZN9cNDJvnXutnSfAm8wXc6b+mDsNo+vUMYv5lCNlvbTjfUP+taYI X/AUXb0c4ZZX5XVriZXC2CJszi7Z7NacMkQ0Y5UiVChP7dY/iF0ZphTUiX0vBHddkU m+JsN0EakpgPXP0iDJKXq+bVf1TI+WUEw1dnQiggHzU/DXeR3I1lbRLq5PYk0FqjNC zjpM1+DyfkLc6ebugfNQTqcDDrQ2fSouL02yJQDOGvIkNqf1c57xEdcUEWD7J9oZuA ZM7pEspEhp3GuJOKhj4SZVkxo3jiROrAqgfSsRGRBZbTGZ0OmICWo/DcPkyHURwFhi 0YL2pyRvO3iNA== Received: by mail-ej1-f72.google.com with SMTP id k7-20020a1709062a4700b006fe92440164so4481002eje.23 for ; Thu, 07 Jul 2022 00:56:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ulwrIpj8jGtDTsoqYTPL9gGc2dWsJbApmcp+1FG5Fwk=; b=BaovSAg7Ynb4QDu3VwFqiljG0C37EvV+IlZxiKZiEyrYJE8/d5gH0za8ZT9mtEBOvr VY4wV6B0xX/xjyAwyHp9JPO0+cOHeEahdI894kBA7a3Ef6DfEDIFvZZVBV3AxVJRVFdA x+In8IEO59mebLJcv5Bsi+oKu6WtIiMWWViQ5pMq56eYGpqu/kRSdmGJ9oG4wBRuFuTN UC8FgMFaEVRW4qEjZ8dWd6h6wPmZs9dLniPg6D/jCKGQWull6Vqrtu6Z8MVSVTbBXV6u rvEaD0UHgxfU3D5b1kkpJtgZ1hq67f4cE0Q6ozr7qYkCXSmY5RAmVPn6XeSC23wGlvon jJlA== X-Gm-Message-State: AJIora84UpiQmipSgacbP9AZ5iAzM7h0POOkEcEygiCBchDMP42FmV9H jeRkfr4FFXKQ7fTMq3s8dN4YSaLTQBgJ2jNEvToctCsxnBA+xdunfqsBA37oiQw0CFjGMhTFudF Y19rIKgjz237EjL8ENYsxK/lF X-Received: by 2002:a05:6402:27d1:b0:436:dd8:a6d5 with SMTP id c17-20020a05640227d100b004360dd8a6d5mr61286654ede.342.1657180565705; Thu, 07 Jul 2022 00:56:05 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vpKUSp2RaK3RRRwNNurutQAxBrfS0gFYBqwpy85/Tp3D+OsjkidzrGuTZBBolUflDsCU9aCg== X-Received: by 2002:a05:6402:27d1:b0:436:dd8:a6d5 with SMTP id c17-20020a05640227d100b004360dd8a6d5mr61286639ede.342.1657180565526; Thu, 07 Jul 2022 00:56:05 -0700 (PDT) Received: from Keschdeichel.fritz.box ([2a02:6d40:3a4f:7b00:c19b:938e:7c97:afe2]) by smtp.gmail.com with ESMTPSA id er13-20020a056402448d00b0043a5bcf80a2sm8531080edb.60.2022.07.07.00.56.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jul 2022 00:56:04 -0700 (PDT) From: christian.ehrhardt@canonical.com To: Ke Zhang Cc: Min Hu , dpdk stable Subject: patch 'net/bonding: fix RSS key config with extended key length' has been queued to stable release 19.11.13 Date: Thu, 7 Jul 2022 09:54:10 +0200 Message-Id: <20220707075522.194223-15-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220707075522.194223-1-christian.ehrhardt@canonical.com> References: <20220707075522.194223-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 19.11.13 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/09/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/b1355507e2197eff20d646146f4236f7e5b0cb11 Thanks. Christian Ehrhardt --- >From b1355507e2197eff20d646146f4236f7e5b0cb11 Mon Sep 17 00:00:00 2001 From: Ke Zhang Date: Mon, 11 Apr 2022 05:40:03 +0000 Subject: [PATCH] net/bonding: fix RSS key config with extended key length [ upstream commit 94d9c7d45b43fd44af718b621fa52e556028aa3d ] When creating a bonding device, if the slave device's RSS key length = standard_rss_key length + extended_hash_key length, then bonding device will be same as slave, in function bond_ethdev_configure(), the default_rss_key length is 40, it is not matched, so it should calculate a new key for bonding device if the default key could not be used. Fixes: 6b1a001ec546 ("net/bonding: fix RSS key length") Signed-off-by: Ke Zhang Acked-by: Min Hu (Connor) --- drivers/net/bonding/rte_eth_bond_pmd.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 5b1507e817..2c55621740 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -3577,13 +3577,18 @@ bond_ethdev_configure(struct rte_eth_dev *dev) internals->rss_key_len); } else { if (internals->rss_key_len > sizeof(default_rss_key)) { - RTE_BOND_LOG(ERR, - "There is no suitable default hash key"); - return -EINVAL; + /* + * If the rss_key includes standard_rss_key and + * extended_hash_key, the rss key length will be + * larger than default rss key length, so it should + * re-calculate the hash key. + */ + for (i = 0; i < internals->rss_key_len; i++) + internals->rss_key[i] = (uint8_t)rte_rand(); + } else { + memcpy(internals->rss_key, default_rss_key, + internals->rss_key_len); } - - memcpy(internals->rss_key, default_rss_key, - internals->rss_key_len); } for (i = 0; i < RTE_DIM(internals->reta_conf); i++) { -- 2.37.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-07-07 09:54:11.842701445 +0200 +++ 0015-net-bonding-fix-RSS-key-config-with-extended-key-len.patch 2022-07-07 09:54:10.813823679 +0200 @@ -1 +1 @@ -From 94d9c7d45b43fd44af718b621fa52e556028aa3d Mon Sep 17 00:00:00 2001 +From b1355507e2197eff20d646146f4236f7e5b0cb11 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 94d9c7d45b43fd44af718b621fa52e556028aa3d ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index b305b6a35b..5cbe89031b 100644 +index 5b1507e817..2c55621740 100644 @@ -26 +27 @@ -@@ -3617,13 +3617,18 @@ bond_ethdev_configure(struct rte_eth_dev *dev) +@@ -3577,13 +3577,18 @@ bond_ethdev_configure(struct rte_eth_dev *dev)