DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] examples/ipsec-secgw: fix ESN setting
@ 2022-06-14 12:43 Radu Nicolau
  2022-06-14 15:43 ` Zhang, Roy Fan
  0 siblings, 1 reply; 3+ messages in thread
From: Radu Nicolau @ 2022-06-14 12:43 UTC (permalink / raw)
  To: Radu Nicolau, Akhil Goyal; +Cc: dev, stable

Fix ESN option flag and initial value for the rte_ipsec library path.

Fixes: 560029d5cfc9 ("examples/ipsec-secgw: define initial ESN value")
Cc: stable@dpdk.org

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
 examples/ipsec-secgw/sa.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
index 0b27f11fc0..8505a676ef 100644
--- a/examples/ipsec-secgw/sa.c
+++ b/examples/ipsec-secgw/sa.c
@@ -1488,6 +1488,11 @@ fill_ipsec_sa_prm(struct rte_ipsec_sa_prm *prm, const struct ipsec_sa *ss,
 	prm->ipsec_xform.options.ecn = 1;
 	prm->ipsec_xform.options.copy_dscp = 1;
 
+	if (ss->esn > 0) {
+		prm->ipsec_xform.options.esn = 1;
+		prm->ipsec_xform.esn.value = ss->esn;
+	}
+
 	if (IS_IP4_TUNNEL(ss->flags)) {
 		prm->ipsec_xform.tunnel.type = RTE_SECURITY_IPSEC_TUNNEL_IPV4;
 		prm->tun.hdr_len = sizeof(*v4);
-- 
2.25.1


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

end of thread, other threads:[~2022-06-15 15:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-14 12:43 [PATCH] examples/ipsec-secgw: fix ESN setting Radu Nicolau
2022-06-14 15:43 ` Zhang, Roy Fan
2022-06-15 15:11   ` 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).