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 1AF25A00BE; Tue, 17 May 2022 05:39:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C155142B7A; Tue, 17 May 2022 05:39:34 +0200 (CEST) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20042.outbound.protection.outlook.com [40.107.2.42]) by mails.dpdk.org (Postfix) with ESMTP id AD53F427EB for ; Tue, 17 May 2022 05:39:29 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BUe5OVaGi15pVY4u+gs2l3goJbvBmlD2QvIOEqXAXUToRvAGsunJirUFuKxMMRP6tJyRoxAPzHeDfXxDi8UTdN9QuqFsiiJ8PKTKDPc+cDjLi2cbpHuCL0djh9k5QSF3uq6xtE/dyQmQWJGLfUYZc9SrVEqYJQtc1s143+7JuB/D0wwZgN+T0EyGGuzj2+IH6kZSRvebZMMDY83Mx6WGnS8wr/lI4PZubRhENjbltmDAwjURP+L1TVy+jLOvoJ5Ix3qrlIKaoGKcvOUezFsd/V4gRLgUcQMOI1Kd0tAonFNiCPVJzG1uvsOXDi2Xf71BjaAhWKnJh2pqgmfaePS7BA== 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=FfhkZHrrRaQXJtg0Ux+bw44Y6sTUQ7kSzT8/eNmo/HHMyg1bf/uMVYKyBalq5a+PdSpmdSpGu1wuBKLtRqSZmkGl00GQa6Hf3H7z0oZYFShXn2BNT5b8EpX7NaFE6CfyHzgUYW9/m9UaqBEeqVEImoVZwlg/Cp20+u1zH3zLUfoXM+JNH+OuVn+dCPQdsZV9efBCu8ulYjk6LMFrlkYFwNkIdeCTCtUYS/AsQm6NQH8RUGbBtoePtnYWPjfwniweL+dVJowMvm25AFZhlkvM+WbAAi39qQOJF6nRv4grhNPmBhPA0YhWs8vQ5N1+gXNjLVo71w79cBTLX+wkMvCRbg== 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=rLWZ8JvUACaephXTsV3nEmraTThsRmimDJnjmOoNIjRPBN3Pz735fpmID7ZQBUhEcrGS5eaueXQqau+pJCKbMKE8ufiKXJpLGcN8BEjB16N+cR2vEgA1EAj3hcFWe0T7wJ03kvIYHvi/CeXXuGKcnvZm/1u7z95q81db5ww4xkk= 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 DB8PR04MB6937.eurprd04.prod.outlook.com (2603:10a6:10:113::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.18; Tue, 17 May 2022 03:39:28 +0000 Received: from AS8PR04MB8198.eurprd04.prod.outlook.com ([fe80::8cf1:93b:c340:3be2]) by AS8PR04MB8198.eurprd04.prod.outlook.com ([fe80::8cf1:93b:c340:3be2%9]) with mapi id 15.20.5250.018; Tue, 17 May 2022 03:39:28 +0000 From: Gagandeep Singh To: gakhil@marvell.com, dev@dpdk.org Cc: Gagandeep Singh Subject: [PATCH v2 5/7] test/crypto: support raw buffer APIs for PDCP Date: Tue, 17 May 2022 09:08:56 +0530 Message-Id: <20220517033858.40394-6-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220517033858.40394-1-g.singh@nxp.com> References: <20220425041423.2232034-1-g.singh@nxp.com> <20220517033858.40394-1-g.singh@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2PR01CA0046.apcprd01.prod.exchangelabs.com (2603:1096:4:193::18) 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: 6d3c145e-fa59-4a3b-d237-08da37b6d6f1 X-MS-TrafficTypeDiagnostic: DB8PR04MB6937: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: NWrwZNCmfrN5IcTn54yuX08D1juBv5XizBkRyGEai0BDjIBokU3PNQ2dDoLVWp4VKky2VdIGseZfULKjacdqsrT8JLFJjNK8E9SovZUnliTj+dzrTWEy7T76r8QNijde73aqCtLRlciVeRzt6OCAd9qAUGIDShGscPhDKDdB75sTI0gWVnXjzIANkuTpYrWrM7BTpkPyQixfNNrdqADhJ2Y9/DYZyjpawIMIlJaiY/UQ6/04xHpN3WYQcY9SyW6xdMTGvXg+hSUy9qOh2vMS2NoUBOdmOrFE2qhqgvSB1e0wdP2zNq0f76RXVgowgEGQXf6PQlXpA8ZB17QOwZxFnEw1RBxoOh/ut9JG4Y1yX9P9NV8VfZs+FfxAuqwULOLBWc5Jq3QeaGjFOaiAkMvK5l7uc+iFkK717+cs53OVB3JJhBPtnBQ/ZZIG1v1FzQVyDRJyjjE7KUuDlvQTr2u1Cx4nmudr6tJF5JIJ+OpdzDV4A+bwUNDK39y1tFlGQn9mRpJwunHjm4ar3ffRlUU7/v9LR88X6JuEWhr6BVHu3JFP8G+jRLn0M4i6wdt4pW67iz2ckjX0IGM+UHqAZ7ncBewISYpo/Nu81VTL1J678cSxHNZK1TI66I2dm7RJA3bPRMTmoK4yHQzAPb+6MVZsY0pBHdYyDm6Tv40cvlZp/lZcrIlyuvA0pHatsvbV/kv9mMjWN6bEN+hXdiSYxi9tnA== 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)(8936002)(316002)(55236004)(2906002)(38100700002)(2616005)(86362001)(66556008)(38350700002)(36756003)(26005)(186003)(6512007)(4326008)(6506007)(83380400001)(1076003)(6486002)(6666004)(52116002)(508600001)(8676002)(66946007)(5660300002)(66476007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?6zlDjuWYNqkzYBedkk2RYRfjpj4FWHbvGxFx7pAE1FSYeHJtejMTTe+IMKe0?= =?us-ascii?Q?j/BpTxh/tYHuKWebpNTp/I6GSl617Fh/v98EyDSHAbGF+5WepGRAbUqNanci?= =?us-ascii?Q?CWZrTCmUQ/d2JAPjmwr1IvnRM0z2LrUpKdc9+uG3i9Sry6rJ3rhPVv+U5Rfn?= =?us-ascii?Q?j3HJ3eE3AhCYp9ymuycTtOefIBZD/POHJXYOuARezcFCBPhD1ZSBheUzA/iU?= =?us-ascii?Q?Bt1Nwet/QJqu/U9JlAzsikwDjjzbUrNbyp6dkDJDYJPQJIVtXr2YnC1jdFCV?= =?us-ascii?Q?ti6GyB3mX0Aiun1JBmgws3vs4GVp8cncnUaL9Wsu0cdOkYsz0zK8a0ic2E6G?= =?us-ascii?Q?1ugykckZFemzw6W8mkRw44uanNvOuIDNXLO0H/KMGTBaOIqwXL2fgsNKrkGT?= =?us-asc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T7/KkHjT4M3krj8pLWyyYQpOWRrK?= =?us-ascii?Q?88VM8/mIWRn2FrXvtu1tS4Jv5ZnIzz0FRyPTh4t7hdoe6YcszUB9ZkKCrXYI?= =?us-ascii?Q?2j0IOhT/jb/HWP5ADAsGzFkTvmdeVW8qj0NzN6R+rNbSfBlYlOm9Cbd0KB8Q?= =?us-ascii?Q?EsI5E9lBkqLe1mGKDiqEESnHJewrDSbzHVci11ehvfpyLN1BgndUK/abjPVq?= =?us-ascii?Q?i5FRujr3vJbPsbYpZlBstQ1O5gMFJRVfzmh8zybbmXnyTU6nkFPPDnyQQSws?= =?us-ascii?Q?svtSBhJ5xEd3r1VCwpnFGRI/2g+2JJZFbpHKTIHvzVsVkOm0ImCFaW7syAf5?= =?us-ascii?Q?ROgx5jLc40+KvkJtBvPxP3Pk28uS5BcT+lVC5DyCvCDvJBZS6xaFmVNleLaX?= =?us-ascii?Q?NK7Yw389IUzESMnXSOp3YFWdFAvchjJe6JVyWpJtyFDJLMEX+CCbbv6gKvuM?= =?us-ascii?Q?6taiEbCD9A=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6d3c145e-fa59-4a3b-d237-08da37b6d6f1 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8198.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 May 2022 03:39:25.8594 (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: Tj4gT2+J+ic/KLAJ7ig142QPaqv2jGgYnnwrFH2pWZ9APGcqlw7EB9BmC8M0U3Ay X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6937 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