From patchwork Thu Jul 6 12:01:06 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: 107111 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp2016313qge; Thu, 6 Jul 2017 05:05:33 -0700 (PDT) X-Received: by 10.200.61.82 with SMTP id u18mr51051227qtf.196.1499342733644; Thu, 06 Jul 2017 05:05:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499342733; cv=none; d=google.com; s=arc-20160816; b=Cf34lrl8LorzaBnT/VTLbj61Y8JsQCLItAJv6sIl1wGlI5aGGoWbDfzzwEIAWWTKSm uZ6y5RD6Vl74WPrmA/3rRGL/4VcuAfghn6hwC4BJCuyNZ0osy53DTzj7ZFxEEKyhFmEO h9Vq4rWqbl+r0kVH9FBlcgpcWdX/yQje48klSawxwWsDvWoBdbyuyQvPJWF8fHHwrFUP yExmA/F74VJlz9j/cglT61Qay8Co5+rd/qIvDIM/nQs8+sUJoTuptG+kO3WztfTicRpi 6DsMi5bz4mjgfDDRaLMMTPxLuxFouiXNPRlQd3/iYLmehsVWljlI6Zv+oP30jOp2i8py Hp4g== 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=/vrD5aI9puHx8CMxxLIClGOs/J8AcFIFI7WxJJm5RYE=; b=otLjVZQcScEfzHA5eaR62vn/S9ZDtSQn/Qz6Innv8Lt1Aurki0Qt8PMiJpOE2OHzy7 O4lCPoooVHuXxzv7ZqUtGHB1NS/1yQNspG8BTXkBj8JBx9+KN2cykAmJ7HM0I9WKYsSP yPR/K3dqG47rNklYzangezJoQJCADnavBkIhK8L+8y/D5qmYL/G6fwVv+7xYNkNPDVhA 8NC6XLcp79q4TPhzTXIuunPHy/+tT2nENeSQREvQt4P2bLUrpZmY3s6tkfI2dr6Ia9Ie LmeST8KZIYzZJTvAzdCqvKrTii5nniuKBPWE0sKZM8+9pCp1mJjjc2pkPM+roCk9G76i pdgw== 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 z188si128859qke.98.2017.07.06.05.05.33; Thu, 06 Jul 2017 05:05:33 -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 6396A6069E; Thu, 6 Jul 2017 12:05:33 +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 B99D360D79; Thu, 6 Jul 2017 12:01:52 +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 7412460CD1; Thu, 6 Jul 2017 12:01:33 +0000 (UTC) Received: from forward1j.cmail.yandex.net (forward1j.cmail.yandex.net [5.255.227.19]) by lists.linaro.org (Postfix) with ESMTPS id 6FD3660C35 for ; Thu, 6 Jul 2017 12:01:15 +0000 (UTC) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [77.88.29.84]) by forward1j.cmail.yandex.net (Yandex) with ESMTP id 3D2A5206A9 for ; Thu, 6 Jul 2017 15:01:14 +0300 (MSK) Received: from smtp1p.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp1p.mail.yandex.net (Yandex) with ESMTP id 0697117804F4 for ; Thu, 6 Jul 2017 15:01:12 +0300 (MSK) Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id NoD3SrWPp3-1BOKsLvc; Thu, 06 Jul 2017 15:01:11 +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: Thu, 6 Jul 2017 15:01:06 +0300 Message-Id: <1499342466-18674-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1499342466-18674-1-git-send-email-odpbot@yandex.ru> References: <1499342466-18674-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 68 Subject: [lng-odp] [PATCH API-NEXT v1 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: 15c97427d01c81dc9f4d0aafe9b0a99cdb2d1fc6 ** Merge commit sha: bb30b0fc22b7daa0dc114fc9b0c06b197c6ced13 **/ 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]); }