busy_poll.h (dfcefb0be1231982784df2152213103ad33c1cfd) busy_poll.h (e0d1095ae3405404d247afb00233ef837d58da83)
1/*
2 * net busy poll support
3 * Copyright(c) 2013 Intel Corporation.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
8 *

--- 13 unchanged lines hidden (view full) ---

22 */
23
24#ifndef _LINUX_NET_BUSY_POLL_H
25#define _LINUX_NET_BUSY_POLL_H
26
27#include <linux/netdevice.h>
28#include <net/ip.h>
29
1/*
2 * net busy poll support
3 * Copyright(c) 2013 Intel Corporation.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
8 *

--- 13 unchanged lines hidden (view full) ---

22 */
23
24#ifndef _LINUX_NET_BUSY_POLL_H
25#define _LINUX_NET_BUSY_POLL_H
26
27#include <linux/netdevice.h>
28#include <net/ip.h>
29
30#ifdef CONFIG_NET_LL_RX_POLL
30#ifdef CONFIG_NET_RX_BUSY_POLL
31
32struct napi_struct;
33extern unsigned int sysctl_net_busy_read __read_mostly;
34extern unsigned int sysctl_net_busy_poll __read_mostly;
35
36/* return values from ndo_ll_poll */
37#define LL_FLUSH_FAILED -1
38#define LL_FLUSH_BUSY -2

--- 102 unchanged lines hidden (view full) ---

141}
142
143/* used in the protocol hanlder to propagate the napi_id to the socket */
144static inline void sk_mark_napi_id(struct sock *sk, struct sk_buff *skb)
145{
146 sk->sk_napi_id = skb->napi_id;
147}
148
31
32struct napi_struct;
33extern unsigned int sysctl_net_busy_read __read_mostly;
34extern unsigned int sysctl_net_busy_poll __read_mostly;
35
36/* return values from ndo_ll_poll */
37#define LL_FLUSH_FAILED -1
38#define LL_FLUSH_BUSY -2

--- 102 unchanged lines hidden (view full) ---

141}
142
143/* used in the protocol hanlder to propagate the napi_id to the socket */
144static inline void sk_mark_napi_id(struct sock *sk, struct sk_buff *skb)
145{
146 sk->sk_napi_id = skb->napi_id;
147}
148
149#else /* CONFIG_NET_LL_RX_POLL */
149#else /* CONFIG_NET_RX_BUSY_POLL */
150static inline unsigned long net_busy_loop_on(void)
151{
152 return 0;
153}
154
155static inline unsigned long busy_loop_end_time(void)
156{
157 return 0;

--- 23 unchanged lines hidden (view full) ---

181 return true;
182}
183
184static inline bool sk_busy_loop(struct sock *sk, int nonblock)
185{
186 return false;
187}
188
150static inline unsigned long net_busy_loop_on(void)
151{
152 return 0;
153}
154
155static inline unsigned long busy_loop_end_time(void)
156{
157 return 0;

--- 23 unchanged lines hidden (view full) ---

181 return true;
182}
183
184static inline bool sk_busy_loop(struct sock *sk, int nonblock)
185{
186 return false;
187}
188
189#endif /* CONFIG_NET_LL_RX_POLL */
189#endif /* CONFIG_NET_RX_BUSY_POLL */
190#endif /* _LINUX_NET_BUSY_POLL_H */
190#endif /* _LINUX_NET_BUSY_POLL_H */