patch 'net/ixgbe: do not update link status in secondary process' has been queued to stable release 21.11.8

Kevin Traynor ktraynor at redhat.com
Fri Aug 23 18:17:48 CEST 2024


Hi,

FYI, your patch has been queued to stable release 21.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. 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/1d72c067059e2731649c2458a5820d2093328a7b

Thanks.

Kevin

---
>From 1d72c067059e2731649c2458a5820d2093328a7b Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Wed, 20 Mar 2024 10:33:04 -0700
Subject: [PATCH] net/ixgbe: do not update link status in secondary process

[ upstream commit 5ffd40b85febd2a80b88b4cfbf4e1dd7e5f059c5 ]

The code to update link status is not safe in secondary process.
If called from secondary it will crash, example from dumpcap:
	ixgbe_dev_link_update_share()
	ixgbe_dev_link_update()
	rte_eth_link_get()

Fixes: af75078fece3 ("first public release")

Reported-by: Jun Wang <junwang01 at cestc.cn>
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 96dc34eb83..1c65cf77f5 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -4286,4 +4286,7 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
 	u32 esdp_reg;
 
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -1;
+
 	memset(&link, 0, sizeof(link));
 	link.link_status = RTE_ETH_LINK_DOWN;
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.131644456 +0100
+++ 0040-net-ixgbe-do-not-update-link-status-in-secondary-pro.patch	2024-08-23 17:18:09.685429983 +0100
@@ -1 +1 @@
-From 5ffd40b85febd2a80b88b4cfbf4e1dd7e5f059c5 Mon Sep 17 00:00:00 2001
+From 1d72c067059e2731649c2458a5820d2093328a7b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5ffd40b85febd2a80b88b4cfbf4e1dd7e5f059c5 ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -23 +24 @@
-index bbdc996f31..a6916da0c5 100644
+index 96dc34eb83..1c65cf77f5 100644
@@ -26 +27 @@
-@@ -4294,4 +4294,7 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
+@@ -4286,4 +4286,7 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,



More information about the stable mailing list