aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/Kconfig12
-rw-r--r--net/core/skbuff.c4
-rw-r--r--net/core/sock.c6
-rw-r--r--net/core/sysctl_net_core.c10
-rw-r--r--net/ipv4/proc.c1
-rw-r--r--net/socket.c6
6 files changed, 39 insertions, 0 deletions
diff --git a/net/Kconfig b/net/Kconfig
index 523e43e6da1b..d6a9ce6e1800 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -243,6 +243,18 @@ config NETPRIO_CGROUP
243 Cgroup subsystem for use in assigning processes to network priorities on 243 Cgroup subsystem for use in assigning processes to network priorities on
244 a per-interface basis 244 a per-interface basis
245 245
246config NET_LL_RX_POLL
247 bool "Low Latency Receive Poll"
248 depends on X86_TSC
249 default n
250 ---help---
251 Support Low Latency Receive Queue Poll.
252 (For network card drivers which support this option.)
253 When waiting for data in read or poll call directly into the the device driver
254 to flush packets which may be pending on the device queues into the stack.
255
256 If unsure, say N.
257
246config BQL 258config BQL
247 boolean 259 boolean
248 depends on SYSFS 260 depends on SYSFS
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 73f57a0e1523..4a4181e16c1a 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -733,6 +733,10 @@ static void __copy_skb_header(struct sk_buff *new, const struct sk_buff *old)
733 new->vlan_tci = old->vlan_tci; 733 new->vlan_tci = old->vlan_tci;
734 734
735 skb_copy_secmark(new, old); 735 skb_copy_secmark(new, old);
736
737#ifdef CONFIG_NET_LL_RX_POLL
738 new->napi_id = old->napi_id;
739#endif
736} 740}
737 741
738/* 742/*
diff --git a/net/core/sock.c b/net/core/sock.c
index 88868a9d21da..788c0da5eed1 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -139,6 +139,8 @@
139#include <net/tcp.h> 139#include <net/tcp.h>
140#endif 140#endif
141 141
142#include <net/ll_poll.h>
143
142static DEFINE_MUTEX(proto_list_mutex); 144static DEFINE_MUTEX(proto_list_mutex);
143static LIST_HEAD(proto_list); 145static LIST_HEAD(proto_list);
144 146
@@ -2284,6 +2286,10 @@ void sock_init_data(struct socket *sock, struct sock *sk)
2284 2286
2285 sk->sk_stamp = ktime_set(-1L, 0); 2287 sk->sk_stamp = ktime_set(-1L, 0);
2286 2288
2289#ifdef CONFIG_NET_LL_RX_POLL
2290 sk->sk_napi_id = 0;
2291#endif
2292
2287 /* 2293 /*
2288 * Before updating sk_refcnt, we must commit prior changes to memory 2294 * Before updating sk_refcnt, we must commit prior changes to memory
2289 * (Documentation/RCU/rculist_nulls.txt for details) 2295 * (Documentation/RCU/rculist_nulls.txt for details)
diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c
index 741db5fc7806..4b48f39582b0 100644
--- a/net/core/sysctl_net_core.c
+++ b/net/core/sysctl_net_core.c
@@ -19,6 +19,7 @@
19#include <net/ip.h> 19#include <net/ip.h>
20#include <net/sock.h> 20#include <net/sock.h>
21#include <net/net_ratelimit.h> 21#include <net/net_ratelimit.h>
22#include <net/ll_poll.h>
22 23
23static int one = 1; 24static int one = 1;
24 25
@@ -284,6 +285,15 @@ static struct ctl_table net_core_table[] = {
284 .proc_handler = flow_limit_table_len_sysctl 285 .proc_handler = flow_limit_table_len_sysctl
285 }, 286 },
286#endif /* CONFIG_NET_FLOW_LIMIT */ 287#endif /* CONFIG_NET_FLOW_LIMIT */
288#ifdef CONFIG_NET_LL_RX_POLL
289 {
290 .procname = "low_latency_poll",
291 .data = &sysctl_net_ll_poll,
292 .maxlen = sizeof(unsigned long),
293 .mode = 0644,
294 .proc_handler = proc_doulongvec_minmax
295 },
296#endif
287#endif /* CONFIG_NET */ 297#endif /* CONFIG_NET */
288 { 298 {
289 .procname = "netdev_budget", 299 .procname = "netdev_budget",
diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c
index 2a5bf86d2415..6577a1149a47 100644
--- a/net/ipv4/proc.c
+++ b/net/ipv4/proc.c
@@ -273,6 +273,7 @@ static const struct snmp_mib snmp4_net_list[] = {
273 SNMP_MIB_ITEM("TCPFastOpenListenOverflow", LINUX_MIB_TCPFASTOPENLISTENOVERFLOW), 273 SNMP_MIB_ITEM("TCPFastOpenListenOverflow", LINUX_MIB_TCPFASTOPENLISTENOVERFLOW),
274 SNMP_MIB_ITEM("TCPFastOpenCookieReqd", LINUX_MIB_TCPFASTOPENCOOKIEREQD), 274 SNMP_MIB_ITEM("TCPFastOpenCookieReqd", LINUX_MIB_TCPFASTOPENCOOKIEREQD),
275 SNMP_MIB_ITEM("TCPSpuriousRtxHostQueues", LINUX_MIB_TCPSPURIOUS_RTX_HOSTQUEUES), 275 SNMP_MIB_ITEM("TCPSpuriousRtxHostQueues", LINUX_MIB_TCPSPURIOUS_RTX_HOSTQUEUES),
276 SNMP_MIB_ITEM("LowLatencyRxPackets", LINUX_MIB_LOWLATENCYRXPACKETS),
276 SNMP_MIB_SENTINEL 277 SNMP_MIB_SENTINEL
277}; 278};
278 279
diff --git a/net/socket.c b/net/socket.c
index 3ebdcb805c51..21fd29f63ed2 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -104,6 +104,12 @@
104#include <linux/route.h> 104#include <linux/route.h>
105#include <linux/sockios.h> 105#include <linux/sockios.h>
106#include <linux/atalk.h> 106#include <linux/atalk.h>
107#include <net/ll_poll.h>
108
109#ifdef CONFIG_NET_LL_RX_POLL
110unsigned long sysctl_net_ll_poll __read_mostly;
111EXPORT_SYMBOL_GPL(sysctl_net_ll_poll);
112#endif
107 113
108static int sock_no_open(struct inode *irrelevant, struct file *dontcare); 114static int sock_no_open(struct inode *irrelevant, struct file *dontcare);
109static ssize_t sock_aio_read(struct kiocb *iocb, const struct iovec *iov, 115static ssize_t sock_aio_read(struct kiocb *iocb, const struct iovec *iov,