diff options
Diffstat (limited to 'include/linux/netpoll.h')
-rw-r--r-- | include/linux/netpoll.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h index e38d3c9dccda..2524267210d3 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h | |||
@@ -18,7 +18,7 @@ struct netpoll { | |||
18 | const char *name; | 18 | const char *name; |
19 | void (*rx_hook)(struct netpoll *, int, char *, int); | 19 | void (*rx_hook)(struct netpoll *, int, char *, int); |
20 | 20 | ||
21 | u32 local_ip, remote_ip; | 21 | __be32 local_ip, remote_ip; |
22 | u16 local_port, remote_port; | 22 | u16 local_port, remote_port; |
23 | u8 remote_mac[ETH_ALEN]; | 23 | u8 remote_mac[ETH_ALEN]; |
24 | }; | 24 | }; |
@@ -63,6 +63,13 @@ static inline int netpoll_rx(struct sk_buff *skb) | |||
63 | return ret; | 63 | return ret; |
64 | } | 64 | } |
65 | 65 | ||
66 | static inline int netpoll_rx_on(struct sk_buff *skb) | ||
67 | { | ||
68 | struct netpoll_info *npinfo = skb->dev->npinfo; | ||
69 | |||
70 | return npinfo && (npinfo->rx_np || npinfo->rx_flags); | ||
71 | } | ||
72 | |||
66 | static inline int netpoll_receive_skb(struct sk_buff *skb) | 73 | static inline int netpoll_receive_skb(struct sk_buff *skb) |
67 | { | 74 | { |
68 | if (!list_empty(&skb->dev->napi_list)) | 75 | if (!list_empty(&skb->dev->napi_list)) |
@@ -99,6 +106,10 @@ static inline int netpoll_rx(struct sk_buff *skb) | |||
99 | { | 106 | { |
100 | return 0; | 107 | return 0; |
101 | } | 108 | } |
109 | static inline int netpoll_rx_on(struct sk_buff *skb) | ||
110 | { | ||
111 | return 0; | ||
112 | } | ||
102 | static inline int netpoll_receive_skb(struct sk_buff *skb) | 113 | static inline int netpoll_receive_skb(struct sk_buff *skb) |
103 | { | 114 | { |
104 | return 0; | 115 | return 0; |