From: Sunil Kumar Kori <[email protected]>

With current implementation, backpressure can be configured only
on lpb_pool but a RQ can be configured with spb_pool too and
spb_pool can also participate to assert backpressure.

Enabling backpressure support on spb_pool for 802.3x and
802.1qbb both.

Signed-off-by: Sunil Kumar Kori <[email protected]>
---
 drivers/net/cnxk/cnxk_ethdev_ops.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/cnxk/cnxk_ethdev_ops.c 
b/drivers/net/cnxk/cnxk_ethdev_ops.c
index da5ee19c85..3ade8eed36 100644
--- a/drivers/net/cnxk/cnxk_ethdev_ops.c
+++ b/drivers/net/cnxk/cnxk_ethdev_ops.c
@@ -308,7 +308,9 @@ cnxk_nix_flow_ctrl_set(struct rte_eth_dev *eth_dev,
                fc_cfg.rq_cfg.tc = 0;
                fc_cfg.rq_cfg.rq = rq->qid;
                fc_cfg.rq_cfg.pool = rq->aura_handle;
+               fc_cfg.rq_cfg.spb_pool = rq->spb_aura_handle;
                fc_cfg.rq_cfg.cq_drop = cq->drop_thresh;
+               fc_cfg.rq_cfg.pool_drop_pct = ROC_NIX_AURA_THRESH;
 
                rc = roc_nix_fc_config_set(nix, &fc_cfg);
                if (rc)
@@ -1198,7 +1200,9 @@ nix_priority_flow_ctrl_rq_conf(struct rte_eth_dev 
*eth_dev, uint16_t qid,
        fc_cfg.rq_cfg.enable = !!tx_pause;
        fc_cfg.rq_cfg.rq = rq->qid;
        fc_cfg.rq_cfg.pool = rxq->qconf.mp->pool_id;
+       fc_cfg.rq_cfg.spb_pool = rq->spb_aura_handle;
        fc_cfg.rq_cfg.cq_drop = cq->drop_thresh;
+       fc_cfg.rq_cfg.pool_drop_pct = ROC_NIX_AURA_THRESH;
        rc = roc_nix_fc_config_set(nix, &fc_cfg);
        if (rc)
                return rc;
-- 
2.25.1

Reply via email to