From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by dpdk.org (Postfix) with ESMTP id 46BE423D for ; Mon, 30 Jul 2018 18:18:32 +0200 (CEST) Received: from 1.general.paelzer.uk.vpn ([10.172.196.172] helo=lap.fritz.box) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1fkAru-00009D-BZ; Mon, 30 Jul 2018 16:17:58 +0000 From: Christian Ehrhardt To: Pablo de Lara Cc: Fiona Trahe , dpdk stable Date: Mon, 30 Jul 2018 18:12:56 +0200 Message-Id: <20180730161342.16566-131-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180730161342.16566-1-christian.ehrhardt@canonical.com> References: <20180730161342.16566-1-christian.ehrhardt@canonical.com> Subject: [dpdk-stable] patch 'examples/l2fwd-crypto: skip device not supporting operation' has been queued to stable release 18.05.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: Mon, 30 Jul 2018 16:18:32 -0000 Hi, FYI, your patch has been queued to stable release 18.05.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 08/01/18. So please shout if anyone has objections. Thanks. Christian Ehrhardt --- >>From 5530bb5285c66de7dd2d5d50297d3205b4991445 Mon Sep 17 00:00:00 2001 From: Pablo de Lara Date: Thu, 19 Jul 2018 09:39:56 +0100 Subject: [PATCH] examples/l2fwd-crypto: skip device not supporting operation [ upstream commit a8fd8881ddf7be88c05e0fb258a54e861ae54a29 ] When a crypto device does not support an algorithm, it is skipped and not used. However, when it does support it, but not the rest of the parameters (IV, key, AAD sizes...), application stops. Instead, the device should be skipped and the search of a suitable device should continue. Fixes: a061e50a0d97 ("examples/l2fwd-crypto: fix ambiguous input key size") Signed-off-by: Pablo de Lara Acked-by: Fiona Trahe --- examples/l2fwd-crypto/main.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c index 646512da6..e204d2282 100644 --- a/examples/l2fwd-crypto/main.c +++ b/examples/l2fwd-crypto/main.c @@ -2053,7 +2053,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports, options->aead_iv_param, options->aead_iv_random_size, &options->aead_iv.length) < 0) - return -1; + continue; /* * Check if length of provided AEAD key is supported @@ -2067,7 +2067,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports, cap->sym.aead.key_size.increment) != 0) { printf("Unsupported aead key length\n"); - return -1; + continue; } /* * Check if length of the aead key to be randomly generated @@ -2080,7 +2080,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports, cap->sym.aead.key_size.increment) != 0) { printf("Unsupported aead key length\n"); - return -1; + continue; } options->aead_xform.aead.key.length = options->aead_key_random_size; @@ -2105,7 +2105,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports, cap->sym.aead.aad_size.increment) != 0) { printf("Unsupported AAD length\n"); - return -1; + continue; } /* * Check if length of AAD to be randomly generated @@ -2118,7 +2118,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports, cap->sym.aead.aad_size.increment) != 0) { printf("Unsupported AAD length\n"); - return -1; + continue; } options->aad.length = options->aad_random_size; /* No size provided, use minimum size. */ @@ -2136,7 +2136,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports, cap->sym.aead.digest_size.increment) != 0) { printf("Unsupported digest length\n"); - return -1; + continue; } options->aead_xform.aead.digest_length = options->digest_size; @@ -2162,7 +2162,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports, options->cipher_iv_param, options->cipher_iv_random_size, &options->cipher_iv.length) < 0) - return -1; + continue; /* * Check if length of provided cipher key is supported @@ -2176,7 +2176,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports, cap->sym.cipher.key_size.increment) != 0) { printf("Unsupported cipher key length\n"); - return -1; + continue; } /* * Check if length of the cipher key to be randomly generated @@ -2189,7 +2189,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports, cap->sym.cipher.key_size.increment) != 0) { printf("Unsupported cipher key length\n"); - return -1; + continue; } options->cipher_xform.cipher.key.length = options->ckey_random_size; @@ -2219,7 +2219,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports, options->auth_iv_param, options->auth_iv_random_size, &options->auth_iv.length) < 0) - return -1; + continue; /* * Check if length of provided auth key is supported * by the algorithm chosen. @@ -2232,7 +2232,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports, cap->sym.auth.key_size.increment) != 0) { printf("Unsupported auth key length\n"); - return -1; + continue; } /* * Check if length of the auth key to be randomly generated @@ -2245,7 +2245,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports, cap->sym.auth.key_size.increment) != 0) { printf("Unsupported auth key length\n"); - return -1; + continue; } options->auth_xform.auth.key.length = options->akey_random_size; @@ -2267,7 +2267,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports, cap->sym.auth.digest_size.increment) != 0) { printf("Unsupported digest length\n"); - return -1; + continue; } options->auth_xform.auth.digest_length = options->digest_size; -- 2.17.1