aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-07-13 20:42:22 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-13 20:42:22 -0400
commitbe9c6d9169705504296bdb42ffec8f406691d99f (patch)
tree60e25d5f33f80a1c09476e770b89ca4661f2e944 /include
parent03ce3ca4b02bfc1e6567a7851ae231ad3cc9418e (diff)
parent307f2fb95e9b96b3577916e73d92e104f8f26494 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: "Just a bunch of small fixes and tidy ups: 1) Finish the "busy_poll" renames, from Eliezer Tamir. 2) Fix RCU stalls in IFB driver, from Ding Tianhong. 3) Linearize buffers properly in tun/macvtap zerocopy code. 4) Don't crash on rmmod in vxlan, from Pravin B Shelar. 5) Spinlock used before init in alx driver, from Maarten Lankhorst. 6) A sparse warning fix in bnx2x broke TSO checksums, fix from Dmitry Kravkov. 7) Dummy and ifb driver load failure paths can oops, fixes from Tan Xiaojun and Ding Tianhong. 8) Correct MTU calculations in IP tunnels, from Alexander Duyck. 9) Account all TCP retransmits in SNMP stats properly, from Yuchung Cheng. 10) atl1e and via-rhine do not handle DMA mapping failures properly, from Neil Horman. 11) Various equal-cost multipath route fixes in ipv6 from Hannes Frederic Sowa" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (36 commits) ipv6: only static routes qualify for equal cost multipathing via-rhine: fix dma mapping errors atl1e: fix dma mapping warnings tcp: account all retransmit failures usb/net/r815x: fix cast to restricted __le32 usb/net/r8152: fix integer overflow in expression net: access page->private by using page_private net: strict_strtoul is obsolete, use kstrtoul instead drivers/net/ieee802154: don't use devm_pinctrl_get_select_default() in probe drivers/net/ethernet/cadence: don't use devm_pinctrl_get_select_default() in probe drivers/net/can/c_can: don't use devm_pinctrl_get_select_default() in probe net/usb: add relative mii functions for r815x net/tipc: use %*phC to dump small buffers in hex form qlcnic: Adding Maintainers. gre: Fix MTU sizing check for gretap tunnels pkt_sched: sch_qfq: remove forward declaration of qfq_update_agg_ts pkt_sched: sch_qfq: improve efficiency of make_eligible gso: Update tunnel segmentation to support Tx checksum offload inet: fix spacing in assignment ifb: fix oops when loading the ifb failed ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/netdevice.h2
-rw-r--r--include/net/busy_poll.h (renamed from include/net/ll_poll.h)30
-rw-r--r--include/uapi/asm-generic/socket.h2
3 files changed, 18 insertions, 16 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index bb82871b8494..0741a1e919a5 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -974,7 +974,7 @@ struct net_device_ops {
974 void (*ndo_netpoll_cleanup)(struct net_device *dev); 974 void (*ndo_netpoll_cleanup)(struct net_device *dev);
975#endif 975#endif
976#ifdef CONFIG_NET_LL_RX_POLL 976#ifdef CONFIG_NET_LL_RX_POLL
977 int (*ndo_ll_poll)(struct napi_struct *dev); 977 int (*ndo_busy_poll)(struct napi_struct *dev);
978#endif 978#endif
979 int (*ndo_set_vf_mac)(struct net_device *dev, 979 int (*ndo_set_vf_mac)(struct net_device *dev,
980 int queue, u8 *mac); 980 int queue, u8 *mac);
diff --git a/include/net/ll_poll.h b/include/net/busy_poll.h
index 76f034087743..a14339c2985f 100644
--- a/include/net/ll_poll.h
+++ b/include/net/busy_poll.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Low Latency Sockets 2 * net busy poll support
3 * Copyright(c) 2013 Intel Corporation. 3 * Copyright(c) 2013 Intel Corporation.
4 * 4 *
5 * This program is free software; you can redistribute it and/or modify it 5 * This program is free software; you can redistribute it and/or modify it
@@ -21,8 +21,8 @@
21 * e1000-devel Mailing List <e1000-devel@lists.sourceforge.net> 21 * e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
22 */ 22 */
23 23
24#ifndef _LINUX_NET_LL_POLL_H 24#ifndef _LINUX_NET_BUSY_POLL_H
25#define _LINUX_NET_LL_POLL_H 25#define _LINUX_NET_BUSY_POLL_H
26 26
27#include <linux/netdevice.h> 27#include <linux/netdevice.h>
28#include <net/ip.h> 28#include <net/ip.h>
@@ -30,8 +30,8 @@
30#ifdef CONFIG_NET_LL_RX_POLL 30#ifdef CONFIG_NET_LL_RX_POLL
31 31
32struct napi_struct; 32struct napi_struct;
33extern unsigned int sysctl_net_ll_read __read_mostly; 33extern unsigned int sysctl_net_busy_read __read_mostly;
34extern unsigned int sysctl_net_ll_poll __read_mostly; 34extern unsigned int sysctl_net_busy_poll __read_mostly;
35 35
36/* return values from ndo_ll_poll */ 36/* return values from ndo_ll_poll */
37#define LL_FLUSH_FAILED -1 37#define LL_FLUSH_FAILED -1
@@ -39,7 +39,7 @@ extern unsigned int sysctl_net_ll_poll __read_mostly;
39 39
40static inline bool net_busy_loop_on(void) 40static inline bool net_busy_loop_on(void)
41{ 41{
42 return sysctl_net_ll_poll; 42 return sysctl_net_busy_poll;
43} 43}
44 44
45/* a wrapper to make debug_smp_processor_id() happy 45/* a wrapper to make debug_smp_processor_id() happy
@@ -72,7 +72,7 @@ static inline unsigned long sk_busy_loop_end_time(struct sock *sk)
72/* in poll/select we use the global sysctl_net_ll_poll value */ 72/* in poll/select we use the global sysctl_net_ll_poll value */
73static inline unsigned long busy_loop_end_time(void) 73static inline unsigned long busy_loop_end_time(void)
74{ 74{
75 return busy_loop_us_clock() + ACCESS_ONCE(sysctl_net_ll_poll); 75 return busy_loop_us_clock() + ACCESS_ONCE(sysctl_net_busy_poll);
76} 76}
77 77
78static inline bool sk_can_busy_loop(struct sock *sk) 78static inline bool sk_can_busy_loop(struct sock *sk)
@@ -110,11 +110,11 @@ static inline bool sk_busy_loop(struct sock *sk, int nonblock)
110 goto out; 110 goto out;
111 111
112 ops = napi->dev->netdev_ops; 112 ops = napi->dev->netdev_ops;
113 if (!ops->ndo_ll_poll) 113 if (!ops->ndo_busy_poll)
114 goto out; 114 goto out;
115 115
116 do { 116 do {
117 rc = ops->ndo_ll_poll(napi); 117 rc = ops->ndo_busy_poll(napi);
118 118
119 if (rc == LL_FLUSH_FAILED) 119 if (rc == LL_FLUSH_FAILED)
120 break; /* permanent failure */ 120 break; /* permanent failure */
@@ -134,13 +134,14 @@ out:
134} 134}
135 135
136/* used in the NIC receive handler to mark the skb */ 136/* used in the NIC receive handler to mark the skb */
137static inline void skb_mark_ll(struct sk_buff *skb, struct napi_struct *napi) 137static inline void skb_mark_napi_id(struct sk_buff *skb,
138 struct napi_struct *napi)
138{ 139{
139 skb->napi_id = napi->napi_id; 140 skb->napi_id = napi->napi_id;
140} 141}
141 142
142/* used in the protocol hanlder to propagate the napi_id to the socket */ 143/* used in the protocol hanlder to propagate the napi_id to the socket */
143static inline void sk_mark_ll(struct sock *sk, struct sk_buff *skb) 144static inline void sk_mark_napi_id(struct sock *sk, struct sk_buff *skb)
144{ 145{
145 sk->sk_napi_id = skb->napi_id; 146 sk->sk_napi_id = skb->napi_id;
146} 147}
@@ -166,11 +167,12 @@ static inline bool sk_busy_poll(struct sock *sk, int nonblock)
166 return false; 167 return false;
167} 168}
168 169
169static inline void skb_mark_ll(struct sk_buff *skb, struct napi_struct *napi) 170static inline void skb_mark_napi_id(struct sk_buff *skb,
171 struct napi_struct *napi)
170{ 172{
171} 173}
172 174
173static inline void sk_mark_ll(struct sock *sk, struct sk_buff *skb) 175static inline void sk_mark_napi_id(struct sock *sk, struct sk_buff *skb)
174{ 176{
175} 177}
176 178
@@ -180,4 +182,4 @@ static inline bool busy_loop_timeout(unsigned long end_time)
180} 182}
181 183
182#endif /* CONFIG_NET_LL_RX_POLL */ 184#endif /* CONFIG_NET_LL_RX_POLL */
183#endif /* _LINUX_NET_LL_POLL_H */ 185#endif /* _LINUX_NET_BUSY_POLL_H */
diff --git a/include/uapi/asm-generic/socket.h b/include/uapi/asm-generic/socket.h
index ca3a20d772ac..f04b69b6abf2 100644
--- a/include/uapi/asm-generic/socket.h
+++ b/include/uapi/asm-generic/socket.h
@@ -76,6 +76,6 @@
76 76
77#define SO_SELECT_ERR_QUEUE 45 77#define SO_SELECT_ERR_QUEUE 45
78 78
79#define SO_LL 46 79#define SO_BUSY_POLL 46
80 80
81#endif /* __ASM_GENERIC_SOCKET_H */ 81#endif /* __ASM_GENERIC_SOCKET_H */