lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090619.002454.04323414.davem@davemloft.net>
Date:	Fri, 19 Jun 2009 00:24:54 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	alexander.h.duyck@...el.com
Cc:	andy@...yhouse.net, netdev@...r.kernel.org,
	bruce.w.allan@...el.com, jeffrey.t.kirsher@...el.com,
	jesse.brandeburg@...el.com, stable@...nel.org
Subject: Re: [PATCH] e1000e: stop unnecessary polling when using msi-x

From: Alexander Duyck <alexander.h.duyck@...el.com>
Date: Thu, 18 Jun 2009 15:06:36 -0700

> Andy Gospodarek wrote:
>> The last hunk of this commit:
>>     commit 12d04a3c12b420f23398b4d650127642469a60a6
>>     Author: Alexander Duyck <alexander.h.duyck@...el.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
>> can just spin indefinitely on older kernels and for 2 jiffies on newer
>> kernels since napi_complete is never called and budget isn't
>> decremented.
>> Discovered and verified while testing driver backport to an older
>> kernel.
>> Signed-off-by: Andy Gospodarek <andy@...yhouse.net>
>> ---
>>  netdev.c |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
>> index 677f604..679885a 100644
>> --- a/drivers/net/e1000e/netdev.c
>> +++ b/drivers/net/e1000e/netdev.c
>> @@ -1997,7 +1997,7 @@ static int e1000_clean(struct napi_struct *napi,
>> int budget)
>>  	struct e1000_adapter *adapter = container_of(napi, struct
>>  	e1000_adapter, napi);
>>  	struct e1000_hw *hw = &adapter->hw;
>>  	struct net_device *poll_dev = adapter->netdev;
>> -	int tx_cleaned = 0, work_done = 0;
>> +	int tx_cleaned = 1, work_done = 0;
>>   	adapter = netdev_priv(poll_dev);
>> 
> This is most certainly a bug, and the fix is correct.  The logic for
> tx_cleaned is supposed to default to true in the event that there are
> no tx queues cleaned as part of the polling routine.
> 
> Acked-by: Alexander Duyck <alexander.h.duyck@...el.com>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ