DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] examples/ipsec-secgw: fix fallback session create
@ 2022-06-30 10:00 Radu Nicolau
  2022-06-30 11:45 ` [PATCH v2] " Radu Nicolau
  0 siblings, 1 reply; 4+ messages in thread
From: Radu Nicolau @ 2022-06-30 10:00 UTC (permalink / raw)
  To: Radu Nicolau, Akhil Goyal; +Cc: dev, roy.fan.zhang, vladimir.medvedkin, vfialko

Fix fallback session create for inline sessions.

Fixes: a8ade12123c3 ("examples/ipsec-secgw: create lookaside sessions at init")
Cc: vfialko@marvell.com

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
 examples/ipsec-secgw/sa.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
index 5d9cec97db..f62b88ca23 100644
--- a/examples/ipsec-secgw/sa.c
+++ b/examples/ipsec-secgw/sa.c
@@ -1522,9 +1522,11 @@ fill_ipsec_session(struct rte_ipsec_session *ss, struct rte_ipsec_sa *sa)
 
 	ss->sa = sa;
 
-	rc = rte_ipsec_session_prepare(ss);
-	if (rc != 0)
-		memset(ss, 0, sizeof(*ss));
+	if (ss->security.ses != NULL) {
+		rc = rte_ipsec_session_prepare(ss);
+		if (rc != 0)
+			memset(ss, 0, sizeof(*ss));
+	}
 
 	return rc;
 }
-- 
2.25.1


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

end of thread, other threads:[~2022-07-01 19:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-30 10:00 [PATCH] examples/ipsec-secgw: fix fallback session create Radu Nicolau
2022-06-30 11:45 ` [PATCH v2] " Radu Nicolau
2022-06-30 16:22   ` Medvedkin, Vladimir
2022-07-01 19:12     ` [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).