From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <yskoh@mellanox.com>
Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])
 by dpdk.org (Postfix) with ESMTP id 030BF1B505
 for <stable@dpdk.org>; Fri, 30 Nov 2018 00:13:30 +0100 (CET)
Received: from Internal Mail-Server by MTLPINE1 (envelope-from
 yskoh@mellanox.com)
 with ESMTPS (AES256-SHA encrypted); 30 Nov 2018 01:19:20 +0200
Received: from scfae-sc-2.mti.labs.mlnx (scfae-sc-2.mti.labs.mlnx
 [10.101.0.96])
 by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id wATNCW7V032075;
 Fri, 30 Nov 2018 01:13:25 +0200
From: Yongseok Koh <yskoh@mellanox.com>
To: Anoob Joseph <anoob.joseph@caviumnetworks.com>
Cc: Akash Saxena <akash.saxena@caviumnetworks.com>,
 Akhil Goyal <akhil.goyal@nxp.com>, dpdk stable <stable@dpdk.org>
Date: Thu, 29 Nov 2018 15:10:25 -0800
Message-Id: <20181129231202.30436-31-yskoh@mellanox.com>
X-Mailer: git-send-email 2.11.0
In-Reply-To: <20181129231202.30436-1-yskoh@mellanox.com>
References: <20181129231202.30436-1-yskoh@mellanox.com>
Subject: [dpdk-stable] patch 'app/test-crypto-perf: fix check for cipher IV'
	has been queued to LTS release 17.11.5
X-BeenThere: stable@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches for DPDK stable branches <stable.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/stable>,
 <mailto:stable-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/stable/>
List-Post: <mailto:stable@dpdk.org>
List-Help: <mailto:stable-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/stable>,
 <mailto:stable-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Thu, 29 Nov 2018 23:13:31 -0000

Hi,

FYI, your patch has been queued to LTS release 17.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/01/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Yongseok

---
>>From 5f0d2c5b838bf1371cb5732ae22425062e95229d Mon Sep 17 00:00:00 2001
From: Anoob Joseph <anoob.joseph@caviumnetworks.com>
Date: Fri, 14 Sep 2018 14:54:48 +0530
Subject: [PATCH] app/test-crypto-perf: fix check for cipher IV

[ upstream commit 3c78812b5082146f23af45784a04c37be9b90190 ]

IV is not required for all ciphers. Making sure the null check is done
only when 'cipher_iv_sz' is non-zero.

Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")

Signed-off-by: Akash Saxena <akash.saxena@caviumnetworks.com>
Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 app/test-crypto-perf/main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index fb5d6ebe3..be861cc0f 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -324,7 +324,9 @@ cperf_check_test_vector(struct cperf_options *opts,
 				return -1;
 			if (test_vec->ciphertext.length < opts->max_buffer_size)
 				return -1;
-			if (test_vec->cipher_iv.data == NULL)
+			/* Cipher IV is only required for some algorithms */
+			if (opts->cipher_iv_sz &&
+					test_vec->cipher_iv.data == NULL)
 				return -1;
 			if (test_vec->cipher_iv.length != opts->cipher_iv_sz)
 				return -1;
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-29 15:01:46.626698969 -0800
+++ 0031-app-test-crypto-perf-fix-check-for-cipher-IV.patch	2018-11-29 15:01:45.038966000 -0800
@@ -1,13 +1,14 @@
-From 3c78812b5082146f23af45784a04c37be9b90190 Mon Sep 17 00:00:00 2001
+From 5f0d2c5b838bf1371cb5732ae22425062e95229d Mon Sep 17 00:00:00 2001
 From: Anoob Joseph <anoob.joseph@caviumnetworks.com>
 Date: Fri, 14 Sep 2018 14:54:48 +0530
 Subject: [PATCH] app/test-crypto-perf: fix check for cipher IV
 
+[ upstream commit 3c78812b5082146f23af45784a04c37be9b90190 ]
+
 IV is not required for all ciphers. Making sure the null check is done
 only when 'cipher_iv_sz' is non-zero.
 
 Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")
-Cc: stable@dpdk.org
 
 Signed-off-by: Akash Saxena <akash.saxena@caviumnetworks.com>
 Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
@@ -17,10 +18,10 @@
  1 file changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
-index 55d97c26b..953e058c9 100644
+index fb5d6ebe3..be861cc0f 100644
 --- a/app/test-crypto-perf/main.c
 +++ b/app/test-crypto-perf/main.c
-@@ -342,7 +342,9 @@ cperf_check_test_vector(struct cperf_options *opts,
+@@ -324,7 +324,9 @@ cperf_check_test_vector(struct cperf_options *opts,
  				return -1;
  			if (test_vec->ciphertext.length < opts->max_buffer_size)
  				return -1;