Received: by 10.223.176.46 with SMTP id f43csp530581wra; Thu, 18 Jan 2018 21:38:09 -0800 (PST) X-Google-Smtp-Source: ACJfBos/yU1NdisxIsgoLtwBsJhU0DuDovDUElbl0ieMaQMQ6MCYpi6QglTpzU/GKaM3V+tebdc/ X-Received: by 10.99.176.76 with SMTP id z12mr16223497pgo.405.1516340288919; Thu, 18 Jan 2018 21:38:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516340288; cv=none; d=google.com; s=arc-20160816; b=wLvqOWwJWijFL7UCpKNv6nowuTqLPZHjQRWGFU01sejPWtZ8/WZbpPjDTC0AFmXtE/ k29KLyniNskzxzE28DuWvtWbCK/KTPnP4jQlMDPUqdkA+HB6utAWtuY8mRu1JfIEfNSe eryl6fSgdF1EoIW6Qfl6N05+ipkugh6AjvZfQO8ZTDqYs4FBl6Uc3VCLp1wm1Ra/bEXK e64A1k7Tvd3KzjtR4iHpiuTXOspCuxT15kykqDr//HP8drOYF6+dd1+JWDjyM5OPt0/+ zBd9mbkgLlL6Nu5ROKwC5ZMCIfg0WX2TYp0g84qBBjxS4b4WDCB8cMuxGsC/Y5JV74zH KPyA== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=dNfQq4vs7QFB2HTJhfvFYb5EY+/uwjvmlrOrcc0Gfzg=; b=uk8W0d+WIiejJDTlj0vqnOLQEnR/mt7ayYYsDNNPZJyFAKDmeudplKNK3F80HEuAST UEBrpAt6ruuHxo+D1rnK465a8rULKhytVbl3gcBrXo5Ee2zZaXUuJchpckSEAayFcnNz ewGcXK8TBfcCyT89lnae6K/OLdWKHsKAhvLMb3fEKQ0+G82+1/TpT4BTZ3zw0CnafqIT rF1/0xcSy0SqfBIqAjKtdmcavxnOhgkD8YG8BxIxsQ1SWE2CUTZAnk9/RRW9+NuUTn2N NDm62U5h0D65GPvt3n9BvBBNruw7ujxKpLbFMSBqGB4iKcE5EaQVtCllTcXKBIiXYwkh ruXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XUYqLXXP; 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=NONE 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 t83si8554062pfi.53.2018.01.18.21.37.53; Thu, 18 Jan 2018 21:38:08 -0800 (PST) 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=XUYqLXXP; 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=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752190AbeASFhI (ORCPT + 99 others); Fri, 19 Jan 2018 00:37:08 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:40465 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750729AbeASFg6 (ORCPT ); Fri, 19 Jan 2018 00:36:58 -0500 Received: by mail-pf0-f194.google.com with SMTP id i66so597420pfd.7; Thu, 18 Jan 2018 21:36:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=dNfQq4vs7QFB2HTJhfvFYb5EY+/uwjvmlrOrcc0Gfzg=; b=XUYqLXXPTIyI+cpUGeZWGPtd92Alj2tja3qyN8s5nuN+ULhJw2nAgMd3YllK5VsPvW Qj3/34WuAIHziV4lu6ND+J9F+4/Dl/54yDOKP+Z1w8ahOKmiXWEwtwu3d20/jXII591o obuEeZIzZxF/VNLrE1jbVfslu/fWgZlJQzPDTiEM7m4oFl67bavJOpyDBsBhKrQlc7Qr N5T5l4w7eMEv1cPIYF5HnR5I/W7y+6kIMN5Nk8n/sc2mH09TPsoRVUcs8AdAwEtg0yKk ZFbSXteSxW0nrF3VznjFXek2/woRfKwANp0DI6L/MFC7HqEfnyKxwCAUEfB6qt6gHLrU bEAw== 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:in-reply-to:user-agent; bh=dNfQq4vs7QFB2HTJhfvFYb5EY+/uwjvmlrOrcc0Gfzg=; b=oocL87Rn9gd67iasun7BJ4Im7WCOb5L7m+l7KHMomhNxhlH2hY4uvAak2T87TpsTue g634evDbEv/PkfJMNNJUcGY7lVyWBCo2p/TBXZv9MfuH2YVRA90zxVr3cqO0zYVu/umV QqOcGf2IW5Mtwbdc9s3ijK9GmqWp6MKgrAfDOJ9PxDQHXE8Vfqjm7/y6HQ8TFJrUA8+c p/o0c8+Jog3CKiF+B5RDmmhLlTEZa1bLF85st4Nqq/cE1djlO9HPluxqvCiT0ImHSgWK 5pB5BQVrmpjTDdXsy+3rvH3Nn7KyDbg5wEjyC/JNUsxS2c68cTMkbyz5TYcSbd5sI8YT Cd2A== X-Gm-Message-State: AKwxytfRGDaetsDlp+xm03U8ZR4cBIg3s/27Cv+QObfVGXA500JNU44s 3mnAojk249h6456GJvov+70= X-Received: by 10.101.101.26 with SMTP id x26mr14420224pgv.149.1516340218094; Thu, 18 Jan 2018 21:36:58 -0800 (PST) Received: from f1.synalogic.ca ([45.122.157.202]) by smtp.gmail.com with ESMTPSA id 12sm3036863pfr.147.2018.01.18.21.36.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Jan 2018 21:36:56 -0800 (PST) Date: Fri, 19 Jan 2018 14:36:52 +0900 From: Benjamin Poirier To: Shrikrishna Khare Cc: Shrikrishna Khare , pv-drivers@vmware.com, Jeff Kirsher , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Alexander Duyck Subject: Re: [RFC PATCH] e1000e: Remove Other from EIAC. Message-ID: <20180119053652.77zlafisweg2ar74@f1.synalogic.ca> References: <20180118065054.29844-1-bpoirier@suse.com> <20180118072741.hlkepaeibppz7uih@f1.synalogic.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170912 (1.9.0) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/01/18 18:42, Shrikrishna Khare wrote: > > > On Thu, 18 Jan 2018, Benjamin Poirier wrote: > > > On 2018/01/18 15:50, Benjamin Poirier wrote: > > > It was reported that emulated e1000e devices in vmware esxi 6.5 Build > > > 7526125 do not link up after commit 4aea7a5c5e94 ("e1000e: Avoid receiver > > > overrun interrupt bursts", v4.15-rc1). Some tracing shows that after > > > e1000e_trigger_lsc() is called, ICR reads out as 0x0 in e1000_msix_other() > > > on emulated e1000e devices. In comparison, on real e1000e 82574 hardware, > > > icr=0x80000004 (_INT_ASSERTED | _OTHER) in the same situation. > > > > > > Some experimentation showed that this flaw in vmware e1000e emulation can > > > be worked around by not setting Other in EIAC. This is how it was before > > > 16ecba59bc33 ("e1000e: Do not read ICR in Other interrupt", v4.5-rc1). > > > > vmware folks, please comment. > > Thank you for bringing this to our attention. > > Using the reported build (ESX 6.5, 7526125) and 4.15.0-rc8+ kernel (which > has the said patch), I could bring up e1000e interface (version: 3.2.6-k), > get dhcp address and even do large file downloads without difficulty. > > Could you give us more pointers on how we may be able to reproduce this > locally? Was there anything different with the configuration when the > issue was observed? Is the issue consistently reproducible? It's consistently reproducible, however I noticed that once in a while there is a genuine "Other" interrupt that comes in and triggers the link status change. The problem is with interrupts that are triggered via a write to ICS (such as in e1000e_trigger_lsc()). Can you reproduce a problem if you do: ip link set ethX down ip link set ethX up If you're building your own kernel, you can add the following patch and cat /sys/kernel/debug/tracing/trace_pipe For me it shows on v4.15-rc8: <...>-2578 [000] .... 83527.938321: e1000e_trigger_lsc: trigger_lsc <...>-2578 [000] d.h. 83527.938398: e1000_msix_other: icr 0x0 With the patch that I submitted, it shows: wickedd-1329 [002] .N.. 20.123545: e1000e_trigger_lsc: trigger_lsc -0 [000] d.h. 20.123630: e1000_msix_other: icr 0x81000004 -0 [000] d.h. 20.123654: e1000_msix_other: lsc -0 [000] d.h. 20.123676: e1000_msix_other: mod_timer diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index 9f18d39bdc8f..16620ce840fc 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@ -1918,22 +1918,29 @@ static irqreturn_t e1000_msix_other(int __always_unused irq, void *data) bool enable = true; icr = er32(ICR); + trace_printk("icr 0x%x\n", icr); + if (icr & E1000_ICR_RXO) { + trace_printk("rxo\n"); ew32(ICR, E1000_ICR_RXO); enable = false; /* napi poll will re-enable Other, make sure it runs */ if (napi_schedule_prep(&adapter->napi)) { + trace_printk("napi schedule\n"); adapter->total_rx_bytes = 0; adapter->total_rx_packets = 0; __napi_schedule(&adapter->napi); } } if (icr & E1000_ICR_LSC) { + trace_printk("lsc\n"); ew32(ICR, E1000_ICR_LSC); hw->mac.get_link_status = true; /* guard against interrupt when we're going down */ - if (!test_bit(__E1000_DOWN, &adapter->state)) + if (!test_bit(__E1000_DOWN, &adapter->state)) { + trace_printk("mod_timer\n"); mod_timer(&adapter->watchdog_timer, jiffies + 1); + } } if (enable && !test_bit(__E1000_DOWN, &adapter->state)) @@ -4221,6 +4228,8 @@ static void e1000e_trigger_lsc(struct e1000_adapter *adapter) { struct e1000_hw *hw = &adapter->hw; + trace_printk("trigger_lsc\n"); + if (adapter->msix_entries) ew32(ICS, E1000_ICS_LSC | E1000_ICS_OTHER); else