patch 'net/bonding: set initial value of descriptor count alignment' has been queued to stable release 20.11.7

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Nov 18 00:08:25 CET 2022


Hi,

FYI, your patch has been queued to stable release 20.11.7

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/19/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/03170e37415b218d6c4e3d92d7d4bb84edb63b49

Thanks.

Luca Boccassi

---
>From 03170e37415b218d6c4e3d92d7d4bb84edb63b49 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov at oktetlabs.ru>
Date: Mon, 31 Oct 2022 16:17:44 +0300
Subject: [PATCH] net/bonding: set initial value of descriptor count alignment

[ upstream commit 550e8d6d340f93882e4a1183314fd5f4a408595f ]

The driver had once been broken by patch [1] looking to have
a non-zero "nb_max" value in a use case not involving adding
any back-end ports. That was addressed afterwards ([2]). But,
as per report [3], similar test cases exist which attempt to
setup Rx queues on a void bond before attaching any back-end
ports. Rx queue setup, in turn, involves device info get API
invocation, and one of the checks on received data causes an
exception (division by zero). The "nb_align" value is indeed
zero at that time, but, as explained in [2], such test cases
are totally incorrect since a bond device must have at least
one back-end port plugged before any ethdev APIs can be used.

Once again, to avoid any problems with fixing the test cases,
this patch adjusts the bond PMD itself to workaround the bug.

[1] commit 5be3b40fea60 ("net/bonding: fix values of descriptor limits")
[2] commit d03c0e83cc00 ("net/bonding: fix descriptor limit reporting")
[3] https://bugs.dpdk.org/show_bug.cgi?id=1118

Bugzilla ID: 1118
Fixes: d03c0e83cc00 ("net/bonding: fix descriptor limit reporting")

Signed-off-by: Ivan Malov <ivan.malov at oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
Acked-by: Min Hu (Connor) <humin29 at huawei.com>
Tested-by: Weiyuan Li <weiyuanx.li at intel.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index d5dac1ef3e..d8172be041 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3375,6 +3375,8 @@ bond_alloc(struct rte_vdev_device *dev, uint8_t mode)
 	 */
 	internals->rx_desc_lim.nb_max = UINT16_MAX;
 	internals->tx_desc_lim.nb_max = UINT16_MAX;
+	internals->rx_desc_lim.nb_align = 1;
+	internals->tx_desc_lim.nb_align = 1;
 
 	memset(internals->active_slaves, 0, sizeof(internals->active_slaves));
 	memset(internals->slaves, 0, sizeof(internals->slaves));
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-11-17 23:07:55.588100067 +0000
+++ 0001-net-bonding-set-initial-value-of-descriptor-count-al.patch	2022-11-17 23:07:55.400328295 +0000
@@ -1 +1 @@
-From 550e8d6d340f93882e4a1183314fd5f4a408595f Mon Sep 17 00:00:00 2001
+From 03170e37415b218d6c4e3d92d7d4bb84edb63b49 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 550e8d6d340f93882e4a1183314fd5f4a408595f ]
+
@@ -27 +28,0 @@
-Cc: stable at dpdk.org
@@ -38 +39 @@
-index bd25040851..e0da1fa7c9 100644
+index d5dac1ef3e..d8172be041 100644
@@ -41 +42 @@
-@@ -3431,6 +3431,8 @@ bond_alloc(struct rte_vdev_device *dev, uint8_t mode)
+@@ -3375,6 +3375,8 @@ bond_alloc(struct rte_vdev_device *dev, uint8_t mode)


More information about the stable mailing list