diff options
author | Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> | 2009-02-27 23:44:32 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-02 06:00:11 -0500 |
commit | d0af4160d19ff2849386140881e729f9ba86f2aa (patch) | |
tree | d9582acc750f249839602316a129eddb59e21acb /net/ipv4/tcp_input.c | |
parent | 02276f3c962fd408fa9d441251067845f948bfcf (diff) |
tcp: remove redundant code from tcp_mark_lost_retrans
Arnd Hannemann <hannemann@nets.rwth-aachen.de> noticed and was
puzzled by the fact that !tcp_is_fack(tp) leads to early return
near the beginning and the later on tcp_is_fack(tp) was still
used in an if condition. The later check was a left-over from
RFC3517 SACK stuff (== !tcp_is_fack(tp) behavior nowadays) as
there wasn't clear way how to handle this particular check
cheaply in the spirit of RFC3517 (using only SACK blocks, not
holes + SACK blocks as with FACK). I sort of left it there as
a reminder but since it's confusing other people just remove
it and comment the missing-feature stuff instead.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Cc: Arnd Hannemann <hannemann@nets.rwth-aachen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 3f2f09091bcf..125b4517f368 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -1178,10 +1178,18 @@ static void tcp_mark_lost_retrans(struct sock *sk) | |||
1178 | if (!(TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_RETRANS)) | 1178 | if (!(TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_RETRANS)) |
1179 | continue; | 1179 | continue; |
1180 | 1180 | ||
1181 | if (after(received_upto, ack_seq) && | 1181 | /* TODO: We would like to get rid of tcp_is_fack(tp) only |
1182 | (tcp_is_fack(tp) || | 1182 | * constraint here (see above) but figuring out that at |
1183 | !before(received_upto, | 1183 | * least tp->reordering SACK blocks reside between ack_seq |
1184 | ack_seq + tp->reordering * tp->mss_cache))) { | 1184 | * and received_upto is not easy task to do cheaply with |
1185 | * the available datastructures. | ||
1186 | * | ||
1187 | * Whether FACK should check here for tp->reordering segs | ||
1188 | * in-between one could argue for either way (it would be | ||
1189 | * rather simple to implement as we could count fack_count | ||
1190 | * during the walk and do tp->fackets_out - fack_count). | ||
1191 | */ | ||
1192 | if (after(received_upto, ack_seq)) { | ||
1185 | TCP_SKB_CB(skb)->sacked &= ~TCPCB_SACKED_RETRANS; | 1193 | TCP_SKB_CB(skb)->sacked &= ~TCPCB_SACKED_RETRANS; |
1186 | tp->retrans_out -= tcp_skb_pcount(skb); | 1194 | tp->retrans_out -= tcp_skb_pcount(skb); |
1187 | 1195 | ||