From a90e6ce62ba5eabe54b72857a2b208216c33cf46 Mon Sep 17 00:00:00 2001 From: =?utf8?q?N=C3=A9lio=20Laranjeiro?= Date: Mon, 18 Dec 2017 11:24:37 +0100 Subject: [PATCH] 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 --- examples/ipsec-secgw/ipsec.c | 7 +++++++ 1 file changed, 7 insertions(+) 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, -- 2.20.1