examples/ipsec-secgw: fix missing ingress flow attribute
authorNélio Laranjeiro <nelio.laranjeiro@6wind.com>
Mon, 18 Dec 2017 10:24:35 +0000 (11:24 +0100)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Sat, 20 Jan 2018 15:10:52 +0000 (16:10 +0100)
Generic flow API have both direction bits, ingress and egress for rules
which may work on both sides.

Fixes: ec17993a145a ("examples/ipsec-secgw: support security offload")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
examples/ipsec-secgw/ipsec.c

index b2493bb..a19acb0 100644 (file)
@@ -176,6 +176,8 @@ create_session(struct ipsec_ctx *ipsec_ctx, struct ipsec_sa *sa)
 
                        sa->attr.egress = (sa->direction ==
                                        RTE_SECURITY_IPSEC_SA_DIR_EGRESS);
+                       sa->attr.ingress = (sa->direction ==
+                                       RTE_SECURITY_IPSEC_SA_DIR_INGRESS);
                        sa->flow = rte_flow_create(sa->portid,
                                &sa->attr, sa->pattern, sa->action, &err);
                        if (sa->flow == NULL) {