[1/2] examples/ipsec-secgw: allow single xform SA
Checks
Commit Message
Update check capabilities before session create to allow single xform SA
i.e. auth or cipher only
Fixes: a8781df86c14 ("examples/ipsec-secgw: check capabilities before session create")
Cc: gakhil@marvell.com,kai.ji@intel.com
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
examples/ipsec-secgw/ipsec.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
Comments
Acked-by: Kai Ji <kai.ji@intel.com>
> -----Original Message-----
> From: Radu Nicolau <radu.nicolau@intel.com>
> Sent: Monday, March 13, 2023 12:30 PM
> To: Nicolau, Radu <radu.nicolau@intel.com>; Akhil Goyal
> <gakhil@marvell.com>
> Cc: dev@dpdk.org
> Subject: [PATCH 1/2] examples/ipsec-secgw: allow single xform SA
>
> Update check capabilities before session create to allow single xform SA
> i.e. auth or cipher only
>
> Fixes: a8781df86c14 ("examples/ipsec-secgw: check capabilities before
> session create")
> Cc: gakhil@marvell.com,kai.ji@intel.com
>
> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
> ---
> examples/ipsec-secgw/ipsec.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/examples/ipsec-secgw/ipsec.c b/examples/ipsec-secgw/ipsec.c
> index a5c2b524a7..a5706bed24 100644
> --- a/examples/ipsec-secgw/ipsec.c
> +++ b/examples/ipsec-secgw/ipsec.c
> @@ -101,13 +101,11 @@ static inline int
> verify_crypto_capabilities(const struct rte_cryptodev_capabilities
> *capabilities,
> struct rte_crypto_sym_xform *crypto_xform) {
> - if (crypto_xform->type == RTE_CRYPTO_SYM_XFORM_AEAD)
> - return verify_crypto_xform(capabilities, crypto_xform);
> - else if (crypto_xform->next != NULL)
> + if (crypto_xform->next != NULL)
> return (verify_crypto_xform(capabilities, crypto_xform) ||
> verify_crypto_xform(capabilities, crypto_xform->next));
> else
> - return -ENOTSUP;
> + return verify_crypto_xform(capabilities, crypto_xform);
> }
>
> static inline int
> --
> 2.25.1
> Subject: [EXT] [PATCH 1/2] examples/ipsec-secgw: allow single xform SA
>
> Update check capabilities before session create to allow single xform SA
> i.e. auth or cipher only
>
> Fixes: a8781df86c14 ("examples/ipsec-secgw: check capabilities before session
> create")
> Cc: gakhil@marvell.com,kai.ji@intel.com
>
> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Applied to dpdk-next-crypto
Thanks.
@@ -101,13 +101,11 @@ static inline int
verify_crypto_capabilities(const struct rte_cryptodev_capabilities *capabilities,
struct rte_crypto_sym_xform *crypto_xform)
{
- if (crypto_xform->type == RTE_CRYPTO_SYM_XFORM_AEAD)
- return verify_crypto_xform(capabilities, crypto_xform);
- else if (crypto_xform->next != NULL)
+ if (crypto_xform->next != NULL)
return (verify_crypto_xform(capabilities, crypto_xform) ||
verify_crypto_xform(capabilities, crypto_xform->next));
else
- return -ENOTSUP;
+ return verify_crypto_xform(capabilities, crypto_xform);
}
static inline int