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 4845FA034C for ; Fri, 25 Feb 2022 18:17:02 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 408DB4114F; Fri, 25 Feb 2022 18:17:02 +0100 (CET) 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 CC30B410FD for ; Fri, 25 Feb 2022 18:17:00 +0100 (CET) Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.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 A62CC3F1D9 for ; Fri, 25 Feb 2022 17:17:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1645809420; bh=zyqN8OBo7zwwF+Bw6Y+/j1hrJArvnvCsTwcW7QqGPkE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=n1c0j2urhFoVzlh4ogpxX0q5VvTJebWCJaz87lwxejFLyFqbm6khZ0rzYJ+9DmlP5 TpW9zH7uCsuzxY/MI7p3nMSMO7kxmpJgrrQmvxLFlVW+rYq9iwmyfXvc7m/vmJIj1O I7qONzdD/i9OSkg0p5x1wAnCXv55sUU5JEH2vfWRfcsMAC9yWYOla0H/CEtgAZcyR0 F5G16nl7FK5wW3wiV39mfre1Yg+ngDgLmB47GR5YbL3xoyQPkcRCyYMzy0mPCBomHw to6u/oJfqbGvwKtKHx88YBJQ1CMMOqtRIxSFC7/3RrJR7HeLExriTHPmNWB+8XAbdz +0KDa4GKzukxw== Received: by mail-wr1-f72.google.com with SMTP id j27-20020adfb31b000000b001ea8356972bso1118455wrd.1 for ; Fri, 25 Feb 2022 09:17:00 -0800 (PST) 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=zyqN8OBo7zwwF+Bw6Y+/j1hrJArvnvCsTwcW7QqGPkE=; b=1lVx+ojF/mdMwOaRyt/VOHCQGhChhPSVgRrd5CjUfBQFT1lqgfyjH2vyvaoA6UC2j3 DILe0XKGF/Xs0WAkz0nlc2/J1gEVu8y1Qu1AxYN3DRFoRlANGVmUxA8zDTKqClxi8Vop Ip9vrPVdDq0s/hompaeqg+LeVvpvf8uJ624aFyM40ebEVszRGyAd2olbLj7tZXGZa/Ay vONCeKj6dYEmmyOf2T9ve9SipzceHPC+n8nQYUPgWMH0rHhZbHAgREnu3CGXcWq03YZd rd/3/LH4PVHz6S/uwjcLXiKcxTUJH/AHMuleY0IvwYZS39o02V8ZbflOPZxGO07UnXOG kw+w== X-Gm-Message-State: AOAM533a9KTfLypsWHmLzH+bFfzaNdMGy//OXVmC0lA6Sposr7se7RGx gv8vTmhMAVqsf8i2Hj530baBJfaKMZiM8g9WgI7xUJI7wFKCy3CfbJTxGNTiijHA+WNW4SRRGNp sJqn7cBNGb65RwNeuvpAkkEXN X-Received: by 2002:a05:600c:511d:b0:380:e340:bfaf with SMTP id o29-20020a05600c511d00b00380e340bfafmr3561019wms.159.1645809419536; Fri, 25 Feb 2022 09:16:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJyyGd73DrL2Z7A4kV+26xGMDXS0KisogLwnoONEOefw/z5BJTMGeny1qvbbfFDJFqRieDCa7w== X-Received: by 2002:a05:600c:511d:b0:380:e340:bfaf with SMTP id o29-20020a05600c511d00b00380e340bfafmr3561008wms.159.1645809419314; Fri, 25 Feb 2022 09:16:59 -0800 (PST) Received: from Keschdeichel.fritz.box (068-133-067-156.ip-addr.inexio.net. [156.67.133.68]) by smtp.gmail.com with ESMTPSA id bj8-20020a0560001e0800b001edbf1b462asm2745162wrb.77.2022.02.25.09.16.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Feb 2022 09:16:58 -0800 (PST) From: christian.ehrhardt@canonical.com To: Yu Wenjun Cc: Min Hu , dpdk stable Subject: patch 'net/bonding: fix RSS with early configure' has been queued to stable release 19.11.12 Date: Fri, 25 Feb 2022 18:15:17 +0100 Message-Id: <20220225171550.3499040-24-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.35.0 In-Reply-To: <20220225171550.3499040-1-christian.ehrhardt@canonical.com> References: <20220225171550.3499040-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.12 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/27/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/21e65fa8ece81729c5e48e070c8aca9bc5d7d670 Thanks. Christian Ehrhardt --- >From 21e65fa8ece81729c5e48e070c8aca9bc5d7d670 Mon Sep 17 00:00:00 2001 From: Yu Wenjun Date: Tue, 18 Jan 2022 17:18:52 +0800 Subject: [PATCH] net/bonding: fix RSS with early configure [ upstream commit 4986aea2b879fb242ae04880eb0ed958f40d199a ] RSS don't work when bond_ethdev_configure called before rte_eth_bond_slave_add. This is because internals->rss_key_len is 0 in bond_ethdev_configure(). If internals->rss_key_len is 0, internals->rss_key can not be set properly. e.g.: doesn't work (examples/bond/main.c): rte_eth_bond_create() rte_eth_dev_configure() rte_eth_bond_slave_add() rte_eth_dev_start() works (testpmd): rte_eth_bond_create() rte_eth_bond_slave_add() rte_eth_dev_configure() rte_eth_dev_start() Fixing by using 'default_rss_key' when 'internals->rss_key_len' is 0. Fixes: 6b1a001ec546 ("net/bonding: fix RSS key length") Signed-off-by: Yu Wenjun Acked-by: Min Hu (Connor) --- drivers/net/bonding/rte_eth_bond_pmd.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index a9d81fe936..4ec90c0422 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -3491,6 +3491,11 @@ bond_ethdev_configure(struct rte_eth_dev *dev) if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS) { struct rte_eth_rss_conf *rss_conf = &dev->data->dev_conf.rx_adv_conf.rss_conf; + + if (internals->rss_key_len == 0) { + internals->rss_key_len = sizeof(default_rss_key); + } + if (rss_conf->rss_key != NULL) { if (internals->rss_key_len > rss_conf->rss_key_len) { RTE_BOND_LOG(ERR, "Invalid rss key length(%u)", -- 2.35.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-25 16:58:45.210292893 +0100 +++ 0024-net-bonding-fix-RSS-with-early-configure.patch 2022-02-25 16:58:44.232990405 +0100 @@ -1 +1 @@ -From 4986aea2b879fb242ae04880eb0ed958f40d199a Mon Sep 17 00:00:00 2001 +From 21e65fa8ece81729c5e48e070c8aca9bc5d7d670 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 4986aea2b879fb242ae04880eb0ed958f40d199a ] + @@ -29 +30,0 @@ -Cc: stable@dpdk.org @@ -38 +39 @@ -index 9607141b39..c72fc64806 100644 +index a9d81fe936..4ec90c0422 100644 @@ -41,2 +42,2 @@ -@@ -3511,6 +3511,11 @@ bond_ethdev_configure(struct rte_eth_dev *dev) - if (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS) { +@@ -3491,6 +3491,11 @@ bond_ethdev_configure(struct rte_eth_dev *dev) + if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS) {