From patchwork Wed Jul 12 09: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: 107471 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp548765qge; Wed, 12 Jul 2017 02:01:00 -0700 (PDT) X-Received: by 10.200.2.75 with SMTP id o11mr4885811qtg.26.1499850060679; Wed, 12 Jul 2017 02:01:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499850060; cv=none; d=google.com; s=arc-20160816; b=YPI/A8QlZTBOCx8vs+4Mnq3wpp64hTrYJ6FWFRnZfnR6gjjNYUxSvYEf6xmk0Tt0GZ BULNzy9lHPv+6tmjWT4gRtNp1BtvT8N/tY7QFCJ+esr9v8XvKDcrCcpf6cY8PDFGVnVP vnzZoifCgMw1/FQDAoVY4o1X6zLnTTqCQNY69Z/pzuXTQUFi6Fgw3PLiLHSz+VTKv3O+ yJeJp1u87OaUcBTQYToJ/BViqsyog0YllLbpzfMBC3Lyu42RZkPxPvrguWHP9NOe6kdI mLAz7n87i68/CEkIdpXm8BnwiY00EzpNuD4LsJkpSRfiwnKGMy8x64P3kOSWeEw2watZ rvzg== 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=+L4SCo9JibYkUHwbKKhzSVhpSWBQ5uxqh8QIS/8KC1I=; b=lOeiKGOr9vAuAfInhvgMbN8lVuwHcdhnb6pA6onIecfj0bb55CPPyWNWsVplcbC8HZ nQHoXRYGAo/jKjEZbq4LhEqGPL5NFQp++86elvvcesbnfEgUKgoJAiNFZRUf5vq+WxQz gHarS3ie4WX3DWlSj+0ri8fjuYbUEokUTG9su/A4LZ0N5TgX1+dSzPhjxKM/zTQlDcXU YbSi+PsffjGPVv0wrSWIEjQRBizSav5O+1Nkal38I3zWe53lQUjBUnecUEYVzPI8cbj2 QYNejKeXQxlVMfwZLv82dxJZeRWxDEs/aUwsvE5NQydJD6KO+FTKTBaixWoOZJIm4tR5 2NTQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id r49si1734309qte.305.2017.07.12.02.01.00; Wed, 12 Jul 2017 02:01:00 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 6987D6081A; Wed, 12 Jul 2017 09:01:00 +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 97A3360816; Wed, 12 Jul 2017 09:00:56 +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 7DD3A60A4A; Wed, 12 Jul 2017 09:00:54 +0000 (UTC) Received: from forward1p.cmail.yandex.net (forward1p.cmail.yandex.net [77.88.31.16]) by lists.linaro.org (Postfix) with ESMTPS id E980760765 for ; Wed, 12 Jul 2017 09:00:48 +0000 (UTC) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [77.88.29.86]) by forward1p.cmail.yandex.net (Yandex) with ESMTP id 5A26921238 for ; Wed, 12 Jul 2017 12:00:46 +0300 (MSK) Received: from smtp3p.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp3p.mail.yandex.net (Yandex) with ESMTP id 084E21320290 for ; Wed, 12 Jul 2017 12:00:16 +0300 (MSK) Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id TV9XpAzVgF-0F8GK8Ts; Wed, 12 Jul 2017 12:00:15 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Suid-Status: 1 0 From: Github ODP bot To: lng-odp@lists.linaro.org Date: Wed, 12 Jul 2017 12:00:11 +0300 Message-Id: <1499850011-9130-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1499850011-9130-1-git-send-email-odpbot@yandex.ru> References: <1499850011-9130-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 68 Subject: [lng-odp] [PATCH API-NEXT v3 1/1] linux-gen: pktio: loop: reset packet subtype on loopback 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 loop interface can get any kind of packets, but should output only basic packets. Reset packet subtype on loopback. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 68 (lumag:packet-loop) ** https://github.com/Linaro/odp/pull/68 ** Patch: https://github.com/Linaro/odp/pull/68.patch ** Base sha: ee5be324411a7520528a367967c28fc529d3bc2e ** Merge commit sha: 1d53262ac97803775f439a7ebce2d3bb10cdc3b2 **/ platform/linux-generic/pktio/loop.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform/linux-generic/pktio/loop.c b/platform/linux-generic/pktio/loop.c index c825393a..b1d311fa 100644 --- a/platform/linux-generic/pktio/loop.c +++ b/platform/linux-generic/pktio/loop.c @@ -165,6 +165,8 @@ static int loopback_send(pktio_entry_t *pktio_entry, int index ODP_UNUSED, for (i = 0; i < len; ++i) { hdr_tbl[i] = packet_to_buf_hdr(pkt_tbl[i]); + _odp_buffer_event_subtype_set(hdr_tbl[i]->handle.handle, + ODP_EVENT_PACKET_BASIC); bytes += odp_packet_len(pkt_tbl[i]); }