DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 1/2] examples/ipsec-secgw: allow single xform SA
@ 2023-03-13 12:29 Radu Nicolau
  2023-03-16 12:36 ` Ji, Kai
  2023-03-16 18:51 ` [EXT] " Akhil Goyal
  0 siblings, 2 replies; 3+ messages in thread
From: Radu Nicolau @ 2023-03-13 12:29 UTC (permalink / raw)
  To: Radu Nicolau, Akhil Goyal; +Cc: dev

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH 1/2] examples/ipsec-secgw: allow single xform SA
  2023-03-13 12:29 [PATCH 1/2] examples/ipsec-secgw: allow single xform SA Radu Nicolau
@ 2023-03-16 12:36 ` Ji, Kai
  2023-03-16 18:51 ` [EXT] " Akhil Goyal
  1 sibling, 0 replies; 3+ messages in thread
From: Ji, Kai @ 2023-03-16 12:36 UTC (permalink / raw)
  To: Nicolau, Radu, Nicolau, Radu, Akhil Goyal; +Cc: dev

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [EXT] [PATCH 1/2] examples/ipsec-secgw: allow single xform SA
  2023-03-13 12:29 [PATCH 1/2] examples/ipsec-secgw: allow single xform SA Radu Nicolau
  2023-03-16 12:36 ` Ji, Kai
@ 2023-03-16 18:51 ` Akhil Goyal
  1 sibling, 0 replies; 3+ messages in thread
From: Akhil Goyal @ 2023-03-16 18:51 UTC (permalink / raw)
  To: Radu Nicolau; +Cc: dev

> 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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-16 18:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-13 12:29 [PATCH 1/2] examples/ipsec-secgw: allow single xform SA Radu Nicolau
2023-03-16 12:36 ` Ji, Kai
2023-03-16 18:51 ` [EXT] " Akhil Goyal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).