Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1431248imm; Thu, 6 Sep 2018 23:30:18 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaNU+woHYfk0tb8aDYDe8F1HM4m3T8T8qnKdc7/NtvsAaiMGx85KibrsnQmkLXBBJkxEuKh X-Received: by 2002:a17:902:2f43:: with SMTP id s61-v6mr6318587plb.176.1536301818297; Thu, 06 Sep 2018 23:30:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536301818; cv=none; d=google.com; s=arc-20160816; b=r0l6+LSycVdsJ8ev5+xJWskqe8grULpxD5OJW3IRK8a+9q3Esdlo5UWa0YcwM+0j1y b1dJ52ia1o/3T31eX+ldfgzWfF0UlNLsBNurPzwQixjCJg8WZIrkB0G4y/Pvslx6O7X1 Rvqkxo+73YmKg8si2oL/DkKx3fmeNpBxx0qv4Y2ftaZiIn2epr9s8llj2YEtnKe5s8I0 ZExfnw/K9BIkfuZgOJZQNL7UcoVV3UgvI3nvJE+jnudcAgXdWOEIzLfh8N2g7d31jsCU hNkQoymvORz4uqeBdJzxe2r99jNhSCXoX1APc+ILdK0IVNXaHnNjQ9aJnMbiblCjserm Ez3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=jIBJ46vwXNcPJqhdtJKI/sAshI4Ao2xwzBVd+GgHKf8=; b=rIZ2YjSJnkYIIn9uhZ1JD1Uayn4RvMBkm5vqb/T7A4zBgPgkfduViX49mgN9P3WZ22 rpCYmP/3JZdI+QMaCQ1SIenUiG/K6x8fNTZ8GoEm2fRlgGMOs46vy2hWqv33BXmMJ84O 5TUHI6yNDgumBpppVG+ajnQuZ9Kp/9lQanvAQyhGHZxYQP/uUkdxgk59Ei98JecAvrEf Ciis2URHjvuYEK5ODNBybnjTYclD/NWeu4QKlk0utkTOAtp/wm6W7Z0zSfYDkxPngOQN wTepN9+OMDcB21us6/ekBEVKFAy7tS+6MVjKAm/Zjn7VLlBcfS1Pr8O/0cnxnwEhwGFx zx5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@easymile.com header.s=easymile header.b=iNSD8Jwc; 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 f4-v6si7047662plt.346.2018.09.06.23.30.02; Thu, 06 Sep 2018 23:30:18 -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=@easymile.com header.s=easymile header.b=iNSD8Jwc; 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 S1726620AbeIGLIU (ORCPT + 99 others); Fri, 7 Sep 2018 07:08:20 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:40836 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725933AbeIGLIU (ORCPT ); Fri, 7 Sep 2018 07:08:20 -0400 Received: by mail-wm0-f68.google.com with SMTP id 207-v6so13332282wme.5 for ; Thu, 06 Sep 2018 23:28:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=easymile.com; s=easymile; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=jIBJ46vwXNcPJqhdtJKI/sAshI4Ao2xwzBVd+GgHKf8=; b=iNSD8JwcWwEhxLKqz+zBPIugroOd04loGA3mvVgTWe30Og0OVBEnI+ddcqUiX471To RJAnK5uDr1Aik4v3ZfQAgQwxp5d4PpesWpDxu5ukeCIShutJHrIhlKs6yi0yATwvvpfM fvLFTb/MR2VKqOvIwUQhhxgdaQ7iwic4Y166o= 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:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=jIBJ46vwXNcPJqhdtJKI/sAshI4Ao2xwzBVd+GgHKf8=; b=ihJ9XHbawtuwtm0+nbOX+pIid8xGR0FnkiGlUlPPNYwIqCWRHJh9kdmjn7ID2EM3NB eIMR5zdtZfied1Iri5WwecQKY707S43/ESBTkspNoNf1MRsvxwen1+fO10l3DVrkS2/O gMDknvSrD0qmm8c0V6pInP08EqcA4AFjgTxK9KCOHAuQ/M9gbB7+36PADeFXA4TuGGJW 3zb1LWzOuUNokY20RpsOlWbkRPD9u70v0XYzuBQi8d/QehUzNpNbsYOBsV0pjdDNFT8m m2KQ1L0jLTdRrg6P7iralc3dCaGJ27b4AF2vH7TIJy/vZeLzOLadN5kr64bavQ+8jMWo bFCA== X-Gm-Message-State: APzg51B+RGkczfBOtsXW9vTWMBJIRIriZPgdRYUOOWm4jhxsM1AFJP9u uasfVp5q3hkeYkwKW8Hosize3Q== X-Received: by 2002:a1c:ac1:: with SMTP id 184-v6mr4102352wmk.119.1536301734395; Thu, 06 Sep 2018 23:28:54 -0700 (PDT) Received: from super_plancton ([185.116.129.142]) by smtp.gmail.com with ESMTPSA id 200-v6sm11573588wmv.6.2018.09.06.23.28.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 06 Sep 2018 23:28:53 -0700 (PDT) Date: Fri, 7 Sep 2018 08:28:51 +0200 From: Camille Bordignon To: "Neftin, Sasha" Cc: Alexander Duyck , Netdev , intel-wired-lan , "David S. Miller" , linux-kernel@vger.kernel.org Subject: Re: [Intel-wired-lan] e1000e driver stuck at 10Mbps after reconnection Message-ID: <20180907062851.GA7336@super_plancton> References: <20180806115913.GA21556@super_plancton> <20180807064222.GA30741@super_plancton> <001556a4-c49c-b96b-0be8-b3c4be7bb09c@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le mercredi 08 ao?t 2018 ? 18:00:28 (+0300), Neftin, Sasha a ?crit : > On 8/8/2018 17:24, Neftin, Sasha wrote: > > On 8/7/2018 09:42, Camille Bordignon wrote: > > > Le lundi 06 ao?t 2018 ? 15:45:29 (-0700), Alexander Duyck a ?crit : > > > > On Mon, Aug 6, 2018 at 4:59 AM, Camille Bordignon > > > > wrote: > > > > > Hello, > > > > > > > > > > Recently we experienced some issues with intel NIC (I219-LM > > > > > and I219-V). > > > > > It seems that after a wire reconnection, auto-negotation "fails" and > > > > > link speed drips to 10 Mbps. > > > > > > > > > > ?From kernel logs: > > > > > [17616.346150] e1000e: enp0s31f6 NIC Link is Down > > > > > [17627.003322] e1000e: enp0s31f6 NIC Link is Up 10 Mbps Full > > > > > Duplex, Flow Control: None > > > > > [17627.003325] e1000e 0000:00:1f.6 enp0s31f6: 10/100 speed: > > > > > disabling TSO > > > > > > > > > > > > > > > $ethtool enp0s31f6 > > > > > Settings for enp0s31f6: > > > > > ???????? Supported ports: [ TP ] > > > > > ???????? Supported link modes:?? 10baseT/Half 10baseT/Full > > > > > ???????????????????????????????? 100baseT/Half 100baseT/Full > > > > > ???????????????????????????????? 1000baseT/Full > > > > > ???????? Supported pause frame use: No > > > > > ???????? Supports auto-negotiation: Yes > > > > > ???????? Supported FEC modes: Not reported > > > > > ???????? Advertised link modes:? 10baseT/Half 10baseT/Full > > > > > ???????????????????????????????? 100baseT/Half 100baseT/Full > > > > > ???????????????????????????????? 1000baseT/Full > > > > > ???????? Advertised pause frame use: No > > > > > ???????? Advertised auto-negotiation: Yes > > > > > ???????? Advertised FEC modes: Not reported > > > > > ???????? Speed: 10Mb/s > > > > > ???????? Duplex: Full > > > > > ???????? Port: Twisted Pair > > > > > ???????? PHYAD: 1 > > > > > ???????? Transceiver: internal > > > > > ???????? Auto-negotiation: on > > > > > ???????? MDI-X: on (auto) > > > > > ???????? Supports Wake-on: pumbg > > > > > ???????? Wake-on: g > > > > > ???????? Current message level: 0x00000007 (7) > > > > > ??????????????????????????????? drv probe link > > > > > ???????? Link detected: yes > > > > > > > > > > > > > > > Notice that if disconnection last less than about 5 seconds, > > > > > nothing wrong happens. > > > > > And if after last failure, disconnection / connection occurs again and > > > > > last less than 5 seconds, link speed is back to 1000 Mbps. > > > > > > > > > > [18075.350678] e1000e: enp0s31f6 NIC Link is Down > > > > > [18078.716245] e1000e: enp0s31f6 NIC Link is Up 1000 Mbps > > > > > Full Duplex, Flow Control: None > > > > > > > > > > The following patch seems to fix this issue. > > > > > However I don't clearly understand why. > > > > > > > > > > diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c > > > > > b/drivers/net/ethernet/intel/e1000e/netdev.c > > > > > index 3ba0c90e7055..763c013960f1 100644 > > > > > --- a/drivers/net/ethernet/intel/e1000e/netdev.c > > > > > +++ b/drivers/net/ethernet/intel/e1000e/netdev.c > > > > > @@ -5069,7 +5069,7 @@ static bool e1000e_has_link(struct > > > > > e1000_adapter *adapter) > > > > > ???????? case e1000_media_type_copper: > > > > > ???????????????? if (hw->mac.get_link_status) { > > > > > ???????????????????????? ret_val = hw->mac.ops.check_for_link(hw); > > > > > -?????????????????????? link_active = !hw->mac.get_link_status; > > > > > +?????????????????????? link_active = false; > > > > > ???????????????? } else { > > > > > ???????????????????????? link_active = true; > > > > > ???????????????? } > > > > > > > > > > Maybe this is related to watchdog task. > > > > > > > > > > I've found out this fix by comparing with last commit that works fine : > > > > > commit 0b76aae741abb9d16d2c0e67f8b1e766576f897d. > > > > > However I don't know if this information is relevant. > > > > > > > > > > Thank you. > > > > > Camille Bordignon > > > > > > > > What kernel were you testing this on? I know there have been a number > > > > of changes over the past few months in this area and it would be > > > > useful to know exactly what code base you started out with and what > > > > the latest version of the kernel is you have tested. > > > > > > > > Looking over the code change the net effect of it should be to add a 2 > > > > second delay from the time the link has changed until you actually > > > > check the speed/duplex configuration. It is possible we could be > > > > seeing some sort of timing issue and adding the 2 second delay after > > > > the link event is enough time for things to stabilize and detect the > > > > link at 1000 instead of 10/100. > > > > > > > > - Alex > > > > > > We've found out this issue using Fedora 27 (4.17.11-100.fc27.x86_64). > > > > > > Then I've tested wth a more recent version of the driver v4.18-rc7 but > > > behavior looks the same. > > > > > > Thanks for you reply. > > > > > > Camille Bordignon > > > _______________________________________________ > > > Intel-wired-lan mailing list > > > Intel-wired-lan@osuosl.org > > > https://lists.osuosl.org/mailman/listinfo/intel-wired-lan > > > > > I've agree with Alex. Let's try add 2s delay after a link event. Please, > > let us know if it will solve your problem. > > Also, I would like recommend try work with different link partner and > > see if you see same problem. > > _______________________________________________ > > Intel-wired-lan mailing list > > Intel-wired-lan@osuosl.org > > https://lists.osuosl.org/mailman/listinfo/intel-wired-lan > Camille, > My apologies, I wrong understand Alex. Please, do not try add delay. Please, > check if you see same problem with different link partners. > Thanks, > Sasha Hello, I recently figured out that neither the previous patch nor commit 0b76aae741abb9d16d2c0e67f8b1e766576f897d fix this issue. In these cases, after reproducing the issue, when ethernet wire is connected kernel logs mention full speed (1000 Mbps) but actually it seems it is not. The problem persists. I made some simple tests with a web browser and a dowload speed test site (fast.com). As a result speed was always around 8 Mbps. And again after a quick ethernet wire disconnection / reconnection, same test is around 500 Mbps. I feel very confused. Camille Bordignon