[PATCH v3 27/32] common/cnxk: configure PFC on SPB aura

Nithin Dabilpuram ndabilpuram at marvell.com
Thu May 25 11:58:59 CEST 2023


From: Sunil Kumar Kori <skori at marvell.com>

A RQ can be configured with lpb_aura and spb_aura at the same time
and both can contribute to generate aura based back pressure from
NIX to RPM.

But currently PFC configuration are applied on lpb_aura only and
spb_aura does not contribute to create back pressure.

Patch adds support for the same.

Signed-off-by: Sunil Kumar Kori <skori at marvell.com>
---
 drivers/common/cnxk/roc_nix.h    | 1 +
 drivers/common/cnxk/roc_nix_fc.c | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/drivers/common/cnxk/roc_nix.h b/drivers/common/cnxk/roc_nix.h
index 548854952b..f60e546c01 100644
--- a/drivers/common/cnxk/roc_nix.h
+++ b/drivers/common/cnxk/roc_nix.h
@@ -198,6 +198,7 @@ struct roc_nix_fc_cfg {
 			uint16_t cq_drop;
 			bool enable;
 			uint64_t pool;
+			uint64_t spb_pool;
 			uint64_t pool_drop_pct;
 		} rq_cfg;
 
diff --git a/drivers/common/cnxk/roc_nix_fc.c b/drivers/common/cnxk/roc_nix_fc.c
index 21e3b7d5bd..44eade5ba6 100644
--- a/drivers/common/cnxk/roc_nix_fc.c
+++ b/drivers/common/cnxk/roc_nix_fc.c
@@ -303,6 +303,12 @@ nix_fc_rq_config_set(struct roc_nix *roc_nix, struct roc_nix_fc_cfg *fc_cfg)
 				      fc_cfg->rq_cfg.enable, roc_nix->force_rx_aura_bp,
 				      fc_cfg->rq_cfg.tc, pool_drop_pct);
 
+		if (rq->spb_ena) {
+			roc_nix_fc_npa_bp_cfg(roc_nix, fc_cfg->rq_cfg.spb_pool,
+					      fc_cfg->rq_cfg.enable, roc_nix->force_rx_aura_bp,
+					      fc_cfg->rq_cfg.tc, pool_drop_pct);
+		}
+
 		if (roc_nix->local_meta_aura_ena && roc_nix->meta_aura_handle)
 			roc_nix_fc_npa_bp_cfg(roc_nix, roc_nix->meta_aura_handle,
 					      fc_cfg->rq_cfg.enable, roc_nix->force_rx_aura_bp,
-- 
2.25.1



More information about the dev mailing list