patch 'net/bonding: fix link status callback stop' has been queued to stable release 20.11.10

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Oct 19 01:59:29 CEST 2023


Hi,

FYI, your patch has been queued to stable release 20.11.10

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 10/21/23. 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f709931ab05eb6ce1b98ce0820ff03460e900f48

Thanks.

Luca Boccassi

---
>From f709931ab05eb6ce1b98ce0820ff03460e900f48 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand at redhat.com>
Date: Mon, 16 Oct 2023 10:47:43 +0200
Subject: [PATCH] net/bonding: fix link status callback stop

[ upstream commit 615bd385b93e89e062b4e134e9cc09a79289a0f6 ]

If a bonding port gets released, a link status alarm callback still
referenced the ethdev port that may be reused later.
Cancel this callback when stopping the port.

Bugzilla ID: 1301
Fixes: a45b288ef21a ("bond: support link status polling")

Signed-off-by: David Marchand <david.marchand at redhat.com>
Acked-by: Chengwen Feng <fengchengwen at huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit at amd.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 3dcdae72b6..0c9a1df000 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2114,6 +2114,10 @@ bond_ethdev_stop(struct rte_eth_dev *eth_dev)
 	eth_dev->data->dev_link.link_status = ETH_LINK_DOWN;
 	eth_dev->data->dev_started = 0;
 
+	if (internals->link_status_polling_enabled) {
+		rte_eal_alarm_cancel(bond_ethdev_slave_link_status_change_monitor,
+			(void *)&rte_eth_devices[internals->port_id]);
+	}
 	internals->link_status_polling_enabled = 0;
 	for (i = 0; i < internals->slave_count; i++) {
 		uint16_t slave_id = internals->slaves[i].port_id;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-10-19 00:28:58.246966078 +0100
+++ 0040-net-bonding-fix-link-status-callback-stop.patch	2023-10-19 00:28:56.309806953 +0100
@@ -1 +1 @@
-From 615bd385b93e89e062b4e134e9cc09a79289a0f6 Mon Sep 17 00:00:00 2001
+From f709931ab05eb6ce1b98ce0820ff03460e900f48 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 615bd385b93e89e062b4e134e9cc09a79289a0f6 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -22 +23 @@
-index aa7c911f19..c40d18d128 100644
+index 3dcdae72b6..0c9a1df000 100644
@@ -25,2 +26,2 @@
-@@ -2164,6 +2164,10 @@ bond_ethdev_stop(struct rte_eth_dev *eth_dev)
- 	eth_dev->data->dev_link.link_status = RTE_ETH_LINK_DOWN;
+@@ -2114,6 +2114,10 @@ bond_ethdev_stop(struct rte_eth_dev *eth_dev)
+ 	eth_dev->data->dev_link.link_status = ETH_LINK_DOWN;
@@ -30 +31 @@
-+		rte_eal_alarm_cancel(bond_ethdev_member_link_status_change_monitor,
++		rte_eal_alarm_cancel(bond_ethdev_slave_link_status_change_monitor,
@@ -34,2 +35,2 @@
- 	for (i = 0; i < internals->member_count; i++) {
- 		uint16_t member_id = internals->members[i].port_id;
+ 	for (i = 0; i < internals->slave_count; i++) {
+ 		uint16_t slave_id = internals->slaves[i].port_id;


More information about the stable mailing list