diff options
author | Vlad Yasevich <vladislav.yasevich@hp.com> | 2010-04-30 22:41:09 -0400 |
---|---|---|
committer | Vlad Yasevich <vladislav.yasevich@hp.com> | 2010-04-30 22:41:09 -0400 |
commit | ae19c54866450f6c6f79223ca7d37965859a54e1 (patch) | |
tree | 4da39a450974841532148b15b15de182c8e40dac /net/sctp/output.c | |
parent | d598b166ced20d9b9281ea3527c0e18405ddb803 (diff) |
sctp: remove 'resent' bit from the chunk
The 'resent' bit is used to make sure that we don't update
rto estimate based on retransmitted chunks. However, we already
have the 'rto_pending' bit that we test when need to update rto,
so 'resent' bit is just extra. Additionally, we currently have
a bug in that we always set a 'resent' bit and thus rto estimate
is only updated by Heartbeats.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Diffstat (limited to 'net/sctp/output.c')
-rw-r--r-- | net/sctp/output.c | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/net/sctp/output.c b/net/sctp/output.c index fad261d41ec2..35e49b9df4e0 100644 --- a/net/sctp/output.c +++ b/net/sctp/output.c | |||
@@ -429,24 +429,17 @@ int sctp_packet_transmit(struct sctp_packet *packet) | |||
429 | list_for_each_entry_safe(chunk, tmp, &packet->chunk_list, list) { | 429 | list_for_each_entry_safe(chunk, tmp, &packet->chunk_list, list) { |
430 | list_del_init(&chunk->list); | 430 | list_del_init(&chunk->list); |
431 | if (sctp_chunk_is_data(chunk)) { | 431 | if (sctp_chunk_is_data(chunk)) { |
432 | /* 6.3.1 C4) When data is in flight and when allowed | ||
433 | * by rule C5, a new RTT measurement MUST be made each | ||
434 | * round trip. Furthermore, new RTT measurements | ||
435 | * SHOULD be made no more than once per round-trip | ||
436 | * for a given destination transport address. | ||
437 | */ | ||
432 | 438 | ||
433 | if (!chunk->resent) { | 439 | if (!tp->rto_pending) { |
434 | 440 | chunk->rtt_in_progress = 1; | |
435 | /* 6.3.1 C4) When data is in flight and when allowed | 441 | tp->rto_pending = 1; |
436 | * by rule C5, a new RTT measurement MUST be made each | ||
437 | * round trip. Furthermore, new RTT measurements | ||
438 | * SHOULD be made no more than once per round-trip | ||
439 | * for a given destination transport address. | ||
440 | */ | ||
441 | |||
442 | if (!tp->rto_pending) { | ||
443 | chunk->rtt_in_progress = 1; | ||
444 | tp->rto_pending = 1; | ||
445 | } | ||
446 | } | 442 | } |
447 | |||
448 | chunk->resent = 1; | ||
449 | |||
450 | has_data = 1; | 443 | has_data = 1; |
451 | } | 444 | } |
452 | 445 | ||