diff options
author | Vlad Yasevich <vladislav.yasevich@hp.com> | 2007-10-24 15:59:16 -0400 |
---|---|---|
committer | Vlad Yasevich <vladislav.yasevich@hp.com> | 2007-11-07 11:39:27 -0500 |
commit | b6157d8e03e1e780660a328f7183bcbfa4a93a19 (patch) | |
tree | cff4da4725b1bb0c5b603dc07204697dd0623ad5 /net/sctp/sm_sideeffect.c | |
parent | f3830ccc2ea503ab37d605f6c313d61423ddd94e (diff) |
SCTP: Fix difference cases of retransmit.
Commit d0ce92910bc04e107b2f3f2048f07e94f570035d broke several retransmit
cases including fast retransmit. The reason is that we should
only delay by rto while doing retranmists as a result of a timeout.
Retransmit as a result of path mtu discover, fast retransmit, or
other evernts that should trigger immidiate retransmissions got broken.
Also, since rto is doubled prior to marking of packets elegable for
retransmission, we never marked correct chunks anyway.
The fix is provide a reason for a given retransmission so that we
can mark chunks appropriately and to save the old rto value to do
comparisons against.
All regressions tests passed with this code.
Spotted by Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Diffstat (limited to 'net/sctp/sm_sideeffect.c')
-rw-r--r-- | net/sctp/sm_sideeffect.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c index bbdc938da86f..78d1a8a49bd0 100644 --- a/net/sctp/sm_sideeffect.c +++ b/net/sctp/sm_sideeffect.c | |||
@@ -453,6 +453,7 @@ static void sctp_do_8_2_transport_strike(struct sctp_association *asoc, | |||
453 | * maximum value discussed in rule C7 above (RTO.max) may be | 453 | * maximum value discussed in rule C7 above (RTO.max) may be |
454 | * used to provide an upper bound to this doubling operation. | 454 | * used to provide an upper bound to this doubling operation. |
455 | */ | 455 | */ |
456 | transport->last_rto = transport->rto; | ||
456 | transport->rto = min((transport->rto * 2), transport->asoc->rto_max); | 457 | transport->rto = min((transport->rto * 2), transport->asoc->rto_max); |
457 | } | 458 | } |
458 | 459 | ||
@@ -1267,6 +1268,12 @@ static int sctp_cmd_interpreter(sctp_event_t event_type, | |||
1267 | sctp_ootb_pkt_free(packet); | 1268 | sctp_ootb_pkt_free(packet); |
1268 | break; | 1269 | break; |
1269 | 1270 | ||
1271 | case SCTP_CMD_T1_RETRAN: | ||
1272 | /* Mark a transport for retransmission. */ | ||
1273 | sctp_retransmit(&asoc->outqueue, cmd->obj.transport, | ||
1274 | SCTP_RTXR_T1_RTX); | ||
1275 | break; | ||
1276 | |||
1270 | case SCTP_CMD_RETRAN: | 1277 | case SCTP_CMD_RETRAN: |
1271 | /* Mark a transport for retransmission. */ | 1278 | /* Mark a transport for retransmission. */ |
1272 | sctp_retransmit(&asoc->outqueue, cmd->obj.transport, | 1279 | sctp_retransmit(&asoc->outqueue, cmd->obj.transport, |
@@ -1393,7 +1400,8 @@ static int sctp_cmd_interpreter(sctp_event_t event_type, | |||
1393 | list_for_each(pos, &asoc->peer.transport_addr_list) { | 1400 | list_for_each(pos, &asoc->peer.transport_addr_list) { |
1394 | t = list_entry(pos, struct sctp_transport, | 1401 | t = list_entry(pos, struct sctp_transport, |
1395 | transports); | 1402 | transports); |
1396 | sctp_retransmit_mark(&asoc->outqueue, t, 0); | 1403 | sctp_retransmit_mark(&asoc->outqueue, t, |
1404 | SCTP_RTXR_T1_RTX); | ||
1397 | } | 1405 | } |
1398 | 1406 | ||
1399 | sctp_add_cmd_sf(commands, | 1407 | sctp_add_cmd_sf(commands, |