From patchwork Mon Dec 18 10:24:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?N=C3=A9lio_Laranjeiro?= X-Patchwork-Id: 32355 X-Patchwork-Delegate: pablo.de.lara.guarch@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D74691B019; Mon, 18 Dec 2017 11:25:01 +0100 (CET) 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=gQ8cP23kCEFfhuKBcWuwcI01p9xJzB53Edt/7prDC+o=; b=nITPAZfyyrcwBuziNMR+BJTRKp9MTLPgEe1cF/eT3EJRMkLkUOJqv+hy0hh3vOFt2U 5HUDAHxat+849PlDJ2BlMzh6kQy96U/dMI1g7b6gqOdTCmnNwpDFnDfgU89zbgqN7GzG CfbtNCTEOksT+tXJuxrAzQEqDTsc2d3F9xQiSgFoYjxEQ7285Xh2gd/+Z6ZGwH1kKELQ hqHBd76RwWj+gzYTte8rpOuY7yiWXOVMNCxaAL4OTMx/IqKShb9Zunp94zj4SDiGbt2g Gz7mr0g/m+mwPuIMwLOxua+tLrRa6+AefXT4dMQCPTV6KyPX/ey5sLmgbgrEkWD20Ng+ LmsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=gQ8cP23kCEFfhuKBcWuwcI01p9xJzB53Edt/7prDC+o=; b=il4cHHdWrXZ1pjCwU0gQoLHZr08zL4Grt0iUT8Ehys8vohp0rpZh9MTddSAdPiUn42 yeYUQdP8sAOcMe250rf9gASKd5s3wtSQXoJ8f1uOplwOeGnfRqpn2DxOw+gUJxTc1pyV NTPLniouzX5AnJr+dnbXZnWFjpFt54fnjPLS5/k73p1KIkEFarj7jH6X+5JIBzzHViUU p7BkDFKhbHq0mXaMdxHsjgLXnGKNljUlzexiW093D81W7iTF1IcyPwwaZrF20TGOgu4A orYQxrv0CMJkCb76PWK1XSWxJYq0eBSA11pTCXvVHbMNbQGGZUJfNsbjqKvRao8nFghe +ltA== X-Gm-Message-State: AKGB3mKjmP0CeqcgK+Ahm3twCN1fcW9do7VulEodVo/2sU9RM5NFq53l E8fzv1KYasXLMqu2JLjNhaAU X-Google-Smtp-Source: ACJfBotwzqLB9a9dKickW8ShcwAASTOvEYpt44ziGL/lteXn69Rt7+PLBovoopREYc2E7Khp1/uxxQ== X-Received: by 10.223.167.76 with SMTP id e12mr18235239wrd.204.1513592697105; Mon, 18 Dec 2017 02:24:57 -0800 (PST) Received: from laranjeiro-vm.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id b78sm9970702wmi.18.2017.12.18.02.24.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Dec 2017 02:24:56 -0800 (PST) From: Nelio Laranjeiro To: Sergio Gonzalez Monroy , Radu Nicolau , Anoob Joseph Cc: dev@dpdk.org Date: Mon, 18 Dec 2017 11:24:37 +0100 Message-Id: <18c01491a351b4c6c2fd77177f19da1f065ec3dc.1513592582.git.nelio.laranjeiro@6wind.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <1838395b74a2f9e63e0c3d32fee0356f915cf88d.1513592582.git.nelio.laranjeiro@6wind.com> References: <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> Subject: [dpdk-dev] [PATCH v5 3/3] examples/ipsec-secgw: add Egress flow actions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list 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 Acked-by: Radu Nicolau --- 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,