patch 'common/idpf: remove device stop flag' has been queued to stable release 22.11.3

Xueming Li xuemingl at nvidia.com
Sun Jun 25 08:35:25 CEST 2023


Hi,

FYI, your patch has been queued to stable release 22.11.3

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

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 1bfcca5b651551437b869401b7c9a5a53588ab0b Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang at intel.com>
Date: Thu, 20 Apr 2023 11:57:24 -0400
Subject: [PATCH] common/idpf: remove device stop flag
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit cf0a881e0b8513ed4c1ee83d9e32680d3403a455 ]

Remove device stop flag, as we already have dev->data-dev_started.
This also fixed the issue when close port directly without start it
first, some error message will be reported in dev_stop.

Fixes: 14aa6ed8f2ec ("net/idpf: support device start and stop")
Fixes: 1082a773a86b ("common/idpf: add vport structure")

Signed-off-by: Qi Zhang <qi.z.zhang at intel.com>
Acked-by: Beilei Xing <beilei.xing at intel.com>
---
 drivers/net/idpf/idpf_ethdev.c | 6 +-----
 drivers/net/idpf/idpf_ethdev.h | 2 --
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/net/idpf/idpf_ethdev.c b/drivers/net/idpf/idpf_ethdev.c
index 67d2d49490..b31cb47e90 100644
--- a/drivers/net/idpf/idpf_ethdev.c
+++ b/drivers/net/idpf/idpf_ethdev.c
@@ -563,8 +563,6 @@ idpf_dev_start(struct rte_eth_dev *dev)
 	uint16_t req_vecs_num;
 	int ret;
 
-	vport->stopped = 0;
-
 	if (dev->data->mtu > vport->max_mtu) {
 		PMD_DRV_LOG(ERR, "MTU should be less than %d", vport->max_mtu);
 		ret = -EINVAL;
@@ -622,7 +620,7 @@ idpf_dev_stop(struct rte_eth_dev *dev)
 {
 	struct idpf_vport *vport = dev->data->dev_private;
 
-	if (vport->stopped == 1)
+	if (dev->data->dev_started == 0)
 		return 0;
 
 	idpf_vc_ena_dis_vport(vport, false);
@@ -634,8 +632,6 @@ idpf_dev_stop(struct rte_eth_dev *dev)
 	if (vport->recv_vectors != NULL)
 		idpf_vc_dealloc_vectors(vport);
 
-	vport->stopped = 1;
-
 	return 0;
 }
 
diff --git a/drivers/net/idpf/idpf_ethdev.h b/drivers/net/idpf/idpf_ethdev.h
index 991677c3bc..5633057a81 100644
--- a/drivers/net/idpf/idpf_ethdev.h
+++ b/drivers/net/idpf/idpf_ethdev.h
@@ -128,7 +128,6 @@ struct idpf_vport {
 
 	uint16_t devarg_id;
 
-	bool stopped;
 };
 
 struct idpf_adapter {
@@ -164,7 +163,6 @@ struct idpf_adapter {
 	uint32_t max_txq_per_msg;
 
 	uint32_t ptype_tbl[IDPF_MAX_PKT_TYPE] __rte_cache_min_aligned;
-
 	bool rx_vec_allowed;
 	bool tx_vec_allowed;
 	bool rx_use_avx512;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:01.364044700 +0800
+++ 0107-common-idpf-remove-device-stop-flag.patch	2023-06-25 14:31:58.555773900 +0800
@@ -1 +1 @@
-From cf0a881e0b8513ed4c1ee83d9e32680d3403a455 Mon Sep 17 00:00:00 2001
+From 1bfcca5b651551437b869401b7c9a5a53588ab0b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit cf0a881e0b8513ed4c1ee83d9e32680d3403a455 ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org
@@ -17,4 +19,3 @@
- drivers/common/idpf/idpf_common_device.h | 2 --
- drivers/net/cpfl/cpfl_ethdev.c           | 6 +-----
- drivers/net/idpf/idpf_ethdev.c           | 6 +-----
- 3 files changed, 2 insertions(+), 12 deletions(-)
+ drivers/net/idpf/idpf_ethdev.c | 6 +-----
+ drivers/net/idpf/idpf_ethdev.h | 2 --
+ 2 files changed, 1 insertion(+), 7 deletions(-)
@@ -22,20 +23,7 @@
-diff --git a/drivers/common/idpf/idpf_common_device.h b/drivers/common/idpf/idpf_common_device.h
-index 22bbc16b0c..3116a8e44e 100644
---- a/drivers/common/idpf/idpf_common_device.h
-+++ b/drivers/common/idpf/idpf_common_device.h
-@@ -112,8 +112,6 @@ struct idpf_vport {
- 
- 	uint16_t devarg_id;
- 
--	bool stopped;
--
- 	bool rx_vec_allowed;
- 	bool tx_vec_allowed;
- 	bool rx_use_avx512;
-diff --git a/drivers/net/cpfl/cpfl_ethdev.c b/drivers/net/cpfl/cpfl_ethdev.c
-index ede730fd50..f1d4425ce2 100644
---- a/drivers/net/cpfl/cpfl_ethdev.c
-+++ b/drivers/net/cpfl/cpfl_ethdev.c
-@@ -798,8 +798,6 @@ cpfl_dev_start(struct rte_eth_dev *dev)
- 	if (cpfl_dev_stats_reset(dev))
- 		PMD_DRV_LOG(ERR, "Failed to reset stats");
+diff --git a/drivers/net/idpf/idpf_ethdev.c b/drivers/net/idpf/idpf_ethdev.c
+index 67d2d49490..b31cb47e90 100644
+--- a/drivers/net/idpf/idpf_ethdev.c
++++ b/drivers/net/idpf/idpf_ethdev.c
+@@ -563,8 +563,6 @@ idpf_dev_start(struct rte_eth_dev *dev)
+ 	uint16_t req_vecs_num;
+ 	int ret;
@@ -45,4 +33,4 @@
- 	return 0;
- 
- err_vport:
-@@ -817,7 +815,7 @@ cpfl_dev_stop(struct rte_eth_dev *dev)
+ 	if (dev->data->mtu > vport->max_mtu) {
+ 		PMD_DRV_LOG(ERR, "MTU should be less than %d", vport->max_mtu);
+ 		ret = -EINVAL;
+@@ -622,7 +620,7 @@ idpf_dev_stop(struct rte_eth_dev *dev)
@@ -56,4 +44,4 @@
- 	idpf_vc_vport_ena_dis(vport, false);
-@@ -828,8 +826,6 @@ cpfl_dev_stop(struct rte_eth_dev *dev)
- 
- 	idpf_vc_vectors_dealloc(vport);
+ 	idpf_vc_ena_dis_vport(vport, false);
+@@ -634,8 +632,6 @@ idpf_dev_stop(struct rte_eth_dev *dev)
+ 	if (vport->recv_vectors != NULL)
+ 		idpf_vc_dealloc_vectors(vport);
@@ -66,7 +54,5 @@
-diff --git a/drivers/net/idpf/idpf_ethdev.c b/drivers/net/idpf/idpf_ethdev.c
-index c1782c5fd3..a9d3b6905a 100644
---- a/drivers/net/idpf/idpf_ethdev.c
-+++ b/drivers/net/idpf/idpf_ethdev.c
-@@ -792,8 +792,6 @@ idpf_dev_start(struct rte_eth_dev *dev)
- 	if (idpf_dev_stats_reset(dev))
- 		PMD_DRV_LOG(ERR, "Failed to reset stats");
+diff --git a/drivers/net/idpf/idpf_ethdev.h b/drivers/net/idpf/idpf_ethdev.h
+index 991677c3bc..5633057a81 100644
+--- a/drivers/net/idpf/idpf_ethdev.h
++++ b/drivers/net/idpf/idpf_ethdev.h
+@@ -128,7 +128,6 @@ struct idpf_vport {
@@ -74,12 +60 @@
--	vport->stopped = 0;
--
- 	return 0;
- 
- err_vport:
-@@ -811,7 +809,7 @@ idpf_dev_stop(struct rte_eth_dev *dev)
- {
- 	struct idpf_vport *vport = dev->data->dev_private;
- 
--	if (vport->stopped == 1)
-+	if (dev->data->dev_started == 0)
- 		return 0;
+ 	uint16_t devarg_id;
@@ -87,2 +62,2 @@
- 	idpf_vc_vport_ena_dis(vport, false);
-@@ -822,8 +820,6 @@ idpf_dev_stop(struct rte_eth_dev *dev)
+-	bool stopped;
+ };
@@ -90 +65,3 @@
- 	idpf_vc_vectors_dealloc(vport);
+ struct idpf_adapter {
+@@ -164,7 +163,6 @@ struct idpf_adapter {
+ 	uint32_t max_txq_per_msg;
@@ -92 +69 @@
--	vport->stopped = 1;
+ 	uint32_t ptype_tbl[IDPF_MAX_PKT_TYPE] __rte_cache_min_aligned;
@@ -94,3 +71,3 @@
- 	return 0;
- }
- 
+ 	bool rx_vec_allowed;
+ 	bool tx_vec_allowed;
+ 	bool rx_use_avx512;


More information about the stable mailing list