From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id F385D23C for ; Tue, 21 Nov 2017 14:26:34 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id A456F20696; Tue, 21 Nov 2017 08:26:34 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 21 Nov 2017 08:26:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=JDb1f/fH+K73ekrdn kVqup43YktmktwpoEZL8Y58BYI=; b=tb4+epG22wKRnI0XLWXEusPTrsinPq3VW TlPFPFn9xX+Upm6V3eHrPqe+ePE3HqU8lX3VXerRLGXP4Fk93xIvIh+NLxW9uQFs b5CKp5qpzL/aiX2aH90tABZJwbSbzr/OV2HtsKOsFJ+f6Wf+9FG/CcVYrs+kBowZ Rh/3seZy23mKIJ4Axv57Eq2hYIF0Afgnw8WNSv/XOYBHfwj7qF4YLEmU8sLwYQmM Bh09qFomVZVIsLgsf389ZS3oz/3JNYeYrhz752ihOi+Dq0F3jJPogENK/bFi8aoF IVKanbii2nYIUNrBxPa67UsbuCTO/InvQ387aK9DqEZXoptje7ISA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=JDb1f/fH+K73ekrdnkVqup43YktmktwpoEZL8Y58BYI=; b=bNymc2y1 OKhpBd0sTbSwwWv1Tp61dxsrNQ9eK56yyRz3sikjiLU1d683FeKDMNTlVsG6iRK7 uxlPfyGy1qiXKxaxI1zclSXYARkDksJPTY2+2aW4oQGRGxZmxUYDjfC9IynMZA3d y927GnJ3P29W8ZJ14hqdKDFaDL0pSHxDEuSaVyq2ucUYWtDFxNZF14QKtODdqm/g 1Im661IXb8YIPYa9k23Do17b+iqG+P1YPkFp4Z62r3rz3dTVldKeDYWQapYCDMUr /HktjClJMrKMgleK4gDQlovOH3vn3VXqjgMkD7v2adEpBYMRHUEasaysm9J9xNqR 2BORbVDVO15sYQ== X-ME-Sender: Received: from localhost.localdomain (unknown [180.158.62.0]) by mail.messagingengine.com (Postfix) with ESMTPA id 43217243B9; Tue, 21 Nov 2017 08:26:31 -0500 (EST) From: Yuanhan Liu To: Pablo de Lara Cc: Radu Nicolau , dpdk stable Date: Tue, 21 Nov 2017 21:17:36 +0800 Message-Id: <1511270333-31002-114-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511270333-31002-1-git-send-email-yliu@fridaylinux.org> References: <1511270333-31002-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'app/crypto-perf: fix packet length check' has been queued to stable release 17.08.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Nov 2017 13:26:35 -0000 Hi, FYI, your patch has been queued to stable release 17.08.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/24/17. So please shout if anyone has objections. Thanks. --yliu --- >>From 4aabfc44fee23980745f805cfdc736a2ee0461fc Mon Sep 17 00:00:00 2001 From: Pablo de Lara Date: Thu, 5 Oct 2017 06:28:00 +0100 Subject: [PATCH] app/crypto-perf: fix packet length check [ upstream commit 0c2173c166da8abba93ed4a2f602ad523ee7a59a ] When using DES-CBC, packet size has to be multiple of 8 bytes, but if a list of packets is provided. the check was not correct. Fixes: fc4600fb2520 ("app/crypto-perf: add extra option checks") Signed-off-by: Pablo de Lara Acked-by: Radu Nicolau --- app/test-crypto-perf/cperf_options_parsing.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/app/test-crypto-perf/cperf_options_parsing.c b/app/test-crypto-perf/cperf_options_parsing.c index 663f53f..3f933bc 100644 --- a/app/test-crypto-perf/cperf_options_parsing.c +++ b/app/test-crypto-perf/cperf_options_parsing.c @@ -832,14 +832,26 @@ check_cipher_buffer_length(struct cperf_options *options) if (options->cipher_algo == RTE_CRYPTO_CIPHER_DES_CBC || options->cipher_algo == RTE_CRYPTO_CIPHER_3DES_CBC || options->cipher_algo == RTE_CRYPTO_CIPHER_3DES_ECB) { - for (buffer_size = options->min_buffer_size; - buffer_size < options->max_buffer_size; - buffer_size += options->inc_buffer_size) { + if (options->inc_buffer_size != 0) + buffer_size = options->min_buffer_size; + else + buffer_size = options->buffer_size_list[0]; + + while (buffer_size <= options->max_buffer_size) { if ((buffer_size % DES_BLOCK_SIZE) != 0) { RTE_LOG(ERR, USER1, "Some of the buffer sizes are " "not suitable for the algorithm selected\n"); return -EINVAL; } + + if (options->inc_buffer_size != 0) + buffer_size += options->inc_buffer_size; + else { + if (++buffer_size_idx == options->buffer_size_count) + break; + buffer_size = options->buffer_size_list[buffer_size_idx]; + } + } } -- 2.7.4