diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2014-03-15 03:49:43 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-03-17 19:47:22 (GMT) |
commit | ad8d475244b4112a0f5331e78d043d3a4c9eb37e (patch) | |
tree | 6b0f8bee145b6fda7f60fa4aecb223a00774fd4e /include | |
parent | b6bacd550c33124ea76291bd84ac42c8d30767eb (diff) | |
download | linux-ad8d475244b4112a0f5331e78d043d3a4c9eb37e.tar.xz |
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')
-rw-r--r-- | include/linux/netpoll.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h index 154f977..ab9aaaf 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; |