Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6572120ybi; Wed, 29 May 2019 09:40:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqwDXf+CZOzdpXDZAp88eqWxm/2By9Yyr+3IUqJrM1Z2foQn7dpMHEkuOr4ZRt9xB60yOtgU X-Received: by 2002:a62:5387:: with SMTP id h129mr50337277pfb.6.1559148045878; Wed, 29 May 2019 09:40:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559148045; cv=none; d=google.com; s=arc-20160816; b=m8z3hzm5oABoctXfXSNy4fEgYG/iS4IIPedVdeGlJ69Nd29g27HlXmMXe/KGol0dW3 c4dds4MkFcuYPjXFHkmP75Bw3aXbYPHViGGhMvSoFWliK1LdPSgMdlw5U0WgWn+S1x0K sNm3nzxLRauR2qBsT8zbINso8vgciZE7beFE5WTomk3G2RqEQZkH1qdG3MSqYjcNCw2N cxH/yHfgeznU+jVDWtj6iHoMow1Me32C4d819poAN+3uBF0mpS1ko2LEIQ0KVd2Pfu/S 5IhjcGzzQqis8cLV7xwi1aX/wUqVSC1CajMBnsdP7wcXYXJ4x6Ek7t/ZyXZn6AxCwvrh 0N7g== 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:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=rYXje7pkSQOlawqAWE5SmLuc60hKf0FafMLhT40aro4=; b=Em18zlN6IIpKhs/popbeWejkWDEVzu9KwUTURBNAX97u8eOazPNdkhz0g/t6KDvygy 1yfbbFlDIxmXHViKDyn7FrV7SnGCwC7EC12/29rCx51kCjXQ4+X8i3ZJq8839ocG0CDV sAFAeRgodT9ZkaWZYVRiJkAqfDHUXkVXgy+RxfFND3gdfg2i1DUWQ7/pcskS6Q7NYLwO BLoIiNU4K0QKEjYj9h3UxlnPFKss/9qjldcthpLOq2F/D9uHDs9oFRLktRia+fHwW54E MhMfiTRhOv2oFKqWYM26eoUMSHWMB3CobIcOpcJgFqK43sTVLqswl7whpJcu1C1y1lfw P1lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=HzpC0qmw; 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 s201si103819pgs.522.2019.05.29.09.40.27; Wed, 29 May 2019 09:40:45 -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=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=HzpC0qmw; 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 S1726830AbfE2Qhn (ORCPT + 99 others); Wed, 29 May 2019 12:37:43 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:33169 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726097AbfE2Qhn (ORCPT ); Wed, 29 May 2019 12:37:43 -0400 Received: by mail-pf1-f193.google.com with SMTP id z28so1993113pfk.0 for ; Wed, 29 May 2019 09:37:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rYXje7pkSQOlawqAWE5SmLuc60hKf0FafMLhT40aro4=; b=HzpC0qmw+hi+wxNs0qM40dFyonuMi7Bwb2k+tFbOesTzBeZBOfDBx0+EAkrAoZCUHw XYtC7TeTj/1vIUxlmgGzB1AhFFhRBsE+jMIH6a3R5WIAFYvzuLhSBnp/IEEQBkZ5e/ek WsQz9YWMWQn+K6ij5Yj5irLOe4DGrjvwRUsI5aK7JHVo0QFgzLQvCKcpAIWAN6s98P8m 0SYsWPVf0/IuQKFxW4LajOrGMRv+AVFbjaGYwdkJ9EpLTu0A4m+taaOAyVV1IhNAUzeI PtJG1T4XS5PhwlMeW4/sVsCIzxLxsZVwqLOXB+WnjakWX9il7Nyt4L5cDR/UsZcLJKhD MdrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rYXje7pkSQOlawqAWE5SmLuc60hKf0FafMLhT40aro4=; b=eKi9R+Ltqd4P9jlLcSgmJe4tmo4htPBNn8Z9nagefO2zVf2JIIJ7ep2cR8lTPya6h6 B5+vv0NuXMwf8hQdCot7LdjBpGAYHZihJXXK+I3eEuXNgJ2XaJr2qCJ9kykQg2FgQpq/ kygPYQXZG/yGUeppqlhmdr+h/ijcpBToRslXlHl1FgAKMPmbYwPGK7QsYrsEtTTk/hrB ACMoBOO39bJ6F85K99IbR/cOK15diW88+938hO5UoXf9Pd4xWrJC3tqXmJgfRCCwzd0/ sxwbn4eiiujgHq5Hops//3uw/TMteYOhH/5m4KPkx1AOOLg1xMVi31cqU8EJVyIxQOmY /PYg== X-Gm-Message-State: APjAAAVwfGJRjoIXmZqg6llTUjM8QqFwDHiKhMCqxyBWHqCZhOB41f3X izN3zQMTVR7iQX8w2/l45BPy+A== X-Received: by 2002:a62:1846:: with SMTP id 67mr132559052pfy.33.1559147862067; Wed, 29 May 2019 09:37:42 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id d24sm45802pjv.24.2019.05.29.09.37.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 29 May 2019 09:37:41 -0700 (PDT) Date: Wed, 29 May 2019 09:35:48 -0700 From: Stephen Hemminger To: Eric Dumazet Cc: Paul Menzel , Eric Dumazet , Jeff Kirsher , intel-wired-lan@lists.osuosl.org, netdev , Linux Kernel Mailing List Subject: Re: Driver has suspect GRO implementation, TCP performance may be compromised. Message-ID: <20190529093548.3df7ee73@hermes.lan> In-Reply-To: References: <8627ea1e-8e51-c425-97f6-aeb57176e11a@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 29 May 2019 09:00:54 -0700 Eric Dumazet wrote: > On Wed, May 29, 2019 at 7:49 AM Paul Menzel wrote: > > > > Dear Eric, > > > > > > Thank you for the quick reply. > > > > On 05/28/19 19:18, Eric Dumazet wrote: > > > On 5/28/19 8:42 AM, Paul Menzel wrote: > > > > >> Occasionally, Linux outputs the message below on the workstation Dell > > >> OptiPlex 5040 MT. > > >> > > >> TCP: net00: Driver has suspect GRO implementation, TCP performance may be compromised. > > >> > > >> Linux 4.14.55 and Linux 5.2-rc2 show the message, and the WWW also > > >> gives some hits [1][2]. > > >> > > >> ``` > > >> $ sudo ethtool -i net00 > > >> driver: e1000e > > >> version: 3.2.6-k > > >> firmware-version: 0.8-4 > > >> expansion-rom-version: > > >> bus-info: 0000:00:1f.6 > > >> supports-statistics: yes > > >> supports-test: yes > > >> supports-eeprom-access: yes > > >> supports-register-dump: yes > > >> supports-priv-flags: no > > >> ``` > > >> > > >> Can the driver e1000e be improved? > > >> > > >> Any idea, what triggers this, as I do not see it every boot? Download > > >> of big files? > > >> > > > Maybe the driver/NIC can receive frames bigger than MTU, although this would be strange. > > > > > > diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c > > > index c61edd023b352123e2a77465782e0d32689e96b0..cb0194f66125bcba427e6e7e3cacf0c93040ef61 100644 > > > --- a/net/ipv4/tcp_input.c > > > +++ b/net/ipv4/tcp_input.c > > > @@ -150,8 +150,10 @@ static void tcp_gro_dev_warn(struct sock *sk, const struct sk_buff *skb, > > > rcu_read_lock(); > > > dev = dev_get_by_index_rcu(sock_net(sk), skb->skb_iif); > > > if (!dev || len >= dev->mtu) > > > - pr_warn("%s: Driver has suspect GRO implementation, TCP performance may be compromised.\n", > > > - dev ? dev->name : "Unknown driver"); > > > + pr_warn("%s: Driver has suspect GRO implementation, TCP performance may be compromised." > > > + " len %u mtu %u\n", > > > + dev ? dev->name : "Unknown driver", > > > + len, dev ? dev->mtu : 0); > > > rcu_read_unlock(); > > > } > > > } > > > > I applied your patch on commit 9fb67d643 (Merge tag 'pinctrl-v5.2-2' of > > git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl): > > > > [ 5507.291769] TCP: net00: Driver has suspect GRO implementation, TCP performance may be compromised. len 1856 mtu 1500 > > > The 'GRO' in the warning can be probably ignored, since this NIC does > not implement its own GRO. > > You can confirm this with this debug patch: > > diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c > b/drivers/net/ethernet/intel/e1000e/netdev.c > index 0e09bede42a2bd2c912366a68863a52a22def8ee..014a43ce77e09664bda0568dd118064b006acd67 > 100644 > --- a/drivers/net/ethernet/intel/e1000e/netdev.c > +++ b/drivers/net/ethernet/intel/e1000e/netdev.c > @@ -561,6 +561,9 @@ static void e1000_receive_skb(struct e1000_adapter *adapter, > if (staterr & E1000_RXD_STAT_VP) > __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), tag); > > + if (skb->len > netdev->mtu) > + pr_err_ratelimited("received packet bigger (%u) than > MTU (%u)\n", > + skb->len, netdev->mtu); > napi_gro_receive(&adapter->napi, skb); > } I think e1000 is one of those devices that only has receive limit as power of 2. Therefore frames up to 2K can be received. There always some confusion in Linux about whether MTU is transmit only or devices have to enforce it on receive.