From patchwork Tue Feb 13 16:00:08 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: 128248 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp4397337ljc; Tue, 13 Feb 2018 08:00:27 -0800 (PST) X-Google-Smtp-Source: AH8x2241IwuO3AUxx0Cvhk077RDOt00ymCC3wW3WoKhFFWGQohgmn6UVvYIxDmoJ1j7lqOFPY9yk X-Received: by 10.237.49.130 with SMTP id 2mr2511920qth.19.1518537627163; Tue, 13 Feb 2018 08:00:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518537627; cv=none; d=google.com; s=arc-20160816; b=CfBViF/guyZKkwaSCSycI6xAoSjY7Bh5oTuTCWvQOA/kOEGJhPrB/UWI9UH9QGh38I 4yfQ3a6QtPB/hXwCSMLoBJb9LzUC1agzCvWy/iW/h+qdoKpQvWkdZIJQyehvqzzYGk/A BNelIltmNaaL0N9EyG1N7m4VOVPABlysDwtAZm6FPsmxpE37nyfMGuhTSrjBTWcBnliY 4WE7lZLwV9Nt2mFpnmTVkEHrRDh5dERJ01KaZQ3Pb7cFkPqkZvOQKyA5QM1ubz1B4wBs pxUSGpTJ/OG9L8MVo+4X/DHPk7IiCO7zKP1ZKMOMGPRANvUW96G20nQXXwycLlNLDCSL 72Zw== 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=xW3lOwr4zhO0U36pFJzK+mj3M2hOtZg8cyeWI16ceEU=; b=huqA8WvkjLbLA6iiAlS2RT2FGN3g/S8X+KTudaQBrNWuu6LDCoobySH6P5Ymym+NMf iIyykbazqaaS9s3qU6YeBRT4d3tsIcZkVxSRB6mU6zaNpOz39E8qaGnfrGkc/h2Gq/g+ /xNyfqcEBnL9SGX1jjSeV2nquUEswBeKLOdsfGkyIZwQ/8E0Or09WmfI5gZbMr5iBZWI ZOGIhB4QpzOu8Dy9JzrN+mBGMBMs19n3+OgaedJ2iiliKflQNvfIJy4ZSXYvsj81EKHl 9PQJfgjoYMlvQI1hk1xw4ySlWKeYxc3hWionXMzvkVOS6LXyRRZli8xJZNSKPG4iTULv 0jpA== 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 c11si7719903qth.465.2018.02.13.08.00.26; Tue, 13 Feb 2018 08:00:27 -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 1BEBD609E9; Tue, 13 Feb 2018 16:00:26 +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 CD5CF616F5; Tue, 13 Feb 2018 16:00:18 +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 E98D76170B; Tue, 13 Feb 2018 16:00:15 +0000 (UTC) Received: from forward104o.mail.yandex.net (forward104o.mail.yandex.net [37.140.190.179]) by lists.linaro.org (Postfix) with ESMTPS id 0047E616F5 for ; Tue, 13 Feb 2018 16:00:13 +0000 (UTC) Received: from mxback9g.mail.yandex.net (mxback9g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:170]) by forward104o.mail.yandex.net (Yandex) with ESMTP id A20A87022C0 for ; Tue, 13 Feb 2018 19:00:11 +0300 (MSK) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [2a02:6b8:0:1a2d::26]) by mxback9g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id pUe4T5FVxp-0BEGjTGA; Tue, 13 Feb 2018 19:00:11 +0300 Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 9l1Lelxs2A-0BdC2ieM; Tue, 13 Feb 2018 19:00:11 +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, 13 Feb 2018 19:00:08 +0300 Message-Id: <1518537609-25649-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518537609-25649-1-git-send-email-odpbot@yandex.ru> References: <1518537609-25649-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 475 Subject: [lng-odp] [PATCH v1 1/2] example: generator: remove busy wait for direct mode receive 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: Bogdan Pricope Add timeout to avoid unnecessary loops on low traffic. Signed-off-by: Bogdan Pricope --- /** Email created from pull request 475 (bogdanPricope:master_generator_rx_pr) ** https://github.com/Linaro/odp/pull/475 ** Patch: https://github.com/Linaro/odp/pull/475.patch ** Base sha: 41b3fa2cd994a7ef68290a07dcde5564e4640847 ** Merge commit sha: 1e80eb73f8a105ac227aa7be2b861e2c12491802 **/ example/generator/odp_generator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c index f8c787e44..440b6b287 100644 --- a/example/generator/odp_generator.c +++ b/example/generator/odp_generator.c @@ -939,6 +939,7 @@ static int gen_recv_direct_thread(void *arg) odp_packet_t pkts[MAX_RX_BURST]; int pkt_cnt, burst_size; odp_pktin_queue_t pktin; + uint64_t wait = odp_pktin_wait_time(ODP_TIME_SEC_IN_NS); thr = odp_thread_id(); thr_args = (thread_args_t *)arg; @@ -952,8 +953,7 @@ static int gen_recv_direct_thread(void *arg) if (thr_args->stop) break; - pkt_cnt = odp_pktin_recv_tmo(pktin, pkts, burst_size, - ODP_PKTIN_NO_WAIT); + pkt_cnt = odp_pktin_recv_tmo(pktin, pkts, burst_size, wait); if (pkt_cnt > 0) { process_pkts(thr, thr_args, pkts, pkt_cnt); From patchwork Tue Feb 13 16:00:09 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: 128249 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp4400256ljc; Tue, 13 Feb 2018 08:02:30 -0800 (PST) X-Google-Smtp-Source: AH8x226dm3uRJ/Dg1Q0xr2ErjP7YLPJpssxb2p5gyVDEfaLAYhT8r7tncHbEEdsPxivScx32TpoY X-Received: by 10.55.217.73 with SMTP id u70mr2453679qki.223.1518537749902; Tue, 13 Feb 2018 08:02:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518537749; cv=none; d=google.com; s=arc-20160816; b=Y6QznOBB/gavW6tq28cuCO+rdlJEy0vIGNWiVBAnPhw27eFx1xvGnAMk7isuzGfLNA 40sR6DM1kdMJx6opRPr+s4hItaUJ+CoQuv7vx9QxSpOKm6Y+ee4zWay3MGHVq0DbG3TO 2/mD6zv6PZbU1cSsElhkON9OzaQav9VS81qe5aCm1uSib/EXoSSYEes5beZ2zxY9j9QX OfVrpv9/NCOtSzpSMen3bDj/Mt/OgeVMlBbmiodkME9Zc3y8aZEx5tsp0KZZs7JumWLv A6BEybSIRcZ+n3VYP+3FJ/E4n3upVG1HdmUkUBGeAYPIcyHpYBKeAL3Cmy0g2VR8rtZD 56tg== 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=hXWvJ9q/lJ4UwXWntsLMS3b3ncqTcjaTlgwEm2T9bnM=; b=tLRof392Y+bMi3e/RHEWHYJb0YNCOY2jukRHxzvtLuTjnexJ2tp6/fMas0VbXFUt46 jWjqaH7npZ2MEuUsqQLIsWJObEBNglA/2YaZxLwOLVzoYe6ahy1HOsAkKqH7RrPJO0fY tfd8m5rytcv3K2iv2L9GvDUbY+eM1upzwDAv0WK+5DFO1gyn2VNNgYvoD1k1G2EHUxf0 qSyeU8tcxgalWx0AyVPUzgGDrybOvYrZiup8Wk1ApKuUNHeTmJyFD00iaex9UyoxywDl GrVVvsE1mJaInvvpdXUe5WwArH0IY8KJzVjR1T3AtHlad0RAy0HEGEpX800RusMXQWXp PlRA== 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 m8si5311539qth.125.2018.02.13.08.02.29; Tue, 13 Feb 2018 08:02:29 -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 8B581608A9; Tue, 13 Feb 2018 16:02:29 +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 6396260949; Tue, 13 Feb 2018 16: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 1826A60B5F; Tue, 13 Feb 2018 16:00:23 +0000 (UTC) Received: from forward100j.mail.yandex.net (forward100j.mail.yandex.net [5.45.198.240]) by lists.linaro.org (Postfix) with ESMTPS id A28B161701 for ; Tue, 13 Feb 2018 16:00:13 +0000 (UTC) Received: from mxback16j.mail.yandex.net (mxback16j.mail.yandex.net [IPv6:2a02:6b8:0:1619::92]) by forward100j.mail.yandex.net (Yandex) with ESMTP id 330D15D8511B for ; Tue, 13 Feb 2018 19:00:12 +0300 (MSK) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [2a02:6b8:0:1a2d::26]) by mxback16j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id B4FfnE9gyK-0Cxiwfai; Tue, 13 Feb 2018 19:00:12 +0300 Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 9l1Lelxs2A-0Bdix0Y1; Tue, 13 Feb 2018 19:00:11 +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, 13 Feb 2018 19:00:09 +0300 Message-Id: <1518537609-25649-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518537609-25649-1-git-send-email-odpbot@yandex.ru> References: <1518537609-25649-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 475 Subject: [lng-odp] [PATCH v1 2/2] example: generator: remove useless csum checks 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: Bogdan Pricope Remove useless csum checks: packets are dropped at platform level if have csum errors. Signed-off-by: Bogdan Pricope --- /** Email created from pull request 475 (bogdanPricope:master_generator_rx_pr) ** https://github.com/Linaro/odp/pull/475 ** Patch: https://github.com/Linaro/odp/pull/475.patch ** Base sha: 41b3fa2cd994a7ef68290a07dcde5564e4640847 ** Merge commit sha: 1e80eb73f8a105ac227aa7be2b861e2c12491802 **/ example/generator/odp_generator.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c index 440b6b287..d31b68513 100644 --- a/example/generator/odp_generator.c +++ b/example/generator/odp_generator.c @@ -824,21 +824,12 @@ static void process_pkts(int thr, thread_args_t *thr_args, odp_packet_t pkt_tbl[], unsigned len) { odp_packet_t pkt; - odp_packet_chksum_status_t csum_status; uint32_t left, offset, i; odph_ipv4hdr_t *ip; for (i = 0; i < len; ++i) { pkt = pkt_tbl[i]; - csum_status = odp_packet_l3_chksum_status(pkt); - if (csum_status == ODP_PACKET_CHKSUM_BAD) - printf("L3 checksum error detected.\n"); - - csum_status = odp_packet_l4_chksum_status(pkt); - if (csum_status == ODP_PACKET_CHKSUM_BAD) - printf("L4 checksum error detected.\n"); - /* Drop packets with errors */ if (odp_unlikely(odp_packet_has_error(pkt))) continue;