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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 11 Jul 2008 21:41:23 +0200
From:	Krzysztof Halasa <khc@...waw.pl>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Jeff Garzik <jeff@...zik.org>, <netdev@...r.kernel.org>,
	lkml <linux-kernel@...r.kernel.org>
Subject: Re: [FIX] ARM: IXP4xx Ethernet NAPI fix

Andrew Morton <akpm@...ux-foundation.org> writes:

>> +++ b/drivers/net/arm/ixp4xx_eth.c
>> @@ -522,7 +522,6 @@ static int eth_poll(struct napi_struct *napi, int budget)
>>  #endif
>>  
>>  		if ((n = queue_get_desc(rxq, port, 0)) < 0) {
>> -			received = 0; /* No packet received */
>>  #if DEBUG_RX
>>  			printk(KERN_DEBUG "%s: eth_poll netif_rx_complete\n",
>>  			       dev->name);
>> @@ -543,7 +542,7 @@ static int eth_poll(struct napi_struct *napi, int budget)
>>  			printk(KERN_DEBUG "%s: eth_poll all done\n",
>>  			       dev->name);
>>  #endif
>> -			return 0; /* all work done */
>> +			return received; /* all work done */
>>  		}
>>  
>>  		desc = rx_desc_ptr(port, n);
>
> This is a functional change, and I do not believe that "fixes some
> weirdness" is an adequate description of it.

Well, tried my best :-)

> Please: what was wrong with the old code?

It shouldn't do anything like that, the function has to return the
number of received packets. I.e., it was not up to the NAPI specs. Now
it does what NAPI wants, hopefully. I have no idea why did I put that
in :-(

>  Were the effects user-visible?

I don't know. Actually, for me it works the same before and after the
change.
-- 
Krzysztof Halasa
--
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