[PATCH 23/31] net/cnxk: support rate limit in PFC TM tree

Nithin Dabilpuram ndabilpuram at marvell.com
Fri Aug 11 10:57:57 CEST 2023


From: Satha Rao <skoteshwar at marvell.com>

SQ rate limit was different in PFC tree compared to regular rate
limit tree.

Signed-off-by: Satha Rao <skoteshwar at marvell.com>
---
 drivers/net/cnxk/cnxk_tm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/cnxk/cnxk_tm.c b/drivers/net/cnxk/cnxk_tm.c
index 9d8cd3f0a9..c799193cb8 100644
--- a/drivers/net/cnxk/cnxk_tm.c
+++ b/drivers/net/cnxk/cnxk_tm.c
@@ -765,6 +765,9 @@ cnxk_nix_tm_set_queue_rate_limit(struct rte_eth_dev *eth_dev,
 	if (queue_idx >= eth_dev->data->nb_tx_queues)
 		goto exit;
 
+	if (roc_nix_tm_tree_type_get(nix) == ROC_NIX_TM_PFC)
+		return roc_nix_tm_pfc_rlimit_sq(nix, queue_idx, tx_rate);
+
 	if ((roc_nix_tm_tree_type_get(nix) != ROC_NIX_TM_RLIMIT) &&
 	    eth_dev->data->nb_tx_queues > 1) {
 		/*
-- 
2.25.1



More information about the dev mailing list