From patchwork Wed Feb 7 03:00:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 127107 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp56324ljc; Tue, 6 Feb 2018 19:01:26 -0800 (PST) X-Google-Smtp-Source: AH8x227aNtyPU5KLXua5kAHsxnzWibFYGq8QEbb9A/GppXeXEl7obe/MIizTXMf/ReTdbbgV5Ber X-Received: by 10.55.212.4 with SMTP id l4mr6712907qki.308.1517972486169; Tue, 06 Feb 2018 19:01:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517972486; cv=none; d=google.com; s=arc-20160816; b=Y/P4jRe5rwObL0562C7aTZtF9C/duYVIxN/QyyvZgWBVWB80erwgDreAGmHRXsqU4k cXrrIDrOSF4tFVtFdOi6IOn7A+S3OycsUEjS3jidXBc4sCexbajBHFptL3Y76syzZ+zD 1sT+ohmhObCsl6NkWkjXGQ91pglSWy5Jqk7PUaGcQgUSxR/UlVtVg9vP7F+t6mnWbubc Z7CByzCt6B5kRWCld9W0VsTcsZxUAiEN69JC5qdj/6sPoyjuU0sqYurIA7D7Ux5I9ufu 57IjwORACw+qcBvcSBCGk9EkepMz8+UqKCVDOnLB0MHRwfgIngWqyyRx5XaA1d2lkuWt 3mqA== 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=ROU83Q7YQTyluB/XElzM9cXKYBL+vKLgeEKmbvGZUr4=; b=C9oet76RA72Nx9e7yFsAP8MVTDjEZAMMuKZ82JY1JC89Ep7HXYfzxNSPRNscTFEK1C /Y8zLLRx+Qea0otvtwdmulo0OQiAq7WzoAZVsonI3JrhuGl7hrh2i1L3PpF1cI534JrA TU1hN6nFLEvWmhzlhgQ/dztfJEEQykqUw4iYOcWtRqsopRSLte8UqATH1M4pZyFfIdiX qLZiP6R1SEVxxOTyCgGeWIzgOiK6tfjI4bxajqCtSjZC4N1/i1lzND6NHTBe4LGApbi5 dj1dZ6UdtsXCvGRwERihQfOsXO0KPvxEJXl8GvF8Kh9kKL25kxfnFfD+7NuTHRjJFOcx wbVg== 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 c4si270557qtg.366.2018.02.06.19.01.25; Tue, 06 Feb 2018 19:01:26 -0800 (PST) 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 D812861705; Wed, 7 Feb 2018 03:01:25 +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, RCVD_IN_MSPIKE_H2 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 86FD86089E; Wed, 7 Feb 2018 03:00:24 +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 B7E6562779; Wed, 7 Feb 2018 03:00:14 +0000 (UTC) Received: from forward104o.mail.yandex.net (forward104o.mail.yandex.net [37.140.190.179]) by lists.linaro.org (Postfix) with ESMTPS id 341DE61700 for ; Wed, 7 Feb 2018 03:00:13 +0000 (UTC) Received: from mxback11g.mail.yandex.net (mxback11g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:90]) by forward104o.mail.yandex.net (Yandex) with ESMTP id 9ACF2703A91 for ; Wed, 7 Feb 2018 06:00:11 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback11g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 1y7gjaU2I0-0AJ0tuXp; Wed, 07 Feb 2018 06:00:11 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id HEgjZvZOzR-0Ara6CjI; Wed, 07 Feb 2018 06:00:10 +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, 7 Feb 2018 06:00:07 +0300 Message-Id: <1517972408-19360-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517972408-19360-1-git-send-email-odpbot@yandex.ru> References: <1517972408-19360-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 456 Subject: [lng-odp] [PATCH v4 2/3] linux-gen: ptkio: loop: inline odp_packet_has_ipsec 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 Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 456 (lumag:ipsec-fix) ** https://github.com/Linaro/odp/pull/456 ** Patch: https://github.com/Linaro/odp/pull/456.patch ** Base sha: 257b08b35ceea41bad5a7f1c626496cf111e657a ** Merge commit sha: eb3880eebfb94c83205c92a87e99dfd372a9c064 **/ .../linux-generic/include/odp/api/plat/packet_flag_inlines.h | 9 +++++++++ platform/linux-generic/pktio/loop.c | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/platform/linux-generic/include/odp/api/plat/packet_flag_inlines.h b/platform/linux-generic/include/odp/api/plat/packet_flag_inlines.h index 3212248f3..4e79ee25e 100644 --- a/platform/linux-generic/include/odp/api/plat/packet_flag_inlines.h +++ b/platform/linux-generic/include/odp/api/plat/packet_flag_inlines.h @@ -71,4 +71,13 @@ static inline int _odp_packet_has_ts(odp_packet_t pkt) return flags.timestamp; } +/** @internal Inline function @param pkt @return */ +static inline int _odp_packet_has_ipsec(odp_packet_t pkt) +{ + _odp_packet_input_flags_t flags; + + flags.all = _odp_packet_input_flags(pkt); + return flags.ipsec; +} + #endif diff --git a/platform/linux-generic/pktio/loop.c b/platform/linux-generic/pktio/loop.c index 79c21ee7a..a210c74ef 100644 --- a/platform/linux-generic/pktio/loop.c +++ b/platform/linux-generic/pktio/loop.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -155,7 +156,7 @@ static int loopback_recv(pktio_entry_t *pktio_entry, int index ODP_UNUSED, /* Try IPsec inline processing */ if (pktio_entry->s.config.inbound_ipsec && - odp_packet_has_ipsec(pkt)) + _odp_packet_has_ipsec(pkt)) _odp_ipsec_try_inline(&pkt); pktio_entry->s.stats.in_octets += pkt_len;