[v2,4/6] test/crypto: check antireply capability only for ingress
Checks
Commit Message
From: Vidya Sagar Velumuri <vvelumuri@marvell.com>
Antireplay is supported only for ingress. Check this
capability only for ingress.
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
---
app/test/test_cryptodev_security_ipsec.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
@@ -202,11 +202,13 @@ test_ipsec_sec_caps_verify(struct rte_security_ipsec_xform *ipsec_xform,
return -ENOTSUP;
}
- if (ipsec_xform->replay_win_sz > sec_cap->ipsec.replay_win_sz_max) {
- if (!silent)
- RTE_LOG(INFO, USER1,
- "Replay window size is not supported\n");
- return -ENOTSUP;
+ if (ipsec_xform->direction == RTE_SECURITY_IPSEC_SA_DIR_INGRESS) {
+ if (ipsec_xform->replay_win_sz > sec_cap->ipsec.replay_win_sz_max) {
+ if (!silent)
+ RTE_LOG(INFO, USER1,
+ "Replay window size is not supported\n");
+ return -ENOTSUP;
+ }
}
return 0;