From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id CCFD45B3A for ; Wed, 27 Feb 2019 14:34:02 +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 x1RDTnxK020223; Wed, 27 Feb 2019 05:34:02 -0800 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=L52ziQXQHBUl5rIYhVskfCH2t0GxS/bJxlxiXkZpakE=; b=rvA0sGzlTUe0Zb8q5D1cCKHHSJW3CtTUMjMGrbOfoSA1/335Afkdvg2E8Hqu1fVTH+uX L1uSJ8AwK8LxLrQmEbXFo5UdSGIrElrNMjk8F2VUGpzVeDvS0F7yz5QF7AYRr2wvCNRz gAHO7Amfmyj/RsKStAlrdFX5o3gZBFwQJ4vvizZKp0m3HvfEe31jX/nrTTV9gZOqEhqU PQSeZD/gH2t5jbvjj1uSZ7HU5ohOwWmaGVOEjxYHU3R1b4m4bzUv4FZ3jql4gAbqSlIL /1jCLW62NcWhHRACCh6Btum9b+aHUuifRe3c9G1Zipcv1KJsqRheFIoLJdxBQOB7qfSg yQ== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0b-0016f401.pphosted.com with ESMTP id 2qwhfgsm2m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 27 Feb 2019 05:34:02 -0800 Received: from SC-EXCH02.marvell.com (10.93.176.82) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 27 Feb 2019 05:34:00 -0800 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (104.47.38.50) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Wed, 27 Feb 2019 05:34:00 -0800 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=L52ziQXQHBUl5rIYhVskfCH2t0GxS/bJxlxiXkZpakE=; b=eHIJhACsabRgFHMv/7zOhiBmCKqlhz1Rady2QXvNm2JRmXUfjrTQrXexGtou6N4bjYkOGyrnYlnGGDomHkKodhx33FbiTz+7+bBRBPT2M6ZoE+X4fbUbAfi1EcfH4PMabIDIxIjgUYcORRiVryHBb1bDCMYMxpzbMFuhTl3hLXE= Received: from MN2PR18MB2542.namprd18.prod.outlook.com (20.179.82.221) by MN2PR18MB2607.namprd18.prod.outlook.com (20.179.82.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1643.15; Wed, 27 Feb 2019 13:33:55 +0000 Received: from MN2PR18MB2542.namprd18.prod.outlook.com ([fe80::2cd3:8b8:fbbb:db98]) by MN2PR18MB2542.namprd18.prod.outlook.com ([fe80::2cd3:8b8:fbbb:db98%5]) with mapi id 15.20.1643.022; Wed, 27 Feb 2019 13:33:55 +0000 From: Ayuj Verma To: "akhil.goyal@nxp.com" CC: "arkadiuszx.kusztal@intel.com" , "fiona.trahe@intel.com" , Shally Verma , Sunila Sahu , "Kanaka Durga Kotamarthy" , Arvind Desai , "dev@dpdk.org" , Ayuj Verma Thread-Topic: [PATCH v2 3/3] test/crypto: check for rsa key type feature flag Thread-Index: AQHUzqEVdUNFOA3Wykqr16yKQ580Mg== Date: Wed, 27 Feb 2019 13:33:55 +0000 Message-ID: <20190227133258.8962-4-ayverma@marvell.com> References: <20190227133258.8962-1-ayverma@marvell.com> In-Reply-To: <20190227133258.8962-1-ayverma@marvell.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: PN1PR01CA0109.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00::25) To MN2PR18MB2542.namprd18.prod.outlook.com (2603:10b6:208:103::29) x-mailer: git-send-email 2.20.0 x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [111.93.218.67] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: eba790dc-7dca-443e-7369-08d69cb83855 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020); SRVR:MN2PR18MB2607; x-ms-traffictypediagnostic: MN2PR18MB2607: x-microsoft-exchange-diagnostics: 1; MN2PR18MB2607; 20:poGXEto5XwGuGcVZK2MEti25EL1shYMSX2GQv/NitLDFkEu6rdeZvGSVAkaPGsOOJDkLVf0wDfPynBKQvqG4VnSS7GpW3NLr9Ax5Kq8O9suHtW/SNPlKYYuLFzyychRXVuYMlNMFcd/K8bJYd7S/f7cvRR8RPYl77qidY5nM+Zc= x-microsoft-antispam-prvs: x-forefront-prvs: 0961DF5286 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(366004)(39860400002)(136003)(346002)(376002)(199004)(189003)(78486014)(99286004)(86362001)(26005)(186003)(14444005)(305945005)(7736002)(6436002)(6512007)(386003)(6506007)(5640700003)(3846002)(2906002)(446003)(486006)(6116002)(54906003)(6916009)(97736004)(11346002)(256004)(1076003)(2616005)(476003)(2501003)(5660300002)(71190400001)(71200400001)(478600001)(4326008)(14454004)(25786009)(107886003)(2351001)(8676002)(53936002)(316002)(102836004)(8936002)(6486002)(68736007)(81166006)(52116002)(81156014)(76176011)(66066001)(50226002)(105586002)(106356001)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR18MB2607; H:MN2PR18MB2542.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX: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: X2SHeuAlcwE5YF8cFVptfl2Yxk9sWbZh4LiqTUanvYG3dX+0pwGYKIiYRhKDooGRrePrKs2320ri3CWPVxguXaYunbKqpg5F+pmx7rPMVZwsErQnSaMHqE3gt1rQSgP+zVXs/LnHKvZwo1foClTWzAkwN72OxShCiis4tnTMiYGnP8OPaGGF2JeUnYJiU2xr05lo+U3ExEZ6oZd0NJmEVKgSVFCBROEK7SS2ldmQCaH5ZTtuSuGbHBu8OIunQPAVOxN1nH8QtjgXfT4NiczQdd0tbtZHJVvz8f0GnJXBAovkkmUOu4biAL7AKMdG3jQwWf/XC9XkrSmlMJBT7/941OoyORQWw62lK1JXxbyhIbfz7x2lAiwMrlTI5cOJg8YAwXBFaznKclTx+Ay8lmlubBdfhgw7XE+HP5AWNO0t098= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: eba790dc-7dca-443e-7369-08d69cb83855 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Feb 2019 13:33:52.5704 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR18MB2607 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-02-27_08:, , signatures=0 X-Proofpoint-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902270090 Subject: [dpdk-dev] [PATCH v2 3/3] test/crypto: check for rsa key type feature flag 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: , X-List-Received-Date: Wed, 27 Feb 2019 13:34:03 -0000 Check for RSA private key type feature flag in private key operations Signed-off-by: Ayuj Verma Signed-off-by: Shally Verma --- test/test/test_cryptodev_asym.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/test/test/test_cryptodev_asym.c b/test/test/test_cryptodev_asy= m.c index 0f6fc5767..950a7bd00 100644 --- a/test/test/test_cryptodev_asym.c +++ b/test/test/test_cryptodev_asym.c @@ -49,6 +49,7 @@ test_rsa_sign_verify(void) struct rte_mempool *op_mpool =3D ts_params->op_mpool; struct rte_mempool *sess_mpool =3D ts_params->session_mpool; uint8_t dev_id =3D ts_params->valid_devs[0]; + struct rte_cryptodev_info dev_info; struct rte_crypto_asym_op *asym_op =3D NULL; struct rte_crypto_op *op =3D NULL, *result_op =3D NULL; struct rte_cryptodev_asym_session *sess =3D NULL; @@ -56,6 +57,18 @@ test_rsa_sign_verify(void) uint8_t output_buf[TEST_DATA_SIZE] =3D {0}; uint8_t input_buf[TEST_DATA_SIZE] =3D {0}; =20 + /* test case supports op with exponent keyonly, + * so check for it in feature_flags + */ + 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 =3D rte_cryptodev_asym_session_create(sess_mpool); =20 if (!sess) { @@ -183,12 +196,25 @@ test_rsa_enc_dec(void) struct rte_mempool *op_mpool =3D ts_params->op_mpool; struct rte_mempool *sess_mpool =3D ts_params->session_mpool; uint8_t dev_id =3D ts_params->valid_devs[0]; + struct rte_cryptodev_info dev_info; struct rte_crypto_asym_op *asym_op =3D NULL; struct rte_crypto_op *op =3D NULL, *result_op =3D NULL; struct rte_cryptodev_asym_session *sess =3D NULL; int status =3D TEST_SUCCESS; uint8_t input_buf[TEST_DATA_SIZE] =3D {0}; =20 + /* test case supports op with exponent keyonly, + * so check for it in feature_flags + */ + 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 =3D rte_cryptodev_asym_session_create(sess_mpool); =20 if (!sess) { --=20 2.20.0