[dpdk-dev] examples/ipsec-secgw: try end in flow actions before fail

Message ID 1516291658-15360-1-git-send-email-radu.nicolau@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Pablo de Lara Guarch
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Radu Nicolau Jan. 18, 2018, 4:07 p.m. UTC
  After trying RSS and Queue also try End for flow action
to allow for HW that don't support flow features with
inline crypto.

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

Comments

Akhil Goyal Jan. 19, 2018, 12:33 p.m. UTC | #1
Reviewed-by: Akhil Goyal <akhil.goyal@nxp.com>
  
De Lara Guarch, Pablo Jan. 22, 2018, 9:44 a.m. UTC | #2
> -----Original Message-----
> From: Nicolau, Radu
> Sent: Thursday, January 18, 2018 4:08 PM
> To: dev@dpdk.org
> Cc: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Doherty,
> Declan <declan.doherty@intel.com>; akhil.goyal@nxp.com; Nicolau, Radu
> <radu.nicolau@intel.com>
> Subject: [PATCH] examples/ipsec-secgw: try end in flow actions before fail
> 
> After trying RSS and Queue also try End for flow action to allow for HW that
> don't support flow features with inline crypto.
> 
> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>

Applied to dpdk-next-crypto (already in RC1).
Thanks,

Pablo
  

Patch

diff --git a/examples/ipsec-secgw/ipsec.c b/examples/ipsec-secgw/ipsec.c
index 4ef446d..c1ddda7 100644
--- a/examples/ipsec-secgw/ipsec.c
+++ b/examples/ipsec-secgw/ipsec.c
@@ -224,6 +224,12 @@  create_session(struct ipsec_ctx *ipsec_ctx, struct ipsec_sa *sa)
 				ret = rte_flow_validate(sa->portid, &sa->attr,
 							sa->pattern, sa->action,
 							&err);
+				/* Try End. */
+				sa->action[1].type = RTE_FLOW_ACTION_TYPE_END;
+				sa->action[1].conf = NULL;
+				ret = rte_flow_validate(sa->portid, &sa->attr,
+							sa->pattern, sa->action,
+							&err);
 				if (ret)
 					goto flow_create_failure;
 			} else if (sa->attr.egress &&