DPDK patches and discussions
 help / color / mirror / Atom feed
From: Radu Nicolau <radu.nicolau@intel.com>
To: Radu Nicolau <radu.nicolau@intel.com>, Akhil Goyal <gakhil@marvell.com>
Cc: dev@dpdk.org
Subject: [PATCH 1/2] examples/ipsec-secgw: allow single xform SA
Date: Mon, 13 Mar 2023 12:29:37 +0000	[thread overview]
Message-ID: <20230313122938.53716-1-radu.nicolau@intel.com> (raw)

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


             reply	other threads:[~2023-03-13 12:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-13 12:29 Radu Nicolau [this message]
2023-03-16 12:36 ` Ji, Kai
2023-03-16 18:51 ` [EXT] " Akhil Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230313122938.53716-1-radu.nicolau@intel.com \
    --to=radu.nicolau@intel.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).