aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netpoll.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/netpoll.h')
-rw-r--r--include/linux/netpoll.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h
index 1efe60c5c00c..2cc9867b1626 100644
--- a/include/linux/netpoll.h
+++ b/include/linux/netpoll.h
@@ -12,26 +12,27 @@
12#include <linux/rcupdate.h> 12#include <linux/rcupdate.h>
13#include <linux/list.h> 13#include <linux/list.h>
14 14
15struct netpoll;
16
17struct netpoll { 15struct netpoll {
18 struct net_device *dev; 16 struct net_device *dev;
19 char dev_name[16], *name; 17 char dev_name[IFNAMSIZ];
18 const char *name;
20 void (*rx_hook)(struct netpoll *, int, char *, int); 19 void (*rx_hook)(struct netpoll *, int, char *, int);
21 void (*drop)(struct sk_buff *skb); 20
22 u32 local_ip, remote_ip; 21 u32 local_ip, remote_ip;
23 u16 local_port, remote_port; 22 u16 local_port, remote_port;
24 unsigned char local_mac[6], remote_mac[6]; 23 u8 local_mac[ETH_ALEN], remote_mac[ETH_ALEN];
25}; 24};
26 25
27struct netpoll_info { 26struct netpoll_info {
27 atomic_t refcnt;
28 spinlock_t poll_lock; 28 spinlock_t poll_lock;
29 int poll_owner; 29 int poll_owner;
30 int tries;
31 int rx_flags; 30 int rx_flags;
32 spinlock_t rx_lock; 31 spinlock_t rx_lock;
33 struct netpoll *rx_np; /* netpoll that registered an rx_hook */ 32 struct netpoll *rx_np; /* netpoll that registered an rx_hook */
34 struct sk_buff_head arp_tx; /* list of arp requests to reply to */ 33 struct sk_buff_head arp_tx; /* list of arp requests to reply to */
34 struct sk_buff_head txq;
35 struct work_struct tx_work;
35}; 36};
36 37
37void netpoll_poll(struct netpoll *np); 38void netpoll_poll(struct netpoll *np);
@@ -42,7 +43,7 @@ int netpoll_trap(void);
42void netpoll_set_trap(int trap); 43void netpoll_set_trap(int trap);
43void netpoll_cleanup(struct netpoll *np); 44void netpoll_cleanup(struct netpoll *np);
44int __netpoll_rx(struct sk_buff *skb); 45int __netpoll_rx(struct sk_buff *skb);
45void netpoll_queue(struct sk_buff *skb); 46
46 47
47#ifdef CONFIG_NETPOLL 48#ifdef CONFIG_NETPOLL
48static inline int netpoll_rx(struct sk_buff *skb) 49static inline int netpoll_rx(struct sk_buff *skb)