From patchwork Thu Dec 21 13:00:39 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: 122566 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp862291qgn; Thu, 21 Dec 2017 05:07:54 -0800 (PST) X-Google-Smtp-Source: ACJfBos2I8Y9H3Fj++DrOsqtNMhpUMENrcgsKCb8dx3bV6i624OLF2prE5VAD0mJcnxRv8fMB7W7 X-Received: by 10.237.36.182 with SMTP id t51mr14692734qtc.90.1513861674297; Thu, 21 Dec 2017 05:07:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513861674; cv=none; d=google.com; s=arc-20160816; b=rysWBkDr5/+k+svbOLDCSHieZLqAKrMCcfIveJPC9ezupH8+sRJ0srI5seFYFFJQl1 Bd45+RNPWFh+no/q8ws1fB8oCRyb9xwAHCXBMDnz0/rPFNXjZ7OMDtlvROjfqmFC4von ubkdlUhsDrvm76Yx3qQ0mI6sYfFCkj5m9lrGrbMBD0MhvMcShsdi4VXRW5LvCSH0y8PY DfWVTqnwvWPSxZ0WsGQ7NMJprUh7qGbLti4a9mdcV43ao4ioQQF9tdRXxrd003JjXeQI UTcKjRLaoBXJx3fobP31Fzikfs9hSuph+MytbDYjcruB00rhPt2k0MQJKxiHhOoDQM+d D8pg== 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=8fESvdvTxvxBRin/VZ3WLx9RGffwlbGiBN3zEqKrmdo=; b=0xUy3gz20SkJYfW8gTwnqIbHTDTqCu9JgC3s1X1I+/SD7bIf55SS56CaBDeLvj+ljr isDpg36cyvJI7ls35R/DeqzAFIkynLOl9W2NN9EnwU+scVYV+U5ViNIbrBs8oaSF7ZKH JViqjxkshfWZicRnUqONVlUtJegyHoCV5635iWyh6YT2OKFIoNnXAshhlnQn6TF40Cr5 wEe2RsFp2sE9WVOdW5t76ejDvkKjM5JpTGorSM6T9OVM86TaV+2DA1Lfmcma1veCPQCy ISMxj9MqvvtI11OcBxbHBXaV5mhMEecehMUKP7IzGSEsCUIRl6XrLPgalKXluTmHq2mP 7zjw== 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 h129si2608323qkc.112.2017.12.21.05.07.53; Thu, 21 Dec 2017 05:07:54 -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 CE1E06150D; Thu, 21 Dec 2017 13:07:53 +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_H3,RCVD_IN_MSPIKE_WL,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 E9FB86150E; Thu, 21 Dec 2017 13:02:06 +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 7D21D60B11; Thu, 21 Dec 2017 13:01:20 +0000 (UTC) Received: from forward106o.mail.yandex.net (forward106o.mail.yandex.net [37.140.190.187]) by lists.linaro.org (Postfix) with ESMTPS id 9CC8660922 for ; Thu, 21 Dec 2017 13:00:46 +0000 (UTC) Received: from mxback17j.mail.yandex.net (mxback17j.mail.yandex.net [IPv6:2a02:6b8:0:1619::93]) by forward106o.mail.yandex.net (Yandex) with ESMTP id E930D780FB7 for ; Thu, 21 Dec 2017 16:00:42 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback17j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id QhK96Ff2l7-0gSSKsfR; Thu, 21 Dec 2017 16:00:42 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id dxXoLRyiI1-0gluTHce; Thu, 21 Dec 2017 16:00:42 +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:39 +0300 Message-Id: <1513861240-18876-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513861240-18876-1-git-send-email-odpbot@yandex.ru> References: <1513861240-18876-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 357 Subject: [lng-odp] [PATCH API-NEXT v1 1/2] linux-gen: pktio: loop: reset flags before reparsing packtes 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 Stale flags can interfere with packet processing, so let's reset them. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 357 (lumag:loop-fix) ** https://github.com/Linaro/odp/pull/357 ** Patch: https://github.com/Linaro/odp/pull/357.patch ** Base sha: f2a1a84b43642f3d0911a351d9308d5501693290 ** Merge commit sha: 9c542050f3413f01be52e51336f5f628c4151742 **/ platform/linux-generic/pktio/loop.c | 1 + 1 file changed, 1 insertion(+) diff --git a/platform/linux-generic/pktio/loop.c b/platform/linux-generic/pktio/loop.c index f887e1a2d..6d19863f6 100644 --- a/platform/linux-generic/pktio/loop.c +++ b/platform/linux-generic/pktio/loop.c @@ -88,6 +88,7 @@ static int loopback_recv(pktio_entry_t *pktio_entry, int index ODP_UNUSED, pkt_len = odp_packet_len(pkt); pkt_hdr = odp_packet_hdr(pkt); + packet_parse_reset(pkt_hdr); if (pktio_cls_enabled(pktio_entry)) { odp_packet_t new_pkt; odp_pool_t new_pool; From patchwork Thu Dec 21 13:00:40 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: 122563 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp858840qgn; Thu, 21 Dec 2017 05:05:33 -0800 (PST) X-Google-Smtp-Source: ACJfBovYEv0OjxyS3j8HN51KIO5yGnBcVEWeVuL4IlM9w5NoduvsX9hBB7HGqdnNjqBWaLLwMpni X-Received: by 10.237.47.228 with SMTP id m91mr15065441qtd.205.1513861533085; Thu, 21 Dec 2017 05:05:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513861533; cv=none; d=google.com; s=arc-20160816; b=z812vfKwavy4u+b2Xj+kybQc6lMVwDVg3vQvWjhkenlWQiFjMRzZ7flERMepuD/LL6 xehNU4ElUFMHFZ/TjC9tf5axBNFYGriulbN8Bbs6pGAq0+TV70Be3A6GOjUJMj1r4NXP coA73FuMo2E3y8e9LhKWTxNEiFtgZF4OOjEbMKkfkHgmTqTf9FfSQiUa18VawpknCgVt aHTwvDVV+lQUQlcN1NWiSHkEBCE3YAW4vjmraBSSq2oVtBHBfpIiFE/KIr3zoGbMZzAx DpIMRx2xwoNz5DPLXDzXUEiAMQTv5nRiUU+WqY0yDiKg28aAkpczx9R/vHFiEHO2XZIJ jsGg== 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=A+oVS2z4q3dEAyWQThFJ8DEu69JYdSi6EI80PeXJ0Jo=; b=htlZUXHHpESePjLksGO2JC8wFPrcAvxVkdX7r+0/e1esVrTyjhhDmmgDnRTl5Nnri5 Vv7h68BWitsbpthPUr3A5sb7GPMM0OlLH7/FuIoWMNLkEE3WHQfC4fyMnW/X5vSPNoC7 xUoBRj3/mpghg/rRoxwleE9IjDACjZPKJAP+d1MFzzfiXF4+Uqt/fQQ/KRDeq9ifHtKF OVa+TSvbTKrHASqsZu7KhW2B/1xAaloZfql7kCVk9+Ae5F1/XRbfadGM8BdQ0ArFLLEi erejRtl9t2UvxVYgioaTsuutYKSFJ7X43qIzx8qS3g8s/HbuEe6ObTs82HyAJb9EB+jd r+9A== 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 z64si5641978qke.119.2017.12.21.05.05.32; Thu, 21 Dec 2017 05:05:33 -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 7BC0160C5E; Thu, 21 Dec 2017 13:05:32 +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 05FC76096B; Thu, 21 Dec 2017 13:01:44 +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 90EDE60A6E; Thu, 21 Dec 2017 13:01:14 +0000 (UTC) Received: from forward101o.mail.yandex.net (forward101o.mail.yandex.net [37.140.190.181]) by lists.linaro.org (Postfix) with ESMTPS id B5D9D60997 for ; Thu, 21 Dec 2017 13:00:44 +0000 (UTC) Received: from mxback6o.mail.yandex.net (mxback6o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::20]) by forward101o.mail.yandex.net (Yandex) with ESMTP id 7A96013420DC for ; Thu, 21 Dec 2017 16:00:43 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback6o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id wpiqjuUrl1-0hb4BCC7; Thu, 21 Dec 2017 16:00:43 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id dxXoLRyiI1-0glelYlN; Thu, 21 Dec 2017 16:00:43 +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:40 +0300 Message-Id: <1513861240-18876-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513861240-18876-1-git-send-email-odpbot@yandex.ru> References: <1513861240-18876-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 357 Subject: [lng-odp] [PATCH API-NEXT v1 2/2] 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 357 (lumag:loop-fix) ** https://github.com/Linaro/odp/pull/357 ** Patch: https://github.com/Linaro/odp/pull/357.patch ** Base sha: f2a1a84b43642f3d0911a351d9308d5501693290 ** Merge commit sha: 9c542050f3413f01be52e51336f5f628c4151742 **/ 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 6d19863f6..7f2e35c17 100644 --- a/platform/linux-generic/pktio/loop.c +++ b/platform/linux-generic/pktio/loop.c @@ -172,19 +172,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);