Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2748009imm; Sun, 17 Jun 2018 03:29:05 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIqMbGhD6M9RRtbAZ5Dmu8J1k8adDxzYkhq/QqnHTwPuuvKohmlpjX8dFWE7bhQJVnImmhz X-Received: by 2002:a62:2394:: with SMTP id q20-v6mr9183639pfj.1.1529231345622; Sun, 17 Jun 2018 03:29:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529231345; cv=none; d=google.com; s=arc-20160816; b=UEIdaS86SnCPi3AmYbsbfMc2EApzmq4f1ZYbBZsRJohmk83tMC1NFpI9YlNpt5rz9Z rfFfpOb3PBCV1yK7cwD7jtTLuBbAmP8DGtAXPhUOfbG+eGSXC/Zl7lwm5xJhk1XTQVJq sHgnKSJKE/cbR3eQr6LpVvBZXcDwYPxbss2tU58uqUEgUoevJ+oJVdr9dGy1H3qxXJ/K Z9bk4CISWXB7DJ5iu843yGG6+wqcezrvGRWkmBibcO+i1cqBp6Z2VYDYRH59VmJrM3U8 49Sv5uQTX0CQS4SQb6ppxbr4Yus9EGn04hDD0hfUD6lMaPYgI0ec3QYin5fxyMz4clof 66pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from :arc-authentication-results; bh=Hvi3GguuaVYqqy1JF7AMnLCdst3TV/WcjJVWoRo6vIk=; b=DIGM8CMq2yM60Co5puCUYem0BvDzEceY6GxGfgO300ZQ8lxn2BQDYQK9oWUChY5UPf bBtUGy0th/5oDN4I3aLAiM6+sTtwNO5LpubWGEt7Ujg/DPNogzntAsRgMbCJ45jUXIAT UBvq1AuzyuN1ckH85hjY99cxwJqF7mkGa9gVi03JmE+MVzEg0XRKZidK/Co22NfpQ/KW wP6oMyvYXejBoEW3wlQdtGMpDHc+RYzoKxy6HKhJ5xZO1E788GmFur2M4AvcTYwiEQZK WZi/bjeNwTP88pw7KtIioSriql+mIzcU+Xc46C6912tO71BaTDXLeKKg98mrf3EKvnuQ NqOg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r125-v6si12155985pfc.202.2018.06.17.03.28.36; Sun, 17 Jun 2018 03:29:05 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933596AbeFQK2D (ORCPT + 99 others); Sun, 17 Jun 2018 06:28:03 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:47633 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932679AbeFQK2B (ORCPT ); Sun, 17 Jun 2018 06:28:01 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 417r5r2sQpz1qvyc; Sun, 17 Jun 2018 12:28:00 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 417r5r25ffz1qqkM; Sun, 17 Jun 2018 12:28:00 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id QOWN7psJjp1o; Sun, 17 Jun 2018 12:27:59 +0200 (CEST) X-Auth-Info: rWtJt8g99fRXG+cudho5R53XTVIJCOvQrU4HAnAYPlrxoleNmkzc+GXF9QR4BW4f Received: from linux.local (ppp-188-174-159-255.dynamic.mnet-online.de [188.174.159.255]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Sun, 17 Jun 2018 12:27:59 +0200 (CEST) Received: by linux.local (Postfix, from userid 501) id 916831E5885; Sun, 17 Jun 2018 12:27:58 +0200 (CEST) From: Andreas Schwab To: Eric Dumazet Cc: Mathieu Malaterre , "David S. Miller" , Eric Dumazet , LKML , Christophe LEROY , Meelis Roos , netdev@vger.kernel.org, linuxppc-dev Subject: Re: [PATCH] Revert "net: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friends" References: <20180615185645.8921-1-malat@debian.org> <9d88677a-f2be-2089-79df-15df4e9a5dd6@gmail.com> X-Yow: -- I can do ANYTHING ... I can even ... SHOPLIFT!! Date: Sun, 17 Jun 2018 12:27:58 +0200 In-Reply-To: <9d88677a-f2be-2089-79df-15df4e9a5dd6@gmail.com> (Eric Dumazet's message of "Sat, 16 Jun 2018 05:45:42 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Jun 16 2018, Eric Dumazet wrote: > I would try something like : > > Basically do not bother using CHECKSUM_COMPLETE for small frames that might have been padded. > > Since we need to bring one cache line in eth_type_trans() and further header processing, > computing the checksum in software will be almost free anyway. > > diff --git a/drivers/net/ethernet/sun/sungem.c b/drivers/net/ethernet/sun/sungem.c > index 7a16d40a72d13cf1d522e8a3a396c826fe76f9b9..071039f211a8a33153e888bd4014314ba5e686a4 100644 > --- a/drivers/net/ethernet/sun/sungem.c > +++ b/drivers/net/ethernet/sun/sungem.c > @@ -855,9 +855,11 @@ static int gem_rx(struct gem *gp, int work_to_do) > skb = copy_skb; > } > > - csum = (__force __sum16)htons((status & RXDCTRL_TCPCSUM) ^ 0xffff); > - skb->csum = csum_unfold(csum); > - skb->ip_summed = CHECKSUM_COMPLETE; > + if (len > ETH_ZLEN) { > + csum = (__force __sum16)htons((status & RXDCTRL_TCPCSUM) ^ 0xffff); > + skb->csum = csum_unfold(csum); > + skb->ip_summed = CHECKSUM_COMPLETE; > + } > skb->protocol = eth_type_trans(skb, gp->dev); > > napi_gro_receive(&gp->napi, skb); That doesn't change anything. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."