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 46529A00BE; Mon, 25 Apr 2022 06:15:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EB0E14280D; Mon, 25 Apr 2022 06:15:13 +0200 (CEST) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140081.outbound.protection.outlook.com [40.107.14.81]) by mails.dpdk.org (Postfix) with ESMTP id 5CF7C427FC for ; Mon, 25 Apr 2022 06:15:13 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ENKAKSaKJNkXVR3TBpzznmtfmEapnj28y9r0uuV4BNrB4m/gahNugEoFmgZM28lWw/jnhITMlAntLt0UC9b2/E78qIpvAkTQb/U3q89n88GA8Jq4gBEV3LG98nbEoHuyzLiupLIeo3QAS9SI6881dWbrKIQWu1cEFtnvkP1NctqLh/dPSnTOjZVEu9lrKqZwaQc4GAjNKJl6AZT83eUNe1HZP4wVcaED3NiteqROClvkHDsjeWMiHh97zrVc2x3wEBQYbjTLND/pe1auQZbJHzD+o2ehtQxhRbDR2g+LYgAMmk8xrIncul0ZHY0DTGiNs9mKv3jG27TrGB9pkcbJ3g== 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=z0biOug9qctolR83SBOHjCm53c/S/BA1J2xoT0hLC/E=; b=YeIWAN2HcqsWbT1U1NlpOHYFD8HCuqurteTTwbmlv+jZNwx1JCXBEn1qXHzmv1Jwi0J9IeM7VV5JWRw77+2KnVtiqEluMFoM7uST89qzhpMu+T/rQBgBOM3/OfUhcrpnk2XluG0v9CBZs2Us8wFhFDj/5SYyXh7dwYlojPO38/4AchFtjzQ07CgTMx3TaSBGRwxl2z+rlgylxbx8d8ydVyHl8sTJJbTrHTfIXbAtYt90cjYWn4isjfHaDA9RWPq0sxHKiDOiaKwq9ntiZgE7aPRPDGuS+VkR3D2t+e5RQiN24rlnlJRWKlswj5DESFgz3CbsGRD9Wms9YGjDQnZrBw== 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=z0biOug9qctolR83SBOHjCm53c/S/BA1J2xoT0hLC/E=; b=Tn8QuLi/Oy0UonmvARLMYfrVdRBnw2uIoRDwVB2uOmQdsFYIQZG0GqcSBJ7ykqkopTz2vZPS5O3+9G9EYlLzG+LFrPtaZaQWz3PV9Wj/I4KrY3qDO0hbPqMF9yYUyZbnzkGQoH408/WMCl4VVXOBwYWHehPI7nErXMa9+Ub/ONM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8PR04MB8198.eurprd04.prod.outlook.com (2603:10a6:20b:3b0::14) by PA4PR04MB9416.eurprd04.prod.outlook.com (2603:10a6:102:2ab::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.21; Mon, 25 Apr 2022 04:15:12 +0000 Received: from AS8PR04MB8198.eurprd04.prod.outlook.com ([fe80::8cf1:93b:c340:3be2]) by AS8PR04MB8198.eurprd04.prod.outlook.com ([fe80::8cf1:93b:c340:3be2%7]) with mapi id 15.20.5186.021; Mon, 25 Apr 2022 04:15:12 +0000 From: Gagandeep Singh To: gakhil@marvell.com, dev@dpdk.org Cc: Gagandeep Singh Subject: [PATCH 6/8] test/crypto: support raw buffer APIs for PDCP Date: Mon, 25 Apr 2022 09:44:21 +0530 Message-Id: <20220425041423.2232034-6-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220425041423.2232034-1-g.singh@nxp.com> References: <20220425041423.2232034-1-g.singh@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR01CA0165.apcprd01.prod.exchangelabs.com (2603:1096:4:28::21) To AS8PR04MB8198.eurprd04.prod.outlook.com (2603:10a6:20b:3b0::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: dd53d0c5-e0e7-468e-a597-08da26723148 X-MS-TrafficTypeDiagnostic: PA4PR04MB9416: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: KO6r0+x0CD8w/RugAyYLJZsVgYcB1P3eL1CgJmbfSjg5GazwIaQD2QRkqp2nAviFjhC9P5xGvTnVennGWdLWqgzvun0ekcrXj6uYN2Hae+OnVtWLK+6H6iaqyG0YyiVRn+Ie0sP1e55Mr6eiOTVrVo+G7iw7jBp+DrByEbRGhJoCkC5X+vXZUyrIZq3Q/a868CAO+vmovhk17sScC5ef6z5EJvFkbc9MUSmCvRNdoQyQ5qhk/eX3yKOUeDw90xTQIk1cf35FRtQt+6HZv8s77BnyD2DHmLNCA+uhDvgdgOwbFAHnrYEdVnGtcNrTjt/InnOZ11aQ2HFZcxKyNtM2JnmnkGgUoLGq4udwDVhLYx4iloAmmemYhdKF9bSvKj2yZ+pOG4w8KXTQabeGE0xRz/jKp0XI6UMl+0S5sdQirnkiTL6VpHUFmADPpJcASKAjn34cZsW4lmfdkMEP3DxSEtl6Mcc/kxXvbnCPXYG1eHIncKWwpd8VB016ox+ydsYValyJ4NEW2AXHR/DZ89uT2AAjQ38QWQsLX5T7KNCUsgi7sY9EObma/7VMaOo5OvgZVXthLkwgoALIVTr78tx2uEOPpZ7YFIRtcw8z/0n5heitanbUbS87rbcmgAhbAS3o7a040/02Uy0yzMnaFbjCJaE99TLh+EIusj3RF+88cl0WrxRmI52dRWQRv3K9kyy/U/V68g9DekL/ywkpQXb38A== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR04MB8198.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(4326008)(66556008)(6666004)(2616005)(5660300002)(66946007)(6512007)(8936002)(26005)(2906002)(38350700002)(86362001)(1076003)(38100700002)(52116002)(508600001)(6486002)(83380400001)(66476007)(8676002)(186003)(316002)(55236004)(6506007)(36756003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?SHuhbGUILVb28KIItPP/PAm/y0V3BajqIzAAvq6NVarnrw/apC+JT84MyoED?= =?us-ascii?Q?qzzLm66R8gnsNE4AoTdk6nXGLG7ZLsOVKOsA+3wQBtNZZKS4Wm6WOwot+LnT?= =?us-ascii?Q?c4fY/XHJT4tD7p1fb2jBnu5XwmsPeJucT3yVGTEU0bonqBy9XUVvM1iy20uy?= =?us-ascii?Q?VtXBd2aKKzd6ODUTa0S5ygy4SFiUWygLn5kXxUKlzUavRo3DjlWxUxta16uU?= =?us-ascii?Q?xh5Tyr8riXTAowB4I7LQ6iEntTOXZo8J5WDi7vAG76ghtdt2MI6nVRw32d30?= =?us-ascii?Q?FSbiwp2Z2G6fhe5FQZXuxmcBtOnCeGJLDcCvsoOBODyp/tEaFHB8XYnNoIoM?= =?us-ascii?Q?1fuuE1TWlI5hPWgi4xC8HzhjWr7oJCHY5i8drhzpoD3sHq8JUpwG6o1gPhuI?= =?us-ascii?Q?sH6Oy8/CL+/nLty3RYPtwfNhN1YylOAlux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Q?U0lLEXRAAjIY0HpjJr5/w8+Y4V3S4jmnf/tm5oxrTpnU4sQgcvT7luvvYWR4?= =?us-ascii?Q?3PocbgjlQNFDiRHK3kvgCBgUUMsuXozc6a+O9IGtetjVc4qwALd+pRkDyEw2?= =?us-ascii?Q?+1T7hfkghwJM1stqywLZEv6Di7lxEMz+AoJW3gcQ4Vd0c2iE16LLler2dAM7?= =?us-ascii?Q?2zVKOEyM9oM78Muo/z/DLG7DZLmQpq92gnVpC1ZfoEqsN2JovCtie8SQUBj6?= =?us-ascii?Q?NKRNPBk4zDjWoaTQeQ/E1oOmVrqQ9/M4axCKo2p3ZuqssIX1BuygQqx3eebT?= =?us-ascii?Q?RAAJtktt6cg/wyQvMKGUgl5EiEu86JEHXVQ3HJDeZ8GvsP1lIhRYnvet/BDU?= =?us-ascii?Q?SVVxgpf11Jzy/yj0jTn/PG+3kZHropUjj1VwoDmdTGFI5z6m5YV8BwqPR1yO?= =?us-ascii?Q?f9wEX38few=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: dd53d0c5-e0e7-468e-a597-08da26723148 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8198.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2022 04:15:12.4286 (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: rSjvp6untNNyyoclL0uyhbyIz78a8fIoTbNp9nQ2xDfxKtOHYOZo2XYeQFowrUjs X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB9416 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 5a60fc5c73..0b53ec0078 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