aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_input.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r--net/ipv4/tcp_input.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 7a027dec649b..6ac274249961 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -1574,9 +1574,7 @@ static struct sk_buff *tcp_sacktag_walk(struct sk_buff *skb, struct sock *sk,
1574 return skb; 1574 return skb;
1575} 1575}
1576 1576
1577static struct sk_buff *tcp_sacktag_bsearch(struct sock *sk, 1577static struct sk_buff *tcp_sacktag_bsearch(struct sock *sk, u32 seq)
1578 struct tcp_sacktag_state *state,
1579 u32 seq)
1580{ 1578{
1581 struct rb_node *parent, **p = &sk->tcp_rtx_queue.rb_node; 1579 struct rb_node *parent, **p = &sk->tcp_rtx_queue.rb_node;
1582 struct sk_buff *skb; 1580 struct sk_buff *skb;
@@ -1598,13 +1596,12 @@ static struct sk_buff *tcp_sacktag_bsearch(struct sock *sk,
1598} 1596}
1599 1597
1600static struct sk_buff *tcp_sacktag_skip(struct sk_buff *skb, struct sock *sk, 1598static struct sk_buff *tcp_sacktag_skip(struct sk_buff *skb, struct sock *sk,
1601 struct tcp_sacktag_state *state,
1602 u32 skip_to_seq) 1599 u32 skip_to_seq)
1603{ 1600{
1604 if (skb && after(TCP_SKB_CB(skb)->seq, skip_to_seq)) 1601 if (skb && after(TCP_SKB_CB(skb)->seq, skip_to_seq))
1605 return skb; 1602 return skb;
1606 1603
1607 return tcp_sacktag_bsearch(sk, state, skip_to_seq); 1604 return tcp_sacktag_bsearch(sk, skip_to_seq);
1608} 1605}
1609 1606
1610static struct sk_buff *tcp_maybe_skipping_dsack(struct sk_buff *skb, 1607static struct sk_buff *tcp_maybe_skipping_dsack(struct sk_buff *skb,
@@ -1617,7 +1614,7 @@ static struct sk_buff *tcp_maybe_skipping_dsack(struct sk_buff *skb,
1617 return skb; 1614 return skb;
1618 1615
1619 if (before(next_dup->start_seq, skip_to_seq)) { 1616 if (before(next_dup->start_seq, skip_to_seq)) {
1620 skb = tcp_sacktag_skip(skb, sk, state, next_dup->start_seq); 1617 skb = tcp_sacktag_skip(skb, sk, next_dup->start_seq);
1621 skb = tcp_sacktag_walk(skb, sk, NULL, state, 1618 skb = tcp_sacktag_walk(skb, sk, NULL, state,
1622 next_dup->start_seq, next_dup->end_seq, 1619 next_dup->start_seq, next_dup->end_seq,
1623 1); 1620 1);
@@ -1758,8 +1755,7 @@ tcp_sacktag_write_queue(struct sock *sk, const struct sk_buff *ack_skb,
1758 1755
1759 /* Head todo? */ 1756 /* Head todo? */
1760 if (before(start_seq, cache->start_seq)) { 1757 if (before(start_seq, cache->start_seq)) {
1761 skb = tcp_sacktag_skip(skb, sk, state, 1758 skb = tcp_sacktag_skip(skb, sk, start_seq);
1762 start_seq);
1763 skb = tcp_sacktag_walk(skb, sk, next_dup, 1759 skb = tcp_sacktag_walk(skb, sk, next_dup,
1764 state, 1760 state,
1765 start_seq, 1761 start_seq,
@@ -1785,7 +1781,7 @@ tcp_sacktag_write_queue(struct sock *sk, const struct sk_buff *ack_skb,
1785 goto walk; 1781 goto walk;
1786 } 1782 }
1787 1783
1788 skb = tcp_sacktag_skip(skb, sk, state, cache->end_seq); 1784 skb = tcp_sacktag_skip(skb, sk, cache->end_seq);
1789 /* Check overlap against next cached too (past this one already) */ 1785 /* Check overlap against next cached too (past this one already) */
1790 cache++; 1786 cache++;
1791 continue; 1787 continue;
@@ -1796,7 +1792,7 @@ tcp_sacktag_write_queue(struct sock *sk, const struct sk_buff *ack_skb,
1796 if (!skb) 1792 if (!skb)
1797 break; 1793 break;
1798 } 1794 }
1799 skb = tcp_sacktag_skip(skb, sk, state, start_seq); 1795 skb = tcp_sacktag_skip(skb, sk, start_seq);
1800 1796
1801walk: 1797walk:
1802 skb = tcp_sacktag_walk(skb, sk, next_dup, state, 1798 skb = tcp_sacktag_walk(skb, sk, next_dup, state,