From: Kommula Shiva Shankar Date: Fri, 1 Oct 2021 13:40:06 +0000 (+0530) Subject: common/cnxk: add CQ enable support in NIX Tx path X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=87254db8b48c7c4ed8ebeee150e208c29f8887d0;p=dpdk.git common/cnxk: add CQ enable support in NIX Tx path 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 Acked-by: Jerin Jacob --- diff --git a/drivers/common/cnxk/roc_nix.h b/drivers/common/cnxk/roc_nix.h index 4fcce49b7b..b06895a565 100644 --- a/drivers/common/cnxk/roc_nix.h +++ b/drivers/common/cnxk/roc_nix.h @@ -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; diff --git a/drivers/common/cnxk/roc_nix_queue.c b/drivers/common/cnxk/roc_nix_queue.c index a8a713aacf..cba1294ef1 100644 --- a/drivers/common/cnxk/roc_nix_queue.c +++ b/drivers/common/cnxk/roc_nix_queue.c @@ -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);