NL80211_ATTR_PAD question
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
Signature · 2 lines
Ben Greear <[email protected]> Candela Technologies Inc http://www.candelatech.com
Quoted 3 lines · Ben Greear
I see this was added sometime recently:
NL80211_ATTR_PADIf 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().
Quoted 4 lines
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
Quoted 3 lines · Ben Greear
I see this was added sometime recently: NL80211_ATTR_PAD
If another enum member is added, should it replace the PAD enum?
No.
Quoted 3 lines
At the least, I think we need some comments about how this is to be dealt with.
You simply ignore it :)
johannes
Quoted 5 lines · Johannes Berg
Quoted 3 lines · Ben Greear
I see this was added sometime recently:
NL80211_ATTR_PADIf another enum member is added, should it replace the PAD enum?
Quoted 7 lines
No.
Quoted 3 lines
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
Signature · 2 lines
Ben Greear <[email protected]> Candela Technologies Inc http://www.candelatech.com
Quoted 5 lines · Johannes Berg
Quoted 3 lines · Ben Greear
I see this was added sometime recently:
NL80211_ATTR_PADIf another enum member is added, should it replace the PAD enum?
Quoted 7 lines
No.
Quoted 3 lines
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
Quoted 14 lines · Arend van Spriel
Quoted 12 lines · Johannes Berg
Quoted 3 lines · Ben Greear
I see this was added sometime recently: NL80211_ATTR_PAD
If another enum member is added, should it replace the PAD enum?
No.
Quoted 4 lines
At the least, I think we need some comments about how this is to be
dealt with.
Quoted 8 lines
Quoted 1 line
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