Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 78263
b: refs/heads/master
c: 407ef1d
h: refs/heads/master
i:
  78261: aa1e8aa
  78259: 8b3244b
  78255: f4ef118
v: v3
  • Loading branch information
Ilpo Järvinen authored and David S. Miller committed Jan 28, 2008
1 parent 1d8a4bf commit 8298098
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 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: bce392f3b02755a8c615d4ced3d3b9cb1d9e3648
refs/heads/master: 407ef1de03e87225d75a9bed271f35ea6880f5f1
10 changes: 3 additions & 7 deletions trunk/net/ipv4/tcp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -1118,20 +1118,19 @@ static int tcp_is_sackblock_valid(struct tcp_sock *tp, int is_dsack,
* highest SACK block). Also calculate the lowest snd_nxt among the remaining
* retransmitted skbs to avoid some costly processing per ACKs.
*/
static int tcp_mark_lost_retrans(struct sock *sk)
static void tcp_mark_lost_retrans(struct sock *sk)
{
const struct inet_connection_sock *icsk = inet_csk(sk);
struct tcp_sock *tp = tcp_sk(sk);
struct sk_buff *skb;
int flag = 0;
int cnt = 0;
u32 new_low_seq = tp->snd_nxt;
u32 received_upto = TCP_SKB_CB(tp->highest_sack)->end_seq;

if (!tcp_is_fack(tp) || !tp->retrans_out ||
!after(received_upto, tp->lost_retrans_low) ||
icsk->icsk_ca_state != TCP_CA_Recovery)
return flag;
return;

tcp_for_write_queue(skb, sk) {
u32 ack_seq = TCP_SKB_CB(skb)->ack_seq;
Expand Down Expand Up @@ -1159,7 +1158,6 @@ static int tcp_mark_lost_retrans(struct sock *sk)
if (!(TCP_SKB_CB(skb)->sacked & (TCPCB_LOST|TCPCB_SACKED_ACKED))) {
tp->lost_out += tcp_skb_pcount(skb);
TCP_SKB_CB(skb)->sacked |= TCPCB_LOST;
flag |= FLAG_DATA_SACKED;
}
NET_INC_STATS_BH(LINUX_MIB_TCPLOSTRETRANSMIT);
} else {
Expand All @@ -1171,8 +1169,6 @@ static int tcp_mark_lost_retrans(struct sock *sk)

if (tp->retrans_out)
tp->lost_retrans_low = new_low_seq;

return flag;
}

static int tcp_check_dsack(struct tcp_sock *tp, struct sk_buff *ack_skb,
Expand Down Expand Up @@ -1603,7 +1599,7 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_
for (j = 0; j < used_sacks; j++)
tp->recv_sack_cache[i++] = sp[j];

flag |= tcp_mark_lost_retrans(sk);
tcp_mark_lost_retrans(sk);

tcp_verify_left_out(tp);

Expand Down

0 comments on commit 8298098

Please sign in to comment.