From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id C6F5837B2 for ; Wed, 19 Apr 2017 16:38:05 +0200 (CEST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP; 19 Apr 2017 07:38:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,221,1488873600"; d="scan'208";a="89742870" Received: from silpixa00381631.ir.intel.com (HELO silpixa00381631.ger.corp.intel.com) ([10.237.222.122]) by orsmga005.jf.intel.com with ESMTP; 19 Apr 2017 07:38:03 -0700 From: Pablo de Lara To: dev@dpdk.org Cc: Pablo de Lara Date: Wed, 19 Apr 2017 15:37:54 +0100 Message-Id: <1492612674-147730-1-git-send-email-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH] examples/l2fwd-crypto: fix padding calculation 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, 19 Apr 2017 14:38:06 -0000 For padding calculation, it is necessary to know if algorithm is a block cipher or stream cipher algorithm, and know the block size for the algorithm. In the application, this block size should be only the cipher block size, but if authentication was used too, it was being overwritten by the authentication block size, which is not needed. Fixes: 27cf2d1b18e1 ("examples/l2fwd-crypto: discover capabilities") Signed-off-by: Pablo de Lara --- examples/l2fwd-crypto/main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c index 720a1c2..d7db55d 100644 --- a/examples/l2fwd-crypto/main.c +++ b/examples/l2fwd-crypto/main.c @@ -1705,7 +1705,6 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports, continue; } - options->block_size = cap->sym.auth.block_size; /* * Check if length of provided AAD is supported * by the algorithm chosen. -- 2.7.4