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;