Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > media > main-src > by-pkgid > d0a35cd31c1125e2132804d68547073d > files > 2157

kernel-2.6.18-194.26.1.el5.src.rpm

From: Andy Gospodarek <gospo@redhat.com>
Date: Fri, 19 Jun 2009 09:24:52 -0400
Subject: [net] e1000e: stop unnecessary polling when using msi-x
Message-id: 20090619132452.GE20245@gospo.rdu.redhat.com
O-Subject: [RHEL5.4 PATCH] e1000e: stop unnecessary polling when using msi-x
Bugzilla: 506841
RH-Acked-by: Stefan Assmann <sassmann@redhat.com>
RH-Acked-by: Dean Nelson <dnelson@redhat.com>
RH-Acked-by: Neil Horman <nhorman@redhat.com>

The last hunk of this commit:

    commit 12d04a3c12b420f23398b4d650127642469a60a6
    Author: Alexander Duyck <alexander.h.duyck@intel.com>
    Date:   Wed Mar 25 22:05:03 2009 +0000

        e1000e: commonize tx cleanup routine to match e1000 & igb

changed the logic for determining if we should call napi_complete or
not at then end of a napi poll.

If the NIC is using MSI-X with no work to do in ->poll, net_rx_action
will spin until the timeout.  Since the device is back on the list of
devices to poll when softirqs are run again, net_rx_action will spring
into action and the same process will repeat.  User-space processes will
be blocked and soft-lockup messages start scrolling.

Accepted upstream yesterday.

This will resolve RHBZ 506841.

diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index 953bd2b..06cccbc 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -1998,7 +1998,7 @@ static int e1000_clean(struct net_device *poll_dev, int *budget)
 	struct e1000_adapter *adapter = poll_dev->priv;
 	struct e1000_hw *hw = &adapter->hw;
 	int work_to_do = min(*budget, poll_dev->quota);
-	int tx_cleaned = 0, work_done = 0;
+	int tx_cleaned = 1, work_done = 0;
 
 	/* Keep link state information with original netdev */
 	if (!netif_carrier_ok(poll_dev))