From patchwork Mon Oct 9 14:00:17 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: 115253 Delivered-To: patch@linaro.org Received: by 10.80.163.170 with SMTP id s39csp2426931edb; Mon, 9 Oct 2017 07:14:32 -0700 (PDT) X-Google-Smtp-Source: AOwi7QAXSxJz1ZvpO8E0HbLCQUjOwH/8C1Udy2buk007EO8SF7FEvJ4onWnuxb2Y3twL9zcx1Dd4 X-Received: by 10.107.14.203 with SMTP id 194mr13154695ioo.127.1507558472097; Mon, 09 Oct 2017 07:14:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507558472; cv=none; d=google.com; s=arc-20160816; b=sT7aK+b/Q+wsh2pPvCyp6LmWtLTiq9woiHfOzeu25ddxFfVZ4XBxRmmROEqTo0k3Yg CBdZMaHj9DcLHPxu964TSZipq+wuMhI3t8hY2KTBk2ehgL0FQI2QVAmhROB4vfMHRGPo rzrXlcPg5OBZSRWqUG1n64VmUqtEn/vXFKF4+davV4CUmvZLptFsRuPSGvADsfobuS7C i4oav7x+W/PDk8p9iJ+uVHPc3NIxjyqHHb5u0SCkTDGzOWeLi5Zvo5t+xcqqAUYFfAyL 6OX0py1PslbcJ9tJi6Ph91pzJcbOjwuTP03pwG12ix9lg4hIARjA+NuvAJHHIc/ew8it OBzA== 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=w4UNSeyS40SOKu537colxRmOFtFaaUCjYVyWIL4+d+8=; b=RNzLsQwB3wrryeQR/XvLSDR4+1Xz8t2CipCV5KL7Eg5b2sLXdNKdWrgl5zWPUVJDAi vBIPjSw94LRkeH5GG3F4d5maX2UNTq+KTrzpa0kd11oZGugCkIpM+yD40W3tA7vXud1S fczD4298KX4sx5jMnMb+4LjxE+85jNA2AFRtw5QGxxjIVJ0HeVOM/gQIQN5FM612rY1d Pvx9bbCU28d7vJ85XxjyB8U0EbH4zRSF0SHbBASsF9bUi3LE3vp8gH7hkk8+f8tCqixQ ATEZvK44uhHhFpVCulXQwWK8LI3n6iNfUsTI+UrJGNjQsTgBh8rnfXg3lNxbjhxA8eeK 9LCA== 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 m65si5756302iod.307.2017.10.09.07.14.30; Mon, 09 Oct 2017 07:14:32 -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 3C85160C11; Mon, 9 Oct 2017 14:14:30 +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=-5.4 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 E548560C95; Mon, 9 Oct 2017 14:03: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 06DCC60BED; Mon, 9 Oct 2017 14:03:09 +0000 (UTC) Received: from forward103o.mail.yandex.net (forward103o.mail.yandex.net [37.140.190.177]) by lists.linaro.org (Postfix) with ESMTPS id E704760BDF for ; Mon, 9 Oct 2017 14:01:00 +0000 (UTC) Received: from mxback4g.mail.yandex.net (mxback4g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:165]) by forward103o.mail.yandex.net (Yandex) with ESMTP id 4D94E5882F96 for ; Mon, 9 Oct 2017 17:00:59 +0300 (MSK) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback4g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 0T9oZwUHwW-0x5OBiAa; Mon, 09 Oct 2017 17:00:59 +0300 Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id wSTIYzb9Br-0wdia0sq; Mon, 09 Oct 2017 17:00:58 +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: Mon, 9 Oct 2017 17:00:17 +0300 Message-Id: <1507557617-32018-14-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1507557617-32018-1-git-send-email-odpbot@yandex.ru> References: <1507557617-32018-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 188 Subject: [lng-odp] [PATCH v3 13/13] 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. Together with the improved sequence number allocation change, performance improves >2x on Hisilicon D02 (6 and 8 threads) and more of the scalability of the scheduler itself is exposed. Signed-off-by: Ola Liljedahl Reviewed-by: Brian Brooks Reviewed-by: Bill Fischofer Signed-off-by: Maxim Uvarov Jira: ENTNET-488 Change-Id: I44035bf5b70af5b5bd9b7163ca55673043d2493b --- /** 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: c16af6486eea240609f334b1bdc81a11404275de ** Merge commit sha: 4ad1d0615a4dcd74d4e9703090149eec1a58d7d2 **/ test/common_plat/performance/odp_pktio_perf.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/test/common_plat/performance/odp_pktio_perf.c b/test/common_plat/performance/odp_pktio_perf.c index 210a833fe..b749ee9b9 100644 --- a/test/common_plat/performance/odp_pktio_perf.c +++ b/test/common_plat/performance/odp_pktio_perf.c @@ -239,18 +239,16 @@ static int pktio_pkt_has_magic(odp_packet_t pkt) size_t l4_off; pkt_head_t pkt_hdr; - l4_off = odp_packet_l4_offset(pkt); - if (l4_off) { - int ret = odp_packet_copy_to_mem(pkt, - l4_off + ODPH_UDPHDR_LEN, - sizeof(pkt_hdr), &pkt_hdr); + l4_off = ODPH_ETHHDR_LEN + ODPH_IPV4HDR_LEN; + int ret = odp_packet_copy_to_mem(pkt, + l4_off + ODPH_UDPHDR_LEN, + sizeof(pkt_hdr), &pkt_hdr); - if (ret != 0) - return 0; + if (ret != 0) + return 0; - if (pkt_hdr.magic == TEST_HDR_MAGIC) - return 1; - } + if (pkt_hdr.magic == TEST_HDR_MAGIC) + return 1; return 0; } @@ -739,6 +737,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 +787,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");