netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: sctp: recover a tranport when an ack comes
@ 2013-11-14 20:40 Chang Xiangzhong
  2013-11-15  2:34 ` Vlad Yasevich
  0 siblings, 1 reply; 11+ messages in thread
From: Chang Xiangzhong @ 2013-11-14 20:40 UTC (permalink / raw)
  To: vyasevich, nhorman
  Cc: davem, linux-sctp, netdev, linux-kernel, dreibh, ernstgr,
	Chang Xiangzhong

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")
---
 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(
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-11-15 22:48 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-14 20:40 [PATCH] net: sctp: recover a tranport when an ack comes 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
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

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).