All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vlad Yasevich <vladislav.yasevich@hp.com>
To: linux-sctp@vger.kernel.org
Subject: Re: [PATCH] sctp: Fix broken RTO-doubling for data retransmits
Date: Fri, 20 Feb 2009 02:43:53 +0000	[thread overview]
Message-ID: <499E18E9.4000205@hp.com> (raw)
In-Reply-To: <1235063487-9470-1-git-send-email-vladislav.yasevich@hp.com>

Vlad Yasevich wrote:
> Wei Yongjun wrote:
>> Vlad Yasevich wrote:
>>> Commit faee47cdbfe8d74a1573c2f81ea6dbb08d735be6
>>> (sctp: Fix the RTO-doubling on idle-link heartbeats)
>>> broke the RTO doubling for data retransmits.  If the
>>> heartbeat was sent before the data T3-rtx time, the
>>> the RTO will not double upon the T3-rtx expiration.
>>> Distingish between the operations by passing an argument
>>> to the function.
>>>   
>> Hi Vlad
>>
>> I think we should talk about what the SCTP_CMD_TRANSPORT_RESET and
>> SCTP_CMD_HB_TIMER_UPDATE command do.
>>
>> SCTP_CMD_TRANSPORT_RESET
>> --> sctp_cmd_transport_reset()
>> --> sctp_transport_lower_cwnd()
>> ... transport->cwnd = XXX if timer expire
>> ... partial_bytes_acked = 0;
>> --> sctp_do_8_2_transport_strike()
>> ... asoc->overall_error_count++;
>> ... transport->rto = XXX if not send HB
>>
>> SCTP_CMD_HB_TIMER_UPDATE
>> --> sctp_cmd_hb_timer_update()
>> ... mod_timer(&t->hb_timer, sctp_transport_timeout(t))
>>
>> In sctp_sf_do_prm_requestheartbeat(), it used
>> SCTP_CMD_TRANSPORT_RESET command, not SCTP_CMD_HB_TIMER_UPDATE,
>> so if user request to send HB, the partial_bytes_acked will be clear,
>> and the overall_error_count be increased.
> 
> I am concerned about partial_bytes_acked, but the error count should be
> increased.
> 
>> And the heartbeat primitive
>> may not send HB, but only mark the transport state to SCTP_INACTIVE.
> 
> How?  Once you reach sctp_sf_do_prm_requestheartbeat, you will either
> send a HB, or error out with NOMEM.  The transport reset happens after
> the HB is sent.
> 
>> We user request to send HB immediately:
>> - the HB timer will be update, so HB will expires after
>> (HB_INTERVAL + RTO +/- 50% * RTO).
>> - the overall_error_count should not be increased. Because this is not
>> a idle-link heartbeat.
> 
> No, the error count should still increase.
> 
>> - the cwnd and partial_bytes_acked should not be changed.
> 
> This is true.  Because the link is not idle, these 2 things shouldn't happen.
> 
> Looks like there is more work to do here.
> 
> -vlad
> 
>> Is this correct?

Oh, forgot to address the state bellow.

>>
>> And after the patch I sent, used SCTP_CMD_HB_TIMER_UPDATE instead of
>> SCTP_CMD_TRANSPORT_RESET command. The action of idle-link heartbeat
>> and user initiated heartbeat are like this.
>>
>> idle-link heartbeat:
>>
>> Endpoint A                      Endpoint B
>>    |
>>    | idle
>>    |
>> HEARTBEAT    ----------->
>>    | lower cwnd
>>    | overall_error_count++
>>    | RTO = RTO * 2

no, in this case, RTO should not be doubled, since we did not have an
outstanding HB that was not acknowleged.

>>    | expires HB_INTERVAL + RTO +/- 50% * RTO
>> HEARTBEAT    ----------->
>>    | lower cwnd
>>    | overall_error_count++
>>    | RTO = RTO * 2
>>    | expires HB_INTERVAL + RTO +/- 50% * RTO

In this case, RTO doubles correctly.

>>
>> user initiated heartbeat
>>
>> Endpoint A                      Endpoint B
>>    |
>>    |
>>    |
>> HEARTBEAT    ----------->     (*) first HB
>>    |
>>    | reset hb_timer, not update RTO

We also need to update the error count.

>>    |
>> HEARTBEAT    ----------->
>>    | lower cwnd
>>    | overall_error_count++
>>    | RTO = RTO * 2
>>    | expires HB_INTERVAL + RTO +/- 50% * RTO

Yes, RTO doubles.

>>
>>
>> The different between two is that only reset the HB timer, the
>> other increased overall_error_count and lower cwnd. I agree with
>> reset the HB timer.
>>

It also needs to count the HB towards the error count.  They have count
the same way as if there was a timeout prior to the first HB sent.

-vlad

  parent reply	other threads:[~2009-02-20  2:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-19 17:11 [PATCH] sctp: Fix broken RTO-doubling for data retransmits Vlad Yasevich
2009-02-20  1:18 ` Wei Yongjun
2009-02-20  2:39 ` Vlad Yasevich
2009-02-20  2:43 ` Vlad Yasevich [this message]
2009-02-23 19:15 ` Vlad Yasevich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=499E18E9.4000205@hp.com \
    --to=vladislav.yasevich@hp.com \
    --cc=linux-sctp@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.