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

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