From patchwork Wed Feb 7 02:00:06 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: 127104 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp20714ljc; Tue, 6 Feb 2018 18:01:32 -0800 (PST) X-Google-Smtp-Source: AH8x227MsIrhqgUfuU/G6tNJ0GCrwfp2ajuzfDJnK2+wjWDs1x6T+/w5aZRewjyTxieZfwXbl70J X-Received: by 10.233.244.4 with SMTP id y4mr5771189qkl.289.1517968892843; Tue, 06 Feb 2018 18:01:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517968892; cv=none; d=google.com; s=arc-20160816; b=ZuCGnH4ecB/3l/jg8ZRvTl5nrV3i6FsB7CeM1IZYt/ocKM7mET7GiR5J89uxXpFpk6 82wH7Qq8HPgcqkKArhLwqU3Rf4bP4T6+3bhepH5OqPPCCC3sV1NRJoR1bi9KG6gyz2Y9 WDnqAyelSsDNATl+K3Ne9GetntKDWrEKpVT6ha8b0h8ytgJwnVKxceleADeIO72wiUVt 12w1avauxXiEaWYnki/ADNLcX1jBoNBNCgkSu8l8W/HzATTvi6DgJHBK3Hufff4nOb/z qkbkJyFqMauOSqz1HB9+KSMFw5jfz38zW1XZftTAv6UCjqaP9z5akt7KW+1Yu5vxsrWQ jXGQ== 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=Fj/9tWBoPjfnQLN7rkTUsfneQhUfZNXfG//i0bWKk3A=; b=y4BV0sriagd04DL2I7E4Z1BXeeyKVffV19KxrwBXi1bAW134u/F6epH/NHbNz/3A8k pKQZg5wm8oKws55mfFzXoW9ONgt4tfwlLi4Hsi2aJxcIYIhWcmiUnyz83ib+L9BId0Qf grKu0kD/IkSwguRNEE2D1MroJ28r39l+0mt/1Jv+ef4YbT9deJRMaYxylnYyQz5Umoqm dTKdfZ/xAm28m0nCvUbp97Q7yRPdPdohSTBeKbANv79hnpExdARN06KSk7Y1sxOX4+CQ IPvXpqQGk5Z/y8b5ImPf4Gxb+24dsomJWYfLhSWG1dCY0oa8c7dRvqijsrTT53Bj9yRR qrgA== 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 j12si405196qtc.112.2018.02.06.18.01.32; Tue, 06 Feb 2018 18:01:32 -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 7AAB5617C5; Wed, 7 Feb 2018 02:01:32 +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_H3, RCVD_IN_MSPIKE_WL 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 0AE5F61517; Wed, 7 Feb 2018 02:00:54 +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 0B7E76074A; Wed, 7 Feb 2018 02:00:49 +0000 (UTC) Received: from forward106j.mail.yandex.net (forward106j.mail.yandex.net [5.45.198.249]) by lists.linaro.org (Postfix) with ESMTPS id BA0A56063C for ; Wed, 7 Feb 2018 02:00:28 +0000 (UTC) Received: from mxback2g.mail.yandex.net (mxback2g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:163]) by forward106j.mail.yandex.net (Yandex) with ESMTP id EA6631802C20 for ; Wed, 7 Feb 2018 05:00:26 +0300 (MSK) Received: from smtp2p.mail.yandex.net (smtp2p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:7]) by mxback2g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id mvhR5tmVSM-0QdW3xK4; Wed, 07 Feb 2018 05:00:26 +0300 Received: by smtp2p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id nKioYpbuPJ-0KVOwMh4; Wed, 07 Feb 2018 05:00:20 +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 05:00:06 +0300 Message-Id: <1517968807-18097-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517968807-18097-1-git-send-email-odpbot@yandex.ru> References: <1517968807-18097-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 456 Subject: [lng-odp] [PATCH v3 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: e8666889f21113d1d24bf1d03ccd0bde538eabf0 **/ platform/linux-generic/include/odp/api/plat/packet_flag_inlines.h | 8 ++++++++ platform/linux-generic/pktio/loop.c | 3 ++- 2 files changed, 10 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..e96f7c8ed 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,12 @@ static inline int _odp_packet_has_ts(odp_packet_t pkt) return flags.timestamp; } +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;