examples/l2fwd-crypto: fix padding calculation
authorPablo de Lara <pablo.de.lara.guarch@intel.com>
Wed, 19 Apr 2017 14:37:54 +0000 (15:37 +0100)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Thu, 20 Apr 2017 09:32:45 +0000 (11:32 +0200)
commitc64457cb11f0df25813983b10c47d80058b9a8ba
tree8d0ee4351474a3615137828d817395a2ba45bfeb
parent168b9e76f9168fa3d2c79b3931215597976111c4
examples/l2fwd-crypto: fix padding calculation

For padding calculation, it is necessary to know if algorithm
is a block cipher or stream cipher algorithm, and know the
block size for the algorithm.

In the application, this block size should be only the
cipher block size, but if authentication was used too,
it was being overwritten by the authentication block size,
which is not needed.

Fixes: 27cf2d1b18e1 ("examples/l2fwd-crypto: discover capabilities")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
examples/l2fwd-crypto/main.c