Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Nov 2011 05:00:25 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r227868 - head/sys/dev/ath
Message-ID:  <201111230500.pAN50PXs026112@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111230500.pAN50PXs026112>