From patchwork Tue Jan 30 16:00:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 126271 Delivered-To: patch@linaro.org Received: by 10.46.84.92 with SMTP id y28csp3490165ljd; Tue, 30 Jan 2018 08:06:06 -0800 (PST) X-Google-Smtp-Source: AH8x226szBwagtojbEUH4EUDzSOicgx/fyzkOSwSPxLOAIWA6eOzFFcWnzVMmBLPZO6hARC/kt1g X-Received: by 10.200.52.70 with SMTP id v6mr44042226qtb.63.1517328366009; Tue, 30 Jan 2018 08:06:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517328366; cv=none; d=google.com; s=arc-20160816; b=sO37S8yXZ13oTw+pqPkCHHE/AD0i7tRFxBR0HkVUvKMh8reG5WOL+70/7FJbZmpmPJ bLW9xnNEwroZkXSgboQmLBUNbEAIBViukexPowO9z7WtVFMXjciH+5SEfHHL1Taocg8/ +m8jPpdRnu3cmBqHo103CHEf/epWOoTKN2qoJO8lAHw6fSb2Rh3+d/7i7s40LZSo0QQy ugR8+xyktONNXVHzBPhnMECYkIA1Rv8FM5RfIt7RaV0DElDGxIGAuNjLEccu9v+aRZeU u4fUyk9ww+YrOps00ecQvXp3UJ8m2Z6fMSe2qfekjbDebNEsPSAnnvWi5b/XG/AuKADR NflA== 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=x8m2bPnCdq8I3+AANWD8+whDkVggL9kVfzQd0iFtqT8=; b=pP4JYlSy/c/VfHDqidGYn6o3JivmmpiYCLNvbDkcaV9v/plNdldp+9JE3YabrsPKu/ zkbe6q7lHaNaJ6KJwnupaNi+hqo+vvNu6+zxbPOyXHhzdLQyIP+DMmX4wEQxyV1rNK/7 +JMQBNB2pLtfoD2fnQeJhi2eKheqGq6WMSmMlNhJQmM+yEub+i1sBvpu+PNoJWkpOpCm n091hvY+tnYj7wHjT83n7kGiHeid7sPkm+xC6s863cbV9h8iyf+6bAzrncpvztzKq1K2 fa7MTXCJkCzSSAWml4F6zMR4Jv9nunXk50Kf1B57x+QZUaRMSCn5CINxuY4B7FUCVV05 kpjg== 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 x33si2974439qtb.183.2018.01.30.08.06.05; Tue, 30 Jan 2018 08:06:05 -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 B4FDC61749; Tue, 30 Jan 2018 16:06:05 +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 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 2ED376175E; Tue, 30 Jan 2018 16:01:02 +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 0054860C5D; Tue, 30 Jan 2018 16:00:26 +0000 (UTC) Received: from forward105j.mail.yandex.net (forward105j.mail.yandex.net [5.45.198.248]) by lists.linaro.org (Postfix) with ESMTPS id 28A9D610B9 for ; Tue, 30 Jan 2018 16:00:18 +0000 (UTC) Received: from mxback10g.mail.yandex.net (mxback10g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:171]) by forward105j.mail.yandex.net (Yandex) with ESMTP id DA467183C12 for ; Tue, 30 Jan 2018 19:00:16 +0300 (MSK) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback10g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 9QXIJwWuMC-0GpOPbag; Tue, 30 Jan 2018 19:00:16 +0300 Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Nz8CQ597Mi-0GRuonAH; Tue, 30 Jan 2018 19:00:16 +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: Tue, 30 Jan 2018 19:00:06 +0300 Message-Id: <1517328009-16379-9-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517328009-16379-1-git-send-email-odpbot@yandex.ru> References: <1517328009-16379-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 437 Subject: [lng-odp] [PATCH v1 8/11] test: l2fwd: use multi conversion functions 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: Petri Savolainen Use multi versions of packet / event conversion functions. Signed-off-by: Petri Savolainen --- /** Email created from pull request 437 (psavol:master-packet-optim) ** https://github.com/Linaro/odp/pull/437 ** Patch: https://github.com/Linaro/odp/pull/437.patch ** Base sha: b95ccd3db6eeb7358a877541747e06354429acdd ** Merge commit sha: ab7875c186fe80cfe103c5be5634b0eda312aed4 **/ test/performance/odp_l2fwd.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/test/performance/odp_l2fwd.c b/test/performance/odp_l2fwd.c index 09a12b050..a2b9a9ca0 100644 --- a/test/performance/odp_l2fwd.c +++ b/test/performance/odp_l2fwd.c @@ -270,12 +270,10 @@ static inline int event_queue_send(odp_queue_t queue, odp_packet_t *pkt_tbl, unsigned pkts) { int ret; - unsigned i; unsigned sent = 0; odp_event_t ev_tbl[pkts]; - for (i = 0; i < pkts; i++) - ev_tbl[i] = odp_packet_to_event(pkt_tbl[i]); + odp_packet_to_event_multi(pkt_tbl, ev_tbl, pkts); while (sent < pkts) { ret = odp_queue_enq_multi(queue, &ev_tbl[sent], pkts - sent); @@ -373,8 +371,7 @@ static int run_worker_sched_mode(void *arg) if (pkts <= 0) continue; - for (i = 0; i < pkts; i++) - pkt_tbl[i] = odp_packet_from_event(ev_tbl[i]); + odp_packet_from_event_multi(pkt_tbl, ev_tbl, pkts); if (odp_unlikely(gbl_args->appl.extra_check)) { if (gbl_args->appl.chksum) @@ -499,8 +496,7 @@ static int run_worker_plain_queue_mode(void *arg) if (odp_unlikely(pkts <= 0)) continue; - for (i = 0; i < pkts; i++) - pkt_tbl[i] = odp_packet_from_event(event[i]); + odp_packet_from_event_multi(pkt_tbl, event, pkts); if (odp_unlikely(gbl_args->appl.extra_check)) { if (gbl_args->appl.chksum)