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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Nov 3 10:26:47 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/05/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/2727671dc9f52bce9c4f70eabd7787073dafcbca

Thanks.

Luca Boccassi

---
>From 2727671dc9f52bce9c4f70eabd7787073dafcbca 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 5daa7ddcfd..4f59d80ac3 100644
--- a/drivers/net/i40e/i40e_vf_representor.c
+++ b/drivers/net/i40e/i40e_vf_representor.c
@@ -29,8 +29,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;
@@ -102,7 +100,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.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-11-03 09:27:27.185455482 +0000
+++ 0029-net-i40e-fix-VF-representor-release.patch	2022-11-03 09:27:25.365422286 +0000
@@ -1 +1 @@
-From ba10df53e486ef7918c1236ef4d8da16ae3a32e1 Mon Sep 17 00:00:00 2001
+From 2727671dc9f52bce9c4f70eabd7787073dafcbca 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 5daa7ddcfd..4f59d80ac3 100644
@@ -37 +38 @@
-@@ -104,7 +102,7 @@ i40e_vf_representor_dev_infos_get(struct rte_eth_dev *ethdev,
+@@ -102,7 +100,7 @@ i40e_vf_representor_dev_infos_get(struct rte_eth_dev *ethdev,


More information about the stable mailing list