examples/l2fwd-crypto: flush buffers
authorPablo de Lara <pablo.de.lara.guarch@intel.com>
Wed, 6 Jul 2016 09:38:50 +0000 (10:38 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 11 Jul 2016 15:21:21 +0000 (17:21 +0200)
commit268ca73585ea84207fc0505e0db1ab97099ffa07
treedf33054be0eb28c83afacca803595e025e02ea15
parent516c26da83a322f4b9ce0f550c6d343c2cfc3ffb
examples/l2fwd-crypto: flush buffers

Crypto operations are enqueued in the crypto devices
when the crypto device buffers are full (MAX_PKT_BURST),
in order to be more efficient.

The problem is that operations might be stuck in those buffers,
if they never get full, and therefore, those operations
will never be performed.

Therefore, it is necessary to have a buffer flush mechanism,
similar to the one used for flush the TX buffers, so eventually,
all packets received are ciphered and sent out.

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

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
examples/l2fwd-crypto/main.c