From patchwork Thu Dec 21 13:00:40 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: 122563 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp858840qgn; Thu, 21 Dec 2017 05:05:33 -0800 (PST) X-Google-Smtp-Source: ACJfBovYEv0OjxyS3j8HN51KIO5yGnBcVEWeVuL4IlM9w5NoduvsX9hBB7HGqdnNjqBWaLLwMpni X-Received: by 10.237.47.228 with SMTP id m91mr15065441qtd.205.1513861533085; Thu, 21 Dec 2017 05:05:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513861533; cv=none; d=google.com; s=arc-20160816; b=z812vfKwavy4u+b2Xj+kybQc6lMVwDVg3vQvWjhkenlWQiFjMRzZ7flERMepuD/LL6 xehNU4ElUFMHFZ/TjC9tf5axBNFYGriulbN8Bbs6pGAq0+TV70Be3A6GOjUJMj1r4NXP coA73FuMo2E3y8e9LhKWTxNEiFtgZF4OOjEbMKkfkHgmTqTf9FfSQiUa18VawpknCgVt aHTwvDVV+lQUQlcN1NWiSHkEBCE3YAW4vjmraBSSq2oVtBHBfpIiFE/KIr3zoGbMZzAx DpIMRx2xwoNz5DPLXDzXUEiAMQTv5nRiUU+WqY0yDiKg28aAkpczx9R/vHFiEHO2XZIJ jsGg== 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=A+oVS2z4q3dEAyWQThFJ8DEu69JYdSi6EI80PeXJ0Jo=; b=htlZUXHHpESePjLksGO2JC8wFPrcAvxVkdX7r+0/e1esVrTyjhhDmmgDnRTl5Nnri5 Vv7h68BWitsbpthPUr3A5sb7GPMM0OlLH7/FuIoWMNLkEE3WHQfC4fyMnW/X5vSPNoC7 xUoBRj3/mpghg/rRoxwleE9IjDACjZPKJAP+d1MFzzfiXF4+Uqt/fQQ/KRDeq9ifHtKF OVa+TSvbTKrHASqsZu7KhW2B/1xAaloZfql7kCVk9+Ae5F1/XRbfadGM8BdQ0ArFLLEi erejRtl9t2UvxVYgioaTsuutYKSFJ7X43qIzx8qS3g8s/HbuEe6ObTs82HyAJb9EB+jd r+9A== 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 z64si5641978qke.119.2017.12.21.05.05.32; Thu, 21 Dec 2017 05:05:33 -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 7BC0160C5E; Thu, 21 Dec 2017 13:05: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_H2, 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 05FC76096B; Thu, 21 Dec 2017 13:01:44 +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 90EDE60A6E; Thu, 21 Dec 2017 13:01:14 +0000 (UTC) Received: from forward101o.mail.yandex.net (forward101o.mail.yandex.net [37.140.190.181]) by lists.linaro.org (Postfix) with ESMTPS id B5D9D60997 for ; Thu, 21 Dec 2017 13:00:44 +0000 (UTC) Received: from mxback6o.mail.yandex.net (mxback6o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::20]) by forward101o.mail.yandex.net (Yandex) with ESMTP id 7A96013420DC for ; Thu, 21 Dec 2017 16:00:43 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback6o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id wpiqjuUrl1-0hb4BCC7; Thu, 21 Dec 2017 16:00:43 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id dxXoLRyiI1-0glelYlN; Thu, 21 Dec 2017 16:00:43 +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: Thu, 21 Dec 2017 16:00:40 +0300 Message-Id: <1513861240-18876-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513861240-18876-1-git-send-email-odpbot@yandex.ru> References: <1513861240-18876-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 357 Subject: [lng-odp] [PATCH API-NEXT v1 2/2] 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 357 (lumag:loop-fix) ** https://github.com/Linaro/odp/pull/357 ** Patch: https://github.com/Linaro/odp/pull/357.patch ** Base sha: f2a1a84b43642f3d0911a351d9308d5501693290 ** Merge commit sha: 9c542050f3413f01be52e51336f5f628c4151742 **/ 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 6d19863f6..7f2e35c17 100644 --- a/platform/linux-generic/pktio/loop.c +++ b/platform/linux-generic/pktio/loop.c @@ -172,19 +172,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);