From patchwork Wed Jul 19 11:00: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: 108268 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp660975qge; Wed, 19 Jul 2017 04:01:58 -0700 (PDT) X-Received: by 10.237.42.88 with SMTP id k24mr1761131qtf.58.1500462118132; Wed, 19 Jul 2017 04:01:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500462118; cv=none; d=google.com; s=arc-20160816; b=G6cIUdkDZGeKQAxrA18QsjLXlg+jWK30Oj2KrHUdS63C6n8qE0O2h+P101GyNQSJ2u qbg43egDBHKmViY4X+hY+nKIygqWau0D83pVo634PmlHDdJ5t7E250W5ZTUOAJlUlPqy DPBNIbJPWeMo7ihKhLutkRmosHaK6LZuJ6oztZPq7Znx0qru6ZbSRyNuKIlYSzvx6Tlh gp0rCG9CiFlm0SAvB53t421at6S2sSIFXS58O7UVGIUzZEeQEegLKMvEFAmXxTk32QzT xujGQR0dzDw6YNeONF/EhPVCHcVFyEVBczjx1koUgvhfrWrzZ6pSUznBFF/cbUxm8MQV DqAg== 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=VmoD1D7n0jU0SMgA17wFBq5RLzpWHjbDD7lH/kT1tyw=; b=CqmbkHFpzPHDzcGsLPYb/0dk+ndiVwXwV/dBqZFfLlD/NDXyT2bVZmAXC7xJsC8BRA 6KdY3+IuCpki/wALaG0ZEjoIoxXZvDaaImoUds7w0JgPQclNuCnOkXBbxQB9RbDOukch jDfWwTnohLNG4wJBB79rAFt+dYnI8wNNh6R7cL7WDoEIIQu85uPtqBe1tyFVgdNYgMgt KTyPS72UQ9ZjjM+SgtXkh/5vrUfaDbVWfsSPrAjLHhRJavPGyjbDzKRPwD8++p3Thpil khteJQDgCgc2I+KSWqu4dja3gJ6vq2rRUQYJa7fmub5EUl6nJU5E7DbnMoPl5Bcf514D CsBQ== 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 k87si4917626qkh.369.2017.07.19.04.01.57; Wed, 19 Jul 2017 04:01:58 -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 BAB9F644DE; Wed, 19 Jul 2017 11:01:57 +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 46E3E6099C; Wed, 19 Jul 2017 11:00:29 +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 8DBE9608B6; Wed, 19 Jul 2017 11:00:25 +0000 (UTC) Received: from forward4p.cmail.yandex.net (forward4p.cmail.yandex.net [77.88.31.19]) by lists.linaro.org (Postfix) with ESMTPS id 7715D609BA for ; Wed, 19 Jul 2017 11:00:22 +0000 (UTC) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [95.108.130.59]) by forward4p.cmail.yandex.net (Yandex) with ESMTP id 89CFF20FB3 for ; Wed, 19 Jul 2017 14:00:20 +0300 (MSK) Received: from smtp1j.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp1j.mail.yandex.net (Yandex) with ESMTP id 946243C80F15 for ; Wed, 19 Jul 2017 14:00:17 +0300 (MSK) Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 2fmNox5Cmm-0HaeOgsf; Wed, 19 Jul 2017 14:00:17 +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, 19 Jul 2017 14:00:06 +0300 Message-Id: <1500462011-17433-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1500462011-17433-1-git-send-email-odpbot@yandex.ru> References: <1500462011-17433-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 81 Subject: [lng-odp] [PATCH API-NEXT v1 1/6] 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 81 (lumag:ipsec-packet-impl-2) ** https://github.com/Linaro/odp/pull/81 ** Patch: https://github.com/Linaro/odp/pull/81.patch ** Base sha: db7cc41aeb559dd296f3a6d8570aa10326a31d5e ** Merge commit sha: 2ea07e66ca00decd7d3013275277a30a03d29c22 **/ platform/linux-generic/pktio/loop.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/platform/linux-generic/pktio/loop.c b/platform/linux-generic/pktio/loop.c index c825393a..27c9566d 100644 --- a/platform/linux-generic/pktio/loop.c +++ b/platform/linux-generic/pktio/loop.c @@ -85,6 +85,10 @@ static int loopback_recv(pktio_entry_t *pktio_entry, int index ODP_UNUSED, pkt = packet_from_buf_hdr(hdr_tbl[i]); pkt_len = odp_packet_len(pkt); + /* Application can send arbitrary packets, but expects to + * receive basic packets from PKTIO */ + _odp_buffer_event_subtype_set(hdr_tbl[i]->handle.handle, + ODP_EVENT_PACKET_BASIC); if (pktio_cls_enabled(pktio_entry)) { odp_packet_t new_pkt;