summaryrefslogtreecommitdiff
path: root/examples/l2fwd-crypto
diff options
context:
space:
mode:
authorPablo de Lara <pablo.de.lara.guarch@intel.com>2017-07-02 06:41:13 +0100
committerPablo de Lara <pablo.de.lara.guarch@intel.com>2017-07-06 22:26:48 +0200
commit5082f991f6def0ef06e9ff1cf9f39ef3b78657c5 (patch)
treef98a8f2b6371a24200280afafba04a2004684cb9 /examples/l2fwd-crypto
parentdad71e9958e62b61cf4edf16d716d38738ead20e (diff)
downloaddpdk-5082f991f6def0ef06e9ff1cf9f39ef3b78657c5.zip
dpdk-5082f991f6def0ef06e9ff1cf9f39ef3b78657c5.tar.gz
dpdk-5082f991f6def0ef06e9ff1cf9f39ef3b78657c5.tar.xz
cryptodev: pass IV as offset
Since IV now is copied after the crypto operation, in its private size, IV can be passed only with offset and length. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Diffstat (limited to 'examples/l2fwd-crypto')
-rw-r--r--examples/l2fwd-crypto/main.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 6941ee4..c810b48 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -489,9 +489,7 @@ l2fwd_simple_crypto_enqueue(struct rte_mbuf *m,
/* Copy IV at the end of the crypto operation */
rte_memcpy(iv_ptr, cparams->iv.data, cparams->iv.length);
- op->sym->cipher.iv.data = iv_ptr;
- op->sym->cipher.iv.phys_addr =
- rte_crypto_op_ctophys_offset(op, IV_OFFSET);
+ op->sym->cipher.iv.offset = IV_OFFSET;
op->sym->cipher.iv.length = cparams->iv.length;
/* For wireless algorithms, offset/length must be in bits */
@@ -700,7 +698,6 @@ l2fwd_main_loop(struct l2fwd_crypto_options *options)
if (port_cparams[i].do_cipher) {
port_cparams[i].iv.data = options->iv.data;
port_cparams[i].iv.length = options->iv.length;
- port_cparams[i].iv.phys_addr = options->iv.phys_addr;
if (!options->iv_param)
generate_random_key(port_cparams[i].iv.data,
port_cparams[i].iv.length);