Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1387418
| From | Lars Ellenberg <lars.ellenberg@linbit.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [Drbd-dev] [PATCH net-next 0/8] netlink: align attributes when needed (patchset #3) |
| Date | 2016-04-26 14:20 +0200 |
| Message-ID | <rsa89-7In-5@gated-at.bofh.it> (permalink) |
| References | <rs6ed-41c-7@gated-at.bofh.it> <rs9OP-76D-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Apr 26, 2016 at 01:54:27PM +0200, Lars Ellenberg wrote:
> On Tue, Apr 26, 2016 at 10:06:10AM +0200, Nicolas Dichtel wrote:
> >
> > This is the continuation (series #3) of the work done to align netlink
> > attributes when these attributes contain some 64-bit fields.
> >
> > It's the last patchset from what I've seen.
> >
> > The last user of nla_put_u64() is block/drbd. This module does not use
> > standard netlink API (see all the stuff in include/linux/genl_magic_struct.h
> > and include/linux/genl_magic_func.h). I didn't modify it because it's seems
> > hard to do it whithout testing and fully understanding the context
>
> Something like this should just work.
> + * @attrtype: attribute type
> + * @value: numeric value
> + */
> +static inline int nla_put_u64_64bit_unspec(struct sk_buff *skb, int attrtype,
> + u64 value)
> +{
> + return nla_put_64bit(skb, attrtype, sizeof(u64), &value, NLA_UNSPEC);
Ok, I confused attribute and policy type there for a sec.
Anyways, 0 works just fine,
all our nested attribute enums are != 0,
because nla_parse skips type 0.
Lars
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH net-next 0/8] netlink: align attributes when needed (patchset #3) Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2016-04-26 10:10 +0200
[PATCH net-next 1/8] macsec: use nla_put_u64_64bit() Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2016-04-26 10:10 +0200
[PATCH net-next 3/8] fs/quota: use nla_put_u64_64bit() Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2016-04-26 10:10 +0200
Re: [PATCH net-next 3/8] fs/quota: use nla_put_u64_64bit() Jan Kara <jack@suse.cz> - 2016-04-26 13:10 +0200
Re: [PATCH net-next 3/8] fs/quota: use nla_put_u64_64bit() Jan Kara <jack@suse.cz> - 2016-04-26 14:40 +0200
Re: [PATCH net-next 3/8] fs/quota: use nla_put_u64_64bit() Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2016-04-26 14:40 +0200
Re: [PATCH net-next 3/8] fs/quota: use nla_put_u64_64bit() David Miller <davem@davemloft.net> - 2016-04-26 18:30 +0200
[PATCH net-next 5/8] ovs: align nlattr properly when needed Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2016-04-26 10:10 +0200
[PATCH net-next 8/8] sched: align nlattr properly when needed Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2016-04-26 10:10 +0200
[PATCH net-next 7/8] neigh: align nlattr properly when needed Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2016-04-26 10:10 +0200
[PATCH net-next 2/8] drivers/wireless: use nla_put_u64_64bit() Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2016-04-26 10:20 +0200
[PATCH net-next 4/8] sock_diag: align nlattr properly when needed Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2016-04-26 10:20 +0200
Re: [PATCH net-next 0/8] netlink: align attributes when needed (patchset #3) Lars Ellenberg <lars.ellenberg@linbit.com> - 2016-04-26 14:00 +0200
Re: [Drbd-dev] [PATCH net-next 0/8] netlink: align attributes when needed (patchset #3) Lars Ellenberg <lars.ellenberg@linbit.com> - 2016-04-26 14:20 +0200
Re: [PATCH net-next 0/8] netlink: align attributes when needed (patchset #3) David Miller <davem@davemloft.net> - 2016-04-26 18:30 +0200
Re: [PATCH net-next 0/8] netlink: align attributes when needed (patchset #3) David Miller <davem@davemloft.net> - 2016-04-26 18:10 +0200
csiph-web