[dpdk-dev] examples/ipsec-secgw: fix rte flow egress

Message ID 1505650593-3924-1-git-send-email-borisp@mellanox.com (mailing list archive)
State Rejected, archived
Delegated to: Pablo de Lara Guarch
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail apply patch file failure

Commit Message

Boris Pismenny Sept. 17, 2017, 12:16 p.m. UTC
  This patch ensures that the egress flag is set for outbound inline
flows.

Signed-off-by: Boris Pismenny <borisp@mellanox.com>
---
 examples/ipsec-secgw/ipsec.c | 3 +++
 1 file changed, 3 insertions(+)
  

Comments

De Lara Guarch, Pablo Oct. 10, 2017, 11:18 a.m. UTC | #1
> -----Original Message-----
> From: Boris Pismenny [mailto:borisp@mellanox.com]
> Sent: Sunday, September 17, 2017 1:17 PM
> To: dev@dpdk.org
> Cc: akhil.goyal@nxp.com; Doherty, Declan <declan.doherty@intel.com>; De
> Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>;
> hemant.agrawal@nxp.com; Nicolau, Radu <radu.nicolau@intel.com>;
> borisp@mellanox.com; aviadye@mellanox.com; thomas@monjalon.net;
> sandeep.malik@nxp.com; jerin.jacob@caviumnetworks.com
> Subject: [dpdk-dev] [PATCH] examples/ipsec-secgw: fix rte flow egress
> 
> This patch ensures that the egress flag is set for outbound inline flows.
> 
> Signed-off-by: Boris Pismenny <borisp@mellanox.com>
> ---

This patch can be rejected, as it is part of the rte_security patchset.

Pablo
  

Patch

diff --git a/examples/ipsec-secgw/ipsec.c b/examples/ipsec-secgw/ipsec.c
index 3d241a2..b3694a5 100644
--- a/examples/ipsec-secgw/ipsec.c
+++ b/examples/ipsec-secgw/ipsec.c
@@ -171,6 +171,9 @@ 
 
 			sa->action[1].type = RTE_FLOW_ACTION_TYPE_END;
 
+			sa->attr.egress =
+				(sa->direction ==
+				 RTE_SECURITY_IPSEC_SA_DIR_EGRESS);
 			sa->flow = rte_flow_create(sa->portid,
 				&sa->attr, sa->pattern, sa->action, &err);
 			if (sa->flow == NULL) {