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: 534669 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 8354E141317 for ; Fri, 23 Oct 2015 11:34:56 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965773AbbJWAdD (ORCPT ); Thu, 22 Oct 2015 20:33:03 -0400 Received: from mx2.suse.de ([195.135.220.15]:59334 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758284AbbJWAc4 (ORCPT ); Thu, 22 Oct 2015 20:32:56 -0400 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 Cc: Jesse Brandeburg , Shannon Nelson , Carolyn Wyborny , Don Skidmore , Matthew Vick , John Ronciak , Mitch Williams , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/2] e1000e msi-x fixes 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 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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