Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751706AbdIOAi0 convert rfc822-to-8bit (ORCPT ); Thu, 14 Sep 2017 20:38:26 -0400 Received: from mga01.intel.com ([192.55.52.88]:33456 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751619AbdIOAiZ (ORCPT ); Thu, 14 Sep 2017 20:38:25 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,395,1500966000"; d="scan'208";a="900413150" From: "Brown, Aaron F" To: Benjamin Poirier , "Kirsher, Jeffrey T" CC: "netdev@vger.kernel.org" , "intel-wired-lan@lists.osuosl.org" , "linux-kernel@vger.kernel.org" , "Lennart Sorensen" Subject: RE: [Intel-wired-lan] [PATCH 5/5] e1000e: Avoid receiver overrun interrupt bursts Thread-Topic: [Intel-wired-lan] [PATCH 5/5] e1000e: Avoid receiver overrun interrupt bursts Thread-Index: AQHTAlBgiiBGsopI5UWY2irVVUE0xaK1b4RQ Date: Fri, 15 Sep 2017 00:38:22 +0000 Message-ID: <309B89C4C689E141A5FF6A0C5FB2118B8C6A05EC@ORSMSX101.amr.corp.intel.com> References: <20170721160937.GA22632@csclub.uwaterloo.ca> <20170721183627.13373-1-bpoirier@suse.com> <20170721183627.13373-5-bpoirier@suse.com> In-Reply-To: <20170721183627.13373-5-bpoirier@suse.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.22.254.139] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3686 Lines: 73 > From: Intel-wired-lan [mailto:intel-wired-lan-bounces@osuosl.org] On Behalf > Of Benjamin Poirier > Sent: Friday, July 21, 2017 11:36 AM > To: Kirsher, Jeffrey T > Cc: netdev@vger.kernel.org; intel-wired-lan@lists.osuosl.org; linux- > kernel@vger.kernel.org; Lennart Sorensen > Subject: [Intel-wired-lan] [PATCH 5/5] e1000e: Avoid receiver overrun > interrupt bursts > > When e1000e_poll() is not fast enough to keep up with incoming traffic, the > adapter (when operating in msix mode) raises the Other interrupt to signal > Receiver Overrun. > > This is a double problem because 1) at the moment e1000_msix_other() > assumes that it is only called in case of Link Status Change and 2) if the > condition persists, the interrupt is repeatedly raised again in quick > succession. > > Ideally we would configure the Other interrupt to not be raised in case of > receiver overrun but this doesn't seem possible on this adapter. Instead, > we handle the first part of the problem by reverting to the practice of > reading ICR in the other interrupt handler, like before commit 16ecba59bc33 > ("e1000e: Do not read ICR in Other interrupt"). Thanks to commit > 0a8047ac68e5 ("e1000e: Fix msi-x interrupt automask") which cleared IAME > from CTRL_EXT, reading ICR doesn't interfere with RxQ0, TxQ0 interrupts > anymore. We handle the second part of the problem by not re-enabling the > Other interrupt right away when there is overrun. Instead, we wait until > traffic subsides, napi polling mode is exited and interrupts are > re-enabled. > > Reported-by: Lennart Sorensen > Fixes: 16ecba59bc33 ("e1000e: Do not read ICR in Other interrupt") > Signed-off-by: Benjamin Poirier > --- > drivers/net/ethernet/intel/e1000e/defines.h | 1 + > drivers/net/ethernet/intel/e1000e/netdev.c | 33 > +++++++++++++++++++++++------ > 2 files changed, 27 insertions(+), 7 deletions(-) > I get an error and a few warnings out of checkpatch from this, but I think the error is false (thinking the reference to a commit in the description is this commit, a fixes commit or something like that) and I'm more concerned with the fix than the warnings, so... Tested-by: Aaron Brown Here is the checkpatch output in case anyone has a different opinion on the severity: ------------- u1484:[0]/usr/src/kernels/next-queue> git format-patch d81d1e6 -1 --stdout|./scripts/checkpatch.pl - ERROR: Please use git commit description style 'commit <12+ chars of sha1> ("")' - ie: 'commit 0a8047ac68e5 ("e1000e: Fix msi-x interrupt automask")' #20: 0a8047ac68e5 ("e1000e: Fix msi-x interrupt automask") which cleared IAME WARNING: braces {} are not necessary for single statement blocks #73: FILE: drivers/net/ethernet/intel/e1000e/netdev.c:1931: + if (!test_bit(__E1000_DOWN, &adapter->state)) { + mod_timer(&adapter->watchdog_timer, jiffies + 1); + } WARNING: braces {} are not necessary for single statement blocks #83: FILE: drivers/net/ethernet/intel/e1000e/netdev.c:1936: + if (enable && !test_bit(__E1000_DOWN, &adapter->state)) { ew32(IMS, E1000_IMS_OTHER); } total: 1 errors, 2 warnings, 0 checks, 59 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. Your patch has style problems, please review. NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. u1484:[0]/usr/src/kernels/next-queue>