patch 'net/i40e: fix VF representor release' has been queued to stable release 19.11.14

christian.ehrhardt at canonical.com christian.ehrhardt at canonical.com
Fri Nov 11 12:38:35 CET 2022


Hi,

FYI, your patch has been queued to stable release 19.11.14

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/18/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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/da62944cd52661d4ce91ccb8ea4be7434d6ff223

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From da62944cd52661d4ce91ccb8ea4be7434d6ff223 Mon Sep 17 00:00:00 2001
From: Ke Zhang <ke1x.zhang at intel.com>
Date: Thu, 4 Aug 2022 17:50:03 +0800
Subject: [PATCH] net/i40e: fix VF representor release

[ upstream commit ba10df53e486ef7918c1236ef4d8da16ae3a32e1 ]

A segmentation fault occurs when testpmd exit.

This is due to fetching the device name from PF, PF
is freed firstly and then VF representor is called
later.

This commit fixes the bug by fetching the device
name from VF representor instead of PF.

Fixes: e391a7b7f815 ("net/i40e: fix multi-process shared data")

Signed-off-by: Ke Zhang <ke1x.zhang at intel.com>
Acked-by: Yuying Zhang <yuying.zhang at intel.com>
---
 drivers/net/i40e/i40e_vf_representor.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/i40e/i40e_vf_representor.c b/drivers/net/i40e/i40e_vf_representor.c
index 40065e1524..ca083e0ee3 100644
--- a/drivers/net/i40e/i40e_vf_representor.c
+++ b/drivers/net/i40e/i40e_vf_representor.c
@@ -28,8 +28,6 @@ i40e_vf_representor_dev_infos_get(struct rte_eth_dev *ethdev,
 	struct rte_eth_dev_info *dev_info)
 {
 	struct i40e_vf_representor *representor = ethdev->data->dev_private;
-	struct rte_eth_dev_data *pf_dev_data =
-		representor->adapter->pf.dev_data;
 
 	/* get dev info for the vdev */
 	dev_info->device = ethdev->device;
@@ -101,7 +99,7 @@ i40e_vf_representor_dev_infos_get(struct rte_eth_dev *ethdev,
 	};
 
 	dev_info->switch_info.name =
-		rte_eth_devices[pf_dev_data->port_id].device->name;
+		rte_eth_devices[ethdev->data->port_id].device->name;
 	dev_info->switch_info.domain_id = representor->switch_domain_id;
 	dev_info->switch_info.port_id = representor->vf_id;
 
-- 
2.38.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-11-11 12:35:05.432527510 +0100
+++ 0018-net-i40e-fix-VF-representor-release.patch	2022-11-11 12:35:04.745191908 +0100
@@ -1 +1 @@
-From ba10df53e486ef7918c1236ef4d8da16ae3a32e1 Mon Sep 17 00:00:00 2001
+From da62944cd52661d4ce91ccb8ea4be7434d6ff223 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ba10df53e486ef7918c1236ef4d8da16ae3a32e1 ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -25 +26 @@
-index cc0f992453..c00ae832aa 100644
+index 40065e1524..ca083e0ee3 100644
@@ -28 +29 @@
-@@ -29,8 +29,6 @@ i40e_vf_representor_dev_infos_get(struct rte_eth_dev *ethdev,
+@@ -28,8 +28,6 @@ i40e_vf_representor_dev_infos_get(struct rte_eth_dev *ethdev,
@@ -37 +38 @@
-@@ -104,7 +102,7 @@ i40e_vf_representor_dev_infos_get(struct rte_eth_dev *ethdev,
+@@ -101,7 +99,7 @@ i40e_vf_representor_dev_infos_get(struct rte_eth_dev *ethdev,


More information about the stable mailing list