From: Sunil Kumar Kori <skori@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@marvell.com>
---
drivers/common/cnxk/roc_nix.h | 1 +
drivers/common/cnxk/roc_nix_fc.c | 6 ++++++
2 files changed, 7 insertions(+)
@@ -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;
@@ -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,