Acked-by: Kai Ji <kai...@intel.com>

> -----Original Message-----
> From: Radu Nicolau <radu.nico...@intel.com>
> Sent: Monday, March 13, 2023 12:30 PM
> To: Nicolau, Radu <radu.nico...@intel.com>; Akhil Goyal
> <gak...@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: gak...@marvell.com,kai...@intel.com
> 
> Signed-off-by: Radu Nicolau <radu.nico...@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

Reply via email to