Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4500472imm; Mon, 18 Jun 2018 16:30:20 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLuL3OvoICii7fuUH51Dppwm+7iuBDyNtT6C1bGrrVzn+AG7+lsHt+tx+KZwFH+4rONw+ml X-Received: by 2002:a17:902:2927:: with SMTP id g36-v6mr15947950plb.303.1529364620337; Mon, 18 Jun 2018 16:30:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529364620; cv=none; d=google.com; s=arc-20160816; b=ESWpgnRYU2PhR4cci3aEVzNrBoIBPJ3ziLF4QcNTeI8/7TaVex32bJh3uwVY9erghw ak3QXH2LbU0JhCtnBWK4HQiXyUznmzkciz+j6lPsWLlOQqy6vVJKn+fH9CzCZOH6eaTn rQPpkIloiAJssbCaPSbvQmkV2Hvo9bn1JaMuT0Wib4A1ZLJ2nlCI9KX6OcI2NaC86y68 nnhJcjDZF3rKZppwloZhb2hH5GHKxslfJyAVw5i3prM4l/G2PckmyJDmtusKigAlIGQ7 gdnvFIJZnlrf/g3Yw2ugsLzkPekFxfXW9LtEeUfH2D0Q7qLg1DGKBKXGw50VqGGt4kHF VWJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=VBspoApW8op0Gz/z7wQnmvhFQ4ZJzRfQZdiyva1ko1w=; b=KXL2TdRuKf00/05/fjsv+JVZfPDfBWEnzZSoKZu5axBkiteB/foB3i+pSjY3ntu9oY yLYZTkguXS0nxPZRC0i/tFH0cUcMpWT/kKCEF+5m40JZuh5bIdUbCUnj/+0tpGp/Rkn5 ZWq7ACizmyKk49PAruChPQ/IdcRGZamJQgUy8Gfm8/KbpNh2ElWkyerl8N5irzJInn+5 CrNqTHNYikOy4nrOz5faxsbNpYRZ4+7TxM9bHnw9KFv5s2GV0ywSvnwoPFfdO2nQM9W9 2kuSnYLLmYzaKqs5LCtQVS9rO5U1XG1Y4/w6Iv8TBxVX10w1WRxC3ranlLf/rICQFkIh ezOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uRA1rscO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i5-v6si13619328pgt.346.2018.06.18.16.30.05; Mon, 18 Jun 2018 16:30:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uRA1rscO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937004AbeFRX3R (ORCPT + 99 others); Mon, 18 Jun 2018 19:29:17 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:38307 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934857AbeFRX3P (ORCPT ); Mon, 18 Jun 2018 19:29:15 -0400 Received: by mail-pg0-f65.google.com with SMTP id c9-v6so8244334pgf.5; Mon, 18 Jun 2018 16:29:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=VBspoApW8op0Gz/z7wQnmvhFQ4ZJzRfQZdiyva1ko1w=; b=uRA1rscOjaaZWED/1dRIA84/BbzUZquJx1x4FBMsWvA0y10oa6AaYrjvifG9gQMSKI EYwdAWLmklBkLkJogxW2niN+JI1aqfOZpGyej5quGOvxZ58PnEwSVBRd3HRCDHnqgV2c A8rGFhTKcs+zxTWES0cKPLDjjF/z5DgiLVk2+70E5Mas2uEzVjOfPT5ElVEdimRe7smP D6ZbZ43VES+O1gK1O8z8p2SxIIYF2fq3lROFLEgtNUCiVmUcc8lsnOslN7SU1drDVPHQ lP9VyZqqVe1oJCoyc3oVAuKTBeWSJY0nyxpyv47Z7XmuA3gmcCE3ikav0232IABOBRba w18g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=VBspoApW8op0Gz/z7wQnmvhFQ4ZJzRfQZdiyva1ko1w=; b=Yqo7p7Skx5VuuDTT5dDT0wOJf2Z5Cin4okdI4D7M8Isy5PaAZRtNap90XAN+NHnbM0 T7Q1331Y05gPt8dxLqESRF7b8cUGZuX6+tDw2iDMMd7XvT45NeEK6dzkbWa8Vqh2veMy cSbTwHas6VQIkp8qFiga9fQTCyJfE2VcCGhdOJenc/lfcKE7zwmW7YIez6HDRkWJr6/7 GfQgbx47J5YpULNnAr3UX1ZartazapaC8Ny8ViTg/RuNrK0PFnwwcMQV4yrMaPvk+R1C +EYSg0u7OrX48TWZnQGFoPODd7p1pr1Kr2Lbat5pO7RUmuYEZgCpZjImMghw36edmiiT Cosw== X-Gm-Message-State: APt69E3u6rvTEoCLr1Qih7uZonJVi9AWK2z+Nr4pz1eshe7kDlaALNZf S7tap3/saeX7OkijLwZuhxhN3ndm X-Received: by 2002:a62:a09c:: with SMTP id p28-v6mr15619460pfl.9.1529364554647; Mon, 18 Jun 2018 16:29:14 -0700 (PDT) Received: from ?IPv6:2620:15c:2c1:200:55c7:81e6:c7d8:94b? ([2620:15c:2c1:200:55c7:81e6:c7d8:94b]) by smtp.gmail.com with ESMTPSA id r11-v6sm28585861pfb.139.2018.06.18.16.29.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Jun 2018 16:29:13 -0700 (PDT) Subject: Re: [PATCH] Revert "net: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friends" To: Mathieu Malaterre Cc: schwab@linux-m68k.org, "David S. Miller" , Eric Dumazet , LKML , Christophe LEROY , Meelis Roos , netdev@vger.kernel.org, linuxppc-dev References: <20180615185645.8921-1-malat@debian.org> <9d88677a-f2be-2089-79df-15df4e9a5dd6@gmail.com> <87o9g8geu0.fsf@igel.home> <816ef746-5278-1d51-1d9d-55593e377681@gmail.com> From: Eric Dumazet Message-ID: <21523399-92ee-f8da-1a3e-0561f62850b7@gmail.com> Date: Mon, 18 Jun 2018 16:29:12 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/18/2018 11:45 AM, Mathieu Malaterre wrote: > > Here is what I get on my side > > [ 53.628847] sungem: sungem wrong csum : 4e04/f97, len 64 bytes > [ 53.667063] sungem: sungem wrong csum : eea8/6eec, len 149 bytes > [ 58.648952] sungem: sungem wrong csum : 2095/3d06, len 64 bytes > [ 58.669414] sungem: sungem wrong csum : 5245/b50, len 149 bytes > [ 63.674451] sungem: sungem wrong csum : 2d8/5abd, len 149 bytes > [ 68.678233] sungem: sungem wrong csum : b8fc/a498, len 149 bytes > [ 73.685771] sungem: sungem wrong csum : 374/5a21, len 149 bytes > [ 78.689089] sungem: sungem wrong csum : d81/5014, len 149 bytes > [ 83.683261] sungem: sungem wrong csum : 4e04/f97, len 64 bytes > [ 83.690193] sungem: sungem wrong csum : c2f7/9a9d, len 149 bytes > [ 88.692511] sungem: sungem wrong csum : f4d8/68bc, len 149 bytes > [ 93.699915] sungem: sungem wrong csum : 1370/4a25, len 149 bytes > [ 98.703136] sungem: sungem wrong csum : e1b5/7bdf, len 149 bytes > [ 103.704230] sungem: sungem wrong csum : 5321/a74, len 149 bytes > [ 108.688912] sungem: sungem wrong csum : 2095/3d06, len 64 bytes > [ 108.706559] sungem: sungem wrong csum : ddbc/7fd8, len 149 bytes > [ 113.713189] sungem: sungem wrong csum : 5a65/330, len 149 bytes > [ 113.891697] sungem: sungem wrong csum : 4e04/f97, len 64 bytes > [ 118.717151] sungem: sungem wrong csum : f7c8/65cc, len 149 bytes > [ 123.722680] sungem: sungem wrong csum : 3d7a/201b, len 149 bytes > [ 128.726524] sungem: sungem wrong csum : c8fd/9497, len 149 bytes > [ 133.732045] sungem: sungem wrong csum : de0d/7f87, len 149 bytes > [ 135.529163] sungem: sungem wrong csum : 3089/b6dd, len 96 bytes > [ 135.529208] eth0: hw csum failure > [ 135.529220] CPU: 0 PID: 0 Comm: swapper Not tainted 4.17.0+ #7 > [ 135.529226] Call Trace: > [ 135.529243] [dffedbe0] [c069ddac] > __skb_checksum_complete+0xf0/0x108 (unreliable) Thanks, then I guess next step would be to dump the content of the frames having a wrong checksum, hoping we find an easy way to discard the CHECKSUM_COMPLETE in a selective way. Otherwise, we will need to remove CHECKSUM_COMPLETE setting in this driver. diff --git a/drivers/net/ethernet/sun/sungem.c b/drivers/net/ethernet/sun/sungem.c index 7a16d40a72d13cf1d522e8a3a396c826fe76f9b9..77a761f95be788bb86c8d917f613c9084818f826 100644 --- a/drivers/net/ethernet/sun/sungem.c +++ b/drivers/net/ethernet/sun/sungem.c @@ -857,6 +857,14 @@ static int gem_rx(struct gem *gp, int work_to_do) csum = (__force __sum16)htons((status & RXDCTRL_TCPCSUM) ^ 0xffff); skb->csum = csum_unfold(csum); + { + __wsum rsum = csum_partial(skb->data + ETH_HLEN, len - ETH_HLEN, 0); + if (csum != csum_fold(rsum) && net_ratelimit()) + pr_err("sungem wrong csum : %04x/%04x, len %u bytes\n", + csum, csum_fold(rsum), len); + print_hex_dump(KERN_ERR, "raw data: ", DUMP_PREFIX_OFFSET, + 16, 1, skb->data, len, true); + } skb->ip_summed = CHECKSUM_COMPLETE; skb->protocol = eth_type_trans(skb, gp->dev);