* [dpdk-dev] [PATCH] crypto/octeontx2: fix lookaside IPsec IV pointer
@ 2021-07-16 9:01 Tejasree Kondoj
2021-07-16 10:44 ` [dpdk-dev] [PATCH v2] " Tejasree Kondoj
0 siblings, 1 reply; 4+ messages in thread
From: Tejasree Kondoj @ 2021-07-16 9:01 UTC (permalink / raw)
To: Akhil Goyal, Radu Nicolau
Cc: Tejasree Kondoj, Anoob Joseph, Ankur Dwivedi, dev
Fixing IV pointer population in lookaside IPsec
outbound instruction.
Fixes: fab634eb87ca ("crypto/octeontx2: support security session data path")
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
---
drivers/crypto/octeontx2/otx2_ipsec_po_ops.h | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/crypto/octeontx2/otx2_ipsec_po_ops.h b/drivers/crypto/octeontx2/otx2_ipsec_po_ops.h
index 58b199f4f3..03331f4723 100644
--- a/drivers/crypto/octeontx2/otx2_ipsec_po_ops.h
+++ b/drivers/crypto/octeontx2/otx2_ipsec_po_ops.h
@@ -107,14 +107,8 @@ process_outb_sa(struct rte_crypto_op *cop,
hdr = (struct otx2_ipsec_po_out_hdr *)rte_pktmbuf_adj(m_src,
RTE_ETHER_HDR_LEN);
- if (ctl_wrd->enc_type == OTX2_IPSEC_FP_SA_ENC_AES_GCM) {
- memcpy(&hdr->iv[0], &sa->iv.gcm.nonce, 4);
- memcpy(&hdr->iv[4], rte_crypto_op_ctod_offset(cop, uint8_t *,
- sess->iv_offset), sess->iv_length);
- } else if (ctl_wrd->auth_type == OTX2_IPSEC_PO_SA_AUTH_SHA1) {
- memcpy(&hdr->iv[0], rte_crypto_op_ctod_offset(cop, uint8_t *,
- sess->iv_offset), sess->iv_length);
- }
+ memcpy(&hdr->iv[0], rte_crypto_op_ctod_offset(cop, uint8_t *,
+ sess->iv_offset), sess->iv_length);
/* Prepare CPT instruction */
word0.u64 = sess->ucmd_w0;
--
2.27.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-dev] [PATCH v2] crypto/octeontx2: fix lookaside IPsec IV pointer
2021-07-16 9:01 [dpdk-dev] [PATCH] crypto/octeontx2: fix lookaside IPsec IV pointer Tejasree Kondoj
@ 2021-07-16 10:44 ` Tejasree Kondoj
2021-07-18 8:57 ` Akhil Goyal
0 siblings, 1 reply; 4+ messages in thread
From: Tejasree Kondoj @ 2021-07-16 10:44 UTC (permalink / raw)
To: Akhil Goyal; +Cc: Tejasree Kondoj, Anoob Joseph, Ankur Dwivedi, dev
Fixing IV pointer population in lookaside IPsec
outbound instruction.
Fixes: fab634eb87ca ("crypto/octeontx2: support security session data path")
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
---
v2:
* Fixed unused variable warning
drivers/crypto/octeontx2/otx2_ipsec_po_ops.h | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/crypto/octeontx2/otx2_ipsec_po_ops.h b/drivers/crypto/octeontx2/otx2_ipsec_po_ops.h
index 58b199f4f3..25ee10f342 100644
--- a/drivers/crypto/octeontx2/otx2_ipsec_po_ops.h
+++ b/drivers/crypto/octeontx2/otx2_ipsec_po_ops.h
@@ -61,7 +61,6 @@ process_outb_sa(struct rte_crypto_op *cop,
uint32_t dlen, rlen, extend_head, extend_tail;
struct rte_crypto_sym_op *sym_op = cop->sym;
struct rte_mbuf *m_src = sym_op->m_src;
- struct otx2_ipsec_po_sa_ctl *ctl_wrd;
struct cpt_request_info *req = NULL;
struct otx2_ipsec_po_out_hdr *hdr;
struct otx2_ipsec_po_out_sa *sa;
@@ -70,7 +69,6 @@ process_outb_sa(struct rte_crypto_op *cop,
char *mdata, *data;
sa = &sess->out_sa;
- ctl_wrd = &sa->ctl;
hdr_len = sizeof(*hdr);
dlen = rte_pktmbuf_pkt_len(m_src) + hdr_len;
@@ -107,14 +105,8 @@ process_outb_sa(struct rte_crypto_op *cop,
hdr = (struct otx2_ipsec_po_out_hdr *)rte_pktmbuf_adj(m_src,
RTE_ETHER_HDR_LEN);
- if (ctl_wrd->enc_type == OTX2_IPSEC_FP_SA_ENC_AES_GCM) {
- memcpy(&hdr->iv[0], &sa->iv.gcm.nonce, 4);
- memcpy(&hdr->iv[4], rte_crypto_op_ctod_offset(cop, uint8_t *,
- sess->iv_offset), sess->iv_length);
- } else if (ctl_wrd->auth_type == OTX2_IPSEC_PO_SA_AUTH_SHA1) {
- memcpy(&hdr->iv[0], rte_crypto_op_ctod_offset(cop, uint8_t *,
- sess->iv_offset), sess->iv_length);
- }
+ memcpy(&hdr->iv[0], rte_crypto_op_ctod_offset(cop, uint8_t *,
+ sess->iv_offset), sess->iv_length);
/* Prepare CPT instruction */
word0.u64 = sess->ucmd_w0;
--
2.27.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v2] crypto/octeontx2: fix lookaside IPsec IV pointer
2021-07-16 10:44 ` [dpdk-dev] [PATCH v2] " Tejasree Kondoj
@ 2021-07-18 8:57 ` Akhil Goyal
2021-07-18 9:01 ` Akhil Goyal
0 siblings, 1 reply; 4+ messages in thread
From: Akhil Goyal @ 2021-07-18 8:57 UTC (permalink / raw)
To: Tejasree Kondoj; +Cc: Tejasree Kondoj, Anoob Joseph, Ankur Dwivedi, dev
> Fixing IV pointer population in lookaside IPsec
> outbound instruction.
>
> Fixes: fab634eb87ca ("crypto/octeontx2: support security session data path")
>
> Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
> ---
> v2:
> * Fixed unused variable warning
Acked-by: Akhil Goyal <gakhil@marvell.com>
Applied to dpdk-next-crypto
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v2] crypto/octeontx2: fix lookaside IPsec IV pointer
2021-07-18 8:57 ` Akhil Goyal
@ 2021-07-18 9:01 ` Akhil Goyal
0 siblings, 0 replies; 4+ messages in thread
From: Akhil Goyal @ 2021-07-18 9:01 UTC (permalink / raw)
To: Tejasree Kondoj; +Cc: Tejasree Kondoj, Anoob Joseph, Ankur Dwivedi, dev, stable
> > Fixing IV pointer population in lookaside IPsec
> > outbound instruction.
> >
> > Fixes: fab634eb87ca ("crypto/octeontx2: support security session data
> path")
> >
> > Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
> > ---
> > v2:
> > * Fixed unused variable warning
> Acked-by: Akhil Goyal <gakhil@marvell.com>
>
> Applied to dpdk-next-crypto
>
Cc:stable@dpdk.org
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-07-18 9:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-16 9:01 [dpdk-dev] [PATCH] crypto/octeontx2: fix lookaside IPsec IV pointer Tejasree Kondoj
2021-07-16 10:44 ` [dpdk-dev] [PATCH v2] " Tejasree Kondoj
2021-07-18 8:57 ` Akhil Goyal
2021-07-18 9:01 ` 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).