common/cnxk: add CQ enable support in NIX Tx path
authorKommula Shiva Shankar <kshankar@marvell.com>
Fri, 1 Oct 2021 13:40:06 +0000 (19:10 +0530)
committerJerin Jacob <jerinj@marvell.com>
Sat, 2 Oct 2021 13:44:51 +0000 (15:44 +0200)
This patch provides applications to add CQ support
in Tx path. This enables packet completion events on
CQ for requested packets.

Signed-off-by: Kommula Shiva Shankar <kshankar@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
drivers/common/cnxk/roc_nix.h
drivers/common/cnxk/roc_nix_queue.c

index 4fcce49..b06895a 100644 (file)
@@ -194,7 +194,9 @@ struct roc_nix_sq {
        enum roc_nix_sq_max_sqe_sz max_sqe_sz;
        uint32_t nb_desc;
        uint16_t qid;
+       uint16_t cqid;
        bool sso_ena;
+       bool cq_ena;
        /* End of Input parameters */
        uint16_t sqes_per_sqb_log2;
        struct roc_nix *roc_nix;
index a8a713a..cba1294 100644 (file)
@@ -661,6 +661,8 @@ sq_cn9k_init(struct nix *nix, struct roc_nix_sq *sq, uint32_t rr_quantum,
        aq->sq.sqe_stype = NIX_STYPE_STF;
        aq->sq.ena = 1;
        aq->sq.sso_ena = !!sq->sso_ena;
+       aq->sq.cq_ena = !!sq->cq_ena;
+       aq->sq.cq = sq->cqid;
        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);
@@ -759,6 +761,8 @@ sq_init(struct nix *nix, struct roc_nix_sq *sq, uint32_t rr_quantum,
        aq->sq.sqe_stype = NIX_STYPE_STF;
        aq->sq.ena = 1;
        aq->sq.sso_ena = !!sq->sso_ena;
+       aq->sq.cq_ena = !!sq->cq_ena;
+       aq->sq.cq = sq->cqid;
        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);