Skip to contentSkip to conversation

examples/ipsec-secgw: extend inline session to non AES-GCM

PATCH Applied Ankur Dwivedi 4 participants 5 messages Feb 14, 2020 – Feb 20, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 examples/ipsec-secgw: extend inline session to non AES-GCM

This patch extends creation of inline session to all the algorithms. Previously the inline session was enabled only for AES-GCM cipher.

Fixes 3a690d5a65e2 ("examples/ipsec-secgw: fix first packet with inline crypto")
---
 examples/ipsec-secgw/sa.c | 26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)
examples/ipsec-secgw/sa.c +12 -14
index e75b687..4822d6b 100644
@@ -1057,7 +1057,6 @@ struct sa_ctx {
 		}
 
 		if (sa->aead_algo == RTE_CRYPTO_AEAD_AES_GCM) {
-			struct rte_ipsec_session *ips;
 			iv_length = 12;
 
 			sa_ctx->xf[idx].a.type = RTE_CRYPTO_SYM_XFORM_AEAD;
@@ -1077,19 +1076,6 @@ struct sa_ctx {
 				sa->digest_len;
 
 			sa->xforms = &sa_ctx->xf[idx].a;
-
-			ips = ipsec_get_primary_session(sa);
-			if (ips->type ==
-				RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL ||
-				ips->type ==
-				RTE_SECURITY_ACTION_TYPE_INLINE_CRYPTO) {
-				rc = create_inline_session(skt_ctx, sa, ips);
-				if (rc != 0) {
-					RTE_LOG(ERR, IPSEC_ESP,
-						"create_inline_session() failed\n");
-					return -EINVAL;
-				}
-			}
 		} else {
 			switch (sa->cipher_algo) {
 			case RTE_CRYPTO_CIPHER_NULL:
@@ -1156,6 +1142,18 @@ struct sa_ctx {
 			sa->xforms = &sa_ctx->xf[idx].a;
 		}
 
+		if (ips->type ==
+			RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL ||
+			ips->type ==
+			RTE_SECURITY_ACTION_TYPE_INLINE_CRYPTO) {
+			rc = create_inline_session(skt_ctx, sa, ips);
+			if (rc != 0) {
+				RTE_LOG(ERR, IPSEC_ESP,
+					"create_inline_session() failed\n");
+				return -EINVAL;
+			}
+		}
+
 		print_one_sa_rule(sa, inbound);
 	}
 
Signature · 1 line
1.9.3
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines

This patch extends creation of inline session to all the algorithms. Previously the inline session was enabled only for AES-GCM cipher.

Fixes 3a690d5a65e2 ("examples/ipsec-secgw: fix first packet with inline

crypto")

---
 examples/ipsec-secgw/sa.c | 26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)
Acked-by
#2 lore raw
Quoted 17 lines

-----Original Message-----
From: Anoob Joseph <[email protected]>
Sent: Saturday, February 15, 2020 1:06 PM
To: Akhil Goyal <[email protected]>; Konstantin Ananyev <[email protected]>
Cc: Ankur Dwivedi <[email protected]>; Narayana Prasad Raju Athreya <[email protected]>; [email protected]
Subject: RE: [dpdk-dev] [PATCH] examples/ipsec-secgw: extend inline session to non AES-GCM

Quoted 6 lines

This patch extends creation of inline session to all the algorithms. Previously the inline session was enabled only for AES-GCM cipher.

Fixes 3a690d5a65e2 ("examples/ipsec-secgw: fix first packet with inline

crypto")

Quoted 6 lines
Quoted 4 lines
---
 examples/ipsec-secgw/sa.c | 26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)

Hi Konstantin,

I am about to merge this patch. Do you have any issues on this.

Regards,
Akhil

#3 lore raw

Hi Akhil,

Quoted 11 lines
Quoted 11 lines
Quoted 10 lines

This patch extends creation of inline session to all the algorithms. Previously the inline session was enabled only for AES-GCM cipher.

Fixes 3a690d5a65e2 ("examples/ipsec-secgw: fix first packet with inline

crypto")

---
 examples/ipsec-secgw/sa.c | 26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)
Quoted 6 lines
Quoted 1 line

Hi Konstantin,

I am about to merge this patch. Do you have any issues on this.

No objections, LGTM.
Konstantin

Applied
#4 lore raw
Quoted 15 lines

Hi Akhil,

Quoted 12 lines
Quoted 12 lines
Quoted 10 lines

This patch extends creation of inline session to all the algorithms. Previously the inline session was enabled only for AES-GCM cipher.

Fixes 3a690d5a65e2 ("examples/ipsec-secgw: fix first packet with inline

crypto")

---
 examples/ipsec-secgw/sa.c | 26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)
Quoted 9 lines
Quoted 5 lines

Hi Konstantin,

I am about to merge this patch. Do you have any issues on this.

No objections, LGTM.
Konstantin

Applied to dpdk-next-crypto

Thanks.