From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nelio Laranjeiro Subject: [PATCH v5 3/3] examples/ipsec-secgw: add Egress flow actions Date: Mon, 18 Dec 2017 11:24:37 +0100 Message-ID: <18c01491a351b4c6c2fd77177f19da1f065ec3dc.1513592582.git.nelio.laranjeiro@6wind.com> References: <1838395b74a2f9e63e0c3d32fee0356f915cf88d.1513592582.git.nelio.laranjeiro@6wind.com> Cc: dev@dpdk.org To: Sergio Gonzalez Monroy , Radu Nicolau , Anoob Joseph Return-path: Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by dpdk.org (Postfix) with ESMTP id 735501B00F for ; Mon, 18 Dec 2017 11:24:57 +0100 (CET) Received: by mail-wr0-f194.google.com with SMTP id q9so13542131wre.7 for ; Mon, 18 Dec 2017 02:24:57 -0800 (PST) In-Reply-To: <1838395b74a2f9e63e0c3d32fee0356f915cf88d.1513592582.git.nelio.laranjeiro@6wind.com> In-Reply-To: <89add3272024fefe644a9e636a476c85d39e398b.1513264386.git.nelio.laranjeiro@6wind.com> References: <89add3272024fefe644a9e636a476c85d39e398b.1513264386.git.nelio.laranjeiro@6wind.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add Egress flow create for devices supporting RTE_SECURITY_TX_HW_TRAILER_OFFLOAD. Signed-off-by: Nelio Laranjeiro -- Changes in v5: * removed default second end actions wrongly added in this patch. --- 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 37a6416ed..580e09a3a 100644 --- a/examples/ipsec-secgw/ipsec.c +++ b/examples/ipsec-secgw/ipsec.c @@ -255,6 +255,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.11.0