From owner-svn-src-head@FreeBSD.ORG Wed Nov 23 05:00:25 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8F67106566C; Wed, 23 Nov 2011 05:00:25 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8E0358FC0A; Wed, 23 Nov 2011 05:00:25 +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 pAN50PZX026116; Wed, 23 Nov 2011 05:00:25 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAN50PXs026112; Wed, 23 Nov 2011 05:00:25 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201111230500.pAN50PXs026112@svn.freebsd.org> From: Adrian Chadd Date: Wed, 23 Nov 2011 05:00:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r227868 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2011 05:00:25 -0000 Author: adrian Date: Wed Nov 23 05:00:25 2011 New Revision: 227868 URL: http://svn.freebsd.org/changeset/base/227868 Log: Flesh out the TX aggregation completion statistics. * Failall is now named just that. * Add TX ok and TX fail, for aggregate frame sub-frames. This will break athstats; a followup commit wil resolve this. Sponsored by: Hobnob, Inc. Modified: head/sys/dev/ath/if_ath_sysctl.c head/sys/dev/ath/if_ath_tx.c head/sys/dev/ath/if_athioctl.h Modified: head/sys/dev/ath/if_ath_sysctl.c ============================================================================== --- head/sys/dev/ath/if_ath_sysctl.c Wed Nov 23 03:55:48 2011 (r227867) +++ head/sys/dev/ath/if_ath_sysctl.c Wed Nov 23 05:00:25 2011 (r227868) @@ -842,9 +842,15 @@ ath_sysctl_stats_attach(struct ath_softc &sc->sc_stats.ast_tx_data_underrun, 0, ""); SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_delim_underrun", CTLFLAG_RD, &sc->sc_stats.ast_tx_delim_underrun, 0, ""); - SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_aggrfail", CTLFLAG_RD, - &sc->sc_stats.ast_tx_aggrfail, 0, + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_aggr_failall", CTLFLAG_RD, + &sc->sc_stats.ast_tx_aggr_failall, 0, "Number of aggregate TX failures (whole frame)"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_aggr_ok", CTLFLAG_RD, + &sc->sc_stats.ast_tx_aggr_ok, 0, + "Number of aggregate TX OK completions (subframe)"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_aggr_fail", CTLFLAG_RD, + &sc->sc_stats.ast_tx_aggr_fail, 0, + "Number of aggregate TX failures (subframe)"); SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rx_intr", CTLFLAG_RD, &sc->sc_stats.ast_rx_intr, 0, "RX interrupts"); Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Wed Nov 23 03:55:48 2011 (r227867) +++ head/sys/dev/ath/if_ath_tx.c Wed Nov 23 05:00:25 2011 (r227868) @@ -2940,7 +2940,6 @@ ath_tx_comp_aggr_error(struct ath_softc TAILQ_INIT(&bf_q); TAILQ_INIT(&bf_cq); - sc->sc_stats.ast_tx_aggrfail++; /* * Update rate control - all frames have failed. @@ -2955,12 +2954,14 @@ ath_tx_comp_aggr_error(struct ath_softc ATH_TXQ_LOCK(sc->sc_ac2q[tid->ac]); tap = ath_tx_get_tx_tid(an, tid->tid); + sc->sc_stats.ast_tx_aggr_failall++; /* Retry all subframes */ bf = bf_first; while (bf) { bf_next = bf->bf_next; bf->bf_next = NULL; /* Remove it from the aggr list */ + sc->sc_stats.ast_tx_aggr_fail++; if (ath_tx_retry_subframe(sc, bf, &bf_q)) { drops++; bf->bf_next = NULL; @@ -3196,6 +3197,7 @@ ath_tx_aggr_comp_aggr(struct ath_softc * ATH_BA_ISSET(ba, ba_index)); if (tx_ok && ATH_BA_ISSET(ba, ba_index)) { + sc->sc_stats.ast_tx_aggr_ok++; ath_tx_update_baw(sc, an, atid, bf); bf->bf_state.bfs_dobaw = 0; if (! bf->bf_state.bfs_addedbaw) @@ -3205,6 +3207,7 @@ ath_tx_aggr_comp_aggr(struct ath_softc * bf->bf_next = NULL; TAILQ_INSERT_TAIL(&bf_cq, bf, bf_list); } else { + sc->sc_stats.ast_tx_aggr_fail++; if (ath_tx_retry_subframe(sc, bf, &bf_q)) { drops++; bf->bf_next = NULL; Modified: head/sys/dev/ath/if_athioctl.h ============================================================================== --- head/sys/dev/ath/if_athioctl.h Wed Nov 23 03:55:48 2011 (r227867) +++ head/sys/dev/ath/if_athioctl.h Wed Nov 23 05:00:25 2011 (r227868) @@ -148,12 +148,14 @@ struct ath_stats { u_int32_t ast_tx_swretrymax; /* software TX retry max limit reach */ u_int32_t ast_tx_data_underrun; u_int32_t ast_tx_delim_underrun; - u_int32_t ast_tx_aggrfail; /* aggregate TX failed in its entirety */ + u_int32_t ast_tx_aggr_failall; /* aggregate TX failed in its entirety */ u_int32_t ast_tx_getnobuf; u_int32_t ast_tx_getbusybuf; u_int32_t ast_tx_intr; u_int32_t ast_rx_intr; - u_int32_t ast_pad[4]; + u_int32_t ast_tx_aggr_ok; /* aggregate TX ok */ + u_int32_t ast_tx_aggr_fail; /* aggregate TX failed */ + u_int32_t ast_pad[2]; }; #define SIOCGATHSTATS _IOWR('i', 137, struct ifreq)