DPDK patches and discussions
 help / color / mirror / Atom feed
From: Archana Muniganti <marchana@marvell.com>
To: <gakhil@marvell.com>
Cc: Archana Muniganti <marchana@marvell.com>, <anoobj@marvell.com>,
	<ktejasree@marvell.com>, <jerinj@marvell.com>, <dev@dpdk.org>
Subject: [dpdk-dev] [PATCH] crypto/cnxk: use IE engine group for IPsec
Date: Mon, 4 Oct 2021 12:23:53 +0530	[thread overview]
Message-ID: <20211004065353.2850-1-marchana@marvell.com> (raw)

Use IE engine group for cn9k IPsec.

Signed-off-by: Archana Muniganti <marchana@marvell.com>
---
 drivers/crypto/cnxk/cn9k_ipsec.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/crypto/cnxk/cn9k_ipsec.c b/drivers/crypto/cnxk/cn9k_ipsec.c
index 63ae025030..9ca4d20c62 100644
--- a/drivers/crypto/cnxk/cn9k_ipsec.c
+++ b/drivers/crypto/cnxk/cn9k_ipsec.c
@@ -19,6 +19,7 @@ static inline int
 cn9k_cpt_enq_sa_write(struct cn9k_ipsec_sa *sa, struct cnxk_cpt_qp *qp,
 		      uint8_t opcode, size_t ctx_len)
 {
+	struct roc_cpt *roc_cpt = qp->lf.roc_cpt;
 	uint64_t lmtline = qp->lmtline.lmt_base;
 	uint64_t io_addr = qp->lmtline.io_addr;
 	uint64_t lmt_status, time_out;
@@ -41,7 +42,7 @@ cn9k_cpt_enq_sa_write(struct cn9k_ipsec_sa *sa, struct cnxk_cpt_qp *qp,
 	inst.dptr = rte_mempool_virt2iova(sa);
 	inst.rptr = 0;
 	inst.w7.s.cptr = rte_mempool_virt2iova(sa);
-	inst.w7.s.egrp = ROC_CPT_DFLT_ENG_GRP_SE;
+	inst.w7.s.egrp = roc_cpt->eng_grp[CPT_ENG_TYPE_IE];
 
 	inst.w0.u64 = 0;
 	inst.w2.u64 = 0;
@@ -278,6 +279,7 @@ cn9k_ipsec_outb_sa_create(struct cnxk_cpt_qp *qp,
 {
 	struct rte_crypto_sym_xform *auth_xform = crypto_xform->next;
 	struct roc_ie_on_ip_template *template = NULL;
+	struct roc_cpt *roc_cpt = qp->lf.roc_cpt;
 	struct cnxk_cpt_inst_tmpl *inst_tmpl;
 	struct roc_ie_on_outb_sa *out_sa;
 	struct cn9k_sec_session *sess;
@@ -408,7 +410,7 @@ cn9k_ipsec_outb_sa_create(struct cnxk_cpt_qp *qp,
 	inst_tmpl->w4 = w4.u64;
 
 	w7.u64 = 0;
-	w7.s.egrp = ROC_CPT_DFLT_ENG_GRP_SE;
+	w7.s.egrp = roc_cpt->eng_grp[CPT_ENG_TYPE_IE];
 	w7.s.cptr = rte_mempool_virt2iova(out_sa);
 	inst_tmpl->w7 = w7.u64;
 
@@ -423,6 +425,7 @@ cn9k_ipsec_inb_sa_create(struct cnxk_cpt_qp *qp,
 			 struct rte_security_session *sec_sess)
 {
 	struct rte_crypto_sym_xform *auth_xform = crypto_xform;
+	struct roc_cpt *roc_cpt = qp->lf.roc_cpt;
 	struct cnxk_cpt_inst_tmpl *inst_tmpl;
 	struct roc_ie_on_inb_sa *in_sa;
 	struct cn9k_sec_session *sess;
@@ -474,7 +477,7 @@ cn9k_ipsec_inb_sa_create(struct cnxk_cpt_qp *qp,
 	inst_tmpl->w4 = w4.u64;
 
 	w7.u64 = 0;
-	w7.s.egrp = ROC_CPT_DFLT_ENG_GRP_SE;
+	w7.s.egrp = roc_cpt->eng_grp[CPT_ENG_TYPE_IE];
 	w7.s.cptr = rte_mempool_virt2iova(in_sa);
 	inst_tmpl->w7 = w7.u64;
 
-- 
2.22.0


             reply	other threads:[~2021-10-04  6:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-04  6:53 Archana Muniganti [this message]
2021-10-04  6:59 ` Anoob Joseph
2021-10-07 13:19   ` Akhil Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211004065353.2850-1-marchana@marvell.com \
    --to=marchana@marvell.com \
    --cc=anoobj@marvell.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=ktejasree@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).