diff options
author | Pavel Emelyanov <xemul@parallels.com> | 2012-05-10 01:49:41 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-10 23:24:35 -0400 |
commit | 292e8d8c853889140ed77b7b37c66979b13080ae (patch) | |
tree | 7b5c1e110d68904277826e13c9daed638fef618d /net/ipv4/tcp.c | |
parent | 74e04aca1abb8d697ca88e472a2d08dfbe19a0e1 (diff) | |
download | op-kernel-dev-292e8d8c853889140ed77b7b37c66979b13080ae.zip op-kernel-dev-292e8d8c853889140ed77b7b37c66979b13080ae.tar.gz |
tcp: Move rcvq sending to tcp_input.c
It actually works on the input queue and will use its read mem
routines, thus it's better to have in in the tcp_input.c file.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 5654062..86e2cf2 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -978,39 +978,6 @@ static inline int select_size(const struct sock *sk, bool sg) return tmp; } -static int tcp_send_rcvq(struct sock *sk, struct msghdr *msg, size_t size) -{ - struct sk_buff *skb; - struct tcphdr *th; - bool fragstolen; - - skb = alloc_skb(size + sizeof(*th), sk->sk_allocation); - if (!skb) - goto err; - - th = (struct tcphdr *)skb_put(skb, sizeof(*th)); - skb_reset_transport_header(skb); - memset(th, 0, sizeof(*th)); - - if (memcpy_fromiovec(skb_put(skb, size), msg->msg_iov, size)) - goto err_free; - - TCP_SKB_CB(skb)->seq = tcp_sk(sk)->rcv_nxt; - TCP_SKB_CB(skb)->end_seq = TCP_SKB_CB(skb)->seq + size; - TCP_SKB_CB(skb)->ack_seq = tcp_sk(sk)->snd_una - 1; - - if (tcp_queue_rcv(sk, skb, sizeof(*th), &fragstolen)) { - WARN_ON_ONCE(fragstolen); /* should not happen */ - __kfree_skb(skb); - } - return size; - -err_free: - kfree_skb(skb); -err: - return -ENOMEM; -} - int tcp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t size) { |