From: Kommula Shiva Shankar <kshan...@marvell.com>

Update CQ threshold limit associated with sq. This is
used when we need completions for packets that are successfully
transmitted.

Signed-off-by: Kommula Shiva Shankar <kshan...@marvell.com>
---
 drivers/common/cnxk/roc_nix.h       | 1 +
 drivers/common/cnxk/roc_nix_queue.c | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/drivers/common/cnxk/roc_nix.h b/drivers/common/cnxk/roc_nix.h
index b17623076c..8869cf5169 100644
--- a/drivers/common/cnxk/roc_nix.h
+++ b/drivers/common/cnxk/roc_nix.h
@@ -346,6 +346,7 @@ struct roc_nix_sq {
        uint32_t nb_desc;
        uint16_t qid;
        uint16_t cqid;
+       uint16_t cq_drop_thresh;
        bool sso_ena;
        bool cq_ena;
        /* End of Input parameters */
diff --git a/drivers/common/cnxk/roc_nix_queue.c 
b/drivers/common/cnxk/roc_nix_queue.c
index b197de0a77..60303329cc 100644
--- a/drivers/common/cnxk/roc_nix_queue.c
+++ b/drivers/common/cnxk/roc_nix_queue.c
@@ -907,6 +907,7 @@ sq_cn9k_init(struct nix *nix, struct roc_nix_sq *sq, 
uint32_t rr_quantum,
        aq->sq.sso_ena = !!sq->sso_ena;
        aq->sq.cq_ena = !!sq->cq_ena;
        aq->sq.cq = sq->cqid;
+       aq->sq.cq_limit = sq->cq_drop_thresh;
        if (aq->sq.max_sqe_size == NIX_MAXSQESZ_W8)
                aq->sq.sqe_stype = NIX_STYPE_STP;
        aq->sq.sqb_aura = roc_npa_aura_handle_to_aura(sq->aura_handle);
@@ -1024,6 +1025,7 @@ sq_init(struct nix *nix, struct roc_nix_sq *sq, uint32_t 
rr_quantum,
        aq->sq.sso_ena = !!sq->sso_ena;
        aq->sq.cq_ena = !!sq->cq_ena;
        aq->sq.cq = sq->cqid;
+       aq->sq.cq_limit = sq->cq_drop_thresh;
        if (aq->sq.max_sqe_size == NIX_MAXSQESZ_W8)
                aq->sq.sqe_stype = NIX_STYPE_STP;
        aq->sq.sqb_aura = roc_npa_aura_handle_to_aura(sq->aura_handle);
-- 
2.25.1

Reply via email to