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

Xueming Li xuemingl at nvidia.com
Sun Oct 22 16:22:48 CEST 2023


Hi,

FYI, your patch has been queued to stable release 22.11.4

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/15/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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=b33ea9e6de82eb70a606106fc0efe2314a708164

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From b33ea9e6de82eb70a606106fc0efe2314a708164 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
Cc: Xueming Li <xuemingl at nvidia.com>

[ 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 bddc3fb8df..8df632fa6e 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2160,6 +2160,10 @@ bond_ethdev_stop(struct rte_eth_dev *eth_dev)
 	eth_dev->data->dev_link.link_status = RTE_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.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-10-22 22:17:39.317724200 +0800
+++ 0139-net-bonding-fix-link-status-callback-stop.patch	2023-10-22 22:17:34.436723700 +0800
@@ -1 +1 @@
-From 615bd385b93e89e062b4e134e9cc09a79289a0f6 Mon Sep 17 00:00:00 2001
+From b33ea9e6de82eb70a606106fc0efe2314a708164 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 615bd385b93e89e062b4e134e9cc09a79289a0f6 ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org
@@ -22 +24 @@
-index aa7c911f19..c40d18d128 100644
+index bddc3fb8df..8df632fa6e 100644
@@ -25 +27 @@
-@@ -2164,6 +2164,10 @@ bond_ethdev_stop(struct rte_eth_dev *eth_dev)
+@@ -2160,6 +2160,10 @@ bond_ethdev_stop(struct rte_eth_dev *eth_dev)
@@ -30 +32 @@
-+		rte_eal_alarm_cancel(bond_ethdev_member_link_status_change_monitor,
++		rte_eal_alarm_cancel(bond_ethdev_slave_link_status_change_monitor,
@@ -34,2 +36,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