diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2009-03-16 13:50:02 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-16 13:50:02 -0400 |
commit | d1c76af9e2434fac3add561e26c61b06503de986 (patch) | |
tree | cbedc7c96c4b7db3d7a5a8300117804c5e0230d9 /include/linux/netdevice.h | |
parent | afece1c6587010cc81d1a43045c855774e8234a3 (diff) |
GRO: Move netpoll checks to correct location
As my netpoll fix for net doesn't really work for net-next, we
need this update to move the checks into the right place. As it
stands we may pass freed skbs to netpoll_receive_skb.
This patch also introduces a netpoll_rx_on function to avoid GRO
completely if we're invoked through netpoll. This might seem
paranoid but as netpoll may have an external receive hook it's
better to be safe than sorry. I don't think we need this for
2.6.29 though since there's nothing immediately broken by it.
This patch also moves the GRO_* return values to netdevice.h since
VLAN needs them too (I tried to avoid this originally but alas
this seems to be the easiest way out). This fixes a bug in VLAN
where it continued to use the old return value 2 instead of the
correct GRO_DROP.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 493b065f76d7..be3ebd7e8ce5 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -330,6 +330,14 @@ enum | |||
330 | NAPI_STATE_NPSVC, /* Netpoll - don't dequeue from poll_list */ | 330 | NAPI_STATE_NPSVC, /* Netpoll - don't dequeue from poll_list */ |
331 | }; | 331 | }; |
332 | 332 | ||
333 | enum { | ||
334 | GRO_MERGED, | ||
335 | GRO_MERGED_FREE, | ||
336 | GRO_HELD, | ||
337 | GRO_NORMAL, | ||
338 | GRO_DROP, | ||
339 | }; | ||
340 | |||
333 | extern void __napi_schedule(struct napi_struct *n); | 341 | extern void __napi_schedule(struct napi_struct *n); |
334 | 342 | ||
335 | static inline int napi_disable_pending(struct napi_struct *n) | 343 | static inline int napi_disable_pending(struct napi_struct *n) |