]> git.droids-corp.org - dpdk.git/commitdiff
net/cnxk: add receive channel backpressure for SDP
authorRadha Mohan Chintakuntla <radhac@marvell.com>
Sun, 8 May 2022 07:48:13 +0000 (13:18 +0530)
committerJerin Jacob <jerinj@marvell.com>
Tue, 10 May 2022 14:26:46 +0000 (16:26 +0200)
The SDP interfaces also need to be configured for NIX receive channel
backpressure for packet receive.

Signed-off-by: Radha Mohan Chintakuntla <radhac@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
drivers/common/cnxk/roc_nix_fc.c
drivers/net/cnxk/cnxk_ethdev.c

index 8e31443b8f702719d0964dd9726516ec4da2f932..a0505bd65fe91a9d7b0a65750870160277aa32af 100644 (file)
@@ -38,16 +38,13 @@ nix_fc_rxchan_bpid_set(struct roc_nix *roc_nix, bool enable)
        struct nix_bp_cfg_rsp *rsp;
        int rc = -ENOSPC, i;
 
-       if (roc_nix_is_sdp(roc_nix))
-               return 0;
-
        if (enable) {
                req = mbox_alloc_msg_nix_bp_enable(mbox);
                if (req == NULL)
                        return rc;
 
                req->chan_base = 0;
-               if (roc_nix_is_lbk(roc_nix))
+               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;
@@ -203,7 +200,8 @@ nix_fc_cq_config_set(struct roc_nix *roc_nix, struct roc_nix_fc_cfg *fc_cfg)
 int
 roc_nix_fc_config_get(struct roc_nix *roc_nix, struct roc_nix_fc_cfg *fc_cfg)
 {
-       if (roc_nix_is_vf_or_sdp(roc_nix) && !roc_nix_is_lbk(roc_nix))
+       if (!roc_nix_is_pf(roc_nix) && !roc_nix_is_lbk(roc_nix) &&
+           !roc_nix_is_sdp(roc_nix))
                return 0;
 
        if (fc_cfg->type == ROC_NIX_FC_CQ_CFG)
@@ -219,7 +217,8 @@ roc_nix_fc_config_get(struct roc_nix *roc_nix, struct roc_nix_fc_cfg *fc_cfg)
 int
 roc_nix_fc_config_set(struct roc_nix *roc_nix, struct roc_nix_fc_cfg *fc_cfg)
 {
-       if (roc_nix_is_vf_or_sdp(roc_nix) && !roc_nix_is_lbk(roc_nix))
+       if (!roc_nix_is_pf(roc_nix) && !roc_nix_is_lbk(roc_nix) &&
+           !roc_nix_is_sdp(roc_nix))
                return 0;
 
        if (fc_cfg->type == ROC_NIX_FC_CQ_CFG)
index 1fa413190791bc1fe8e4f3e05a30b44ff44d797d..bd31a9af5108fdbc61a1141b79edd3ac4164d5a0 100644 (file)
@@ -310,6 +310,9 @@ nix_init_flow_ctrl_config(struct rte_eth_dev *eth_dev)
        struct cnxk_fc_cfg *fc = &dev->fc_cfg;
        int rc;
 
+       if (roc_nix_is_sdp(&dev->nix))
+               return 0;
+
        /* To avoid Link credit deadlock on Ax, disable Tx FC if it's enabled */
        if (roc_model_is_cn96_ax() &&
            dev->npc.switch_header_type != ROC_PRIV_FLAGS_HIGIG)