X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fl2fwd-crypto%2Fmain.c;h=4f5161649234b6f9884002be08e29c0468a55df7;hb=a1978aa23bf4a8dd34087173f7769250d050315e;hp=23a398043e15bf6da0c79042442dceb00ef69c8b;hpb=62c0b4484c455e9ba03d04dcf8403fef17e7d22d;p=dpdk.git diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c index 23a398043e..4f51616492 100644 --- a/examples/l2fwd-crypto/main.c +++ b/examples/l2fwd-crypto/main.c @@ -2126,12 +2126,21 @@ check_capabilities(struct l2fwd_crypto_options *options, uint8_t cdev_id) cap->sym.cipher.key_size.max, cap->sym.cipher.key_size.increment) != 0) { - RTE_LOG(DEBUG, USER1, - "Device %u does not support cipher " - "key length\n", + if (dev_info.feature_flags & + RTE_CRYPTODEV_FF_CIPHER_WRAPPED_KEY) { + RTE_LOG(DEBUG, USER1, + "Key length does not match the device " + "%u capability. Key may be wrapped\n", cdev_id); - return -1; + } else { + RTE_LOG(DEBUG, USER1, + "Key length does not match the device " + "%u capability\n", + cdev_id); + return -1; + } } + /* * Check if length of the cipher key to be randomly generated * is supported by the algorithm chosen. @@ -2826,5 +2835,8 @@ main(int argc, char **argv) return -1; } + /* clean up the EAL */ + rte_eal_cleanup(); + return 0; }