From owner-svn-src-stable-8@FreeBSD.ORG Fri Feb 10 18:55:51 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05CCD106564A; Fri, 10 Feb 2012 18:55:51 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CAB3D8FC13; Fri, 10 Feb 2012 18:55:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1AItoBg088370; Fri, 10 Feb 2012 18:55:50 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1AItoxl088367; Fri, 10 Feb 2012 18:55:50 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201202101855.q1AItoxl088367@svn.freebsd.org> From: Michael Tuexen Date: Fri, 10 Feb 2012 18:55:50 +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: r231398 - stable/8/sys/netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Feb 2012 18:55:51 -0000 Author: tuexen Date: Fri Feb 10 18:55:50 2012 New Revision: 231398 URL: http://svn.freebsd.org/changeset/base/231398 Log: MFC r218037: Fix a bug in the way ECN-Echo chunk sends were being accounted for. The counting was such that we counted only when we queued a chunk, not when we sent it. Now keep an additional counter for queuing and one for sending. Modified: stable/8/sys/netinet/sctp_output.c stable/8/sys/netinet/sctp_uio.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (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/e1000/ (props changed) Modified: stable/8/sys/netinet/sctp_output.c ============================================================================== --- stable/8/sys/netinet/sctp_output.c Fri Feb 10 18:53:39 2012 (r231397) +++ stable/8/sys/netinet/sctp_output.c Fri Feb 10 18:55:50 2012 (r231398) @@ -7809,6 +7809,20 @@ again_one_more_time: if (chk->rec.chunk_id.id == SCTP_COOKIE_ECHO) { cookie = 1; no_out_cnt = 1; + } else if (chk->rec.chunk_id.id == SCTP_ECN_ECHO) { + /* + * Increment ecne send count + * here this means we may be + * over-zealous in our + * counting if the send + * fails, but its the best + * place to do it (we used + * to do it in the queue of + * the chunk, but that did + * not tell how many times + * it was sent. + */ + SCTP_STAT_INCR(sctps_sendecne); } chk->sent = SCTP_DATAGRAM_SENT; chk->snd_count++; @@ -10751,6 +10765,7 @@ sctp_send_ecn_echo(struct sctp_tcb *stcb /* found a previous ECN_ECHO update it if needed */ ecne = mtod(chk->data, struct sctp_ecne_chunk *); ecne->tsn = htonl(high_tsn); + SCTP_STAT_INCR(sctps_queue_upd_ecne); return; } } @@ -10760,7 +10775,7 @@ sctp_send_ecn_echo(struct sctp_tcb *stcb return; } chk->copy_by_ref = 0; - SCTP_STAT_INCR(sctps_sendecne); + SCTP_STAT_INCR(sctps_queue_upd_ecne); chk->rec.chunk_id.id = SCTP_ECN_ECHO; chk->rec.chunk_id.can_take_data = 0; chk->asoc = &stcb->asoc; Modified: stable/8/sys/netinet/sctp_uio.h ============================================================================== --- stable/8/sys/netinet/sctp_uio.h Fri Feb 10 18:53:39 2012 (r231397) +++ stable/8/sys/netinet/sctp_uio.h Fri Feb 10 18:55:50 2012 (r231398) @@ -946,8 +946,9 @@ struct sctpstat { * max burst inflight to net */ uint32_t sctps_fwdtsn_map_over; /* number of map array over-runs via * fwd-tsn's */ - - uint32_t sctps_reserved[32]; /* Future ABI compat - remove int's + uint32_t sctps_queue_upd_ecne; /* Number of times we queued or + * updated an ECN chunk on send queue */ + uint32_t sctps_reserved[31]; /* Future ABI compat - remove int's * from here when adding new */ };