[PATCH 1/2] supplicant: Use high-priority queue for management packets.

Ben Greear greearb
Tue Jan 7 10:12:35 PST 2014


On 01/07/2014 06:59 AM, Johannes Berg wrote:
> On Mon, 2013-09-23 at 09:04 -0700, Ben Greear wrote:
>> On 09/23/2013 01:08 AM, Jouni Malinen wrote:
>>> On Mon, Sep 09, 2013 at 11:49:04AM -0700, greearb at candelatech.com wrote:
>>>> Without this patch, wpa_supplicant EAPOL packets (at least)
>>>> are sent on normal best-effort TX queue.  I believe they
>>>> should be on the VO high-priority queue instead.
>>>
>>>> diff --git a/src/l2_packet/l2_packet_linux.c b/src/l2_packet/l2_packet_linux.c
>>>
>>>> @@ -97,6 +97,7 @@ struct l2_packet_data * l2_packet_init(
>>>> +	/* Use high-priority queue for management packets
>>>> +	 * http://wireless.kernel.org/en/developers/Documentation/mac80211/queues
>>>> +	 */
>>>> +	if (setsockopt(l2->fd, SOL_SOCKET,
>>>> +		       SO_PRIORITY, (char*)&val, sizeof(val)) < 0) {
>>>
>>> This seems to be assuming that mac80211 is used always. That is not
>>> really the case and I guess this SO_PRIORITY change to a special
>>> mac80211-specific value could result in undesired results with
>>> non-mac80211 drivers.
>>
>> The special priority is defined in the net/wireless/ dir of the kernel,
>> and does not make special mention of mac80211 v/s other logic.
>>
>>  From what I can tell, there is no other way to specify QoS when
>> sending on packet-sockets.  The skb->priority never hits the wire
>> directly, so either something should be using it properly, or it
>> will just be ignored and we are no worse off than before.  If
>> some driver is actually conflicting with the documentation, then
>> we just need to fix it.
> 
> That code isn't really documentation though :)

This page mentions it as well, about half way down.

http://wireless.kernel.org/en/developers/Documentation/mac80211/queues

As is, unless the NIC has firmware that inspects packets and
twiddles the queue selection based on that, some management packets do not go
out in the VO queue.

With my patch, it (ath9k) seems to work properly.

If someone has a suggestion for how to do this better,
please let me know.

Thanks,
Ben


-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com




More information about the Hostap mailing list