Date: Fri, 23 Dec 2011 19:17:54 GMT From: Adrian Chadd <adrian@FreeBSD.org> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/163573: [ath] hostap mode TX buffer hang Message-ID: <201112231917.pBNJHsAJ052267@red.freebsd.org> Resent-Message-ID: <201112231920.pBNJK7VO080561@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 163573 >Category: kern >Synopsis: [ath] hostap mode TX buffer hang >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Dec 23 19:20:07 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Adrian Chadd >Release: FreeBSD-10.0, on a TP-WR1043ND router. >Organization: FreeBSD >Environment: FreeBSD home-11bg-ap 10.0-CURRENT FreeBSD 10.0-CURRENT #39: Thu Jan 1 08:00:00 WST 1970 adrian@dummy:/home/adrian/work/freebsd/git/adrianchadd-freebsd-work/obj/mipseb/mips.mipseb/home/adrian/work/freebsd/git/adrianchadd-freebsd-work/adrianchadd-freebsd-work/sys/TP-WN1043ND mips . it's a recent -HEAD (to this date stamp), from my git tree. Ignore the actual datestamp there. >Description: When testing 802.11n hostap mode, the TX side still occasionally hangs. This is again due to the "busy" buffer management code being slightly wrong, allowing a "busy" buffer to stay busy and eventually clogging up the free TX buffer ring. This occurs with IEEE80211_SUPPORT_TDMA, as the busy buffer code isn't included otherwise. (It should be though, due to how the MAC behaves. But that's a different problem.) The relevant output from "sysctl dev.ath.0.txagg=1" is: HW TXQ 0: axq_depth=2, axq_aggr_depth=2 HW TXQ 1: axq_depth=0, axq_aggr_depth=0 HW TXQ 2: axq_depth=0, axq_aggr_depth=0 HW TXQ 3: axq_depth=0, axq_aggr_depth=0 HW TXQ 8: axq_depth=0, axq_aggr_depth=0 Busy: 0 Total TX buffers: 1; Total TX buffers busy: 1 . the fact that there's only 1 total buffer in the free list, and that one is busy, indicates that things were going pear shaped. Also, athstats can be helpful: # athstats | grep tx .. 294 tx stopped 'cuz no xmit buffer .. >How-To-Repeat: Just exchange a bunch of traffic whilst in a lossy 802.11 network. It should eventually get angry and stop transmitting. ifconfig wlan0 down / up will flush the TX buffer queue. Enable both 802.11 and TDMA in the kernel configuration file (ATH_ENABLE_11N and IEEE80211_SUPPORT_TDMA.) Configure the unit as a hostap - in non-hostap mode, the interface resets will cause the TX buffer queue to be flushed. Sit back and watch the fireworks. >Fix: Not yet. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112231917.pBNJHsAJ052267>