From patchwork Fri Oct 21 07:26:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejasree Kondoj X-Patchwork-Id: 118892 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CABD5A0032; Fri, 21 Oct 2022 09:27:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B156D42BAC; Fri, 21 Oct 2022 09:27:28 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id C6E4542B8A for ; Fri, 21 Oct 2022 09:27:25 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29L2C8ei008909; Fri, 21 Oct 2022 00:27:25 -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=lN9EDvrip90MQNRly9jBnKkzypbroNJVCqTtk6vZtCFeE7qCUGejqtbdwXR7jjS/5OTF KbPBpXCXuPMe+9QgzC9mxadF2Mmu4EsUIUCaSXjZhiRkK3+vz0KOWVwZS6VLhnUNk0/Q knScngyfUvxHToScFcp/TMgX1xOVai+U+8Zo6btsEYvVn8ERCDcse0itG//xawc5cCJC K1/iwo2qJFvj+OQDtAOX2XNn+MZJ5vcgl2LTDoTz8MS/Di/xLlgAxOxwmfiZQ/R0trBX ffsSz8hzixVDznmImUkdSSDLZosjdGglzE/08jtX/Q6IVE+sP3ht4BcKAnQDIyPvCXpk ow== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3kb125d6gg-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 21 Oct 2022 00:27:25 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Fri, 21 Oct 2022 00:27:23 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 21 Oct 2022 00:27:23 -0700 Received: from hyd1554.marvell.com (unknown [10.29.57.11]) by maili.marvell.com (Postfix) with ESMTP id D0EF95B69A2; Fri, 21 Oct 2022 00:27:04 -0700 (PDT) From: Tejasree Kondoj To: Akhil Goyal , Fan Zhang , Ciara Power CC: Vidya Sagar Velumuri , Anoob Joseph , Subject: [PATCH v2 4/6] test/crypto: check antireply capability only for ingress Date: Fri, 21 Oct 2022 12:56:49 +0530 Message-ID: <20221021072651.1985340-5-ktejasree@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221021072651.1985340-1-ktejasree@marvell.com> References: <20221021072651.1985340-1-ktejasree@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: WW4wcw-3Ln_UugrTZZq7L8rowDMh--Qe X-Proofpoint-ORIG-GUID: WW4wcw-3Ln_UugrTZZq7L8rowDMh--Qe 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-21_03,2022-10-20_01,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;