2014-03-13 05:05:18

by Florian Fainelli

[permalink] [raw]
Subject: skb->priority magic values as part of UAPI headers?

Hi,

While browsing through net/wireless/util.c::cfg80211_classify8021d() I
stumbled upon the "magic values" range 256 to 263, should not those be
made part of some sort of user-space API header file, just so if
things need to be changed, they suddenly do not break?

Thanks
--
Florian


2014-03-14 15:56:08

by Ben Greear

[permalink] [raw]
Subject: Re: skb->priority magic values as part of UAPI headers?

On 03/14/2014 02:26 AM, Helmut Schaa wrote:
> On Thu, Mar 13, 2014 at 6:04 AM, Florian Fainelli <[email protected]> wrote:
>> While browsing through net/wireless/util.c::cfg80211_classify8021d() I
>> stumbled upon the "magic values" range 256 to 263, should not those be
>> made part of some sort of user-space API header file, just so if
>> things need to be changed, they suddenly do not break?
>
> I stumbled over that some time ago as well [1].
> The question is if this is required at all anymore or if it could just
> be removed.
> Helmut

I use it to easily poke user-space generated packets into specific
transmit queues on the NIC. Please do not remove it.

Thanks,
Ben

>
> [1] http://comments.gmane.org/gmane.linux.kernel.wireless.general/82689
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>


--
Ben Greear <[email protected]>
Candela Technologies Inc http://www.candelatech.com


2014-03-14 19:28:55

by Florian Fainelli

[permalink] [raw]
Subject: Re: skb->priority magic values as part of UAPI headers?

2014-03-14 8:56 GMT-07:00 Ben Greear <[email protected]>:
> On 03/14/2014 02:26 AM, Helmut Schaa wrote:
>> On Thu, Mar 13, 2014 at 6:04 AM, Florian Fainelli <[email protected]> wrote:
>>> While browsing through net/wireless/util.c::cfg80211_classify8021d() I
>>> stumbled upon the "magic values" range 256 to 263, should not those be
>>> made part of some sort of user-space API header file, just so if
>>> things need to be changed, they suddenly do not break?
>>
>> I stumbled over that some time ago as well [1].
>> The question is if this is required at all anymore or if it could just
>> be removed.
>> Helmut
>
> I use it to easily poke user-space generated packets into specific
> transmit queues on the NIC. Please do not remove it.

The initial question was whether that should be clearly stated as part
of ABI contract between the kernel and user-space, do you think this
belongs in some header in include/uapi?

Thanks!
--
Florian

2014-03-14 09:27:54

by Helmut Schaa

[permalink] [raw]
Subject: Re: skb->priority magic values as part of UAPI headers?

On Thu, Mar 13, 2014 at 6:04 AM, Florian Fainelli <[email protected]> wrote:
> While browsing through net/wireless/util.c::cfg80211_classify8021d() I
> stumbled upon the "magic values" range 256 to 263, should not those be
> made part of some sort of user-space API header file, just so if
> things need to be changed, they suddenly do not break?

I stumbled over that some time ago as well [1].
The question is if this is required at all anymore or if it could just
be removed.
Helmut

[1] http://comments.gmane.org/gmane.linux.kernel.wireless.general/82689