diff mbox series

[2/2] examples/ipsec-secgw: add support for replay win for lookaside

Message ID 20191025062021.18052-2-hemant.agrawal@nxp.com
State New
Headers show
Series [1/2] security: add anti replay window size | expand

Commit Message

Hemant Agrawal Oct. 25, 2019, 6:20 a.m. UTC
This patch extend the support for window size config
to lookaside based ipsec offload as well.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>

---
 examples/ipsec-secgw/ipsec.c | 1 +
 examples/ipsec-secgw/sa.c    | 1 +
 2 files changed, 2 insertions(+)

-- 
2.17.1
diff mbox series

Patch

diff --git a/examples/ipsec-secgw/ipsec.c b/examples/ipsec-secgw/ipsec.c
index 51fb22e8a..159e81f99 100644
--- a/examples/ipsec-secgw/ipsec.c
+++ b/examples/ipsec-secgw/ipsec.c
@@ -49,6 +49,7 @@  set_ipsec_conf(struct ipsec_sa *sa, struct rte_security_ipsec_xform *ipsec)
 		/* TODO support for Transport */
 	}
 	ipsec->esn_soft_limit = IPSEC_OFFLOAD_ESN_SOFTLIMIT;
+	ipsec->replay_win_sz = app_sa_prm.window_size;
 }
 
 int
diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
index 14ee94731..9a57e3eac 100644
--- a/examples/ipsec-secgw/sa.c
+++ b/examples/ipsec-secgw/sa.c
@@ -1056,6 +1056,7 @@  fill_ipsec_app_sa_prm(struct rte_ipsec_sa_prm *prm,
 	prm->flags = app_prm->flags;
 	prm->ipsec_xform.options.esn = app_prm->enable_esn;
 	prm->replay_win_sz = app_prm->window_size;
+	prm->ipsec_xform.replay_win_sz = prm->replay_win_sz;
 }
 
 static int