From: Wei Yongjun <yjwei@cn.fujitsu.com>
To: linux-sctp@vger.kernel.org
Subject: Re: [PATCH 4/4] sctp: heartbeats exceed maximum retransmssion limit
Date: Fri, 20 Feb 2009 01:30:46 +0000 [thread overview]
Message-ID: <499E07C6.7000904@cn.fujitsu.com> (raw)
In-Reply-To: <499D2750.7030606@cn.fujitsu.com>
Vlad Yasevich wrote:
> Wei Yongjun wrote:
>
>> The number of HEARTBEAT chunks that an association may transmit is
>> limited by Association.Max.Retrans count; however, the code allows
>> us to send one extra heartbeat.
>>
>> This patch limits the number of heartbeats to the maximum count.
>>
>> Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
>> ---
>> net/sctp/sm_statefuns.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
>> index 3e7f6d2..ac7bf6d 100644
>> --- a/net/sctp/sm_statefuns.c
>> +++ b/net/sctp/sm_statefuns.c
>> @@ -962,7 +962,7 @@ sctp_disposition_t sctp_sf_sendbeat_8_3(const struct sctp_endpoint *ep,
>> {
>> struct sctp_transport *transport = (struct sctp_transport *) arg;
>>
>> - if (asoc->overall_error_count > asoc->max_retrans) {
>> + if (asoc->overall_error_count >= asoc->max_retrans) {
>> sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR,
>> SCTP_ERROR(ETIMEDOUT));
>> /* CMD_ASSOC_FAILED calls CMD_DELETE_TCB. */
>>
>
> Hi Wei
>
> Here is the spec:
>
> The endpoint should increment the respective error counter of the
> destination transport address each time a HEARTBEAT is sent to that
> address and not acknowledged within one RTO.
>
> When the value of this counter reaches the protocol parameter
> 'Path.Max.Retrans', the endpoint should mark the corresponding
> destination address as inactive...
>
> According to this, only unacknowledged HB count as errors. The very
> first HB we sent doest count as an error until the RTO expires. So
> the >= is the correct test here as we are really counting the number
> of timeouts with reacknowledgment.
>
Hi vlad
There are two way to send HB. One is idle-like HB which is send after HB
timer expires, the other is user initiated heartbeat.
Now the user initiated heartbeat is retranmited 10 times after send the
first one, this is correctly. But the timer expires HB is sent 11 times,
which means HB timeout 12 times.
In the [PATCH 3/4], I changed to not inc the overall_error_count when
send the first HB, so the user initiated heartbeat will retranmited 11
times.
If you disagree with the [PATCH 3/4], this patch need update.
Regards.
next prev parent reply other threads:[~2009-02-20 1:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-19 9:33 [PATCH 4/4] sctp: heartbeats exceed maximum retransmssion limit Wei Yongjun
2009-02-19 13:56 ` Vlad Yasevich
2009-02-20 1:30 ` Wei Yongjun [this message]
2009-02-20 2:34 ` Vlad Yasevich
2009-02-20 3:25 ` Wei Yongjun
2009-02-20 14:39 ` 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=499E07C6.7000904@cn.fujitsu.com \
--to=yjwei@cn.fujitsu.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.