examples/l2fwd-crypto: remove key size validation
authorShiri Kuzin <shirik@nvidia.com>
Tue, 13 Apr 2021 16:24:52 +0000 (19:24 +0300)
committerAkhil Goyal <gakhil@marvell.com>
Fri, 16 Apr 2021 10:43:33 +0000 (12:43 +0200)
commit3ea6ee38ec7a7e88499d30ad86d7821b72ce3abc
tree8a6fe3e38d7266cd206e99f0bf752488957cac80
parent07b0b75370692d16476fff5583855582621dfa60
examples/l2fwd-crypto: remove key size validation

In the example application the key can be provided by the user or
generated randomly by the example application.

Then a validation is done in order to check if the key size is
supported in the algorithm capabilities.

A new feature flag is added in crypto PMDs to allow wrapped keys,
hence, to allow wrapped keys, app should remove the validation of
key size in the application and rely on a PMD key size validation.

The validation is removed in case the key is provided by user and
the RTE_CRYPTODEV_FF_CIPHER_WRAPPED_KEY feature flag is set, and
kept in case the key should be generated by the application or
RTE_CRYPTODEV_FF_CIPHER_WRAPPED_KEY is not set.

Signed-off-by: Shiri Kuzin <shirik@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
examples/l2fwd-crypto/main.c