aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorNeil Horman <nhorman@tuxdriver.com>2010-10-13 12:01:51 -0400
committerDavid S. Miller <davem@davemloft.net>2010-10-18 11:32:08 -0400
commit990c3d6f9c4115347659fc2b163907c8c832ae44 (patch)
treed41e68a1c3c34d8439fe886b96c18fec4d954604 /net/core
parente843fa50887582c867d8b7995f81fe9c1a076806 (diff)
bonding: Fix napi poll for bonding driver
Usually the netpoll path, when preforming a napi poll can get away with just polling all the napi instances of the configured device. Thats not the case for the bonding driver however, as the napi instances which may wind up getting flagged as needing polling after the poll_controller call don't belong to the bonded device, but rather to the slave devices. Fix this by checking the device in question for the IFF_MASTER flag, if set, we know we need to check the full poll list for this cpu, rather than just the devices napi instance list. Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/netpoll.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 4e98ffac3af..d79d221fd1f 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -156,8 +156,15 @@ static void poll_napi(struct net_device *dev)
156{ 156{
157 struct napi_struct *napi; 157 struct napi_struct *napi;
158 int budget = 16; 158 int budget = 16;
159 struct softnet_data *sd = &__get_cpu_var(softnet_data);
160 struct list_head *nlist;
159 161
160 list_for_each_entry(napi, &dev->napi_list, dev_list) { 162 if (dev->flags & IFF_MASTER)
163 nlist = &sd->poll_list;
164 else
165 nlist = &dev->napi_list;
166
167 list_for_each_entry(napi, nlist, dev_list) {
161 if (napi->poll_owner != smp_processor_id() && 168 if (napi->poll_owner != smp_processor_id() &&
162 spin_trylock(&napi->poll_lock)) { 169 spin_trylock(&napi->poll_lock)) {
163 budget = poll_one_napi(dev->npinfo, napi, budget); 170 budget = poll_one_napi(dev->npinfo, napi, budget);