crypto/octeontx2: fix lookaside IPsec IV pointer

Message ID 20210716090131.13114-1-ktejasree@marvell.com (mailing list archive)
State Superseded, archived
Delegated to: akhil goyal
Headers
Series crypto/octeontx2: fix lookaside IPsec IV pointer |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/github-robot fail github build: failed
ci/Intel-compilation fail Compilation issues

Commit Message

Tejasree Kondoj July 16, 2021, 9:01 a.m. UTC
  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(-)
  

Patch

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;