patch 'net/ice: fix TM configuration clearing' has been queued to stable release 21.11.6

Kevin Traynor ktraynor at redhat.com
Thu Nov 2 14:12:04 CET 2023


Hi,

FYI, your patch has been queued to stable release 21.11.6

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/08/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://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/28ddcaf4a6195f728cb5ead6a8e529f82dd525e6

Thanks.

Kevin

---
>From 28ddcaf4a6195f728cb5ead6a8e529f82dd525e6 Mon Sep 17 00:00:00 2001
From: Kaiwen Deng <kaiwenx.deng at intel.com>
Date: Wed, 6 Sep 2023 15:49:30 +0800
Subject: [PATCH] net/ice: fix TM configuration clearing

[ upstream commit c21a6a3ff6c49965d4373677255058d041dafe96 ]

When the device is stopped, the PMD resets the commit flag so that
we can update the hierarchy configuration. The commit flag is also
used to determine if the hierarchy configuration needs to be cleared.
When the PMD exits, it always stops the device first and also resets
the commit flag result in the hierarchy configuration is not cleared.

This commit changes the PMD to not reset the commit flag when the
device is stopped. And we prevent additional commit when device is
running by only checking the stop flag.

Fixes: f5ec6a3a1987 ("net/ice: fix TM hierarchy commit flag reset")

Signed-off-by: Kaiwen Deng <kaiwenx.deng at intel.com>
Acked-by: Wenjun Wu <wenjun1.wu at intel.com>
---
 drivers/net/ice/ice_dcf_ethdev.c |  2 --
 drivers/net/ice/ice_dcf_sched.c  | 14 ++++++++------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c
index 20888f1980..8954dc0f8d 100644
--- a/drivers/net/ice/ice_dcf_ethdev.c
+++ b/drivers/net/ice/ice_dcf_ethdev.c
@@ -612,5 +612,4 @@ ice_dcf_dev_stop(struct rte_eth_dev *dev)
 	struct rte_intr_handle *intr_handle = dev->intr_handle;
 	struct ice_adapter *ad = &dcf_ad->parent;
-	struct ice_dcf_hw *hw = &dcf_ad->real_hw;
 
 	if (ad->pf.adapter_stopped == 1) {
@@ -630,5 +629,4 @@ ice_dcf_dev_stop(struct rte_eth_dev *dev)
 	dev->data->dev_link.link_status = RTE_ETH_LINK_DOWN;
 	ad->pf.adapter_stopped = 1;
-	hw->tm_conf.committed = false;
 
 	return 0;
diff --git a/drivers/net/ice/ice_dcf_sched.c b/drivers/net/ice/ice_dcf_sched.c
index a231c1e60b..b08bc5f1de 100644
--- a/drivers/net/ice/ice_dcf_sched.c
+++ b/drivers/net/ice/ice_dcf_sched.c
@@ -238,4 +238,5 @@ ice_dcf_node_add(struct rte_eth_dev *dev, uint32_t node_id,
 	struct ice_dcf_tm_shaper_profile *shaper_profile = NULL;
 	struct ice_dcf_adapter *adapter = dev->data->dev_private;
+	struct ice_adapter *ad = &adapter->parent;
 	struct ice_dcf_hw *hw = &adapter->real_hw;
 	struct ice_dcf_tm_node *parent_node;
@@ -247,8 +248,8 @@ ice_dcf_node_add(struct rte_eth_dev *dev, uint32_t node_id,
 		return -EINVAL;
 
-	/* if already committed */
-	if (hw->tm_conf.committed) {
+	/* if port is running */
+	if (!ad->pf.adapter_stopped) {
 		error->type = RTE_TM_ERROR_TYPE_UNSPECIFIED;
-		error->message = "already committed";
+		error->message = "port is running";
 		return -EINVAL;
 	}
@@ -401,4 +402,5 @@ ice_dcf_node_delete(struct rte_eth_dev *dev, uint32_t node_id,
 	enum ice_dcf_tm_node_type node_type = ICE_DCF_TM_NODE_TYPE_MAX;
 	struct ice_dcf_adapter *adapter = dev->data->dev_private;
+	struct ice_adapter *ad = &adapter->parent;
 	struct ice_dcf_hw *hw = &adapter->real_hw;
 	struct ice_dcf_tm_node *tm_node;
@@ -407,8 +409,8 @@ ice_dcf_node_delete(struct rte_eth_dev *dev, uint32_t node_id,
 		return -EINVAL;
 
-	/* if already committed */
-	if (hw->tm_conf.committed) {
+	/* if port is running */
+	if (!ad->pf.adapter_stopped) {
 		error->type = RTE_TM_ERROR_TYPE_UNSPECIFIED;
-		error->message = "already committed";
+		error->message = "port is running";
 		return -EINVAL;
 	}
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-11-02 13:09:42.237147124 +0000
+++ 0058-net-ice-fix-TM-configuration-clearing.patch	2023-11-02 13:09:40.867163509 +0000
@@ -1 +1 @@
-From c21a6a3ff6c49965d4373677255058d041dafe96 Mon Sep 17 00:00:00 2001
+From 28ddcaf4a6195f728cb5ead6a8e529f82dd525e6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c21a6a3ff6c49965d4373677255058d041dafe96 ]
+
@@ -17 +18,0 @@
-Cc: stable at dpdk.org
@@ -27 +28 @@
-index 30ad18d8fc..065ec728c2 100644
+index 20888f1980..8954dc0f8d 100644
@@ -30 +31 @@
-@@ -671,5 +671,4 @@ ice_dcf_dev_stop(struct rte_eth_dev *dev)
+@@ -612,5 +612,4 @@ ice_dcf_dev_stop(struct rte_eth_dev *dev)
@@ -36 +37 @@
-@@ -698,5 +697,4 @@ ice_dcf_dev_stop(struct rte_eth_dev *dev)
+@@ -630,5 +629,4 @@ ice_dcf_dev_stop(struct rte_eth_dev *dev)



More information about the stable mailing list