diff options
| author | 2018-04-16 18:26:38 -0400 | |
|---|---|---|
| committer | 2018-04-16 18:26:38 -0400 | |
| commit | 309c446cb45f6663932c8e6d0754f4ac81d1b5cd (patch) | |
| tree | e8eb152424755e887f745634ae6d163b79835e17 /include | |
| parent | tc-testing: add sample action tests (diff) | |
| parent | selftests: net: add tcp_mmap program (diff) | |
Merge branch 'tcp-zero-copy-receive'
Eric Dumazet says:
====================
tcp: add zero copy receive
This patch series add mmap() support to TCP sockets for RX zero copy.
While tcp_mmap() patch itself is quite small (~100 LOC), optimal support
for asynchronous mmap() required better SO_RCVLOWAT behavior, and a
test program to demonstrate how mmap() on TCP sockets can be used.
Note that mmap() (and associated munmap()) calls are adding more
pressure on per-process VM semaphore, so might not show benefit
for processus with high number of threads.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/net.h | 1 | ||||
| -rw-r--r-- | include/net/tcp.h | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/net.h b/include/linux/net.h index 2248a052061d..6554d3ba4396 100644 --- a/include/linux/net.h +++ b/include/linux/net.h @@ -197,6 +197,7 @@ struct proto_ops { int offset, size_t size, int flags); int (*sendmsg_locked)(struct sock *sk, struct msghdr *msg, size_t size); + int (*set_rcvlowat)(struct sock *sk, int val); }; #define DECLARE_SOCKADDR(type, dst, src) \ diff --git a/include/net/tcp.h b/include/net/tcp.h index 9c9b3768b350..833154e3df17 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -402,6 +402,10 @@ void tcp_set_keepalive(struct sock *sk, int val); void tcp_syn_ack_timeout(const struct request_sock *req); int tcp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int nonblock, int flags, int *addr_len); +int tcp_set_rcvlowat(struct sock *sk, int val); +void tcp_data_ready(struct sock *sk); +int tcp_mmap(struct file *file, struct socket *sock, + struct vm_area_struct *vma); void tcp_parse_options(const struct net *net, const struct sk_buff *skb, struct tcp_options_received *opt_rx, int estab, struct tcp_fastopen_cookie *foc); |
