Skip site navigation (1)Skip section navigation (2)
Date:      Mon,  6 Feb 2006 21:19:05 +0000 (GMT)
From:      Nate Nielsen <nielsen-list@memberwebs.com>
To:        Sam Leffler <sam@errno.com>
Cc:        "freebsd-net@FreeBSD.org" <freebsd-net@freebsd.org>
Subject:   Re: Polling for ath driver
Message-ID:  <20060206211904.56054DCA99E@mail.npubs.com>
References:  <20060205011931.E5F08DCA99E@mail.npubs.com> <43E63FC3.2030409@errno.com> <20060206050301.AC895DCAA3F@mail.npubs.com> <43E6E4B6.50100@errno.com> <20060206083013.99D32DCAA14@mail.npubs.com> <43E78483.3030106@errno.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------030804060208050203030707
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Sam Leffler wrote:
> I see no statistics; are you sure you are not being pounded by phy
> errors. 

I've put together a small patch to the ath driver which exposes some
interupt statistic sysctls, and a small shell script to read these and
list them once per second. Both are attached.

Here are the results from the hostap box, configured like so:

ath0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        inet 10.9.6.1 netmask 0xffffff00 broadcast 10.9.6.255
        ether 00:15:6d:10:17:03
        media: IEEE 802.11 Wireless Ethernet autoselect <hostap>
        status: associated
        ssid blah channel 165 bssid 00:15:6d:10:17:03
        authmode OPEN privacy OFF txpowmax 57 dtimperiod 1 bintval 100

When not active, we see (rx interrupts, tx interrupts, and all other
interrupts, respectively, one line per second):

RX:0  TX:0  OTH:10
RX:0  TX:0  OTH:11
RX:0  TX:0  OTH:10
RX:0  TX:0  OTH:11
RX:0  TX:0  OTH:10
RX:0  TX:0  OTH:11
RX:0  TX:0  OTH:10
RX:0  TX:0  OTH:11
RX:0  TX:0  OTH:10
RX:0  TX:0  OTH:10

I'm guessing the 10 or 11 interrupts per second are softawre beacon
interrupts. I did not spend time verifying this. Once we put load
through box (around 20+ Mb/s, two TCP streams, both directions
simultaneously):

RX:2377  TX:506  OTH:12
RX:2209  TX:509  OTH:10
RX:2118  TX:465  OTH:11
RX:2143  TX:482  OTH:10
RX:2145  TX:496  OTH:11
RX:2154  TX:493  OTH:10
RX:2123  TX:507  OTH:10
RX:2089  TX:471  OTH:11
RX:2021  TX:451  OTH:9
RX:2148  TX:496  OTH:10

As you noted the TX interrupts are mitigated.

During this time we have a normal amount of phy errors:

# athstats ath0 | cut -c 62-70
  phyerr
    2170
       0
      64
      71
      99
      77
     102
      87
      68
      72
      65

> You haven't even answered my question about what ath devices
> you're using.

Sorry bout that. These are 802.11a Mini-PCI radios, the chipset is
actually marked 'AR5213A' but I guess it's treated as a 5212:

<Atheros 5212> mem 0xe1000000-0xe100ffff irq 10 at device 10.0 on pci0
mac 5.9 phy 4.3 radio 3.6

Cheers,
Nate


--------------030804060208050203030707
Content-Type: text/x-patch;
 name="ath-intr-table.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="ath-intr-table.patch"

Index: sys/dev/ath/if_ath.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/ath/if_ath.c,v
retrieving revision 1.94.2.8
diff -p -U3 -r1.94.2.8 if_ath.c
--- sys/dev/ath/if_ath.c	29 Jan 2006 07:33:27 -0000	1.94.2.8
+++ sys/dev/ath/if_ath.c	6 Feb 2006 21:08:53 -0000
@@ -200,6 +200,13 @@ static	int ath_regdomain = 0;			/* regul
 SYSCTL_INT(_hw_ath, OID_AUTO, regdomain, CTLFLAG_RD, &ath_regdomain,
 	    0, "regulatory domain");
 
+/* XXXX TEMP: for testing number of interrupts */
+struct { int rx_intr; int tx_intr; int oth_intr; } intr_table;
+SYSCTL_INT(_hw_ath, OID_AUTO, rx_intr, CTLFLAG_RD, &(intr_table.rx_intr), 0, "XXX TEMP: rx interrupts generated");
+SYSCTL_INT(_hw_ath, OID_AUTO, tx_intr, CTLFLAG_RD, &(intr_table.tx_intr), 0, "XXX TEMP: tx interrupts generated");
+SYSCTL_INT(_hw_ath, OID_AUTO, oth_intr, CTLFLAG_RD, &(intr_table.oth_intr), 0, "XXX TEMP: other interrupts generated");
+/* XXXXXX */
+
 #ifdef AR_DEBUG
 static	int ath_debug = 0;
 SYSCTL_INT(_hw_ath, OID_AUTO, debug, CTLFLAG_RW, &ath_debug,
@@ -258,6 +265,9 @@ ath_attach(u_int16_t devid, struct ath_s
 	HAL_STATUS status;
 	int error = 0, i;
 
+	/* XXX TEMP */
+	memset(&intr_table, 0, sizeof(intr_table));
+
 	DPRINTF(sc, ATH_DEBUG_ANY, "%s: devid 0x%x\n", __func__, devid);
 
 	ifp = sc->sc_ifp = if_alloc(IFT_ETHER);
@@ -712,6 +722,15 @@ ath_intr(void *arg)
 	ath_hal_getisr(ah, &status);		/* NB: clears ISR too */
 	DPRINTF(sc, ATH_DEBUG_INTR, "%s: status 0x%x\n", __func__, status);
 	status &= sc->sc_imask;			/* discard unasked for bits */
+
+	/* XXX TEMP: */
+	if (status & HAL_INT_RX) 
+		++intr_table.rx_intr;
+	else if(status & HAL_INT_TX) 
+		++intr_table.tx_intr;
+	else
+		++intr_table.oth_intr;
+
 	if (status & HAL_INT_FATAL) {
 		/*
 		 * Fatal errors are unrecoverable.  Typically

--------------030804060208050203030707--




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