* [PATCH 1/3] forcedeth: fixed missing call in napi poll
@ 2007-02-19 14:27 Ayaz Abdulla
2007-02-20 16:26 ` Jeff Garzik
0 siblings, 1 reply; 4+ messages in thread
From: Ayaz Abdulla @ 2007-02-19 14:27 UTC (permalink / raw)
To: Jeff Garzik, Manfred Spraul, Andrew Morton, nedev
[-- Attachment #1: Type: text/plain, Size: 190 bytes --]
The napi poll routine was missing the call to the optimized rx process
routine. This patch adds the missing call for the optimized path.
Signed-Off-By: Ayaz Abdulla <aabdulla@nvidia.com>
[-- Attachment #2: patch-forcedeth-napi-poll --]
[-- Type: text/plain, Size: 750 bytes --]
--- orig/drivers/net/forcedeth.c 2007-02-19 09:13:10.000000000 -0500
+++ new/drivers/net/forcedeth.c 2007-02-19 09:13:46.000000000 -0500
@@ -3104,13 +3104,17 @@
struct fe_priv *np = netdev_priv(dev);
u8 __iomem *base = get_hwbase(dev);
unsigned long flags;
+ u32 retcode;
- if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2)
+ if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) {
pkts = nv_rx_process(dev, limit);
- else
+ retcode = nv_alloc_rx(dev);
+ } else {
pkts = nv_rx_process_optimized(dev, limit);
+ retcode = nv_alloc_rx_optimized(dev);
+ }
- if (nv_alloc_rx(dev)) {
+ if (retcode) {
spin_lock_irqsave(&np->lock, flags);
if (!np->in_shutdown)
mod_timer(&np->oom_kick, jiffies + OOM_REFILL);
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/3] forcedeth: fixed missing call in napi poll
@ 2007-02-20 8:34 Ayaz Abdulla
2007-02-27 9:16 ` Jeff Garzik
0 siblings, 1 reply; 4+ messages in thread
From: Ayaz Abdulla @ 2007-02-20 8:34 UTC (permalink / raw)
To: Jeff Garzik, Manfred Spraul, Andrew Morton, nedev
[-- Attachment #1: Type: text/plain, Size: 190 bytes --]
The napi poll routine was missing the call to the optimized rx process
routine. This patch adds the missing call for the optimized path.
Signed-Off-By: Ayaz Abdulla <aabdulla@nvidia.com>
[-- Attachment #2: patch-forcedeth-napi-poll --]
[-- Type: text/plain, Size: 750 bytes --]
--- orig/drivers/net/forcedeth.c 2007-02-20 03:17:21.000000000 -0500
+++ new/drivers/net/forcedeth.c 2007-02-20 03:28:31.000000000 -0500
@@ -3104,13 +3104,17 @@
struct fe_priv *np = netdev_priv(dev);
u8 __iomem *base = get_hwbase(dev);
unsigned long flags;
+ int retcode;
- if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2)
+ if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) {
pkts = nv_rx_process(dev, limit);
- else
+ retcode = nv_alloc_rx(dev);
+ } else {
pkts = nv_rx_process_optimized(dev, limit);
+ retcode = nv_alloc_rx_optimized(dev);
+ }
- if (nv_alloc_rx(dev)) {
+ if (retcode) {
spin_lock_irqsave(&np->lock, flags);
if (!np->in_shutdown)
mod_timer(&np->oom_kick, jiffies + OOM_REFILL);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/3] forcedeth: fixed missing call in napi poll
2007-02-19 14:27 Ayaz Abdulla
@ 2007-02-20 16:26 ` Jeff Garzik
0 siblings, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2007-02-20 16:26 UTC (permalink / raw)
To: Ayaz Abdulla; +Cc: Manfred Spraul, Andrew Morton, nedev
Ayaz Abdulla wrote:
> The napi poll routine was missing the call to the optimized rx process
> routine. This patch adds the missing call for the optimized path.
>
> Signed-Off-By: Ayaz Abdulla <aabdulla@nvidia.com>
>
>
> ------------------------------------------------------------------------
>
> --- orig/drivers/net/forcedeth.c 2007-02-19 09:13:10.000000000 -0500
> +++ new/drivers/net/forcedeth.c 2007-02-19 09:13:46.000000000 -0500
> @@ -3104,13 +3104,17 @@
> struct fe_priv *np = netdev_priv(dev);
> u8 __iomem *base = get_hwbase(dev);
> unsigned long flags;
> + u32 retcode;
>
> - if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2)
> + if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) {
> pkts = nv_rx_process(dev, limit);
> - else
> + retcode = nv_alloc_rx(dev);
> + } else {
> pkts = nv_rx_process_optimized(dev, limit);
> + retcode = nv_alloc_rx_optimized(dev);
> + }
>
> - if (nv_alloc_rx(dev)) {
> + if (retcode) {
You should update this patch to change the return values of the above
two functions from 'int' to 'u32', to match the code usage. Both
nv_rx_process() and nv_alloc_rx_optimized() return int, but you use them
as if they return u32.
Or alternately, use the Linux kernel standard of negative values
indicating failure, zero (or perhaps >=0) indicates success.
Otherwise, ACK.
Jeff
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/3] forcedeth: fixed missing call in napi poll
2007-02-20 8:34 [PATCH 1/3] forcedeth: fixed missing call in napi poll Ayaz Abdulla
@ 2007-02-27 9:16 ` Jeff Garzik
0 siblings, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2007-02-27 9:16 UTC (permalink / raw)
To: Ayaz Abdulla; +Cc: Manfred Spraul, Andrew Morton, nedev
Ayaz Abdulla wrote:
> The napi poll routine was missing the call to the optimized rx process
> routine. This patch adds the missing call for the optimized path.
>
> Signed-Off-By: Ayaz Abdulla <aabdulla@nvidia.com>
applied 1-3
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-02-27 9:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-20 8:34 [PATCH 1/3] forcedeth: fixed missing call in napi poll Ayaz Abdulla
2007-02-27 9:16 ` Jeff Garzik
-- strict thread matches above, loose matches on Subject: below --
2007-02-19 14:27 Ayaz Abdulla
2007-02-20 16:26 ` 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).