From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.toke.dk (mail.toke.dk [52.28.52.200]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id 18EB43B2A4; Mon, 15 May 2017 13:55:08 -0400 (EDT) From: =?utf-8?Q?Toke_H=C3=B8iland-J=C3=B8rgensen?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=toke.dk; s=20161023; t=1494870906; bh=aFAnPLRAKT3nkeQ//CggNXE7o2yumWG9O7/ZNeLNo78=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=XYzhn+9Yg23wS3eIM/WwGjCds3IAWjMHMu3R7mgLZn8sdcijKm/cb5puO7bPoZW8R iTPCLrVCGc055fm925Skdqhg6DqDHg8esJQw0w/INVGsk1BY9YGC+kwdMXznPEOlPL x2Dzfs5y2JC0lc9/t5q86H4X+SPQYadP4SONAqL7cn8qX+oJiocgt7Qps+bF7GHExy tkzm7+UwQKYdxYqlXE25w95ish1tABEUuLQqrJib5XgUaOMqNNIORujZm3hawWGbjh AsOsVSFKXeMRmhMQhDkpqE3KYuoQbZlfYvn/MtiqcMTmEJG/vE51dZJy7iiYoMayfT yP4W+4bfbg5YA== To: "Mohan\, Nitinder" Cc: "make-wifi-fast\@lists.bufferbloat.net" , "bloat-devel\@lists.bufferbloat.net" Subject: Re: [Make-wifi-fast] Get hardware queue length for wireless interface in linux kernel References: Date: Mon, 15 May 2017 19:55:04 +0200 In-Reply-To: (Nitinder Mohan's message of "Mon, 15 May 2017 15:40:41 +0000") X-Clacks-Overhead: GNU Terry Pratchett Message-ID: <87r2zq3szr.fsf@alrua-x1> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: bloat-devel@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Developers working on AQM, device drivers, and networking stacks" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 17:55:08 -0000 "Mohan, Nitinder" writes: > Hi, > > I am a Ph.D. student working on a bufferbloat resistant scheduler for > Multi-Path TCP. I was unsure of which list my question would be more > suitable in so I am sending this in both make-wifi-fast and bloat-dev > list. Sounds interesting! What, exactly, is such a scheduler going to be doing? :) > While implementing the scheduler in linux kernel, I was unable to get > the current number of bytes in hardware queue for wlan interface. As > currently, linux does not employ BQL for wifi devices, I could not get > this value from dql->num_queued defined in dynamic_queue_limits.h. I > also tried to get queue length from Queueing discipline structure i.e. > qdisc->qstats.qlen defined in sch_generic.h yet it still gives me a > zero value (I am getting zero values for other parameters in qstat as > well so I am sure it is not because the queue length never becomes > more than 0). > > If you have any idea for getting queue length for wireless interfaces, > please do reply. Any help would be highly appreciated. There's no general interface to get the queue length for WiFi interfaces. If you're using a driver that is using the mac80211 intermediate queues (i.e., ath9k, ath10k or mt76), there are fq->backlock and fq->memory_usage which live inside the struct fq in struct ieee80211_local. However, these are private state vars inside mac80211, so not immediately accessible from other parts of the kernel. You could add an access function to mac80211, though. Other drivers will have their own queueing implementations, that you probably can't get at. Some devices will even have most of their queueing in firmware. -Toke