From mboxrd@z Thu Jan 1 00:00:00 1970 From: Felix Fietkau Date: Fri, 14 Feb 2014 11:50:42 +0100 Subject: [ath9k-devel] Interrupt mitigation for USB Atheros dongles In-Reply-To: References: Message-ID: <52FDF502.8050701@openwrt.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org On 2014-02-14 02:45, Dimosthenis Pediaditakis wrote: > Hi all, > I am using a capacity and available bandwidth measurement software that > compute estimates based on the gaps among packet trains/pairs. > > For that reason I need to disable RX/TX interrupt mitigation for the > devices that I take the measurement form, because it introduces skew, > and renders unmeasurable the fast links (> 54Kbps). > The less latencies the drivers+kernel introduces, the better. > > I have so far managed to disable all together the RX mitigation for > mini-PCIe devices by hard-coding the following line in > "linux/drivers/net/wireless/ath/ath9k/ hw.c" > ah->config.rx_intr_mitigation = false; It seems to me that a better way to do this would be to drop your fragile software based time measurement of rx interrupts, and instead use the hardware timestamp (measured in microseconds). > While the above trick improves my results, it doesn't change the > behaviour of the Atheros-based USB WiFi dongles. > AFAIK my TP-Link TL-WN722N USB dongle uses the ath9k_htc driver, but I > haven't found anything relevant in the respective sources ( htc_*.{c, h} ) There is no interrupt mitigation here. > Apart from that, I suspect that the USB-net driver itself might also > introduce some fixed delays which affect the minimum time-spacing > measurement that my software can perceive at the receiver side. USB in general adds too much latency for what you want to do. Use hardware timestamps here as well. - Felix