From patchwork Thu Dec 21 17:00:46 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: 122593 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp1163212qgn; Thu, 21 Dec 2017 09:13:26 -0800 (PST) X-Google-Smtp-Source: ACJfBospnCFcvYHGghNSaG/V1Lt8aHcWzBcFxG/ZVrUeoRj9nAKvenmhyo17nNwFRwES9ZQUXj0f X-Received: by 10.55.126.7 with SMTP id z7mr15022075qkc.306.1513876406173; Thu, 21 Dec 2017 09:13:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513876406; cv=none; d=google.com; s=arc-20160816; b=h5MPN5Zn1unx1wpfF1HkhA6TIPJShAjsFIE8tTxynPt2wuF2puGlafkGQDRDcWS3Sn sknpiXqpYpljJghv1n5H7SJrtSHHwFaB6nZGK4da93N9XWO5JrC929Rg2hxyWXBDBEj2 hSXTBYMhZZg2RE6c39/huWHSEpTRVx8FmC0q3yPG3jU/vYQrMhjynE5sAFL635AAdcJf jCM4p8mucI3YHayZicN8ncDiUGc4ieJw8S+e4r86etKOXcZl2oWxRP8S+D18rah4GeZ2 9MfMb+XOl1iGPaIS1yYk8dliF80ehJpHvniyFt6Oiz9Ey3g63zZSMZvG0wdlOKEgpuq/ hGJw== 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=BHKDfz/6KeDo94rzTE2G0mADzv3ABrqHjqYaRLZpZ+E=; b=sXDBfesOOCa3GX2Um/r9NrXMVXzszG0emjcjKb6P+QpcA2PT1jsXQ4eqZk6eGke1oQ pQE9bizQITqucvG3L4uiZl8hpLDdHftWmZZ8+r8u+CvTxsjNc22coltDuAXULuKz03Rj wm6ptueqW8FYwUBbVx5KvnEqpuKaYuoKGYbmoCDHGWnPQ2jzz3LjD2LJX0Z6vd3gwPbK +cS95QvRwkUH0Fk0IGINfGob8hYmgrx1w9f64f3oArD+FU2UllyKHjGekUPQb3XcjGW7 Gm0UI6w+JhkTzCporHmajD5UMtEGxfvZpxVehaKXehI16nUrAUXLzOBqvKHWU8VNTkao 6sew== 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 j53si7243543qta.133.2017.12.21.09.13.25; Thu, 21 Dec 2017 09:13: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 DBA2C616E4; Thu, 21 Dec 2017 17:13:25 +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 54D5560C5E; Thu, 21 Dec 2017 17:03:43 +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 86D1B6150E; Thu, 21 Dec 2017 17:03:31 +0000 (UTC) Received: from forward100o.mail.yandex.net (forward100o.mail.yandex.net [37.140.190.180]) by lists.linaro.org (Postfix) with ESMTPS id 9EC63614E3 for ; Thu, 21 Dec 2017 17:00:58 +0000 (UTC) Received: from mxback14j.mail.yandex.net (mxback14j.mail.yandex.net [IPv6:2a02:6b8:0:1619::90]) by forward100o.mail.yandex.net (Yandex) with ESMTP id 54C4C2A22FDF for ; Thu, 21 Dec 2017 20:00:57 +0300 (MSK) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [2a02:6b8:0:1a2d::26]) by mxback14j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id exRDJCRTFX-0vcq4lmD; Thu, 21 Dec 2017 20:00:57 +0300 Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id l1vjHaT6xA-0uX0xRZQ; Thu, 21 Dec 2017 20:00:56 +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 20:00:46 +0300 Message-Id: <1513875646-25336-6-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513875646-25336-1-git-send-email-odpbot@yandex.ru> References: <1513875646-25336-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 340 Subject: [lng-odp] [PATCH API-NEXT v4 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: c38fc105f0e9a88dd4ebb4d9e7ac9e1160466322 ** Merge commit sha: 82c8f20abfb7a55542ca78d82428d0c4e42670d1 **/ 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 8d27dd8b7..ad2cb39f8 100644 --- a/platform/linux-generic/pktio/loop.c +++ b/platform/linux-generic/pktio/loop.c @@ -186,19 +186,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);