From patchwork Wed Oct 18 14:00:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 116311 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp6125589qgn; Wed, 18 Oct 2017 07:22:55 -0700 (PDT) X-Google-Smtp-Source: ABhQp+QDbfc402OWHtm3qvYRI8YJgccfLVRKz4/isHYIWqQyvOoLYFbaL36pYeKh0QfwtRBx652a X-Received: by 10.237.60.120 with SMTP id u53mr3356333qte.202.1508336575411; Wed, 18 Oct 2017 07:22:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508336575; cv=none; d=google.com; s=arc-20160816; b=lAKXXZ11mR7nPXAbBSq4yQM6F2e/Q9Piz9SO2pQeKuJBu1a1dlgiQlR6S35/PnoE59 SJWO6mpbvSJOyC0km+nHi1xfj9KzD+Qy0/YSpPaxIxxOkIQYaN7ly3D+nmi3tX5V2dRM By74A4476fEBDRB+BhQxMHPTaNGwQXMbVjyrmwrRLaN1RP1I67k9+HRdPLRRlZDofYJW KGfLkvWMOo1W3bjS80gQ5Clk6xze1hE3gDbmbMMNq47/aJkzA0FLsPFqTZTOQb22Z6rH 951/IvaBenflc1yJJZr3sVMsjqmKGGH7bITTiISzcbmOq+S4e7wZq9BSszVwbgV214XP QCMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=KHZoz0mLWbrGQ0dyUSLxc/+4AkQRFyaC78ZYGgNS4Qo=; b=C6Dam+RU1FX6ylNB22JcWtPmGHtZOFMMRy6So2M51WHhNDHw+Z3M5SDXolGDOiNnEc ngae7DbcAmwvE1bZ3ODI3c/WwPHglqxVPVchiKvCO1GXMbnGJYuJg89/PMhfJVryWLXq WAbjW2uu8avV6J1qr5VAMkR3Y2RbsXgVqakyBEm0+YWrqN85X/JVwVZ91lo5UsyR1wG0 NxEKB4H4vix6YIsi5wMSPXPNqr2VXd0i0ftXKHsN6XWk0UHsevxmW5/ixoD62XULY0HM 10D49pQrPOvN7hCbRPz8R6U6340M56/F6GiLciOdNWLHvQs+RudrXdm1Dw5rF2QFPGBJ Oyzw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id i29si217417qtc.54.2017.10.18.07.22.55; Wed, 18 Oct 2017 07:22:55 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 0EC9662AEA; Wed, 18 Oct 2017 14:22:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 3114962ADC; Wed, 18 Oct 2017 14:03:01 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 6A06D62AC6; Wed, 18 Oct 2017 14:02:54 +0000 (UTC) Received: from forward106p.mail.yandex.net (forward106p.mail.yandex.net [77.88.28.109]) by lists.linaro.org (Postfix) with ESMTPS id 28403628A8 for ; Wed, 18 Oct 2017 14:00:54 +0000 (UTC) Received: from mxback5g.mail.yandex.net (mxback5g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:166]) by forward106p.mail.yandex.net (Yandex) with ESMTP id 3D9EE2D80DE0 for ; Wed, 18 Oct 2017 17:00:49 +0300 (MSK) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback5g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id UgTmk21ioL-0nnGTrSe; Wed, 18 Oct 2017 17:00:49 +0300 Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id ELMppi1EYu-0mjq6onR; Wed, 18 Oct 2017 17:00:48 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Wed, 18 Oct 2017 17:00:23 +0300 Message-Id: <1508335223-15608-11-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1508335223-15608-1-git-send-email-odpbot@yandex.ru> References: <1508335223-15608-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 81 Subject: [lng-odp] [PATCH API-NEXT v20 10/10] linux-gen: pktio: loop: support IPsec inbound inline X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Dmitry Eremin-Solenikov Add support for inbound inline IPsec packet processing on loop interface. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 81 (lumag:ipsec-packet-impl-2) ** https://github.com/Linaro/odp/pull/81 ** Patch: https://github.com/Linaro/odp/pull/81.patch ** Base sha: edca8cd1e55898826f79383b689c2c4bd2c28b3a ** Merge commit sha: 750318196a0c07a634c4755e4da9131a9f11f6f1 **/ platform/linux-generic/pktio/loop.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/platform/linux-generic/pktio/loop.c b/platform/linux-generic/pktio/loop.c index f36dcee48..8bb4b4f14 100644 --- a/platform/linux-generic/pktio/loop.c +++ b/platform/linux-generic/pktio/loop.c @@ -135,6 +135,12 @@ static int loopback_recv(pktio_entry_t *pktio_entry, int index ODP_UNUSED, packet_set_ts(pkt_hdr, ts); pkt_hdr->input = pktio_entry->s.handle; + + /* Try IPsec inline processing */ + if (pktio_entry->s.config.inbound_ipsec && + odp_packet_has_ipsec(pkt)) + _odp_ipsec_try_inline(pkt); + pktio_entry->s.stats.in_octets += pkt_len; pkts[num_rx++] = pkt; } @@ -229,6 +235,7 @@ static int loopback_capability(pktio_entry_t *pktio_entry ODP_UNUSED, odp_pktio_config_init(&capa->config); capa->config.pktin.bit.ts_all = 1; capa->config.pktin.bit.ts_ptp = 1; + capa->config.inbound_ipsec = 1; capa->config.outbound_ipsec = 1; return 0;