All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejasree Kondoj <ktejasree@marvell.com>
To: Akhil Goyal <gakhil@marvell.com>, Radu Nicolau <radu.nicolau@intel.com>
Cc: Tejasree Kondoj <ktejasree@marvell.com>,
	Anoob Joseph <anoobj@marvell.com>,
	Ankur Dwivedi <adwivedi@marvell.com>, <dev@dpdk.org>
Subject: [dpdk-dev] [PATCH] crypto/octeontx2: fix lookaside IPsec IV pointer
Date: Fri, 16 Jul 2021 14:31:31 +0530	[thread overview]
Message-ID: <20210716090131.13114-1-ktejasree@marvell.com> (raw)

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


             reply	other threads:[~2021-07-16  8:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-16  9:01 Tejasree Kondoj [this message]
2021-07-16 10:44 ` [dpdk-dev] [PATCH v2] crypto/octeontx2: fix lookaside IPsec IV pointer Tejasree Kondoj
2021-07-18  8:57   ` Akhil Goyal
2021-07-18  9:01     ` 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=20210716090131.13114-1-ktejasree@marvell.com \
    --to=ktejasree@marvell.com \
    --cc=adwivedi@marvell.com \
    --cc=anoobj@marvell.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    --cc=radu.nicolau@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.