Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 291595
b: refs/heads/master
c: c862815
h: refs/heads/master
i:
  291593: f15ca6c
  291591: da7098b
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Mar 19, 2012
1 parent 764772b commit 9387d57
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e86b291962cbf477e35d983d312428cf737bc0f8
refs/heads/master: c8628155ece363487b57d33441ea0359018c0fa7
1 change: 1 addition & 0 deletions trunk/include/linux/snmp.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ enum
LINUX_MIB_TCPREQQFULLDOCOOKIES, /* TCPReqQFullDoCookies */
LINUX_MIB_TCPREQQFULLDROP, /* TCPReqQFullDrop */
LINUX_MIB_TCPRETRANSFAIL, /* TCPRetransFail */
LINUX_MIB_TCPRCVCOALESCE, /* TCPRcvCoalesce */
__LINUX_MIB_MAX
};

Expand Down
1 change: 1 addition & 0 deletions trunk/net/ipv4/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ static const struct snmp_mib snmp4_net_list[] = {
SNMP_MIB_ITEM("TCPReqQFullDoCookies", LINUX_MIB_TCPREQQFULLDOCOOKIES),
SNMP_MIB_ITEM("TCPReqQFullDrop", LINUX_MIB_TCPREQQFULLDROP),
SNMP_MIB_ITEM("TCPRetransFail", LINUX_MIB_TCPRETRANSFAIL),
SNMP_MIB_ITEM("TCPRcvCoalesce", LINUX_MIB_TCPRCVCOALESCE),
SNMP_MIB_SENTINEL
};

Expand Down
19 changes: 18 additions & 1 deletion trunk/net/ipv4/tcp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -4484,7 +4484,24 @@ static void tcp_data_queue_ofo(struct sock *sk, struct sk_buff *skb)
end_seq = TCP_SKB_CB(skb)->end_seq;

if (seq == TCP_SKB_CB(skb1)->end_seq) {
__skb_queue_after(&tp->out_of_order_queue, skb1, skb);
/* Packets in ofo can stay in queue a long time.
* Better try to coalesce them right now
* to avoid future tcp_collapse_ofo_queue(),
* probably the most expensive function in tcp stack.
*/
if (skb->len <= skb_tailroom(skb1) && !tcp_hdr(skb)->fin) {
NET_INC_STATS_BH(sock_net(sk),
LINUX_MIB_TCPRCVCOALESCE);
BUG_ON(skb_copy_bits(skb, 0,
skb_put(skb1, skb->len),
skb->len));
TCP_SKB_CB(skb1)->end_seq = end_seq;
TCP_SKB_CB(skb1)->ack_seq = TCP_SKB_CB(skb)->ack_seq;
__kfree_skb(skb);
skb = NULL;
} else {
__skb_queue_after(&tp->out_of_order_queue, skb1, skb);
}

if (!tp->rx_opt.num_sacks ||
tp->selective_acks[0].end_seq != seq)
Expand Down

0 comments on commit 9387d57

Please sign in to comment.