From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D6774A034F; Wed, 6 May 2020 11:38:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B5A731D70E; Wed, 6 May 2020 11:38:06 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id E7E121D70B for ; Wed, 6 May 2020 11:38:04 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0469aCio001558; Wed, 6 May 2020 02:38:04 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=pfpt0818; bh=RsxIqiM8qvDLI3fjYJ8ALg48B4NbVHOY0646F6UwY5Q=; b=Sw0czDFv0apOi9rrKuhPkSM1c+Uf4Teh00BvJSRGp6IAcMzYE0fS4SwplAod3C70xpDO j9IjsjQGDDfzH5CHOaOWVfslChplRhX13T4BAQctAP+Hvv42dammhFjxNE7yslEsMYIf LhCliaRU1VvVmXEjZtem3y3kakzaRwco++ypM7hmFjCF9hONaH9Ill26Jxuwx1jEyaWV IzzZG0lovnMaVwKXGBYJFLCi/0AbFRBW0YBt5J0gipZveW5SSGXG16Wd5id3vxRIykVX OklS9yAgNrQAHh1+UexPgCBhYPKEXTaB56gnnz76uZ+m2DQGJo4kJ82IWjD/Wsp8YWMa Vw== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0a-0016f401.pphosted.com with ESMTP id 30uaukvbrc-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 06 May 2020 02:38:04 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 6 May 2020 02:38:02 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 6 May 2020 02:38:01 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 6 May 2020 02:38:01 -0700 Received: from hyd1349.t110.caveonetworks.com (unknown [10.29.45.13]) by maili.marvell.com (Postfix) with ESMTP id 314353F703F; Wed, 6 May 2020 02:37:58 -0700 (PDT) From: Ankur Dwivedi To: CC: , , , , Ankur Dwivedi Date: Wed, 6 May 2020 15:07:26 +0530 Message-ID: <1588757846-14349-1-git-send-email-adwivedi@marvell.com> X-Mailer: git-send-email 1.9.3 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.676 definitions=2020-05-06_03:2020-05-04, 2020-05-06 signatures=0 Subject: [dpdk-dev] [PATCH] app/test: set null cipher iv length to zero 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" For null cipher the iv length should be set to zero. Signed-off-by: Ankur Dwivedi --- app/test/test_cryptodev_blockcipher.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/test/test_cryptodev_blockcipher.c b/app/test/test_cryptodev_blockcipher.c index 473dad9..909b615 100644 --- a/app/test/test_cryptodev_blockcipher.c +++ b/app/test/test_cryptodev_blockcipher.c @@ -379,7 +379,11 @@ cipher_xform->cipher.key.data = cipher_key; cipher_xform->cipher.key.length = tdata->cipher_key.len; cipher_xform->cipher.iv.offset = IV_OFFSET; - cipher_xform->cipher.iv.length = tdata->iv.len; + + if (tdata->crypto_algo == RTE_CRYPTO_CIPHER_NULL) + cipher_xform->cipher.iv.length = 0; + else + cipher_xform->cipher.iv.length = tdata->iv.len; sym_op->cipher.data.offset = tdata->cipher_offset; sym_op->cipher.data.length = tdata->ciphertext.len - -- 1.9.3