From owner-svn-src-all@FreeBSD.ORG Tue Oct 26 19:04:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22CD4106566B; Tue, 26 Oct 2010 19:04:06 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EAE328FC0C; Tue, 26 Oct 2010 19:04:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9QJ45uL062951; Tue, 26 Oct 2010 19:04:05 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9QJ45DI062949; Tue, 26 Oct 2010 19:04:05 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201010261904.o9QJ45DI062949@svn.freebsd.org> From: Randall Stewart Date: Tue, 26 Oct 2010 19:04:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214392 - stable/8/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Oct 2010 19:04:06 -0000 Author: rrs Date: Tue Oct 26 19:04:05 2010 New Revision: 214392 URL: http://svn.freebsd.org/changeset/base/214392 Log: MFC:210493 When counting the number of chunks in the retransmission queue to validate the retran count, we need to include the chunks in the control send queue too. Otherwise the count will not match and you will get the invarient warning if invarients are on. Modified: stable/8/sys/netinet/sctp_timer.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_timer.c ============================================================================== --- stable/8/sys/netinet/sctp_timer.c Tue Oct 26 19:01:56 2010 (r214391) +++ stable/8/sys/netinet/sctp_timer.c Tue Oct 26 19:04:05 2010 (r214392) @@ -870,6 +870,26 @@ start_again: } #endif *num_marked = num_mk; + /* + * Now check for a ECN Echo that may be stranded And include the + * cnt_mk'd to have all resends in the control queue. + */ + TAILQ_FOREACH(chk, &stcb->asoc.control_send_queue, sctp_next) { + if (chk->sent == SCTP_DATAGRAM_RESEND) { + cnt_mk++; + } + if ((chk->whoTo == net) && + (chk->rec.chunk_id.id == SCTP_ECN_ECHO)) { + sctp_free_remote_addr(chk->whoTo); + chk->whoTo = alt; + if (chk->sent != SCTP_DATAGRAM_RESEND) { + chk->sent = SCTP_DATAGRAM_RESEND; + sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt); + cnt_mk++; + } + atomic_add_int(&alt->ref_count, 1); + } + } if ((stcb->asoc.sent_queue_retran_cnt == 0) && (could_be_sent)) { /* fix it so we retransmit the highest acked anyway */ sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt); @@ -885,19 +905,6 @@ start_again: stcb->asoc.sent_queue_retran_cnt = cnt_mk; #endif } - /* Now check for a ECN Echo that may be stranded */ - TAILQ_FOREACH(chk, &stcb->asoc.control_send_queue, sctp_next) { - if ((chk->whoTo == net) && - (chk->rec.chunk_id.id == SCTP_ECN_ECHO)) { - sctp_free_remote_addr(chk->whoTo); - chk->whoTo = alt; - if (chk->sent != SCTP_DATAGRAM_RESEND) { - chk->sent = SCTP_DATAGRAM_RESEND; - sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt); - } - atomic_add_int(&alt->ref_count, 1); - } - } if (audit_tf) { SCTPDBG(SCTP_DEBUG_TIMER4, "Audit total flight due to negative value net:%p\n",