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 <ano...@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