[v3,03/32] common/cnxk: fix CPT backpressure disable on LBK

Message ID 20230525095904.3967080-3-ndabilpuram@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers
Series [v3,01/32] common/cnxk: allocate dynamic BPIDs |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Nithin Dabilpuram May 25, 2023, 9:58 a.m. UTC
  From: Rahul Bhansali <rbhansali@marvell.com>

For LBK interfaces, roc_nix_inl_inb_is_enabled() is false,
hence backpressure on CPT is disabled and causing CQ full
interrupt.
NIXX_AF_RX_CHAN[0x800]_CFG is global config for all PF, VF
of RPM/LBK, hence backpressure disable on CPT is not required.

Fixes: 0663a84524e5 ("common/cnxk: enable backpressure on CPT with inline inbound")
cc: stable@dpdk.org

Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
---
 drivers/common/cnxk/roc_nix_fc.c | 18 ++----------------
 1 file changed, 2 insertions(+), 16 deletions(-)
  

Patch

diff --git a/drivers/common/cnxk/roc_nix_fc.c b/drivers/common/cnxk/roc_nix_fc.c
index 8feb773e1d..6d6997ed82 100644
--- a/drivers/common/cnxk/roc_nix_fc.c
+++ b/drivers/common/cnxk/roc_nix_fc.c
@@ -87,25 +87,11 @@  nix_fc_rxchan_bpid_set(struct roc_nix *roc_nix, bool enable)
 		if (rc)
 			goto exit;
 		nix->cpt_lbpid = rsp->chan_bpid[0] & 0x1FF;
-	} else {
-		req = mbox_alloc_msg_nix_cpt_bp_disable(mbox);
-		if (req == NULL)
-			goto exit;
-		req->chan_base = 0;
-		if (roc_nix_is_lbk(roc_nix) || roc_nix_is_sdp(roc_nix))
-			req->chan_cnt = NIX_LBK_MAX_CHAN;
-		else
-			req->chan_cnt = NIX_CGX_MAX_CHAN;
-		req->bpid_per_chan = 0;
-
-		rc = mbox_process_msg(mbox, (void *)&rsp);
-		if (rc)
-			goto exit;
-		nix->cpt_lbpid = 0;
 	}
 
 	/* CPT to NIX BP on all channels */
-	if (!roc_feature_nix_has_rxchan_multi_bpid() || !nix->cpt_nixbpid)
+	if (!roc_feature_nix_has_rxchan_multi_bpid() || !nix->cpt_nixbpid ||
+	    !roc_nix_inl_inb_is_enabled(roc_nix))
 		goto exit;
 
 	mbox_put(mbox);