summaryrefslogtreecommitdiff
path: root/include/linux/netpoll.h
AgeCommit message (Collapse)Author
2005-10-12[NETPOLL]: wrong return for null netpoll_poll_lock()Ben Dooks
When netpoll is not being used, the macro that defines the removed routing netpoll_poll_lock defines the return as zero, but the real routine returns a `void *` Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-11[NETPOLL]: fix initialization/NAPI raceMatt Mackall
This fixes a race during initialization with the NAPI softirq processing by using an RCU approach. This race was discovered when refill_skbs() was added to the setup code. Signed-off-by: Matt Mackall <mpm@selenic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-11[NETPOLL]: add retry timeoutMatt Mackall
Add limited retry logic to netpoll_send_skb Each time we attempt to send, decrement our per-device retry counter. On every successful send, we reset the counter. We delay 50us between attempts with up to 20000 retries for a total of 1 second. After we've exhausted our retries, subsequent failed attempts will try only once until reset by success. Signed-off-by: Matt Mackall <mpm@selenic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-06-22[NETPOLL]: allow multiple netpoll_clients to register against one interfaceJeff Moyer
This patch provides support for registering multiple netpoll clients to the same network device. Only one of these clients may register an rx_hook, however. In practice, this restriction has not been problematic. It is worth mentioning, though, that the current design can be easily extended to allow for the registration of multiple rx_hooks. The basic idea of the patch is that the rx_np pointer in the netpoll_info structure points to the struct netpoll that has rx_hook filled in. Aside from this one case, there is no need for a pointer from the struct net_device to an individual struct netpoll. A lock is introduced to protect the setting and clearing of the np_rx pointer. The pointer will only be cleared upon netpoll client module removal, and the lock should be uncontested. Signed-off-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-06-22[NETPOLL]: Introduce a netpoll_info structJeff Moyer
This patch introduces a netpoll_info structure, which the struct net_device will now point to instead of pointing to a struct netpoll. The reason for this is two-fold: 1) fields such as the rx_flags, poll_owner, and poll_lock should be maintained per net_device, not per netpoll; and 2) this is a first step in providing support for multiple netpoll clients to register against the same net_device. The struct netpoll is now pointed to by the netpoll_info structure. As such, the previous behaviour of the code is preserved. Signed-off-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-06-22[NETPOLL]: Set poll_owner to -1 before unlocking in netpoll_poll_unlock()Jeff Moyer
This trivial patch moves the assignment of poll_owner to -1 inside of the lock. This fixes a potential SMP race in the code. Signed-off-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-03-22[NETPOLL]: Do not use __smp_processor_id().David S. Miller
It is not necessarily available in all configurations. Signed-off-by: David S. Miller <davem@davemloft.net>
2005-03-22[NETPOLL]: Add optional dropping and queueing supportMatt Mackall
This adds a callback for packets we can't deliver immediately and a helper function for clients to queue such packets to the device post-interrupt. Netconsole is modified to use the queueing function for best-effort delivery. Signed-off-by: Matt Mackall <mpm@selenic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-03-22[NETPOLL]: Fix ->poll() lockingMatt Mackall
Introduce a per-client poll lock and flag. The lock assures we never have more than one caller in dev->poll(). The flag provides recursion avoidance on UP where the lock disappears. Signed-off-by: Matt Mackall <mpm@selenic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-03-22[NETPOLL]: Add netpoll pointer to net_deviceMatt Mackall
Add struct netpoll pointer to struct netdevice Move netpoll rx flags to netpoll struct Stop traversing rx_list and get np pointer from skb->dev->np Remove now unneeded rx_list Signed-off-by: Matt Mackall <mpm@selenic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-03-22[NETPOLL]: Filter inlinesMatt Mackall
Add netpoll rx helpers Move skb_free for rx into __netpoll_rx Signed-off-by: Matt Mackall <mpm@selenic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-01-09[NET]: misc cleanupsAdrian Bunk
The patch below contains the following cleanups: - make needlessly global code static - remove the following unused global functions: - datagram.c: skb_copy_datagram - iovec.c: memcpy_tokerneliovec - remove the following unneeded EXPORT_SYMBOL's: - datagram.c: skb_copy_datagram - dev.c: ing_filter - iovec.c: memcpy_tokerneliovec - netpoll.c: netpoll_send_skb - rtnetlink.c: rtnetlink_dump_ifinfo - sock.c: sock_alloc_send_pskb Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2004-03-15Remove bogus linux/irq.h include that fails build on ARM.Linus Torvalds
Verified to not break anything on x86 either.
2004-01-10[NET] add netpoll APIMatt Mackall