patch 'net/bonding: fix descriptor limit reporting' has been queued to stable release 21.11.3

Kevin Traynor ktraynor at redhat.com
Fri Nov 11 11:32:58 CET 2022


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 <ivan.malov at oktetlabs.ru>
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 <ivan.malov at oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
Acked-by: Chas Williams <3chas3 at 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 at 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)



More information about the stable mailing list