summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2012-06-03 19:50:43 +0000
committerDavid S. Miller <davem@davemloft.net>2012-06-04 11:27:39 -0400
commit90ba9b1986b5ac4b2d184575847147ea7c4280a2 (patch)
tree462289c5795f500049b83c2ccd96fa6b1586565e /net
parentf8f5701bdaf9134b1f90e5044a82c66324d2073f (diff)
downloadlinux-3.10-90ba9b1986b5ac4b2d184575847147ea7c4280a2.tar.gz
linux-3.10-90ba9b1986b5ac4b2d184575847147ea7c4280a2.tar.bz2
linux-3.10-90ba9b1986b5ac4b2d184575847147ea7c4280a2.zip
tcp: tcp_make_synack() can use alloc_skb()
There is no value using sock_wmalloc() in tcp_make_synack(). A listener socket only sends SYNACK packets, they are not queued in a socket queue, only in Qdisc and device layers, so the number of in flight packets is limited in these layers. We used sock_wmalloc() with the %force parameter set to 1 to ignore socket limits anyway. This patch removes two atomic operations per SYNACK packet. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/tcp_output.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 803cbfe82fb..f0b0e4414b0 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -2461,7 +2461,7 @@ struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst,
if (cvp != NULL && cvp->s_data_constant && cvp->s_data_desired)
s_data_desired = cvp->s_data_desired;
- skb = sock_wmalloc(sk, MAX_TCP_HEADER + 15 + s_data_desired, 1, GFP_ATOMIC);
+ skb = alloc_skb(MAX_TCP_HEADER + 15 + s_data_desired, GFP_ATOMIC);
if (skb == NULL)
return NULL;