From patchwork Fri Oct 23 00:32:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Poirier X-Patchwork-Id: 534990 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 480AF141311 for ; Sat, 24 Oct 2015 00:19:31 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 8FA23889BA; Fri, 23 Oct 2015 13:19:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id h9btKATC+I3X; Fri, 23 Oct 2015 13:19:28 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 26B5F889B4; Fri, 23 Oct 2015 13:19:28 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 2630B1C1F0B for ; Fri, 23 Oct 2015 00:44:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 208DD307CD for ; Fri, 23 Oct 2015 00:44:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id W6KlsFtHkHCg for ; Fri, 23 Oct 2015 00:44:09 +0000 (UTC) X-Greylist: delayed 00:11:11 by SQLgrey-1.7.6 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by silver.osuosl.org (Postfix) with ESMTPS id D03FE303D7 for ; Fri, 23 Oct 2015 00:44:08 +0000 (UTC) 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 8B051AB4B; Fri, 23 Oct 2015 00:32:53 +0000 (UTC) From: Benjamin Poirier To: Jeff Kirsher Date: Thu, 22 Oct 2015 17:32:26 -0700 Message-Id: <1445560348-29872-1-git-send-email-bpoirier@suse.com> X-Mailer: git-send-email 2.5.0 X-Mailman-Approved-At: Fri, 23 Oct 2015 13:19:27 +0000 Cc: linux-kernel@vger.kernel.org, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org Subject: [Intel-wired-lan] [PATCH 0/2] e1000e msi-x fixes X-BeenThere: intel-wired-lan@lists.osuosl.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-wired-lan-bounces@lists.osuosl.org Sender: "Intel-wired-lan" Hi, For this series: Benjamin Poirier (2): e1000e: remove unreachable code e1000e: Fix msi-x interrupt automask drivers/net/ethernet/intel/e1000e/netdev.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) The first patch is a cleanup but the second one is the real deal. Please consider reading the description for that patch before proceeding. I believe that the following simple tracing statements are helpful in detecting the problem fixed by the second patch. -------- 8< -------- With that patch but without the patches in this series we can see that rx irqs occur at unexpected times: -0 [000] .Ns. 1986.887517: e1000e_poll: eth1: will enable rxq0 irq -0 [000] d.h. 1986.896654: e1000_intr_msix_rx: eth1: rxq0 irq ims 0x01500004 -0 [000] d.h. 1986.896657: e1000_intr_msix_rx: eth1: scheduling napi -0 [000] d.H. 1986.896662: e1000_intr_msix_rx: eth1: rxq0 irq ims 0x01500004 -0 [000] ..s. 1986.896667: e1000e_poll: eth1: poll starting ims 0x01500004 Warning: many interrupts (2) before napi -0 [000] ..s. 1986.896685: e1000e_poll: eth1: will enable rxq0 irq -0 [000] d.h. 1990.688870: e1000_intr_msix_rx: eth1: scheduling napi -0 [000] ..s. 1990.688875: e1000e_poll: eth1: poll starting ims 0x01500004 -0 [000] dNH. 1990.688913: e1000_intr_msix_rx: eth1: rxq0 irq ims 0x01500004 Warning: interrupt inside napi -0 [000] .Ns. 1990.688916: e1000e_poll: eth1: will enable rxq0 irq -0 [000] d.h. 1990.729688: e1000_intr_msix_rx: eth1: rxq0 irq ims 0x01500004 Here's a typical sequence after applying the patches in this series. Notice that ims is changed. Another printk at the end of e1000e_poll would show it to be 0x01500004. -0 [000] d.h. 3896.134376: e1000_intr_msix_rx: eth1: rxq0 irq ims 0x01400004 -0 [000] d.h. 3896.134379: e1000_intr_msix_rx: eth1: scheduling napi -0 [000] ..s. 3896.134384: e1000e_poll: eth1: poll starting ims 0x01400004 -0 [000] ..s. 3896.134398: e1000e_poll: eth1: will enable rxq0 irq Finally, here's the script I used to generate the warnings above: #!/usr/bin/python3 import sys import re import pprint class NaE(Exception): "Not an Event" pass class Event: def __init__(self, line): # sample events: # -0 [000] d.h. 2025.256536: e1000_intr_msix_rx: eth1: rxq0 irq ims 0x01500004 # -0 [000] d.h. 2025.256539: e1000_intr_msix_rx: eth1: scheduling napi # -0 [000] ..s. 2025.256544: e1000e_poll: eth1: poll starting ims 0x01500004 # -0 [000] ..s. 2025.256558: e1000e_poll: eth1: will enable rxq0 irq retval = re.match(" +.*)>?-(?P[0-9]+) +\[(?P.*)\] (?P[^ ]+) +(?P