DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tejasree Kondoj <ktejasree@marvell.com>
To: Akhil Goyal <gakhil@marvell.com>,
	Fan Zhang <royzhang1980@gmail.com>,
	Ciara Power <ciara.power@intel.com>
Cc: Vidya Sagar Velumuri <vvelumuri@marvell.com>,
	Anoob Joseph <anoobj@marvell.com>, <dev@dpdk.org>
Subject: [PATCH 4/6] test/crypto: check antireply capability only for ingress
Date: Wed, 19 Oct 2022 22:24:16 +0530	[thread overview]
Message-ID: <20221019165418.1970445-5-ktejasree@marvell.com> (raw)
In-Reply-To: <20221019165418.1970445-1-ktejasree@marvell.com>

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(-)

diff --git a/app/test/test_cryptodev_security_ipsec.c b/app/test/test_cryptodev_security_ipsec.c
index cb77b39dbb..3219b41e39 100644
--- a/app/test/test_cryptodev_security_ipsec.c
+++ b/app/test/test_cryptodev_security_ipsec.c
@@ -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;
-- 
2.25.1


  parent reply	other threads:[~2022-10-19 16:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-19 16:54 [PATCH 0/6] update autotest with new algorithms Tejasree Kondoj
2022-10-19 16:54 ` [PATCH 1/6] test/security: add unit tests for DES and 3DES Tejasree Kondoj
2022-10-19 16:54 ` [PATCH 2/6] test/security: add unit tests for auth algo MD5 Tejasree Kondoj
2022-10-19 16:54 ` [PATCH 3/6] test/security: update antireplay unit test for event mode Tejasree Kondoj
2022-10-19 16:54 ` Tejasree Kondoj [this message]
2022-10-19 16:54 ` [PATCH 5/6] test/crypto: add unit tests for DES and MD5 Tejasree Kondoj
2022-10-20 16:23   ` Akhil Goyal
2022-10-19 16:54 ` [PATCH 6/6] test/crypto: add unit test for custom UDP ports Tejasree Kondoj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221019165418.1970445-5-ktejasree@marvell.com \
    --to=ktejasree@marvell.com \
    --cc=anoobj@marvell.com \
    --cc=ciara.power@intel.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    --cc=royzhang1980@gmail.com \
    --cc=vvelumuri@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).