mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Neil Horman <nhorman@tuxdriver.com>
To: Vlad Yasevich <vyasevich@gmail.com>
Cc: Chang Xiangzhong <changxiangzhong@gmail.com>,
	davem@davemloft.net, linux-sctp@vger.kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	dreibh@simula.no, ernstgr@simula.no
Subject: Re: [PATCH] net: sctp: recover a tranport when an ack comes
Date: Fri, 15 Nov 2013 09:56:09 -0500	[thread overview]
Message-ID: <20131115145609.GC29877@hmsreliant.think-freely.org> (raw)
In-Reply-To: <5286291A.7060507@gmail.com>

On Fri, Nov 15, 2013 at 09:00:58AM -0500, Vlad Yasevich wrote:
> On 11/15/2013 07:30 AM, Neil Horman wrote:
> >On Thu, Nov 14, 2013 at 09:34:55PM -0500, Vlad Yasevich wrote:
> >>On 11/14/2013 03:40 PM, Chang Xiangzhong wrote:
> >>>Expected Behavior:
> >>>When hearing an ack from a tranport/path, set its state to normal/on if it's
> >>>in abnormal(__partial_failure__ or inactive) state.
> >>>
> >>>state machine of tranport->state
> >>>Whenever a T3_RTX timer expires, then transport->error_count++.
> >>>When (association->pf_retrans < transport->error_count < tranport->pathmaxrtx)
> >>>	transport->state = SCTP_PF //partial failure
> >>>
> >>>When a heartbeat-ack comes or conventional ack acknowledged its availability,
> >>>	transport->state = SCTP_ON
> >>>
> >>>Signed-off-by: Chang Xiangzhong <changxiangzhong@gmail.com>
> >>>Fixes: 5aa93bcf66f ("sctp: Implement quick failover draft from tsvwg")
> >>
> >>I don't think this is right.  The spec states:
> >>  8.  ACKs for retransmissions do not transition a PF destination back
> >>        to Active state, since a sender cannot disambiguate whether the
> >>        ack was for the original transmission or the retransmission(s).
> >>
> >>
> >>Now, the proper way to this would would be modify
> >>sctp_assoc_control_transport() to transition the transport state to
> >>ACTIVE if it was PF transport that was chosen to send data.
> >>
> >>-vlad
> >>
> >I agree, this patch doesn't agree with the spec, the only time we transition
> >from PF to ACTIVE should be on receipt of ack of new data.
> 
> You mean HB ACK, right?  The 02 spec that see on the ietf site doesn't
> mention anything about transition on SACKs.  Also, there is no way to
> tell right now if the ack is for new or retransmitted data.  We could
> mark chunks that are retransmitted though.
> 
Yes, sorry I wasn't clear, I was speaknig about HB Acks.

> > I'm not even sure if
> >we should allow PF transports to be selected to send new data.  Currently a
> >potentially failed transport will get ignored when specified, and the stack will
> >use the active path in its place.  Only if all transports are PF will a PF
> >transport be chosen.
> 
> Not even that :(.  If all transports are PF, we are going to camp on
> the primary path instead of choosing a PF transport with the lowest
> error count.
> 
Yes, we don't do the smallest error count check, though I have to wonder if
thats really worthwhile.  If all your transports are PF, you're a step away from
a connection reset anyway.
Neil

> -vlad
> 
> >Neil
> >
> >>>---
> >>>  net/sctp/outqueue.c |    1 +
> >>>  1 file changed, 1 insertion(+)
> >>>
> >>>diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c
> >>>index 94df758..2557fa5 100644
> >>>--- a/net/sctp/outqueue.c
> >>>+++ b/net/sctp/outqueue.c
> >>>@@ -1517,6 +1517,7 @@ static void sctp_check_transmitted(struct sctp_outq *q,
> >>>  			 * active if it is not so marked.
> >>>  			 */
> >>>  			if ((transport->state == SCTP_INACTIVE ||
> >>>+			     transport->state == SCTP_PF ||
> >>>  			     transport->state == SCTP_UNCONFIRMED) &&
> >>>  			    sctp_cmp_addr_exact(&transport->ipaddr, saddr)) {
> >>>  				sctp_assoc_control_transport(
> >>>
> >>
> >>
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

  reply	other threads:[~2013-11-15 14:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-14 20:40 Chang Xiangzhong
2013-11-15  2:34 ` Vlad Yasevich
2013-11-15 12:30   ` Neil Horman
2013-11-15 14:00     ` Vlad Yasevich
2013-11-15 14:56       ` Neil Horman [this message]
2013-11-15 19:59         ` Chang
2013-11-15 20:25           ` Neil Horman
2013-11-15 20:35           ` Vlad Yasevich
2013-11-15 20:38             ` Chang
2013-11-15 22:04   ` Chang
2013-11-15 22:48     ` 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=20131115145609.GC29877@hmsreliant.think-freely.org \
    --to=nhorman@tuxdriver.com \
    --cc=changxiangzhong@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dreibh@simula.no \
    --cc=ernstgr@simula.no \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sctp@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vyasevich@gmail.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

all inboxes | Powered by JetHome®