From patchwork Wed Dec 13 20:00:10 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: 121857 Delivered-To: patch@linaro.org Received: by 10.80.152.193 with SMTP id j59csp5833024edb; Wed, 13 Dec 2017 12:09:17 -0800 (PST) X-Google-Smtp-Source: ACJfBouoRqqG4jyrOJ9DSzqnlMB4rDS6lrpsfO9PG57a1GGCVbdpMf7fg/BlgJwAWfqVB28PYVeV X-Received: by 10.55.160.18 with SMTP id j18mr12345197qke.351.1513195757246; Wed, 13 Dec 2017 12:09:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513195757; cv=none; d=google.com; s=arc-20160816; b=Kol2+GAUVlsgEx0msN9TJMnPfs6KeyDQobTch52ot2rpvniHIm4DJa9KlNvNMzyo7T u4uyeNz9uWSpqxVrYw+c8+RChZaLw5BOfo8lRUYOp3jWD3RsPrY1VO+22y6UasE0FiGv OecrYxhMvAIqQMiKOJ6a/RDcFIPseVrcNTRAkOEBBOgQNYO9T9Ox2tIpq19r4u1avDKM PDJ73TGO9QNXXSG4LRwF9+2Bt2SHkK7LzA3GWXeJq2LXcdOGztazSvbwmAAIeLdk5Fln Qyu4guu6pfrWR/BEUg1r40mYPOoTgKvhN9vSYclB73LNuoQaDm7UdqcXrCimV/MGBvHm KCbA== 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=3rajLKVkAUkySq9t0xE7G/XBANxcLJdHrYLhiTDdQNs=; b=iqwKVvsLy3xx2fhFv10HD/wtPxnEbjRV+zGmlS1EEGZfc0tiD00YWJVvK3Z5HQCImr Hwwvd4hGBOyYkKqrPi3svwK4TFccmlUHD5jSFYLFxZIk4eqjsaEbY9Gk9IhhiwGt8Jye 2y8HHwD18WB9AYR4afw93Axh8UKadYkw6v6QG6j1XINhYRDXlOB5FycJl5CIh9oSCUkg ysHBc2pUFNYOLemOJaPBIfLk+I01gsssmulIklsUtruOpn6LMRI3FJzO4TtkG8kWICf8 JDrjbQCIe0vWNkfeiDAvP1uIGK5gSEyRRVeg/6D18kbJi2p7TNfqeUQmFZboniitrEPG pd0w== 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 p24si1840382qtg.286.2017.12.13.12.09.16; Wed, 13 Dec 2017 12:09:17 -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 8792660943; Wed, 13 Dec 2017 20:09:16 +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,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 76433608F6; Wed, 13 Dec 2017 20:02:30 +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 B9C9A6088A; Wed, 13 Dec 2017 20:02:21 +0000 (UTC) Received: from forward102p.mail.yandex.net (forward102p.mail.yandex.net [77.88.28.102]) by lists.linaro.org (Postfix) with ESMTPS id D16196084F for ; Wed, 13 Dec 2017 20:01:28 +0000 (UTC) Received: from mxback4j.mail.yandex.net (mxback4j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10d]) by forward102p.mail.yandex.net (Yandex) with ESMTP id 6A7174305FDE for ; Wed, 13 Dec 2017 23:01:27 +0300 (MSK) Received: from smtp2p.mail.yandex.net (smtp2p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:7]) by mxback4j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id xP7cOzc4qM-1Rg41SEQ; Wed, 13 Dec 2017 23:01:27 +0300 Received: by smtp2p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id bm31k7WFt4-13UmdAZm; Wed, 13 Dec 2017 23:01:03 +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, 13 Dec 2017 23:00:10 +0300 Message-Id: <1513195210-1807-6-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513195210-1807-1-git-send-email-odpbot@yandex.ru> References: <1513195210-1807-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 340 Subject: [lng-odp] [PATCH API-NEXT v1 5/5] linux-gen: pktio: loop: reset packet subtype to BASIC 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 340 (lumag:ipsec-api-example) ** https://github.com/Linaro/odp/pull/340 ** Patch: https://github.com/Linaro/odp/pull/340.patch ** Base sha: d96a8207591fbcaac25b79286d7d72a537354c1f ** Merge commit sha: 83316d73abd3a48692d4212732f1f7b1e8ab1911 **/ platform/linux-generic/pktio/loop.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/platform/linux-generic/pktio/loop.c b/platform/linux-generic/pktio/loop.c index 201c33393..8418f5f66 100644 --- a/platform/linux-generic/pktio/loop.c +++ b/platform/linux-generic/pktio/loop.c @@ -185,19 +185,18 @@ static int loopback_send(pktio_entry_t *pktio_entry, int index ODP_UNUSED, bytes += odp_packet_len(pkt_tbl[i]); } - if (pktio_entry->s.config.outbound_ipsec) - for (i = 0; i < len; ++i) { - odp_ipsec_packet_result_t result; + for (i = 0; i < len; ++i) { + odp_ipsec_packet_result_t result; - if (packet_subtype(pkt_tbl[i]) != - ODP_EVENT_PACKET_IPSEC) - continue; + if (packet_subtype(pkt_tbl[i]) == + ODP_EVENT_PACKET_IPSEC && + pktio_entry->s.config.outbound_ipsec) { /* Possibly postprocessing packet */ odp_ipsec_result(&result, pkt_tbl[i]); - - packet_subtype_set(pkt_tbl[i], ODP_EVENT_PACKET_BASIC); } + packet_subtype_set(pkt_tbl[i], ODP_EVENT_PACKET_BASIC); + } odp_ticketlock_lock(&pktio_entry->s.txl);