* NL80211_ATTR_PAD question
@ 2016-06-10 19:47 Ben Greear
2016-06-10 20:28 ` Arend van Spriel
2016-06-10 21:08 ` Johannes Berg
0 siblings, 2 replies; 6+ messages in thread
From: Ben Greear @ 2016-06-10 19:47 UTC (permalink / raw)
To: linux-wireless@vger.kernel.org
I see this was added sometime recently: NL80211_ATTR_PAD
If another enum member is added, should it replace the PAD enum?
At the least, I think we need some comments about how this is to be dealt
with.
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: NL80211_ATTR_PAD question
2016-06-10 19:47 NL80211_ATTR_PAD question Ben Greear
@ 2016-06-10 20:28 ` Arend van Spriel
2016-06-10 21:08 ` Johannes Berg
1 sibling, 0 replies; 6+ messages in thread
From: Arend van Spriel @ 2016-06-10 20:28 UTC (permalink / raw)
To: Ben Greear, linux-wireless@vger.kernel.org
On 10-06-16 21:47, Ben Greear wrote:
> I see this was added sometime recently: NL80211_ATTR_PAD
>
> If another enum member is added, should it replace the PAD enum?
Nope. This attribute is used as padattr by 64-bit aligned netlink
functions, ie. nla_put_u64_64bit().
> At the least, I think we need some comments about how this is to be dealt
> with.
> * @NL80211_ATTR_PAD: attribute used for padding for 64-bit alignment
This could indeed use a bit more explanation.
Regards,
Arend
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: NL80211_ATTR_PAD question
2016-06-10 19:47 NL80211_ATTR_PAD question Ben Greear
2016-06-10 20:28 ` Arend van Spriel
@ 2016-06-10 21:08 ` Johannes Berg
2016-06-10 22:40 ` Ben Greear
2016-06-13 19:25 ` Arend van Spriel
1 sibling, 2 replies; 6+ messages in thread
From: Johannes Berg @ 2016-06-10 21:08 UTC (permalink / raw)
To: Ben Greear, linux-wireless@vger.kernel.org
On Fri, 2016-06-10 at 12:47 -0700, Ben Greear wrote:
> I see this was added sometime recently: NL80211_ATTR_PAD
>
> If another enum member is added, should it replace the PAD enum?
No.
> At the least, I think we need some comments about how this is to be
> dealt with.
>
You simply ignore it :)
johannes
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: NL80211_ATTR_PAD question
2016-06-10 21:08 ` Johannes Berg
@ 2016-06-10 22:40 ` Ben Greear
2016-06-13 19:25 ` Arend van Spriel
1 sibling, 0 replies; 6+ messages in thread
From: Ben Greear @ 2016-06-10 22:40 UTC (permalink / raw)
To: Johannes Berg, linux-wireless@vger.kernel.org
On 06/10/2016 02:08 PM, Johannes Berg wrote:
> On Fri, 2016-06-10 at 12:47 -0700, Ben Greear wrote:
>> I see this was added sometime recently: NL80211_ATTR_PAD
>>
>> If another enum member is added, should it replace the PAD enum?
>
> No.
>
>> At the least, I think we need some comments about how this is to be
>> dealt with.
>>
>
> You simply ignore it :)
Please add a comment...it is normal behaviour to fill in 'pads' when
possible, and even when I looked up the commit message it wasn't exactly
clear what this member was for.
Even reading nla_put_u64_64bit offers no useful clues...I didn't follow
the call chain longer, probably somewhere it would start making sense,
but then again, this is netlink code, so who knows!
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: NL80211_ATTR_PAD question
2016-06-10 21:08 ` Johannes Berg
2016-06-10 22:40 ` Ben Greear
@ 2016-06-13 19:25 ` Arend van Spriel
2016-06-21 9:36 ` Johannes Berg
1 sibling, 1 reply; 6+ messages in thread
From: Arend van Spriel @ 2016-06-13 19:25 UTC (permalink / raw)
To: Johannes Berg, Ben Greear, linux-wireless@vger.kernel.org
On 10-06-16 23:08, Johannes Berg wrote:
> On Fri, 2016-06-10 at 12:47 -0700, Ben Greear wrote:
>> I see this was added sometime recently: NL80211_ATTR_PAD
>>
>> If another enum member is added, should it replace the PAD enum?
>
> No.
>
>> At the least, I think we need some comments about how this is to be
>> dealt with.
>>
>
> You simply ignore it :)
So do you know why the caller of nla_put_u64_64bit() would need to
specify the padattr. I mean, why is this not an generic attribute that
netlink deals with internally. It has probably been discussed on the
netdev list but I could not find the right thread.
Regards,
Arend
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: NL80211_ATTR_PAD question
2016-06-13 19:25 ` Arend van Spriel
@ 2016-06-21 9:36 ` Johannes Berg
0 siblings, 0 replies; 6+ messages in thread
From: Johannes Berg @ 2016-06-21 9:36 UTC (permalink / raw)
To: Arend van Spriel, Ben Greear, linux-wireless@vger.kernel.org
On Mon, 2016-06-13 at 21:25 +0200, Arend van Spriel wrote:
>
> On 10-06-16 23:08, Johannes Berg wrote:
> > On Fri, 2016-06-10 at 12:47 -0700, Ben Greear wrote:
> > > I see this was added sometime recently: NL80211_ATTR_PAD
> > >
> > > If another enum member is added, should it replace the PAD enum?
> >
> > No.
> >
> > > At the least, I think we need some comments about how this is to
> > > be
> > > dealt with.
> > >
> >
> > You simply ignore it :)
>
> So do you know why the caller of nla_put_u64_64bit() would need to
> specify the padattr. I mean, why is this not an generic attribute
> that
> netlink deals with internally. It has probably been discussed on the
> netdev list but I could not find the right thread.
>
Netlink attribute numbers are always specific to the (generic) netlink
family used. There was a discussion about using the attribute number 0
since that's reserved, but unfortunately it's only reserved in *most*
families, some actually use it (despite that being broken with libnl.)
johannes
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-06-21 11:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-10 19:47 NL80211_ATTR_PAD question Ben Greear
2016-06-10 20:28 ` Arend van Spriel
2016-06-10 21:08 ` Johannes Berg
2016-06-10 22:40 ` Ben Greear
2016-06-13 19:25 ` Arend van Spriel
2016-06-21 9:36 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).