From patchwork Tue Nov 8 16:23:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michio Honda X-Patchwork-Id: 124392 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 2F139B6F7B for ; Wed, 9 Nov 2011 03:32:06 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751730Ab1KHQcA (ORCPT ); Tue, 8 Nov 2011 11:32:00 -0500 Received: from shonan.sfc.wide.ad.jp ([203.178.142.130]:55331 "EHLO mail.sfc.wide.ad.jp" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751437Ab1KHQb5 convert rfc822-to-8bit (ORCPT ); Tue, 8 Nov 2011 11:31:57 -0500 Received: from [IPv6:2001:200:1c0:2800:a8ee:b89:e632:5cdc] (unknown [IPv6:2001:200:1c0:2800:a8ee:b89:e632:5cdc]) by mail.sfc.wide.ad.jp (Postfix) with ESMTPSA id 9DDE7278085; Wed, 9 Nov 2011 01:23:15 +0900 (JST) From: Michio Honda Subject: [PATCH 2/2] sctp: fasthandoff with ASCONF at server-node Date: Wed, 9 Nov 2011 01:23:15 +0900 Message-Id: <32B0E489-560D-4FC8-88C2-FBD490D9E45C@sfc.wide.ad.jp> Cc: netdev@vger.kernel.org To: David Miller , Wei Yongjun Mime-Version: 1.0 (Apple Message framework v1251.1) X-Mailer: Apple Mail (2.1251.1) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From 0c0019a3d219bd900bedbadfa6a3b3733d9ca49c Mon Sep 17 00:00:00 2001 From: Michio Honda Date: Fri, 17 Jun 2011 11:22:35 +0900 Subject: [PATCH 2/2] sctp: fasthandoff with ASCONF at server-node Retransmit chunks to newly confirmed destination when ASCONF and HEARTBEAT negotiation has success with a single-homed peer. Signed-off-by: Michio Honda --- net/sctp/sm_sideeffect.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c index 76388b0..1ff51c9 100644 --- a/net/sctp/sm_sideeffect.c +++ b/net/sctp/sm_sideeffect.c @@ -666,6 +666,7 @@ static void sctp_cmd_transport_on(sctp_cmd_seq_t *cmds, struct sctp_chunk *chunk) { sctp_sender_hb_info_t *hbinfo; + int was_unconfirmed = 0; /* 8.3 Upon the receipt of the HEARTBEAT ACK, the sender of the * HEARTBEAT should clear the error counter of the destination @@ -692,9 +693,11 @@ static void sctp_cmd_transport_on(sctp_cmd_seq_t *cmds, /* Mark the destination transport address as active if it is not so * marked. */ - if ((t->state == SCTP_INACTIVE) || (t->state == SCTP_UNCONFIRMED)) + if ((t->state == SCTP_INACTIVE) || (t->state == SCTP_UNCONFIRMED)) { + was_unconfirmed = 1; sctp_assoc_control_transport(asoc, t, SCTP_TRANSPORT_UP, SCTP_HEARTBEAT_SUCCESS); + } /* The receiver of the HEARTBEAT ACK should also perform an * RTT measurement for that destination transport address @@ -712,6 +715,9 @@ static void sctp_cmd_transport_on(sctp_cmd_seq_t *cmds, /* Update the heartbeat timer. */ if (!mod_timer(&t->hb_timer, sctp_transport_timeout(t))) sctp_transport_hold(t); + + if (was_unconfirmed && asoc->peer.transport_count == 1) + sctp_transport_immediate_rtx(t); }