svn commit: r225411 - user/adrian/if_ath_tx/sys/dev/ath
Adrian Chadd
adrian at FreeBSD.org
Tue Sep 6 02:31:58 UTC 2011
Author: adrian
Date: Tue Sep 6 02:31:57 2011
New Revision: 225411
URL: http://svn.freebsd.org/changeset/base/225411
Log:
Add some debugging to keep track when TX buffers are either busy or missing.
Modified:
user/adrian/if_ath_tx/sys/dev/ath/if_ath.c
user/adrian/if_ath_tx/sys/dev/ath/if_ath_sysctl.c
user/adrian/if_ath_tx/sys/dev/ath/if_athioctl.h
Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath.c
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_ath.c Tue Sep 6 01:42:49 2011 (r225410)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath.c Tue Sep 6 02:31:57 2011 (r225411)
@@ -1860,6 +1860,15 @@ _ath_getbuf_locked(struct ath_softc *sc)
ATH_TXBUF_LOCK_ASSERT(sc);
bf = TAILQ_FIRST(&sc->sc_txbuf);
+ if (bf == NULL) {
+ sc->sc_stats.ast_tx_getnobuf++;
+ } else {
+ if (bf->bf_flags & ATH_BUF_BUSY) {
+ sc->sc_stats.ast_tx_getbusybuf++;
+ bf = NULL;
+ }
+ }
+
if (bf != NULL && (bf->bf_flags & ATH_BUF_BUSY) == 0)
TAILQ_REMOVE(&sc->sc_txbuf, bf, bf_list);
else
Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_sysctl.c
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_ath_sysctl.c Tue Sep 6 01:42:49 2011 (r225410)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_sysctl.c Tue Sep 6 02:31:57 2011 (r225411)
@@ -313,6 +313,9 @@ ath_sysctl_txagg(SYSCTL_HANDLER_ARGS)
if (param != 1)
return 0;
+ printf("no tx bufs (empty list): %d\n", sc->sc_stats.ast_tx_getnobuf);
+ printf("no tx bufs (was busy): %d\n", sc->sc_stats.ast_tx_getbusybuf);
+
printf("aggr single packet: %d\n",
sc->sc_aggr_stats.aggr_single_pkt);
printf("aggr single packet w/ BAW closed: %d\n",
Modified: user/adrian/if_ath_tx/sys/dev/ath/if_athioctl.h
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_athioctl.h Tue Sep 6 01:42:49 2011 (r225410)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_athioctl.h Tue Sep 6 02:31:57 2011 (r225411)
@@ -149,6 +149,8 @@ struct ath_stats {
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_getnobuf;
+ u_int32_t ast_tx_getbusybuf;
u_int32_t ast_tx_intr;
u_int32_t ast_rx_intr;
u_int32_t ast_pad[7];
More information about the svn-src-user
mailing list