From 350b7a536a51370b90230a7a5c3cfaa2fde3b01b Mon Sep 17 00:00:00 2001 From: Vidya Sagar Velumuri Date: Wed, 23 Feb 2022 01:04:57 +0530 Subject: [PATCH] common/cnxk: enable L3 header write back in SA Enable the field in SA to write back L2, L3 headers in case of errors during inline processing. Signed-off-by: Vidya Sagar Velumuri Acked-by: Jerin Jacob --- drivers/common/cnxk/roc_ie_ot.c | 1 + drivers/common/cnxk/roc_ie_ot.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/common/cnxk/roc_ie_ot.c b/drivers/common/cnxk/roc_ie_ot.c index 1ea7bfd68e..d0b7ad38f1 100644 --- a/drivers/common/cnxk/roc_ie_ot.c +++ b/drivers/common/cnxk/roc_ie_ot.c @@ -17,6 +17,7 @@ roc_ot_ipsec_inb_sa_init(struct roc_ot_ipsec_inb_sa *sa, bool is_inline) sa->w0.s.pkt_format = ROC_IE_OT_SA_PKT_FMT_META; sa->w0.s.pkind = ROC_IE_OT_CPT_PKIND; sa->w0.s.et_ovrwr = 1; + sa->w2.s.l3hdr_on_err = 1; } offset = offsetof(struct roc_ot_ipsec_inb_sa, ctx); diff --git a/drivers/common/cnxk/roc_ie_ot.h b/drivers/common/cnxk/roc_ie_ot.h index b5d4f4ac43..202e2d2f39 100644 --- a/drivers/common/cnxk/roc_ie_ot.h +++ b/drivers/common/cnxk/roc_ie_ot.h @@ -351,7 +351,8 @@ struct roc_ot_ipsec_inb_sa { uint64_t ip_hdr_verify : 2; uint64_t udp_ports_verify : 1; - uint64_t rsvd6 : 7; + uint64_t l3hdr_on_err : 1; + uint64_t rsvd6 : 6; uint64_t async_mode : 1; uint64_t spi : 32; -- 2.39.5