From: Stephen Hemminger <shemminger@linux-foundation.org> Date: Wed, 19 Sep 2007 15:01:29 -0700Fair enough, I checked the following into net-2.6.24 commit 3b4eed9f46e4b0405a0d8921c2319f2b7c6a6b4a Author: David S. Miller <davem@sunset.davemloft.net> Date: Wed Sep 19 15:09:55 2007 -0700 [NAPI]: Sample weight into a local var in case it changes. Noted by Stephen Hemminger. Signed-off-by: David S. Miller <davem@davemloft.net> diff --git a/net/core/dev.c b/net/core/dev.c index 0b9f82e..91c31e6 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -2136,7 +2136,7 @@ static void net_rx_action(struct softirq_action *h) while (!list_empty(list)) { struct napi_struct *n; - int work; + int work, weight; /* If softirq window is exhuasted then punt. * @@ -2159,9 +2159,11 @@ static void net_rx_action(struct softirq_action *h) have = netpoll_poll_lock(n); - work = n->poll(n, n->weight); + weight = n->weight; - WARN_ON_ONCE(work > n->weight); + work = n->poll(n, weight); + + WARN_ON_ONCE(work > weight); budget -= work; @@ -2172,7 +2174,7 @@ static void net_rx_action(struct softirq_action *h) * still "owns" the NAPI instance and therefore can * move the instance around on the list at-will. */ - if (unlikely(work == n->weight)) + if (unlikely(work == weight)) list_move_tail(&n->poll_list, list); netpoll_poll_unlock(have); - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Faik Uygur | Re: Linux 2.6.21-rc1 |
| pageexec | Re: [stable] Linux 2.6.25.10 |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
git: | |
| Mark Lord | Re: 2.6.25-rc8: FTP transfer errors |
| Natalie Protasevich | [BUG] New Kernel Bugs |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
