examples/l2fwd-crypto: fix session mempool size
The session mempool size for this application depends
on the number of crypto devices that are capable
of performing the operation given by the parameters on the app.
However, previously this calculation was done before all devices
were checked, resulting in an incorrect number of sessions
required.
Now the calculation of the devices to be used is done first
(checking the capabilities of the enabled devices),
followed by the creation of the session pool, resulting
in a correct number of objects needed for the sessions
to be created.
Fixes:
e3bcb99a5e13 ("examples/l2fwd-crypto: limit number of sessions")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>