DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] crypto/cnxk: use IE engine group for IPsec
@ 2021-10-04  6:53 Archana Muniganti
  2021-10-04  6:59 ` Anoob Joseph
  0 siblings, 1 reply; 3+ messages in thread
From: Archana Muniganti @ 2021-10-04  6:53 UTC (permalink / raw)
  To: gakhil; +Cc: Archana Muniganti, anoobj, ktejasree, jerinj, dev

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-07 13:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-04  6:53 [dpdk-dev] [PATCH] crypto/cnxk: use IE engine group for IPsec Archana Muniganti
2021-10-04  6:59 ` Anoob Joseph
2021-10-07 13:19   ` Akhil Goyal

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).