linux-sctp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luo Chunbo <chunbo.luo@windriver.com>
To: Vlad Yasevich <vladislav.yasevich@hp.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, linux-sctp@vger.kernel.org
Subject: Re: [PATCH 2/2] sctp: fix heartbeat count of path failure
Date: Thu, 20 Aug 2009 01:36:04 +0000	[thread overview]
Message-ID: <1250732164.6436.9.camel@pek-cluo-desktop> (raw)
In-Reply-To: <4A8C10BB.2040804@hp.com>

On Wed, 2009-08-19 at 10:48 -0400, Vlad Yasevich wrote:
> Chunbo Luo wrote:
> > RFC4960 Section 8.2 defined that the transport should enter INACTIVE
> > state only when the value in the error counter exceeds the protocol 
> > parameter 'Path.Max.Retrans' of that destination address. This means 
> > that the transport should enter INACTIVE state after pathmaxrxt+1
> > heartbeats are not acknowledged.
> > 
> > 
> > Signed-off-by: Chunbo Luo <chunbo.luo@windriver.com>
> 
> NAK.  This patch seems to resurface periodically and I have to keep
> explaining that it's wrong.
> 
> Every time we send a HB, we tick up the error count and clear it when
> the HB-ACK is received.  Each HB is separate and not a retransmission,
> so we once we reach the pathmaxrxt, we've already sent max+1 HB, so we
> have time out.  Walk through the code with some values and you'll see
> what I mean.

Although we've already sent max+1 HB, but the code set the transport to
INACTIVE state immediately, which is equal to not sending the max+1 HB
at all.  We should wait for a next period and make sure the max+1 HB was
not acknowledged.

Chunbo 

> 
> -vlad
> 
> > ---
> >  net/sctp/sm_sideeffect.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c
> > index 86426aa..0e2e269 100644
> > --- a/net/sctp/sm_sideeffect.c
> > +++ b/net/sctp/sm_sideeffect.c
> > @@ -447,7 +447,7 @@ static void sctp_do_8_2_transport_strike(struct sctp_association *asoc,
> >  		asoc->overall_error_count++;
> >  
> >  	if (transport->state != SCTP_INACTIVE &&
> > -	    (transport->error_count++ >= transport->pathmaxrxt)) {
> > +	    (transport->error_count++ > transport->pathmaxrxt)) {
> >  		SCTP_DEBUG_PRINTK_IPADDR("transport_strike:association %p",
> >  					 " transport IP: port:%d failed.\n",
> >  					 asoc,
> 

  reply	other threads:[~2009-08-20  1:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-19  7:01 [PATCH 1/2] sctp: fix heartbeat count of association failure Chunbo Luo
2009-08-19  7:01 ` [PATCH 2/2] sctp: fix heartbeat count of path failure Chunbo Luo
2009-08-19 14:48   ` Vlad Yasevich
2009-08-20  1:36     ` Luo Chunbo [this message]
2009-08-20 14:10       ` 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=1250732164.6436.9.camel@pek-cluo-desktop \
    --to=chunbo.luo@windriver.com \
    --cc=davem@davemloft.net \
    --cc=linux-sctp@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vladislav.yasevich@hp.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).