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 E7F43A0542 for ; Fri, 11 Nov 2022 11:34:20 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E335E42D14; Fri, 11 Nov 2022 11:34:20 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id A13E440150 for ; Fri, 11 Nov 2022 11:34:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668162859; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/bUZjSW/d/tBxrVcPGTiVv6pu5GWjkb9cA064tdrLxw=; b=VNzIxslmicCN0Tchgjhwleg1uz3ruxXGfoI7fkCsvbuxHGDMuS8NHOU0k/9QU5NqJSTaPj bXrH5Y9lqtOhGlwmtzqJ/NmhCG2+dD4bSmrJq2C50HqfT6Ori1BC0UTRpJT4E0tXOCL6BY iirKbassIR0lq0VHdA7DJuxEaZY83A8= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-478-KR_AaLNwMVeIDM4h8G6efw-1; Fri, 11 Nov 2022 05:34:18 -0500 X-MC-Unique: KR_AaLNwMVeIDM4h8G6efw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 74F54800B23; Fri, 11 Nov 2022 10:34:17 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.195.104]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4B641200E28F; Fri, 11 Nov 2022 10:34:15 +0000 (UTC) From: Kevin Traynor To: Ivan Malov Cc: Andrew Rybchenko , Chas Williams <3chas3@gmail.com>, dpdk stable Subject: patch 'net/bonding: fix descriptor limit reporting' has been queued to stable release 21.11.3 Date: Fri, 11 Nov 2022 10:32:58 +0000 Message-Id: <20221111103337.307408-8-ktraynor@redhat.com> In-Reply-To: <20221111103337.307408-1-ktraynor@redhat.com> References: <20221111103337.307408-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 21.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/14/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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/bef918a46822d1d61955c81eb70e3a122ca0bf20 Thanks. Kevin --- >From bef918a46822d1d61955c81eb70e3a122ca0bf20 Mon Sep 17 00:00:00 2001 From: Ivan Malov Date: Sun, 11 Sep 2022 15:19:01 +0300 Subject: [PATCH] net/bonding: fix descriptor limit reporting [ upstream commit d03c0e83cc0042dc35e37f984de15533b09e6ac9 ] Commit 5be3b40fea60 ("net/bonding: fix values of descriptor limits") breaks reporting of "nb_min" and "nb_align" values obtained from back-end devices' descriptor limits. This means that work done by eth_bond_slave_inherit_desc_lim_first() as well as eth_bond_slave_inherit_desc_lim_next() gets dismissed. Revert the offending commit and use proper workaround for the test case mentioned in the said commit. Meanwhile, the test case itself might be poorly constructed. It tries to run a bond with no back-end devices attached, but, according to [1] ("Requirements / Limitations"), at least one back-end device must be attached. [1] doc/guides/prog_guide/link_bonding_poll_mode_drv_lib.rst Fixes: 5be3b40fea60 ("net/bonding: fix values of descriptor limits") Signed-off-by: Ivan Malov Reviewed-by: Andrew Rybchenko Acked-by: Chas Williams <3chas3@gmail.com> --- drivers/net/bonding/rte_eth_bond_pmd.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 3402cb380b..c88ba2ae42 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -2202,6 +2202,4 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) uint16_t max_nb_rx_queues = UINT16_MAX; uint16_t max_nb_tx_queues = UINT16_MAX; - uint16_t max_rx_desc_lim = UINT16_MAX; - uint16_t max_tx_desc_lim = UINT16_MAX; dev_info->max_mac_addrs = BOND_MAX_MAC_ADDRS; @@ -2237,10 +2235,4 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) if (slave_info.max_tx_queues < max_nb_tx_queues) max_nb_tx_queues = slave_info.max_tx_queues; - - if (slave_info.rx_desc_lim.nb_max < max_rx_desc_lim) - max_rx_desc_lim = slave_info.rx_desc_lim.nb_max; - - if (slave_info.tx_desc_lim.nb_max < max_tx_desc_lim) - max_tx_desc_lim = slave_info.tx_desc_lim.nb_max; } } @@ -2254,6 +2246,8 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) sizeof(dev_info->default_txconf)); - dev_info->rx_desc_lim.nb_max = max_rx_desc_lim; - dev_info->tx_desc_lim.nb_max = max_tx_desc_lim; + memcpy(&dev_info->rx_desc_lim, &internals->rx_desc_lim, + sizeof(dev_info->rx_desc_lim)); + memcpy(&dev_info->tx_desc_lim, &internals->tx_desc_lim, + sizeof(dev_info->tx_desc_lim)); /** @@ -3389,4 +3383,11 @@ bond_alloc(struct rte_vdev_device *dev, uint8_t mode) memset(&internals->tx_desc_lim, 0, sizeof(internals->tx_desc_lim)); + /* + * Do not restrict descriptor counts until + * the first back-end device gets attached. + */ + internals->rx_desc_lim.nb_max = UINT16_MAX; + internals->tx_desc_lim.nb_max = UINT16_MAX; + memset(internals->active_slaves, 0, sizeof(internals->active_slaves)); memset(internals->slaves, 0, sizeof(internals->slaves)); -- 2.38.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-11 10:32:17.297630668 +0000 +++ 0008-net-bonding-fix-descriptor-limit-reporting.patch 2022-11-11 10:32:17.013300523 +0000 @@ -1 +1 @@ -From d03c0e83cc0042dc35e37f984de15533b09e6ac9 Mon Sep 17 00:00:00 2001 +From bef918a46822d1d61955c81eb70e3a122ca0bf20 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit d03c0e83cc0042dc35e37f984de15533b09e6ac9 ] + @@ -23 +24,0 @@ -Cc: stable@dpdk.org @@ -33 +34 @@ -index aee9e60d40..27005c747c 100644 +index 3402cb380b..c88ba2ae42 100644 @@ -36 +37 @@ -@@ -2206,6 +2206,4 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) +@@ -2202,6 +2202,4 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) @@ -43 +44 @@ -@@ -2241,10 +2239,4 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) +@@ -2237,10 +2235,4 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) @@ -54 +55 @@ -@@ -2258,6 +2250,8 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) +@@ -2254,6 +2246,8 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) @@ -65 +66 @@ -@@ -3394,4 +3388,11 @@ bond_alloc(struct rte_vdev_device *dev, uint8_t mode) +@@ -3389,4 +3383,11 @@ bond_alloc(struct rte_vdev_device *dev, uint8_t mode)