diff mbox series

[v9,8/9] net/ice: support queue group priority configuration

Message ID 20220428033034.3490183-9-wenjun1.wu@intel.com (mailing list archive)
State Superseded
Delegated to: Qi Zhang
Headers show
Series Enable ETS-based TX QoS on PF | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Wenjun Wu April 28, 2022, 3:30 a.m. UTC
This patch adds queue group priority configuration support.

Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
---
 drivers/net/ice/ice_tm.c | 9 +++++++++
 1 file changed, 9 insertions(+)
diff mbox series

Patch

diff --git a/drivers/net/ice/ice_tm.c b/drivers/net/ice/ice_tm.c
index 4d7bb9102c..f604523ead 100644
--- a/drivers/net/ice/ice_tm.c
+++ b/drivers/net/ice/ice_tm.c
@@ -764,6 +764,15 @@  static int ice_hierarchy_commit(struct rte_eth_dev *dev,
 				goto fail_clear;
 			}
 		}
+		priority = 7 - tm_node->priority;
+		ret_val = ice_sched_cfg_sibl_node_prio_lock(hw->port_info, qgroup_sched_node,
+							    priority);
+		if (ret_val) {
+			error->type = RTE_TM_ERROR_TYPE_NODE_PRIORITY;
+			PMD_DRV_LOG(ERR, "configure queue group %u priority failed",
+				    tm_node->priority);
+			goto fail_clear;
+		}
 		idx_qg++;
 		if (idx_qg >= nb_qg) {
 			idx_qg = 0;