From patchwork Thu Dec 21 13:00:53 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: 122567 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp863104qgn; Thu, 21 Dec 2017 05:08:27 -0800 (PST) X-Google-Smtp-Source: ACJfBot79c8dtYDcSibPWcrzZQh2+qQFgX7EAgaGXtNwt1kKC/Vi7ilmtdGZmYYTPhQa3tMwPZ46 X-Received: by 10.237.59.183 with SMTP id r52mr14760224qte.121.1513861706948; Thu, 21 Dec 2017 05:08:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513861706; cv=none; d=google.com; s=arc-20160816; b=jmaOIJf2gifQIz+dKYZHNspMDzTwVMXql2vBSp1ZHKBaGdE8UdzLm8K4GC5j7uZ+Rk 4UuFd3i3VjXfpcmpiE3exA/9W7ppI2xhFPQ1gTFV6YhnMFJd/Y43soQQbahLv0MmTMMA Nfm6EvT5JrMewm+22CCvEljqjyjjvEodoRlsYNm5FtIlp6ibBfFrsd2zaVUoCBuncU8m S+X1OHgBNM7GFC0a49Flj0xtXSmTguE7Yc9hnxgpTWqxYABdznUeMLj+MTjaUMbwwzG9 LZBp4XZOYhUwtgrKLDhoktWMZK9B3NDL8hivrnOUQhs90peHiE3MgplgeL2fpyG/2ITh I42Q== 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=AomJHRvDTZJFWEYPkTHGWPTf8/I8N0JZyJJA3bNZZZs=; b=pL7Jb1n/xf5xXwmrgHbNwbl4QLWblxLBdLnDRtFBEfZeqSiZcxVb1Bk3HQhUhTV/fo 7TiChiMAAmB+53gmGTqRF+/1QqFKc8HEe8odDC0/+5NBdROM/f2ga9b+zrDtNiMuK+eW mAOZ8oHjElnAYKDXkkHBnIBGKStQb45A05IMaTA3Pqo5O8Mpnlpu83rp8tvOFwvb6NeJ 7UeIRs7WHElFSoH+UhI7igh+3NG2pnwZzJxMk0My1lrOLIA+EQBGIdhIIpL1kD+ehe8o dtoHveHRfyHm3X8iwEXJHhdzwh7q93KrZIStN+weY0aWvcta/SnIbd6L/vPvhErvTkqQ 6M1g== 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 41si1568648qtu.188.2017.12.21.05.08.26; Thu, 21 Dec 2017 05:08: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 9F97F61500; Thu, 21 Dec 2017 13:08:26 +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,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 3504B61510; Thu, 21 Dec 2017 13:02:11 +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 7BB1760B4F; Thu, 21 Dec 2017 13:01:24 +0000 (UTC) Received: from forward104o.mail.yandex.net (forward104o.mail.yandex.net [37.140.190.179]) by lists.linaro.org (Postfix) with ESMTPS id CA8AD609A2 for ; Thu, 21 Dec 2017 13:01:00 +0000 (UTC) Received: from mxback2j.mail.yandex.net (mxback2j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10b]) by forward104o.mail.yandex.net (Yandex) with ESMTP id 71FD5700E22 for ; Thu, 21 Dec 2017 16:00:59 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback2j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id pVBs6VOPgm-0xu0l3OV; Thu, 21 Dec 2017 16:00:59 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id bK5cnSlVPU-0x6m0eCc; Thu, 21 Dec 2017 16:00:59 +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:53 +0300 Message-Id: <1513861253-18953-6-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513861253-18953-1-git-send-email-odpbot@yandex.ru> References: <1513861253-18953-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 340 Subject: [lng-odp] [PATCH API-NEXT v3 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: f2a1a84b43642f3d0911a351d9308d5501693290 ** Merge commit sha: ec52601dbf5fe65742cf752c2bcf4c1cc927cdc1 **/ 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);