Make sure the w2 in inbound SA is set for inline IPsec have
L3 header on errors.

Fixes: 350b7a536a51 ("common/cnxk: enable L3 header write back in SA")

Signed-off-by: Nithin Dabilpuram <ndabilpu...@marvell.com>
---
 drivers/common/cnxk/cnxk_security.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/common/cnxk/cnxk_security.c 
b/drivers/common/cnxk/cnxk_security.c
index 1fe750049e..16191c3ecc 100644
--- a/drivers/common/cnxk/cnxk_security.c
+++ b/drivers/common/cnxk/cnxk_security.c
@@ -313,7 +313,7 @@ cnxk_ot_ipsec_inb_sa_fill(struct roc_ot_ipsec_inb_sa *sa,
        /* Initialize the SA */
        roc_ot_ipsec_inb_sa_init(sa);
 
-       w2.u64 = 0;
+       w2.u64 = sa->w2.u64;
        rc = ot_ipsec_sa_common_param_fill(&w2, sa->cipher_key, sa->w8.s.salt,
                                           sa->hmac_opad_ipad, ipsec_xfrm,
                                           crypto_xfrm);
-- 
2.34.1

Reply via email to