aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorNeil Horman <nhorman@tuxdriver.com>2010-10-19 03:04:26 -0400
committerDavid S. Miller <davem@davemloft.net>2010-10-20 04:44:30 -0400
commitf13d493d9cf772d510d78ae00bb9f4d680b3170b (patch)
treeaec4db35f4d2cd2328179e6a4fde6bf5017d3a0d /net/core
parent9ff76c951c5194d44a7cdce51d807d67fc3ae514 (diff)
netpoll: Revert napi_poll fix for bonding driver
In an erlier patch I modified napi_poll so that devices with IFF_MASTER polled the per_cpu list instead of the device list for napi. I did this because the bonding driver has no napi instances to poll, it instead expects to check the slave devices napi instances, which napi_poll was unaware of. Looking at this more closely however, I now see this isn't strictly needed. As the bond driver poll_controller calls the slaves poll_controller via netpoll_poll_dev, which recursively calls poll_napi on each slave, allowing those napi instances to get serviced. The earlier patch isn't at all harmfull, its just not needed, so lets revert it to make the code cleaner. Sorry for the noise, Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Reviewed-by: WANG Cong <amwang@redhat.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, 1 insertions, 8 deletions
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index d79d221fd1f4..4e98ffac3af0 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -156,15 +156,8 @@ 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;
161 159
162 if (dev->flags & IFF_MASTER) 160 list_for_each_entry(napi, &dev->napi_list, dev_list) {
163 nlist = &sd->poll_list;
164 else
165 nlist = &dev->napi_list;
166
167 list_for_each_entry(napi, nlist, dev_list) {
168 if (napi->poll_owner != smp_processor_id() && 161 if (napi->poll_owner != smp_processor_id() &&
169 spin_trylock(&napi->poll_lock)) { 162 spin_trylock(&napi->poll_lock)) {
170 budget = poll_one_napi(dev->npinfo, napi, budget); 163 budget = poll_one_napi(dev->npinfo, napi, budget);