diff options
author | Changli Gao <xiaosuo@gmail.com> | 2010-07-10 16:41:55 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-07-12 23:21:46 -0400 |
commit | 7ba42910073f8432934d61a6c08b1023c408fb62 (patch) | |
tree | 4f74648133eaf6cbea26d59c43d34e7153648f5d /include/net | |
parent | 53d3176b282cc105493babb0fef36c8b873f6201 (diff) |
inet, inet6: make tcp_sendmsg() and tcp_sendpage() through inet_sendmsg() and inet_sendpage()
a new boolean flag no_autobind is added to structure proto to avoid the autobind
calls when the protocol is TCP. Then sock_rps_record_flow() is called int the
TCP's sendmsg() and sendpage() pathes.
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
----
include/net/inet_common.h | 4 ++++
include/net/sock.h | 1 +
include/net/tcp.h | 8 ++++----
net/ipv4/af_inet.c | 15 +++++++++------
net/ipv4/tcp.c | 11 +++++------
net/ipv4/tcp_ipv4.c | 3 +++
net/ipv6/af_inet6.c | 8 ++++----
net/ipv6/tcp_ipv6.c | 3 +++
8 files changed, 33 insertions(+), 20 deletions(-)
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/inet_common.h | 4 | ||||
-rw-r--r-- | include/net/sock.h | 1 | ||||
-rw-r--r-- | include/net/tcp.h | 8 |
3 files changed, 9 insertions, 4 deletions
diff --git a/include/net/inet_common.h b/include/net/inet_common.h index 140c1ec9f8a2..22fac9892b16 100644 --- a/include/net/inet_common.h +++ b/include/net/inet_common.h | |||
@@ -21,6 +21,10 @@ extern int inet_dgram_connect(struct socket *sock, struct sockaddr * uaddr, | |||
21 | extern int inet_accept(struct socket *sock, struct socket *newsock, int flags); | 21 | extern int inet_accept(struct socket *sock, struct socket *newsock, int flags); |
22 | extern int inet_sendmsg(struct kiocb *iocb, struct socket *sock, | 22 | extern int inet_sendmsg(struct kiocb *iocb, struct socket *sock, |
23 | struct msghdr *msg, size_t size); | 23 | struct msghdr *msg, size_t size); |
24 | extern ssize_t inet_sendpage(struct socket *sock, struct page *page, int offset, | ||
25 | size_t size, int flags); | ||
26 | extern int inet_recvmsg(struct kiocb *iocb, struct socket *sock, | ||
27 | struct msghdr *msg, size_t size, int flags); | ||
24 | extern int inet_shutdown(struct socket *sock, int how); | 28 | extern int inet_shutdown(struct socket *sock, int how); |
25 | extern int inet_listen(struct socket *sock, int backlog); | 29 | extern int inet_listen(struct socket *sock, int backlog); |
26 | extern void inet_sock_destruct(struct sock *sk); | 30 | extern void inet_sock_destruct(struct sock *sk); |
diff --git a/include/net/sock.h b/include/net/sock.h index 4f26f2f83be9..3100e71f0c3d 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -772,6 +772,7 @@ struct proto { | |||
772 | int *sysctl_wmem; | 772 | int *sysctl_wmem; |
773 | int *sysctl_rmem; | 773 | int *sysctl_rmem; |
774 | int max_header; | 774 | int max_header; |
775 | bool no_autobind; | ||
775 | 776 | ||
776 | struct kmem_cache *slab; | 777 | struct kmem_cache *slab; |
777 | unsigned int obj_size; | 778 | unsigned int obj_size; |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 33ce5242a17a..468b01f01c13 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -304,10 +304,10 @@ extern int tcp_v4_rcv(struct sk_buff *skb); | |||
304 | 304 | ||
305 | extern int tcp_v4_remember_stamp(struct sock *sk); | 305 | extern int tcp_v4_remember_stamp(struct sock *sk); |
306 | extern int tcp_v4_tw_remember_stamp(struct inet_timewait_sock *tw); | 306 | extern int tcp_v4_tw_remember_stamp(struct inet_timewait_sock *tw); |
307 | extern int tcp_sendmsg(struct kiocb *iocb, struct socket *sock, | 307 | extern int tcp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, |
308 | struct msghdr *msg, size_t size); | 308 | size_t size); |
309 | extern ssize_t tcp_sendpage(struct socket *sock, struct page *page, int offset, | 309 | extern int tcp_sendpage(struct sock *sk, struct page *page, int offset, |
310 | size_t size, int flags); | 310 | size_t size, int flags); |
311 | extern int tcp_ioctl(struct sock *sk, int cmd, unsigned long arg); | 311 | extern int tcp_ioctl(struct sock *sk, int cmd, unsigned long arg); |
312 | extern int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, | 312 | extern int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, |
313 | struct tcphdr *th, unsigned len); | 313 | struct tcphdr *th, unsigned len); |