From patchwork Thu Dec 14 00:00:11 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: 121876 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp6134976qgn; Wed, 13 Dec 2017 16:03:49 -0800 (PST) X-Google-Smtp-Source: ACJfBouncq9Z3yITrYD16dG9rhc5v5CXYiPzuzkFPnCLqsaQeYDY7zAX73neWPsxtdQf33E4ZVNe X-Received: by 10.36.125.129 with SMTP id b123mr1033710itc.142.1513209829285; Wed, 13 Dec 2017 16:03:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513209829; cv=none; d=google.com; s=arc-20160816; b=SMtifg/sYCvM+o6UZlrthRTvEQ/TteMjrZOzJNZIJK0r4xW7PS6OVL1RdwuhutITA1 D48iXEkus4GnMUC1ZVmxc6cdKfz45YdgiFeKTR6pBtK2gpbPbDiaERqltemNQirvgOQ5 Lycf9KqTWJbXCnxblLqCRChwWjD+9bNAbnYJY6FfVVfErg6HSUHRfvZvwZRZc8zeSfLy T439ZuengGNMP2XJFtf9+v6vHNV1gMq4C7YpH+FlcnpQKZVWpAmfJ87XeShDhvQkI7oU QFOBXT9eNTZdWD6gGkyEmw/HFhkgCrXZMdF0HIVEMBU6YwtGNsMp8jxpenNevN1A75RC h8Fw== 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=y21dg0dAS8O8Vqx+bVr9w278Jbep2UpI1HSXatSMxEs=; b=PoynhWH2urO0F5tuAufSfLnCD4r6HfDTZFa7fJO7THtSVLmU4qQHknwKggATbXfpvv ptvHLLluIXQEBdHhlHSiysvQ3/Qzt4pbfvcm/cOCITfWMTpHG6XsoqmPjZAIqGlewD9a 9IFq+gflg+V8WburQ5GuvLKHCsOU2NLErh9Ku7Wc6EZ7jCmJtldgOQKu96SfG53KsGeY jrdwj3xg+1iETKE4ORNbItesO5wVJQMywNWIO+6uz0sbHxAzSgHa0rVsyeU5v0lQlo1/ oniPP57voljmXvm7E2x5GfQaK7ZkcBRtQOGQAtiih0XR5K0WA47VCNTAmB9VvcdClhzT oy6w== 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 c3si2398086itj.75.2017.12.13.16.03.49; Wed, 13 Dec 2017 16:03:49 -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 D00C460903; Thu, 14 Dec 2017 00:03:48 +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 967DC60907; Thu, 14 Dec 2017 00:00:40 +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 ABC84608F6; Thu, 14 Dec 2017 00:00:21 +0000 (UTC) Received: from forward102o.mail.yandex.net (forward102o.mail.yandex.net [37.140.190.182]) by lists.linaro.org (Postfix) with ESMTPS id 7F4D96086F for ; Thu, 14 Dec 2017 00:00:18 +0000 (UTC) Received: from mxback9o.mail.yandex.net (mxback9o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::23]) by forward102o.mail.yandex.net (Yandex) with ESMTP id CE4B25A0518D for ; Thu, 14 Dec 2017 03:00:16 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback9o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id eJaaHaExRY-0GFSLBnR; Thu, 14 Dec 2017 03:00:16 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id yIWKc0t7iQ-0GrafB2L; Thu, 14 Dec 2017 03:00:16 +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, 14 Dec 2017 03:00:11 +0300 Message-Id: <1513209611-8033-6-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513209611-8033-1-git-send-email-odpbot@yandex.ru> References: <1513209611-8033-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 340 Subject: [lng-odp] [PATCH API-NEXT v2 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: 7371c04c5dc9238b8e9f601e6650b4bc36589be9 **/ 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);