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 E56E9A0503; Fri, 20 May 2022 06:21:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7D54A42B82; Fri, 20 May 2022 06:21:34 +0200 (CEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2070.outbound.protection.outlook.com [40.107.22.70]) by mails.dpdk.org (Postfix) with ESMTP id 373124281F for ; Fri, 20 May 2022 06:21:33 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CY7P6w60/mwGo9lU84fiWz37KzRcTsteW01sniTLOmy/8fd20BixLn1iRRPa/16bfQ4iDQ3/+kywtPemZkeAZ/CdDLt4mkRO58TaCsA538rzygcdHHSxYTDcHK3pGmlHdA7YfBFVmkpdYXUqOhPKyGyk8Bw0trV7vYjoyMDx6Z27V2Ety3Z2h+LmB1Pls0dZ+LfYWEzVIgxQ5CHlQAoZmnkSXBpU9ULwk75ZfV1ALo+8YJ0lhdLSpah6hy293Of7FmutkcMwHfhzZVFFgQKY9cEwpgBW/xLdrcr0xvNBCuD5i67GFy/b/SiyvCRp3X46WzrWiS7I1Y6FXHlFI0chDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vFWie7evwMj8MF4O6bLg0cFSrKAAhHL5VXiit9ln71I=; b=UDe9d/RgcIPZq3S6q5pY25CdXehnQFKFvKnnxRmyADL8j37x1OBbHVby1i0Mo40OF3vab3GY6W3qjqmbs4BSKZYGi+UIdrwtyLjRj1okSA78sGhzUnWfLxVmSFTCV1drmdE/A4Mi20l7t4UgmvzZjVS1S1fV/8SIunGN09rH8UcYjYkrOfXeEBqtJX9ZmHH4HvRzyUy8wUqp/bjLmf5a3EZ1JKLcQBoxQ+gykhdJ9Bf0P1/ikbOcSApnlAtejFSgVJzQ6622Flc6m7Alh+QGLROEsq4SmDQmQbTc6LfW86dHCr2n5xp80NeJyLrZP8NWiNP5O10HVTFwjg6k2crzig== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vFWie7evwMj8MF4O6bLg0cFSrKAAhHL5VXiit9ln71I=; b=ne+22F+YH7Ky77WAuOOLwMMlw6anuBDHgi1Bk9pB2tl50Ckc1UC5VeghBFzFhgu+2apudNpwRfk72JksESM/UNQHHgdCUoEdd1vxvZFCoEtM0qlDmpXO5INB6dhLYIv0s9hx9r0G3LpnBLIRI4qUEAuo3i27f5YuHV/aydg2NFY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM9PR04MB8194.eurprd04.prod.outlook.com (2603:10a6:20b:3e6::7) by GV1PR04MB9149.eurprd04.prod.outlook.com (2603:10a6:150:24::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5227.23; Fri, 20 May 2022 04:21:32 +0000 Received: from AM9PR04MB8194.eurprd04.prod.outlook.com ([fe80::c1b2:4c14:c10a:3dde]) by AM9PR04MB8194.eurprd04.prod.outlook.com ([fe80::c1b2:4c14:c10a:3dde%8]) with mapi id 15.20.5273.017; Fri, 20 May 2022 04:21:32 +0000 From: Gagandeep Singh To: gakhil@marvell.com, dev@dpdk.org Cc: Gagandeep Singh Subject: [PATCH v3 5/7] test/crypto: support raw buffer APIs for PDCP Date: Fri, 20 May 2022 09:51:02 +0530 Message-Id: <20220520042104.3784908-6-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220520042104.3784908-1-g.singh@nxp.com> References: <20220517033858.40394-2-g.singh@nxp.com> <20220520042104.3784908-1-g.singh@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2PR04CA0005.apcprd04.prod.outlook.com (2603:1096:4:197::16) To AM9PR04MB8194.eurprd04.prod.outlook.com (2603:10a6:20b:3e6::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2c23e020-cb87-458a-ee18-08da3a1837fd X-MS-TrafficTypeDiagnostic: GV1PR04MB9149:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: E1RR2UUzRq2D2Z5O9pck7O6VNr7IDj1gjJTOS1p2vvqygvI0XDirO8VZSpUR/dNCL8pZPXcyVSVw0o/cgIxIFNWW1nOWPilx27jqAv1OM5tMb0fI4nwITBVoHsAHcDgxrUTsvTc157L/x0S1tK8Db7KhHs/hcQsshq647ZtaSwNh8I+HIe/W31sTM3n3FOIQyOJpbvIC5IUG1ojJ9k0HnIx5SaK3CxJoFye1wnVXXLE7GjPcRf/e5ayDUGpAIiSStKOX0sU52Itk/2npICq1NDncrK+GgxAM030BXNmEhovFUIbIeOWddTtfwamU6OyfVs/QUevMblbTA+LZX7V5BgbtUAdzk7qhYJDpYu9DbvZY2dq0rct5O+ZlUn05Zw6ujMYuMKO/dTprMWYt65HI3R9TGzFNuXKx91WYJizbSTDXpA5Nfmo0HCJvVxR+vCXLuerb8mEXp5rPc0xFLiKx0YuCX7qixRp6vjHvlkFcA6TvMfYN2j4dk5z5AWskglkpZ8lBcPg8geui9WSP9jpCq5g2D6h/aog+wmJOznNeEz1eK+MVqygV7/5KI0/cYfSI6S7M6yRu0vrdhkEeQXs89nKpVHSnVrwhntEq1U4XQ3o3NfQpxFZe8z+FH5jin9u0nddlrhUOosVji4NDrZXZokaFgkF8qDJsZFXD+P7RWEqNlzKv7KoRMP7POQsjc8aOxMp3MY7/w9VwvyPV2H6CCw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM9PR04MB8194.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(38350700002)(66946007)(2906002)(55236004)(6666004)(36756003)(508600001)(38100700002)(8676002)(66556008)(6486002)(6506007)(1076003)(8936002)(26005)(5660300002)(2616005)(316002)(66476007)(52116002)(4326008)(86362001)(83380400001)(186003)(6512007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?2SMnSITDZdFf7XhPVHM4dK5PzT4KJh4ILGjtbSYARjhZw3DHIIsj9AFO+Vzz?= =?us-ascii?Q?XCozxaReb6jUTG91MLB69UJNvXEDuvbSm+QeM+DRNPegjCMHbWrFPCnmTKMT?= =?us-ascii?Q?tDNhV4Y8rX1Ml6IAjXHtgUahRJ2X3IauQBhjXjCeOz0WNVKTdmQBFJEDfhgH?= =?us-ascii?Q?Zf1MDpYUi8gl1Y5Xhi8nmZzFZsy2EVVhFtf652PcB4oMmYrqZC1ZU0H0pXYz?= =?us-ascii?Q?jLxnTCA1K0Qt6hL7rQQpT9llWNCnaTpNZJv/ujcgzYT/c8U5t2VM4fUcwxt8?= =?us-ascii?Q?xLKQDG5K/+epp3qRMlPeZEO1iLXLR4oKJv1M6xFRv2v5mUFLzEwEwdBhvvVp?= =?us-ascii?Q?zgVL6OvmAJXPQJPz1i/pOZ+SsUfeKNF+2J3fLE4Nme6PxCaWqtDayJ987f4F?= =?us-ascii?Q?S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ePkK/p/DMsoqVkh/730?= =?us-ascii?Q?XlV3YiwuLs/+NbcRM23kTbgi1xKfeKVmp3OveImaUW9DdvmX2/yT3++ev6LD?= =?us-ascii?Q?Pw+w8k1Rh4kdiHQQdI6impCjZY8WLVC3up3cJcLsdhwFi/ixdA2pK8xHpCa3?= =?us-ascii?Q?KGzXU9hpa9JyOkEknqWlFvDrowtfqhqNatDWm0sZFmx6NiJBmuw1keMuu9HX?= =?us-ascii?Q?/wD8zpy1KMJu7dc9SvZdLOVOilRy3FevcYKAf/8oZpWu69T1lz7yiN+qVJXr?= =?us-ascii?Q?GFsSevaiHU2ll1esBSOJShdj+eW2YX3eK5/8uhHfIRKdfuArq5CqVucoglcD?= =?us-ascii?Q?SJyUP1jMEUSFzJML/kqJiP38oAkrW9x4OgJl81EMLUqa6U1K5xQgKkpbuCol?= =?us-ascii?Q?9jEF5RLSbukXa9t1/Cp0FjSMfJYLB7y8WTGb4g0yOFs4UTbQbflw8+w0vpGO?= =?us-ascii?Q?1HjywdNXsQ=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2c23e020-cb87-458a-ee18-08da3a1837fd X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8194.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 May 2022 04:21:32.1548 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Cgut4fRTSBi85OJFplErZuGWKb37l2fRV8q43RtCSpHPHQZtff+AWtYbbatF9Xt+ X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB9149 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 This patch supports raw buffer APIs testing for PDCP test cases. Signed-off-by: Gagandeep Singh --- app/test/test_cryptodev.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 7c5d55368b..524019ce0e 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -8370,6 +8370,11 @@ static int test_pdcp_proto(int i, int oop, enum rte_crypto_cipher_operation opc, struct rte_security_ctx *ctx = (struct rte_security_ctx *) rte_cryptodev_get_sec_ctx( ts_params->valid_devs[0]); + struct rte_cryptodev_info dev_info; + uint64_t feat_flags; + + rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); + feat_flags = dev_info.feature_flags; /* Verify the capabilities */ struct rte_security_capability_idx sec_cap_idx; @@ -8391,6 +8396,11 @@ static int test_pdcp_proto(int i, int oop, enum rte_crypto_cipher_operation opc, input_vec_len); memcpy(plaintext, input_vec, input_vec_len); + if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && + (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { + printf("Device does not support RAW data-path APIs.\n"); + return TEST_SKIPPED; + } /* Out of place support */ if (oop) { /* @@ -8483,8 +8493,16 @@ static int test_pdcp_proto(int i, int oop, enum rte_crypto_cipher_operation opc, ut_params->op->sym->m_dst = ut_params->obuf; /* Process crypto operation */ - if (process_crypto_request(ts_params->valid_devs[0], ut_params->op) - == NULL) { + if (global_api_test_type == CRYPTODEV_RAW_API_TEST) { + /* filling lengths */ + ut_params->op->sym->cipher.data.length = ut_params->op->sym->m_src->pkt_len; + ut_params->op->sym->auth.data.length = ut_params->op->sym->m_src->pkt_len; + process_sym_raw_dp_op(ts_params->valid_devs[0], 0, + ut_params->op, 1, 1, 0, 0); + } else { + ut_params->op = process_crypto_request(ts_params->valid_devs[0], ut_params->op); + } + if (ut_params->op == NULL) { printf("TestCase %s()-%d line %d failed %s: ", __func__, i, __LINE__, "failed to process sym crypto op"); -- 2.25.1