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 DE928A00BE; Mon, 6 Jun 2022 06:01:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BE61540A81; Mon, 6 Jun 2022 06:01:24 +0200 (CEST) Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30075.outbound.protection.outlook.com [40.107.3.75]) by mails.dpdk.org (Postfix) with ESMTP id 3581240A7F for ; Mon, 6 Jun 2022 06:01:23 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bbt70QhKjOFSVUeGfq/kdqSaRwGpRNVLdngzJNX110ge8i4fFz5/FjcFsHuEwmIKwjH63QtmloOupZ14UiSU7DrSIRwDAidHm1oQVuBaHr3tln+FUDjmzjbHKV7iFdtTZ37nYYECqGpL4EOfzGox7mZ1hRURRO08pPDIm6HasuvbYf8n2bYeqIaAi14xLNLQzaK7kiiBCQOgkAgvcW1GdFyTPLD4twOG+J6DfMAYcC+xzeWqWcU/Q/EDFyN1wSNHm7BG/uqPv6MHTtch1uQQBYEkQ7VgrGobUkXFDy6Ns/PX0FvMq48YxXvPPfzXELSoFtKhqZFvZNLlED1HbFOSRA== 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=B3YkZvNWFEGcr1vBn3AE9MrAEqSuaL2T+kMvOXG4h4s=; b=KEjLieTS+D3ZV7m/FW+QA4zrpDWoYYKvgLOcOSSZ/lF1gGfQsl6hnLmr8cU2pdmAMf7cJGfDzk4r9purrPV1pGBuytecxXJCrLJtvk0xQEYW9i176ld3oG5VSG4X/30ewHa0WKNuOkcfyStYU24WDnLkdqj8LUS7igLJgYNZqd/yW/1+g50ObhX4JeVzHe9a4qVTb7eMCFqoqE1v7NjI1uWuIqNItd303RtWoeNOoa4Anrr+qGmx2uhA+HcLveJaeEQ1crXpIZiHM/dDEwlo0DVaDkryrqkdEwJjbH+UNccECI4M39P7TVDWsYZ/3X1q6nZMeA53pmlZbr9lzNlDeA== 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=B3YkZvNWFEGcr1vBn3AE9MrAEqSuaL2T+kMvOXG4h4s=; b=kD/Na1U7BJmxi1Zisr8Y6NBOANLlsT0BIb6DBrfmYP2vtewcUDtBkfrQ/jjPT/qC9s62rLTQs/IVsaIqL4gC7c/g3OGKzga9Q6E8YJRPncPnDYeBNPXHEgf3qWb/d7cYLVg6DJa9YvUwb97QO5gOXmn1IrxvOOAkf7iBKJbt3wk= 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 HE1PR04MB3003.eurprd04.prod.outlook.com (2603:10a6:7:20::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.19; Mon, 6 Jun 2022 04:01:21 +0000 Received: from AS8PR04MB8198.eurprd04.prod.outlook.com ([fe80::20be:bf68:bdb3:d4f8]) by AS8PR04MB8198.eurprd04.prod.outlook.com ([fe80::20be:bf68:bdb3:d4f8%9]) with mapi id 15.20.5314.019; Mon, 6 Jun 2022 04:01:21 +0000 From: Gagandeep Singh To: gakhil@marvell.com, dev@dpdk.org Cc: Gagandeep Singh Subject: [PATCH v4] app/test-crypto-perf: support SDAP for PDCP operations Date: Mon, 6 Jun 2022 09:30:58 +0530 Message-Id: <20220606040058.1285089-1-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220520042104.3784908-2-g.singh@nxp.com> References: <20220520042104.3784908-2-g.singh@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2P153CA0018.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::9) 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: bceee0b0-083b-481c-c855-08da47713485 X-MS-TrafficTypeDiagnostic: HE1PR04MB3003: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: mplX+HLBBTzjBJeW6KFG1YQlcobhgKc6ecEC42cxkNfCThq7JaMMWWYKIiiptgK0+aJQ4wuYJk1VcRZTVT5BfjpUOT9SSwGkMDUQLuCCoJ81tWZXeuydumLlG/zfDuFwObULnemuh8L95nHcXcSCXrYHwQAUbOGwI7lQAjb9+qrivW2g8wf4EMGJiAPHmzqUg6T9ni2Ke6S/ckpZT8NFCPyuQDmZE/bCSKRsw1QPLs4V4GC5+selW9png+znUGW8u57TyDGtelyeuMfQabBv26Lyltl0IyPbaMfiM//qn8vgOabdaL0L2CEn9RJZDXWBG+lAg9ZtmWrO+A1xadoI5mCZBvnR3hnXKxmvjKR3XsarrSgnQZA/4Hu0PbpWGhrgg7LLGde5XaKILgKZMEUsfq3HJKC7qa954ljdok5y+aOzE+P7ieRtvn0R437aAy5Ly8JzNXypFAC6S+YE8yjKvi1OdqXgv0CDFA7/5QHFY39XMK8jVqr3Qj1e8iJ37g7kjuNyX2mcn2NZlCfi8Uj28a0Ay0zh8SUr0wr44bII7Iuq9JMqYb8Wy2taLY+SwZ8kUBPmgg6nggdm831hitlGvjX54IlwR0twSNYpg0A3PBcGbkKT9aQYBMYXUjZJtf2HtzSS1hvNUpoW3/2DdI4mmWcgY5/3FNOoZvbKnXFKPhLYVc9AHHj05+BdDupY5RIqAc6gE8cf+Ut4qYm6dQU5XQ== 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)(6512007)(26005)(83380400001)(8676002)(36756003)(66476007)(66946007)(66556008)(8936002)(5660300002)(508600001)(186003)(6486002)(4326008)(86362001)(2906002)(38350700002)(2616005)(6666004)(55236004)(316002)(1076003)(38100700002)(6506007)(52116002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?9WfN3AgD+kwEiNLOZNbVmYrP0N4yPMZER9F5ezm45AYx+IfvJMBAcmW8aUU2?= =?us-ascii?Q?lRYNsG77SRf9M5tHhG8yUsIkN0m2HiNT3VQzxz+5AKyehaHHpk2VKY4Z6N0T?= =?us-ascii?Q?lXSgY7WaqJQHT7oMhcDxNR8sp39wQlrx/SNTTLGl/b/oseBKyEXNVrwZA7Ky?= =?us-ascii?Q?Xff+7FCpSdtR9XeinmHJBGug+t6m/GpyIN6muLMLgyldH9ENLRgI6jbfrMMd?= =?us-ascii?Q?Y6zDumDeS7KFxPy5WT3Jd+/i5PP5mctAruqR4wzr+s10a4oXw3H1pcldwlRA?= =?us-ascii?Q?XQ08FOwpweSuGrAm1+J5hxzFY0MNrgzoca1NH6UUcHhtKUmG1pjy23+EfIiC?= =?us-ascii?Q?6LJeWV3wZtXk8/2xksKwtDiX1T6XhYQ5aG+6knU0UIBV/+Y8l74RKxtWQflC?= =?us-ascii?Q?OVx8KL4gui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/qCaUmF87U94ivMU?= =?us-ascii?Q?vhotoJdtOz5RtBprZ92yMO1D6/aW3S4ttiQU5E2cp9qE/WnZwKuQd/wU2n2S?= =?us-ascii?Q?Ze5eC9UxmD0qrU/IjeewbkYnlC1KhcHz++D37h+2w0BsHLLPWNSDjgBrruxO?= =?us-ascii?Q?a78dh/hOhEeMCtaVMECI4/LnM5jTVVtiCXiy4kGyVAOfHRL5ipPgIu8agOQJ?= =?us-ascii?Q?N/RTJosBJX8DpIiZybPlSWl4ZWACaczMz7svkqk4Xg51i1qvbubiTQYen4DH?= =?us-ascii?Q?9Tj61ff9PNHsBJjvwxEE1G4xbACumSyAd3m3mTT4Xz4hTzFIesUUpF/9xQQC?= =?us-ascii?Q?fGnL1use5GFJ2CMWI65cIe6sZQ+ceFu8wcMepUphEc4/OBO00mwvvldgynar?= =?us-ascii?Q?rTI+xi0JL9WV61D4ynpYjEunqkkKTDG7miB+3Nr7WDhIl/x7aKQT6ebkd4ae?= =?us-ascii?Q?v6GHjgi4QA=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: bceee0b0-083b-481c-c855-08da47713485 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8198.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2022 04:01:21.0447 (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: Xg2hKIvTS9sSmOW8+QCBODPuULxFG0s5CvstAf+vV6FdEP200ARQRMtqKq7/6cWR X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR04MB3003 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 Add a command line option "--enable-sdap" to enable Service Data Adaptation Protocol. example command: ./dpdk-test-crypto-perf -c 0xc --log-level=8 -- --devtype crypto_dpaa2_sec --optype pdcp --cipher-algo aes-ctr --cipher-op encrypt --auth-algo zuc-eia3 --auth-op generate --auth-key-sz 16 --ptest throughput --total-ops 100000 --burst-sz 64 --buffer-sz 64,390,1512 --pool-sz 4096 --silent --pdcp-sn-sz 12 --pdcp-domain control --enable-sdap Signed-off-by: Gagandeep Singh --- v2-change-log: * dropped qeueue improve logic in crypto-perf app patch * removed external buffer patch in this series. * update documentation. v3-change-log: * update signal handler's variable in l2fwd-crypto v4-change-log: * added default value for sdap option. * Sending standalone patch as all other patches have been applied. --- app/test-crypto-perf/cperf_ops.c | 1 + app/test-crypto-perf/cperf_options.h | 2 ++ app/test-crypto-perf/cperf_options_parsing.c | 13 +++++++++++++ doc/guides/tools/cryptoperf.rst | 4 ++++ 4 files changed, 20 insertions(+) diff --git a/app/test-crypto-perf/cperf_ops.c b/app/test-crypto-perf/cperf_ops.c index cbefce8d6c..4295656a0b 100644 --- a/app/test-crypto-perf/cperf_ops.c +++ b/app/test-crypto-perf/cperf_ops.c @@ -861,6 +861,7 @@ cperf_create_session(struct rte_mempool *sess_mp, .hfn = options->pdcp_ses_hfn_en ? PDCP_DEFAULT_HFN : 0, .hfn_threshold = 0x70C0A, + .sdap_enabled = options->pdcp_sdap, .hfn_ovrd = !(options->pdcp_ses_hfn_en), } }, .crypto_xform = &cipher_xform diff --git a/app/test-crypto-perf/cperf_options.h b/app/test-crypto-perf/cperf_options.h index 09caefde22..613d6d31e2 100644 --- a/app/test-crypto-perf/cperf_options.h +++ b/app/test-crypto-perf/cperf_options.h @@ -14,6 +14,7 @@ #define CPERF_PTEST_TYPE ("ptest") #define CPERF_MODEX_LEN ("modex-len") #define CPERF_SILENT ("silent") +#define CPERF_ENABLE_SDAP ("enable-sdap") #define CPERF_POOL_SIZE ("pool-sz") #define CPERF_TOTAL_OPS ("total-ops") @@ -129,6 +130,7 @@ struct cperf_options { #ifdef RTE_LIB_SECURITY uint16_t pdcp_sn_sz; uint16_t pdcp_ses_hfn_en; + uint16_t pdcp_sdap; enum rte_security_pdcp_domain pdcp_domain; uint16_t docsis_hdr_sz; #endif diff --git a/app/test-crypto-perf/cperf_options_parsing.c b/app/test-crypto-perf/cperf_options_parsing.c index 09c98121c8..55b43efe19 100644 --- a/app/test-crypto-perf/cperf_options_parsing.c +++ b/app/test-crypto-perf/cperf_options_parsing.c @@ -64,6 +64,7 @@ usage(char *progname) " --pdcp-sn-sz N: set PDCP SN size N <5/7/12/15/18>\n" " --pdcp-domain DOMAIN: set PDCP domain \n" " --pdcp-ses-hfn-en: enable session based fixed HFN\n" + " --enable-sdap: enable sdap\n" " --docsis-hdr-sz: set DOCSIS header size\n" #endif " -h: prints this help\n", @@ -548,6 +549,15 @@ parse_silent(struct cperf_options *opts, return 0; } +static int +parse_enable_sdap(struct cperf_options *opts, + const char *arg __rte_unused) +{ + opts->pdcp_sdap = 1; + + return 0; +} + static int parse_cipher_algo(struct cperf_options *opts, const char *arg) { @@ -879,6 +889,7 @@ static struct option lgopts[] = { { CPERF_PDCP_SN_SZ, required_argument, 0, 0 }, { CPERF_PDCP_DOMAIN, required_argument, 0, 0 }, { CPERF_PDCP_SES_HFN_EN, no_argument, 0, 0 }, + { CPERF_ENABLE_SDAP, no_argument, 0, 0 }, { CPERF_DOCSIS_HDR_SZ, required_argument, 0, 0 }, #endif { CPERF_CSV, no_argument, 0, 0}, @@ -951,6 +962,7 @@ cperf_options_default(struct cperf_options *opts) opts->pdcp_sn_sz = 12; opts->pdcp_domain = RTE_SECURITY_PDCP_MODE_CONTROL; opts->pdcp_ses_hfn_en = 0; + opts->pdcp_sdap = 0; opts->docsis_hdr_sz = 17; #endif opts->modex_data = (struct cperf_modex_test_data *)&modex_perf_data[0]; @@ -994,6 +1006,7 @@ cperf_opts_parse_long(int opt_idx, struct cperf_options *opts) { CPERF_PDCP_SN_SZ, parse_pdcp_sn_sz }, { CPERF_PDCP_DOMAIN, parse_pdcp_domain }, { CPERF_PDCP_SES_HFN_EN, parse_pdcp_ses_hfn_en }, + { CPERF_ENABLE_SDAP, parse_enable_sdap }, { CPERF_DOCSIS_HDR_SZ, parse_docsis_hdr_sz }, #endif { CPERF_CSV, parse_csv_friendly}, diff --git a/doc/guides/tools/cryptoperf.rst b/doc/guides/tools/cryptoperf.rst index cf3b147213..c77e253417 100644 --- a/doc/guides/tools/cryptoperf.rst +++ b/doc/guides/tools/cryptoperf.rst @@ -332,6 +332,10 @@ The following are the application command-line options: Enable fixed session based HFN instead of per packet HFN. +* ``--enable-sdap`` + + Enable Service Data Adaptation Protocol. + * ``--modex-len `` Set modex length for asymmetric crypto perf test. -- 2.25.1