svn commit: r225136 - user/adrian/if_ath_tx/sys/dev/ath
Adrian Chadd
adrian at FreeBSD.org
Wed Aug 24 08:27:01 UTC 2011
Author: adrian
Date: Wed Aug 24 08:27:00 2011
New Revision: 225136
URL: http://svn.freebsd.org/changeset/base/225136
Log:
Add some debugging to spit out the txbuf count and busy txbuf count.
Modified:
user/adrian/if_ath_tx/sys/dev/ath/if_ath_sysctl.c
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 Wed Aug 24 07:52:55 2011 (r225135)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_sysctl.c Wed Aug 24 08:27:00 2011 (r225136)
@@ -302,8 +302,9 @@ static int
ath_sysctl_txagg(SYSCTL_HANDLER_ARGS)
{
struct ath_softc *sc = arg1;
- int i, param = 0;
+ int i, t, param = 0;
int error;
+ struct ath_buf *bf;
error = sysctl_handle_int(oidp, ¶m, 0, req);
if (error || !req->newptr)
@@ -336,6 +337,19 @@ ath_sysctl_txagg(SYSCTL_HANDLER_ARGS)
}
}
+ i = t = 0;
+ ATH_TXBUF_LOCK(sc);
+ TAILQ_FOREACH(bf, &sc->sc_txbuf, bf_list) {
+ if (bf->bf_flags & ATH_BUF_BUSY) {
+ printf("Busy: %d\n", t);
+ i++;
+ }
+ t++;
+ }
+ ATH_TXBUF_UNLOCK(sc);
+ printf("Total TX buffers: %d; Total TX buffers busy: %d\n",
+ t, i);
+
return 0;
}
More information about the svn-src-user
mailing list