DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] crypto/cnxk: predecrement esn value to be used in session
@ 2022-06-27  8:12 Anoob Joseph
  2022-06-28 12:21 ` Akhil Goyal
  0 siblings, 1 reply; 2+ messages in thread
From: Anoob Joseph @ 2022-06-27  8:12 UTC (permalink / raw)
  To: Akhil Goyal, Jerin Jacob; +Cc: Tejasree Kondoj, dev, Ankur Dwivedi

ESN provided in the session would be the next sequence number to be
used. Hence predecrement the value, so that in datapath, incremented
value will be as expected.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
---
 drivers/crypto/cnxk/cn9k_ipsec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/cnxk/cn9k_ipsec.c b/drivers/crypto/cnxk/cn9k_ipsec.c
index cb9cf174a4..6d26b0cc01 100644
--- a/drivers/crypto/cnxk/cn9k_ipsec.c
+++ b/drivers/crypto/cnxk/cn9k_ipsec.c
@@ -41,7 +41,8 @@ cn9k_ipsec_outb_sa_create(struct cnxk_cpt_qp *qp,
 	/* Initialize lookaside IPsec private data */
 	sa->dir = RTE_SECURITY_IPSEC_SA_DIR_EGRESS;
 
-	sa->esn = ipsec->esn.value;
+	if (ipsec->esn.value)
+		sa->esn = ipsec->esn.value - 1;
 
 	ret = cnxk_ipsec_outb_rlens_get(&sa->rlens, ipsec, crypto_xform);
 	if (ret)
-- 
2.25.1


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

* RE: [PATCH] crypto/cnxk: predecrement esn value to be used in session
  2022-06-27  8:12 [PATCH] crypto/cnxk: predecrement esn value to be used in session Anoob Joseph
@ 2022-06-28 12:21 ` Akhil Goyal
  0 siblings, 0 replies; 2+ messages in thread
From: Akhil Goyal @ 2022-06-28 12:21 UTC (permalink / raw)
  To: Anoob Joseph, Jerin Jacob Kollanukkaran
  Cc: Tejasree Kondoj, dev, Ankur Dwivedi

> ESN provided in the session would be the next sequence number to be
> used. Hence predecrement the value, so that in datapath, incremented
> value will be as expected.
> 
> Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Applied to dpdk-next-crypto

Thanks.

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

end of thread, other threads:[~2022-06-28 12:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-27  8:12 [PATCH] crypto/cnxk: predecrement esn value to be used in session Anoob Joseph
2022-06-28 12:21 ` 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).