From patchwork Thu Mar 28 10:28:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ayuj Verma X-Patchwork-Id: 51841 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4D55F1B137; Thu, 28 Mar 2019 11:28:46 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 773091B146 for ; Thu, 28 Mar 2019 11:28:44 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2SAP5G2014486; Thu, 28 Mar 2019 03:28:43 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=DA062J0G5AjaT2T5Vyps1QSj+AuawtSPa+4f8HAdxNY=; b=B5VXydz8PbloH/UEkgH4K2CaRl5nXytbC/q+A7GzPnIX4F1QIGNVQm0N1eBclT9l9qdE HXDht4RrF7jfcJ2PwOFO3cu2aglvprvDPaOiBEOywgLja1k7DDUa+H/JEynKY8XqQSPv 8J+C7KuAPfZ6IegGX9LOjcw1GAnixwMHvbqyUV0BENHs3BAV/JBXGrLVFEQm9VgyTpct ATPYSEiWKv/V5wCrj53+4LUHWuDQfzWh1hzyfLqr7VRD1cx8szfKP7tIF2D18YytLDhi mn2hyzVyDnjzgNR8qeOci349kRcaPhskcuT208jyDlZ7B4bXujrEOwrOHF6fr60oab86 Dg== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 2rgr9frtay-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 28 Mar 2019 03:28:43 -0700 Received: from SC-EXCH04.marvell.com (10.93.176.84) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 28 Mar 2019 03:28:42 -0700 Received: from NAM03-CO1-obe.outbound.protection.outlook.com (104.47.40.55) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Thu, 28 Mar 2019 03:28:42 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DA062J0G5AjaT2T5Vyps1QSj+AuawtSPa+4f8HAdxNY=; b=IiCF3knrHgPrNAwvdx5r3mTvHHdgmcrKpBI1C7XWRzWErg6cEuAC2JruqEXqWbtL/F4OlQZc+birWAERhhtLh7TcEPzSFtNLYRwuKBTihZT+Sdg0RjD+6iHNnkIiGMg/ec5efn1sFGba2evPO55sUb3wfGLCzVAH6vd/tB77rVc= Received: from MN2PR18MB2542.namprd18.prod.outlook.com (20.179.82.221) by MN2PR18MB2687.namprd18.prod.outlook.com (20.179.84.77) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1750.15; Thu, 28 Mar 2019 10:28:41 +0000 Received: from MN2PR18MB2542.namprd18.prod.outlook.com ([fe80::ecb7:6a6e:f852:3d90]) by MN2PR18MB2542.namprd18.prod.outlook.com ([fe80::ecb7:6a6e:f852:3d90%6]) with mapi id 15.20.1750.014; Thu, 28 Mar 2019 10:28:41 +0000 From: Ayuj Verma To: "akhil.goyal@nxp.com" CC: "arkadiuszx.kusztal@intel.com" , "Shally Verma" , Sunila Sahu , "Kanaka Durga Kotamarthy" , Arvind Desai , "dev@dpdk.org" , Ayuj Verma Thread-Topic: [PATCH v3 3/4] app/test: check for key type ff in asym unit test Thread-Index: AQHU5VEDY+0ecu8X+E+7wVctbv87mg== Date: Thu, 28 Mar 2019 10:28:40 +0000 Message-ID: <1553768834-19072-4-git-send-email-ayverma@marvell.com> References: <1553768834-19072-1-git-send-email-ayverma@marvell.com> In-Reply-To: <1553768834-19072-1-git-send-email-ayverma@marvell.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BM1PR01CA0150.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:68::20) To MN2PR18MB2542.namprd18.prod.outlook.com (2603:10b6:208:103::29) x-mailer: git-send-email 1.8.3.1 x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [49.200.218.66] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 19656301-8099-4366-861b-08d6b3682558 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020); SRVR:MN2PR18MB2687; x-ms-traffictypediagnostic: MN2PR18MB2687: x-microsoft-antispam-prvs: x-forefront-prvs: 0990C54589 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(366004)(376002)(136003)(346002)(39860400002)(189003)(199004)(36756003)(106356001)(25786009)(478600001)(71190400001)(316002)(6506007)(4326008)(386003)(55236004)(54906003)(4720700003)(14454004)(71200400001)(107886003)(6116002)(2616005)(76176011)(3846002)(97736004)(26005)(102836004)(11346002)(66066001)(186003)(486006)(476003)(446003)(6916009)(52116002)(2906002)(2501003)(99286004)(53936002)(305945005)(5640700003)(6512007)(50226002)(8936002)(81156014)(6436002)(256004)(6486002)(81166006)(8676002)(7736002)(105586002)(5660300002)(2351001)(68736007)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR18MB2687; H:MN2PR18MB2542.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: z43nQJNR7IcvCMdECeQ02+qgCTI99SthS8LyG3dVhuWCN3g8IxxjsUpk7U4FjsLcspWeVedWoHxjx46Zb0H5NP/T9Tp1Vu8zQB5yNELJTm+5srG8zFNwSzjqLhsZ4GhexXHe45ZesqIaf9hw4+3h5JSrVfOLRhZisEu8jFO4O6SWjudN5/TxB+Hw/pbj3998GJPLy9A5Hat29IVYALtWAyNRZwY3x8MlQEstoTJjwxW2+1toT/U4h4uBT9b5C2DpXxjjfnjoh6lnEgbYuBD8+TrBTib8AzWKGy8849d6dsBXm23DAI+lg6mAur91g+L14Arc9FJhJZY/F3LpPlbfBJddZ4yOlR/+DU+00mzEdhkGuD+cXgSy3o1cLt2M2Jb4SnX57dJw9xo1wcpCbw9oQQmD24yAAFr8ncK/Z81j+to= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 19656301-8099-4366-861b-08d6b3682558 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Mar 2019 10:28:40.9677 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR18MB2687 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-03-28_05:, , signatures=0 Subject: [dpdk-dev] [PATCH v3 3/4] app/test: check for key type ff in asym unit test X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Signed-off-by: Ayuj Verma Signed-off-by: Shally Verma --- app/test/test_cryptodev_asym.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c index a779e8f..539eda1 100644 --- a/app/test/test_cryptodev_asym.c +++ b/app/test/test_cryptodev_asym.c @@ -49,6 +49,7 @@ struct crypto_unittest_params { struct rte_mempool *op_mpool = ts_params->op_mpool; struct rte_mempool *sess_mpool = ts_params->session_mpool; uint8_t dev_id = ts_params->valid_devs[0]; + struct rte_cryptodev_info dev_info; struct rte_crypto_asym_op *asym_op = NULL; struct rte_crypto_op *op = NULL, *result_op = NULL; struct rte_cryptodev_asym_session *sess = NULL; @@ -56,6 +57,18 @@ struct crypto_unittest_params { uint8_t output_buf[TEST_DATA_SIZE] = {0}; uint8_t input_buf[TEST_DATA_SIZE] = {0}; + /* test case supports op with exponent key only, + * Check in PMD feature flag for RSA exponent key type support. + */ + rte_cryptodev_info_get(dev_id, &dev_info); + if (!(dev_info.feature_flags & + RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_EXP)) { + RTE_LOG(INFO, USER1, + "Device doesn't support sign op with " + "exponent key type. Test Skipped\n"); + return TEST_SKIPPED; + } + sess = rte_cryptodev_asym_session_create(sess_mpool); if (!sess) { @@ -183,12 +196,25 @@ struct crypto_unittest_params { struct rte_mempool *op_mpool = ts_params->op_mpool; struct rte_mempool *sess_mpool = ts_params->session_mpool; uint8_t dev_id = ts_params->valid_devs[0]; + struct rte_cryptodev_info dev_info; struct rte_crypto_asym_op *asym_op = NULL; struct rte_crypto_op *op = NULL, *result_op = NULL; struct rte_cryptodev_asym_session *sess = NULL; int status = TEST_SUCCESS; uint8_t input_buf[TEST_DATA_SIZE] = {0}; + /* test case supports op with exponent key only, + * Check in PMD feature flag for RSA exponent key type support. + */ + rte_cryptodev_info_get(dev_id, &dev_info); + if (!(dev_info.feature_flags & + RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_EXP)) { + RTE_LOG(INFO, USER1, + "Device doesn't support sign op with " + "exponent key type. Test Skipped\n"); + return TEST_SKIPPED; + } + sess = rte_cryptodev_asym_session_create(sess_mpool); if (!sess) {