From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 681A1A09E7; Wed, 19 Oct 2022 18:54:49 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 20D0D42C32; Wed, 19 Oct 2022 18:54:37 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id BD1A54280C for ; Wed, 19 Oct 2022 18:54:34 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29J8B0dH010462; Wed, 19 Oct 2022 09:54:34 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=oQJ9STXy8AbbpfrBE8oLTHlnqb6gbE04VOcACaA9dWE=; b=D69Bgt14SqrFwXrWnd3wy1IveqNRQWKDffEwKDFVB+pRXshB3ilzNRhX/msRBUrN8nsZ LR6+vLaMEWOXr15PEpuT1iP5IrfUk1NKVPBlOa0YwBf4EKfN7xIhKzxkvybHnfv8MzOR ReYWCDx8HaCT2QBNxSzcTwFt+cTtnyE97E19GNQ+3jrpAM/pGinQh/C5yQi5iLLYh9pp 6ngnNCBIC4ZTHBXRwedHonRmVGq1jQx0dDZkYM6e1wJofUsqsHa7uKqq2LAgPfxJ89b+ 9TupeUKkNQOL1YltF/hFv7uT5ApVRShx3kHE+Z0tyEVDusih55DudYO+UweVyqb500u0 EQ== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3kadg5a7bt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 19 Oct 2022 09:54:33 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 19 Oct 2022 09:54:32 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Wed, 19 Oct 2022 09:54:32 -0700 Received: from hyd1554.marvell.com (unknown [10.29.57.11]) by maili.marvell.com (Postfix) with ESMTP id 4000B3F7097; Wed, 19 Oct 2022 09:54:30 -0700 (PDT) From: Tejasree Kondoj To: Akhil Goyal , Fan Zhang , Ciara Power CC: Vidya Sagar Velumuri , Anoob Joseph , Subject: [PATCH 4/6] test/crypto: check antireply capability only for ingress Date: Wed, 19 Oct 2022 22:24:16 +0530 Message-ID: <20221019165418.1970445-5-ktejasree@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221019165418.1970445-1-ktejasree@marvell.com> References: <20221019165418.1970445-1-ktejasree@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: biYpBuUsRzYXRnAqn46_I9vL8aS5dF7e X-Proofpoint-ORIG-GUID: biYpBuUsRzYXRnAqn46_I9vL8aS5dF7e X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-19_09,2022-10-19_04,2022-06-22_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Vidya Sagar Velumuri Antireplay is supported only for ingress. Check this capability only for ingress. Signed-off-by: Tejasree Kondoj Signed-off-by: Vidya Sagar Velumuri --- 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