Received: by 10.223.176.46 with SMTP id f43csp745437wra; Fri, 19 Jan 2018 01:01:57 -0800 (PST) X-Google-Smtp-Source: ACJfBoviNI6s/rGL2vsEcx6ZF5hzI26vYl7YdYTeYOAAFACznHKVVpZhUiYUMWLqql1OAYHR88lM X-Received: by 10.98.70.18 with SMTP id t18mr22562197pfa.14.1516352517166; Fri, 19 Jan 2018 01:01:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516352517; cv=none; d=google.com; s=arc-20160816; b=WK0tf9rQwhJ+wWT53yRfql69ukmEWNfe4mPVcLtLuz0n38Qvnl3C8r4BAWFG0CvtQu 0Ojnq6K52X7W9nCzqUnh7w4+AF94g6Z3rNN5+UKOgR3zyyP2O4TJl19FUde7mO5+SF0r GmF/E5ylVdj3/CrrM3DJ0l7nvC1usRCz02YwQWWad7fpkcuCmE/GQ7VakG5otV7LwQZp 3x10ZjYkLWjRwcXgQuMTOgRTL2edOQKYpq+xPE9wb0WMHviXTW0JG+rH9iUqJZ5pKRqs tnwVGen0mXLmgvdPK63qiJVfutO31/2e3wYehuqM3Br1ovd9tp2e1bVQrYsM/nm0Ioy+ F6ug== 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:arc-authentication-results; bh=QbxtIa2uzQ1wBHymxEixnUOLRQ/3qTn/ppT0FmoI9yU=; b=Dlt0VSD4cFTS5AK7C+qhAqxlhMQBq972F70N6OZbgj3rrx+FB1f9lTcpi4QlarAje6 lUmdupI+20GKGXW8ZpxZgKD8+nklUTbLG8SwgV0I46YviW5WGdJF7dR5yjQ18t0uFMwW dbzQ4XguR8uUrpieMVK77pk9TsZ+Hl5Rv628smhjszdv2OaY55b2eVmwx9NgFbfAl9qI A/p72A9pCMXZybNCJv/hCWDfIV7hGobHZ3PCzrvqe5jmTJ9qVyf2PvO3MihtO44dm1wy 63ubj6mx37TUr2RCiC1zH9Cbcmzg3P78xYQdq9nJbF3AA12O3zMxNpF2YNPAxVoqXtY5 xx0Q== 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 v69si7869304pgb.303.2018.01.19.01.01.42; Fri, 19 Jan 2018 01:01:57 -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; 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 S1755322AbeASJAM (ORCPT + 99 others); Fri, 19 Jan 2018 04:00:12 -0500 Received: from mx2.suse.de ([195.135.220.15]:37920 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755272AbeASJAB (ORCPT ); Fri, 19 Jan 2018 04:00:01 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 6351FAD51; Fri, 19 Jan 2018 08:59:59 +0000 (UTC) Date: Fri, 19 Jan 2018 17:59:52 +0900 From: Benjamin Poirier To: Alexander Duyck Cc: Jeff Kirsher , Netdev , intel-wired-lan , linux-kernel@vger.kernel.org Subject: Re: [Intel-wired-lan] [RFC PATCH] e1000e: Remove Other from EIAC. Message-ID: <20180119085952.u63kius4ud34lleq@f1.synalogic.ca> References: <20180118065054.29844-1-bpoirier@suse.com> 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 07:51, Alexander Duyck wrote: > On Wed, Jan 17, 2018 at 10:50 PM, 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. > > Isn't 0x80000004 (_INT_ASSERTED | _LSC)? The assumption I based my Yes. The numeric value is correct. I made a mistake when writing down the flag names. > patch on was that the VMware code was sending _OTHER instead of _LSC > to trigger LSC events. As such in my version of the workaround I just It's not so deterministic, sadly. In my tests, upon entry into e1000_msix_other() after e1000e_trigger_lsc(), with no workaround patch I've seen: icr=0x0 icr=0x3d Reserved RXDMT0 Reserved LSC TXDW icr=0x46 RXO LSC TXQE and someone else reported: icr=0x3c Reserved RXDMT0 Reserved LSC > went through and did the testing if the _RXO bit was set, otherwise I > assumed that whatever event was received must have been meant to > trigger an _LSC type event since that worked in the past. > > > 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). > > Did this actually set the _LSC bit or was it just giving you the > _OTHER bit? The ICR for that combination would come out 0x81000000. With my patch, after e1000e_trigger_lsc(), it results in icr=0x81000004 on real and emulated hardware. IMO, the resulting icr read is cleaner than with your patch but it depends on an undocumented quirk of the emulated vmware e1000e, so I don't know which of the two workarounds is more desirable. If you'd like to stick with your patch though, I think that you should definitely rewrite it as: diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index 9f18d39bdc8f..68c0bcb8287f 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@ -1928,7 +1928,12 @@ static irqreturn_t e1000_msix_other(int __always_unused irq, void *data) __napi_schedule(&adapter->napi); } } - if (icr & E1000_ICR_LSC) { + if (icr & E1000_ICR_LSC || !(icr & E1000_ICR_RXO)) { + /* We assume if the RXO bit is not set that this is a + * link status change event. This is needed due to emulated + * versions of the device that may not correctly populate + * the LSC bit. + */ ew32(ICR, E1000_ICR_LSC); hw->mac.get_link_status = true; /* guard against interrupt when we're going down */ > > > Fixes: 4aea7a5c5e94 ("e1000e: Avoid receiver overrun interrupt bursts") > > Signed-off-by: Benjamin Poirier > > --- > > > > Jeff, I'm sending as RFC since it looks like a problem that should be fixed > > in vmware. If you'd like to have the workaround in e1000e, I'll submit. > > I would appreciate it if you could review/test the patch I submitted > for the same issue. Specifically I would want to make certain that it > still addresses the original RXO interrupt burst issue your reported. I've tested both my patch and yours; they both allow link up on vmware; link up on real 82574 and rxo mitigation on real 82574. I couldn't conveniently test rxo on vmware. > > Thanks. > > - Alex >