numam-dpdk/examples
Piotr Azarewicz 893fbab031 examples/l2fwd-crypto: fix verify with decrypt in chain
This patch fixes crypto operation data parameters setting
in l2fwd-crypto application, making decryption in chain
with auth verification work.

How to reproduce the issue:

1. Run l2fwd_crypto with command:
-c 0x3 -n 4 --vdev "crypto_aesni_mb" \
--vdev "crypto_aesni_mb" \
-- -p 0x3 --chain CIPHER_HASH \
--cipher_op ENCRYPT --cipher_algo AES_CBC \
--cipher_key 00:01:02:03:04:05:06:07:08:09:0a:0b:0c:0d:0e:0f \
--iv 00:01:02:03:04:05:06:07:08:09:0a:0b:0c:0d:0e:ff \
--auth_op GENERATE --auth_algo SHA1_HMAC \
--auth_key
11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:
11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:
11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11

2. Send packet with payload and capture forwarded packet.
Payload in forwarded packet is encrypted, what is good.

3. Run l2fwd_crypto with command:
-c 0x3 -n 4 --vdev "crypto_aesni_mb" \
--vdev "crypto_aesni_mb" \
-- -p 0x3 --chain HASH_CIPHER \
--cipher_op DECRYPT --cipher_algo AES_CBC \
--cipher_key 00:01:02:03:04:05:06:07:08:09:0a:0b:0c:0d:0e:0f \
--iv 00:01:02:03:04:05:06:07:08:09:0a:0b:0c:0d:0e:ff \
--auth_op VERIFY --auth_algo SHA1_HMAC \
--auth_key
11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:
11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:
11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11

4. Send earlier captured packet and capture forwarded packet.
Payload in newly captured packet is not decrypted, what is wrong.

Fixes: 387259bd6c ("examples/l2fwd-crypto: add sample application")

Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
Acked-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
2016-10-13 21:58:44 +02:00
..
bond remove unused ring includes 2016-09-16 10:16:02 +02:00
cmdline examples: fix whitespace 2015-06-12 11:10:10 +02:00
distributor examples/distributor: fix Rx thread logic for zero packet 2016-07-15 23:42:48 +02:00
dpdk_qat remove unused ring includes 2016-09-16 10:16:02 +02:00
ethtool ethdev: get registers width 2016-07-10 14:55:42 +02:00
exception_path remove unused ring includes 2016-09-16 10:16:02 +02:00
helloworld tailq: remove unneeded inclusions 2015-03-10 11:47:46 +01:00
ip_fragmentation remove unused ring includes 2016-09-16 10:16:02 +02:00
ip_pipeline examples/ip_pipeline: add configuration with TAP 2016-10-13 11:44:32 +02:00
ip_reassembly remove unused ring includes 2016-09-16 10:16:02 +02:00
ipsec-secgw examples/ipsec-secgw: initialize SA salt 2016-10-08 17:54:38 +02:00
ipv4_multicast remove unused ring includes 2016-09-16 10:16:02 +02:00
kni remove unused ring includes 2016-09-16 10:16:02 +02:00
l2fwd examples/l2fwd: add option --[no-]mac-updating 2016-10-13 14:37:48 +02:00
l2fwd-cat examples/l2fwd-cat: add sample application for PQoS CAT and CDP 2016-03-21 23:36:43 +01:00
l2fwd-crypto examples/l2fwd-crypto: fix verify with decrypt in chain 2016-10-13 21:58:44 +02:00
l2fwd-jobstats remove unused ring includes 2016-09-16 10:16:02 +02:00
l2fwd-keepalive remove unused ring includes 2016-09-16 10:16:02 +02:00
l3fwd examples/l3fwd: enable 4M hash for all 64-bit archs 2016-10-13 14:37:48 +02:00
l3fwd-acl remove unused ring includes 2016-09-16 10:16:02 +02:00
l3fwd-power remove unused ring includes 2016-09-16 10:16:02 +02:00
l3fwd-vf remove unused ring includes 2016-09-16 10:16:02 +02:00
link_status_interrupt remove unused ring includes 2016-09-16 10:16:02 +02:00
load_balancer remove unused ring includes 2016-09-16 10:16:02 +02:00
multi_process remove unused ring includes 2016-09-16 10:16:02 +02:00
netmap_compat examples/netmap_compat: fix infinite loop 2016-05-16 21:01:51 +02:00
packet_ordering ivshmem: remove library and its EAL integration 2016-08-23 12:23:58 +02:00
performance-thread remove unused ring includes 2016-09-16 10:16:02 +02:00
ptpclient mk: fix link with glibc < 2.17 2016-07-25 17:54:57 +02:00
qos_meter examples/qos_meter: check flow configuration error 2016-05-16 18:49:12 +02:00
qos_sched examples/qos_sched: fix dequeue from ring 2016-10-13 14:37:48 +02:00
quota_watermark remove unused ring includes 2016-09-16 10:16:02 +02:00
rxtx_callbacks apps: fix default mbuf size 2015-05-11 15:51:14 +02:00
skeleton apps: fix default mbuf size 2015-05-11 15:51:14 +02:00
tep_termination examples/tep_term: fix inner L4 checksum 2016-10-13 14:37:48 +02:00
timer tailq: remove unneeded inclusions 2015-03-10 11:47:46 +01:00
vhost examples/vhost: add --dequeue-zero-copy option 2016-10-13 10:29:31 +02:00
vhost_xen eal: fix thread naming on FreeBSD 2016-06-17 18:04:22 +02:00
vm_power_manager examples/vm_power_manager: remove dependency on internal header 2016-07-11 17:23:32 +02:00
vmdq remove unused ring includes 2016-09-16 10:16:02 +02:00
vmdq_dcb remove unused ring includes 2016-09-16 10:16:02 +02:00
Makefile ivshmem: remove library and its EAL integration 2016-08-23 12:23:58 +02:00