summaryrefslogtreecommitdiff
path: root/examples/l2fwd-crypto
diff options
context:
space:
mode:
authorPablo de Lara <pablo.de.lara.guarch@intel.com>2017-07-18 08:58:17 +0100
committerPablo de Lara <pablo.de.lara.guarch@intel.com>2017-07-19 14:10:41 +0300
commitef896e92176498a03aa50cf92c1533acb701a210 (patch)
tree44db4ac4fda8bbadbe9e101ce718ab31cc8c7c02 /examples/l2fwd-crypto
parent2c023071f6493c8a846ac61fa7d84ad94c8b42b8 (diff)
downloaddpdk-ef896e92176498a03aa50cf92c1533acb701a210.zip
dpdk-ef896e92176498a03aa50cf92c1533acb701a210.tar.gz
dpdk-ef896e92176498a03aa50cf92c1533acb701a210.tar.xz
examples/l2fwd-crypto: fix AEAD IV setting
IV was not being set for AEAD algorithms. Fixes: 2661f4fbe93d ("examples/l2fwd-crypto: add AEAD parameters") Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Diffstat (limited to 'examples/l2fwd-crypto')
-rw-r--r--examples/l2fwd-crypto/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 664e0e0..da2f509 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -764,6 +764,11 @@ l2fwd_main_loop(struct l2fwd_crypto_options *options)
}
if (port_cparams[i].do_aead) {
+ port_cparams[i].aead_iv.data = options->aead_iv.data;
+ port_cparams[i].aead_iv.length = options->aead_iv.length;
+ if (!options->aead_iv_param)
+ generate_random_key(port_cparams[i].aead_iv.data,
+ port_cparams[i].aead_iv.length);
port_cparams[i].aead_algo = options->aead_xform.aead.algo;
port_cparams[i].digest_length =
options->aead_xform.aead.digest_length;