summaryrefslogtreecommitdiffstats
path: root/include/linux/netpoll.h
diff options
context:
space:
mode:
authorEric W. Biederman2014-03-15 04:49:43 +0100
committerDavid S. Miller2014-03-17 20:47:22 +0100
commitad8d475244b4112a0f5331e78d043d3a4c9eb37e (patch)
tree6b0f8bee145b6fda7f60fa4aecb223a00774fd4e /include/linux/netpoll.h
parentnetpoll: Don't drop all received packets. (diff)
downloadkernel-qcow2-linux-ad8d475244b4112a0f5331e78d043d3a4c9eb37e.tar.gz
kernel-qcow2-linux-ad8d475244b4112a0f5331e78d043d3a4c9eb37e.tar.xz
kernel-qcow2-linux-ad8d475244b4112a0f5331e78d043d3a4c9eb37e.zip
netpoll: Move netpoll_trap under CONFIG_NETPOLL_TRAP
Now that we no longer need to receive packets to safely drain the network drivers receive queue move netpoll_trap and netpoll_set_trap under CONFIG_NETPOLL_TRAP Making netpoll_trap and netpoll_set_trap noop inline functions when CONFIG_NETPOLL_TRAP is not set. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netpoll.h')
-rw-r--r--include/linux/netpoll.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h
index 154f9776056c..ab9aaaff8d04 100644
--- a/include/linux/netpoll.h
+++ b/include/linux/netpoll.h
@@ -65,8 +65,6 @@ void netpoll_print_options(struct netpoll *np);
int netpoll_parse_options(struct netpoll *np, char *opt);
int __netpoll_setup(struct netpoll *np, struct net_device *ndev, gfp_t gfp);
int netpoll_setup(struct netpoll *np);
-int netpoll_trap(void);
-void netpoll_set_trap(int trap);
void __netpoll_cleanup(struct netpoll *np);
void __netpoll_free_async(struct netpoll *np);
void netpoll_cleanup(struct netpoll *np);
@@ -82,11 +80,20 @@ static inline void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb)
}
#ifdef CONFIG_NETPOLL_TRAP
+int netpoll_trap(void);
+void netpoll_set_trap(int trap);
static inline bool netpoll_rx_processing(struct netpoll_info *npinfo)
{
return !list_empty(&npinfo->rx_np);
}
#else
+static inline int netpoll_trap(void)
+{
+ return 0;
+}
+static inline void netpoll_set_trap(int trap)
+{
+}
static inline bool netpoll_rx_processing(struct netpoll_info *npinfo)
{
return false;