From: NĂ©lio Laranjeiro Date: Mon, 18 Dec 2017 10:24:37 +0000 (+0100) Subject: examples/ipsec-secgw: add egress flow actions X-Git-Tag: spdx-start~99 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=a90e6ce62ba5eabe54b72857a2b208216c33cf46;p=dpdk.git examples/ipsec-secgw: add egress flow actions Add egress flow create for devices supporting RTE_SECURITY_TX_HW_TRAILER_OFFLOAD. Signed-off-by: Nelio Laranjeiro Acked-by: Radu Nicolau --- diff --git a/examples/ipsec-secgw/ipsec.c b/examples/ipsec-secgw/ipsec.c index 4337e66013..05e89a1e5d 100644 --- a/examples/ipsec-secgw/ipsec.c +++ b/examples/ipsec-secgw/ipsec.c @@ -226,6 +226,13 @@ create_session(struct ipsec_ctx *ipsec_ctx, struct ipsec_sa *sa) &err); if (ret) goto flow_create_failure; + } else if (sa->attr.egress && + (sa->ol_flags & + RTE_SECURITY_TX_HW_TRAILER_OFFLOAD)) { + sa->action[1].type = + RTE_FLOW_ACTION_TYPE_PASSTHRU; + sa->action[2].type = + RTE_FLOW_ACTION_TYPE_END; } flow_create: sa->flow = rte_flow_create(sa->portid,