netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pcnet32: fix non-napi packet reception
@ 2007-10-17 22:59 Don Fry
  2007-10-17 23:55 ` Jeff Garzik
  2007-10-18  0:21 ` Jeff Garzik
  0 siblings, 2 replies; 5+ messages in thread
From: Don Fry @ 2007-10-17 22:59 UTC (permalink / raw)
  To: jgarzik; +Cc: netdev

Recent changes to the driver for the new napi API broke the reception of packets when in
non-napi mode.  The initialization of napi.weight was removed for the non-napi case
leaving the value zero.

Tested NAPI and non-NAPI on x86_64.

Signed-off-by: Don Fry <pcnet32@verizon.net>
---
--- linux-2.6.23-git7/drivers/net/orig.pcnet32.c	2007-10-15 11:19:17.000000000 -0700
+++ linux-2.6.23-git7/drivers/net/pcnet32.c	2007-10-17 15:56:15.000000000 -0700
@@ -1849,6 +1849,9 @@ pcnet32_probe1(unsigned long ioaddr, int
 	lp->mii_if.mdio_read = mdio_read;
 	lp->mii_if.mdio_write = mdio_write;
 
+	/* napi.weight is used in both the napi and non-napi cases */
+	lp->napi.weight = lp->rx_ring_size / 2;
+
 #ifdef CONFIG_PCNET32_NAPI
 	netif_napi_add(dev, &lp->napi, pcnet32_poll, lp->rx_ring_size / 2);
 #endif



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] pcnet32: fix non-napi packet reception
  2007-10-17 22:59 Don Fry
@ 2007-10-17 23:55 ` Jeff Garzik
  2007-10-18  0:21 ` Jeff Garzik
  1 sibling, 0 replies; 5+ messages in thread
From: Jeff Garzik @ 2007-10-17 23:55 UTC (permalink / raw)
  To: Don Fry; +Cc: netdev

Don Fry wrote:
> Recent changes to the driver for the new napi API broke the reception of packets when in
> non-napi mode.  The initialization of napi.weight was removed for the non-napi case
> leaving the value zero.
> 
> Tested NAPI and non-NAPI on x86_64.
> 
> Signed-off-by: Don Fry <pcnet32@verizon.net>
> ---
> --- linux-2.6.23-git7/drivers/net/orig.pcnet32.c	2007-10-15 11:19:17.000000000 -0700
> +++ linux-2.6.23-git7/drivers/net/pcnet32.c	2007-10-17 15:56:15.000000000 -0700
> @@ -1849,6 +1849,9 @@ pcnet32_probe1(unsigned long ioaddr, int
>  	lp->mii_if.mdio_read = mdio_read;
>  	lp->mii_if.mdio_write = mdio_write;
>  
> +	/* napi.weight is used in both the napi and non-napi cases */
> +	lp->napi.weight = lp->rx_ring_size / 2;
> +
>  #ifdef CONFIG_PCNET32_NAPI
>  	netif_napi_add(dev, &lp->napi, pcnet32_poll, lp->rx_ring_size / 2);
>  #endif

In general, we're hoping to remove as many CONFIG_FOO_NAPI as possible, 
pushing everybody towards using NAPI.

Any objection to heading in this direction with pcnet32?

	Jeff




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] pcnet32: fix non-napi packet reception
@ 2007-10-18  0:04 Don Fry
  2007-10-18 19:23 ` Lennart Sorensen
  0 siblings, 1 reply; 5+ messages in thread
From: Don Fry @ 2007-10-18  0:04 UTC (permalink / raw)
  To: jgarzik; +Cc: netdev

>In general, we're hoping to remove as many CONFIG_FOO_NAPI as possible,
>pushing everybody towards using NAPI.
>
>Any objection to heading in this direction with pcnet32?
>
>        Jeff

I have no objections myself.  It has been slowly moving that direction.
First with the napi implementation, default off, labeled experimental.
Then removing experimental and then making the default on.

If any other user of the pcnet32 has objections, now is the time to
speak loudly!

Don


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] pcnet32: fix non-napi packet reception
  2007-10-17 22:59 Don Fry
  2007-10-17 23:55 ` Jeff Garzik
@ 2007-10-18  0:21 ` Jeff Garzik
  1 sibling, 0 replies; 5+ messages in thread
From: Jeff Garzik @ 2007-10-18  0:21 UTC (permalink / raw)
  To: Don Fry; +Cc: netdev

Don Fry wrote:
> Recent changes to the driver for the new napi API broke the reception of packets when in
> non-napi mode.  The initialization of napi.weight was removed for the non-napi case
> leaving the value zero.
> 
> Tested NAPI and non-NAPI on x86_64.
> 
> Signed-off-by: Don Fry <pcnet32@verizon.net>
> ---
> --- linux-2.6.23-git7/drivers/net/orig.pcnet32.c	2007-10-15 11:19:17.000000000 -0700
> +++ linux-2.6.23-git7/drivers/net/pcnet32.c	2007-10-17 15:56:15.000000000 -0700
> @@ -1849,6 +1849,9 @@ pcnet32_probe1(unsigned long ioaddr, int
>  	lp->mii_if.mdio_read = mdio_read;
>  	lp->mii_if.mdio_write = mdio_write;
>  
> +	/* napi.weight is used in both the napi and non-napi cases */
> +	lp->napi.weight = lp->rx_ring_size / 2;
> +
>  #ifdef CONFIG_PCNET32_NAPI
>  	netif_napi_add(dev, &lp->napi, pcnet32_poll, lp->rx_ring_size / 2);
>  #endif

applied



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] pcnet32: fix non-napi packet reception
  2007-10-18  0:04 [PATCH] pcnet32: fix non-napi packet reception Don Fry
@ 2007-10-18 19:23 ` Lennart Sorensen
  0 siblings, 0 replies; 5+ messages in thread
From: Lennart Sorensen @ 2007-10-18 19:23 UTC (permalink / raw)
  To: Don Fry; +Cc: jgarzik, netdev

On Wed, Oct 17, 2007 at 05:04:01PM -0700, Don Fry wrote:
> I have no objections myself.  It has been slowly moving that direction.
> First with the napi implementation, default off, labeled experimental.
> Then removing experimental and then making the default on.
> 
> If any other user of the pcnet32 has objections, now is the time to
> speak loudly!

I have used NAPI only on the pcnet32 for quite a while now.  In fact I
think a few of my local patches would break if I disabled NAPI.

__
Len Sorensen

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-10-18 19:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-18  0:04 [PATCH] pcnet32: fix non-napi packet reception Don Fry
2007-10-18 19:23 ` Lennart Sorensen
  -- strict thread matches above, loose matches on Subject: below --
2007-10-17 22:59 Don Fry
2007-10-17 23:55 ` Jeff Garzik
2007-10-18  0:21 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).