From patchwork Fri Sep 22 15:00:05 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: 114056 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp3397889qgf; Fri, 22 Sep 2017 08:02:15 -0700 (PDT) X-Google-Smtp-Source: AOwi7QBl6hEc8+52ZQrNLDRbygB87JiQ1p9j0OW2HvCdhDZOUHKnKnOFfnfyv2czkElurZboL/nV X-Received: by 10.55.79.85 with SMTP id d82mr7854737qkb.5.1506092534905; Fri, 22 Sep 2017 08:02:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506092534; cv=none; d=google.com; s=arc-20160816; b=HPc3n+jTWFTGZSofARcCGCUc8961zoda/toyjX3c4Ih3nwocWEe7KZI+6qTvcuz+d5 o6WHnx+Usw0wYVewhvy35OH58P2V+VzEdpgYoRfhRXT/NKL2WxnKae2DYof6usRKFFQv JJlkNRr9BJWCmmoZOfwwUHZ6CVOavRPVjOmfA1yswEb1DrpjOf+bx6NgPa3KlAlX1Xm+ gnHN11++gISY8jGIO2wQAzb732N2AbbhomHhacY6WxNJCToNgU82KaKlPmKYWg2FL5cI PYJI6AVMFUGwtbb2kDdWjDhtjJ2dSGJBmY04Cd/H4H/WjcOyHvOAVKfjJ8Ru0l48mKZA 5tCA== 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=SOF9NScncsQ3+45w+fZQdBcoqARBPKJ+W0wER5pCYKk=; b=Bt/SaxsGsksrdtLY3fZIeGjlq1dfd9TfhTFfXXBS/gPo1re9fD0w9SXxn38P8YmG4V gnVW0BL9rYid5kZJ/dtGU8Aq+vQ/xt5ycvzFYGaDDtAGLFgsX45PK2hESuoehIAD8dmw Z+fo7E/NxSfeF0NxeR0qasUbbLlA6lTxuCZrKQ1Nf1HOKV0ESsk5L5+XyGi/CF4wS0BB tAAw/bV0fsK7z/T1GcHL0yZLkpgBFHJ8SuxPjAhPwC5m1F9+13BALk9weujpj2VHyDkA uiT1A0c4+/U4ySVREdGR4kBlGdQagXti5CEkqc324VzAj1SsFXJtjUHyXDpSC+BS1Dcd MhSg== 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 j68si24750qte.231.2017.09.22.08.02.14; Fri, 22 Sep 2017 08:02:14 -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 879276091E; Fri, 22 Sep 2017 15:02:14 +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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, 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 2983760993; Fri, 22 Sep 2017 15:01:05 +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 99C0660965; Fri, 22 Sep 2017 15:00:53 +0000 (UTC) Received: from forward100j.mail.yandex.net (forward100j.mail.yandex.net [5.45.198.240]) by lists.linaro.org (Postfix) with ESMTPS id 4569160923 for ; Fri, 22 Sep 2017 15:00:37 +0000 (UTC) Received: from mxback1j.mail.yandex.net (mxback1j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10a]) by forward100j.mail.yandex.net (Yandex) with ESMTP id E61015D84F38 for ; Fri, 22 Sep 2017 18:00:35 +0300 (MSK) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback1j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id PNkicRUjpN-0C98o4kI; Fri, 22 Sep 2017 18:00:12 +0300 Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 07hEZKoMzk-0C3mZQ7X; Fri, 22 Sep 2017 18:00:12 +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: Fri, 22 Sep 2017 18:00:05 +0300 Message-Id: <1506092406-26086-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1506092406-26086-1-git-send-email-odpbot@yandex.ru> References: <1506092406-26086-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 188 Subject: [lng-odp] [PATCH v1 1/2] test: Make odp_pktio_perf more scalable 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: Ola Liljedahl Amortise overhead of atomic increment over multiple packets so to minimise this scalability bottleneck. Signed-off-by: Ola Liljedahl Reviewed-by: Brian Brooks Change-Id: Ic3f4e5871a6fdd3c29bfb27ff0af1dc3b301750c --- /** Email created from pull request 188 (WonderfulVoid:master) ** https://github.com/Linaro/odp/pull/188 ** Patch: https://github.com/Linaro/odp/pull/188.patch ** Base sha: c2ed3f71a8d61449c5e35ce201f020a74a8ea244 ** Merge commit sha: 8f53c33c86e77be34933d9aeeb3ff3793c941b44 **/ test/common_plat/performance/odp_pktio_perf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/common_plat/performance/odp_pktio_perf.c b/test/common_plat/performance/odp_pktio_perf.c index a170e1285..210a833fe 100644 --- a/test/common_plat/performance/odp_pktio_perf.c +++ b/test/common_plat/performance/odp_pktio_perf.c @@ -167,14 +167,13 @@ static test_globals_t *gbl_args; /* * Generate a single test packet for transmission. */ -static odp_packet_t pktio_create_packet(void) +static odp_packet_t pktio_create_packet(uint32_t seq) { odp_packet_t pkt; odph_ethhdr_t *eth; odph_ipv4hdr_t *ip; odph_udphdr_t *udp; char *buf; - uint16_t seq; uint32_t offset; pkt_head_t pkt_hdr; size_t payload_len; @@ -209,7 +208,6 @@ static odp_packet_t pktio_create_packet(void) ODPH_IPV4HDR_LEN); ip->ttl = 128; ip->proto = ODPH_IPPROTO_UDP; - seq = odp_atomic_fetch_inc_u32(&ip_seq); ip->id = odp_cpu_to_be_16(seq); ip->chksum = 0; odph_ipv4_csum_update(pkt); @@ -263,9 +261,11 @@ static int pktio_pkt_has_magic(odp_packet_t pkt) static int alloc_packets(odp_packet_t *pkt_tbl, int num_pkts) { int n; + uint16_t seq; + seq = odp_atomic_fetch_add_u32(&ip_seq, num_pkts); for (n = 0; n < num_pkts; ++n) { - pkt_tbl[n] = pktio_create_packet(); + pkt_tbl[n] = pktio_create_packet(seq + n); if (pkt_tbl[n] == ODP_PACKET_INVALID) break; } From patchwork Fri Sep 22 15: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: 114055 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp3396502qgf; Fri, 22 Sep 2017 08:01:08 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCOPL0jLsrFztkj4grFWpT+dyOcicF/oQmH4eDeTccRpiEfEeLo3a4u51b0Ka2XKwwn58b6 X-Received: by 10.200.51.137 with SMTP id c9mr9000360qtb.203.1506092468178; Fri, 22 Sep 2017 08:01:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506092468; cv=none; d=google.com; s=arc-20160816; b=iOgnvlOxF+MdFKPTVRlQY39/5s8/01mx866fPYM2pm+S+yYVR8tNzS8DEuHz9zCjMP TscNvJnfyQODultH71Azbg++JET62D4I6VtE4oHD4MVIlE008C582JGot1MJ/Wl7D/Gz TFzr6uLF/Af7Oesn7iOjEJcepP2zpyU9AokqLKmL6lJ7cbPout/0aWhgidcSUly0o0nn Wl7x9I1kDiePasuuWruzJZfQ1CAYJTp1WWP4OuTR30xscB3LtIg41H+Iheq+rZnDmy+a IHGAs0jj+ZrczpjhkayRPvQgJGyz2i8+1AUYtaIP1fFciMKE068gZDTdIDfKzuhK6qIS p2ng== 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=ltLzNjtTyYWILWxEjE/DV6FOkAzsHHGDP1qfIuawkmE=; b=Xd9L1qdcSQJZiWhgx3GKbbeSriEbjPdZEoWv1JxvQp5H+OO/6xAmNAAXT1oX3EpBmT 61q/AxdUuE/Ttoi55Tl8zouuwmSn9qYiNNg5NO2Ej2CaxjgrSkmUmt+YhVn9iwuJUkbT ixH9VuCKNmv5puqykfqvwPNCqIB/5DB7Bb2vHLb0ICLxIw6JKdBczPRLu++E7ipLnEA+ pfDhjF2+skPlFZsyZ4yV4qtXLVCgYwc2uUyhkuP7Umtq1NRp+g6pq3IR2EesMF7me9RK EJlxIbNUNd982jOPPtkT2EXVrC+4PXkqAqg9YBHpzip7ti6oWxYTd8KepdKMn0QnIrS2 Scng== 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 11si12349qki.338.2017.09.22.08.01.07; Fri, 22 Sep 2017 08:01:08 -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 D2C7E60988; Fri, 22 Sep 2017 15:01:07 +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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 441536091E; Fri, 22 Sep 2017 15: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 9B9B460993; Fri, 22 Sep 2017 15:00:52 +0000 (UTC) Received: from forward101j.mail.yandex.net (forward101j.mail.yandex.net [5.45.198.241]) by lists.linaro.org (Postfix) with ESMTPS id 0606960932 for ; Fri, 22 Sep 2017 15:00:39 +0000 (UTC) Received: from mxback8o.mail.yandex.net (mxback8o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::22]) by forward101j.mail.yandex.net (Yandex) with ESMTP id 974A41242C6F for ; Fri, 22 Sep 2017 18:00:37 +0300 (MSK) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback8o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id c8jPIBCary-0bNaXAJE; Fri, 22 Sep 2017 18:00:37 +0300 Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 07hEZKoMzk-0a30HoXA; Fri, 22 Sep 2017 18:00:37 +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: Fri, 22 Sep 2017 18:00:06 +0300 Message-Id: <1506092406-26086-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1506092406-26086-1-git-send-email-odpbot@yandex.ru> References: <1506092406-26086-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 188 Subject: [lng-odp] [PATCH v1 2/2] test: Disable packet parsing in odp_pktio_perf 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: Ola Liljedahl Disable packet parsing as it is done in the driver where it affects scalability of the application. This especially problematic for e.g. the loopback pktio which has only one RX queue. Signed-off-by: Ola Liljedahl Reviewed-by: Brian Brooks Change-Id: Icdf4fe00a5cb6d775362cfec059132a1498f8ffa --- /** Email created from pull request 188 (WonderfulVoid:master) ** https://github.com/Linaro/odp/pull/188 ** Patch: https://github.com/Linaro/odp/pull/188.patch ** Base sha: c2ed3f71a8d61449c5e35ce201f020a74a8ea244 ** Merge commit sha: 8f53c33c86e77be34933d9aeeb3ff3793c941b44 **/ test/common_plat/performance/odp_pktio_perf.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/common_plat/performance/odp_pktio_perf.c b/test/common_plat/performance/odp_pktio_perf.c index 210a833fe..01c2eae14 100644 --- a/test/common_plat/performance/odp_pktio_perf.c +++ b/test/common_plat/performance/odp_pktio_perf.c @@ -739,6 +739,7 @@ static int test_init(void) odp_pool_param_t params; const char *iface; int schedule; + odp_pktio_config_t cfg; odp_pool_param_init(¶ms); params.pkt.len = PKT_HDR_LEN + gbl_args->args.pkt_len; @@ -788,6 +789,13 @@ static int test_init(void) return -1; } + /* Disable packet parsing as this is done in the driver where it + * affects scalability. + */ + odp_pktio_config_init(&cfg); + cfg.parser.layer = ODP_PKTIO_PARSER_LAYER_NONE; + odp_pktio_config(gbl_args->pktio_rx, &cfg); + if (gbl_args->args.num_ifaces > 1) { if (odp_pktout_queue_config(gbl_args->pktio_rx, NULL)) { LOG_ERR("failed to configure pktio_rx queue\n");