Re: [PATCH net-next v10 1/4] net netlink: Add new type NLA_FLAG_BITS
From: David Ahern <hidden>
Date: 2017-06-12 15:00:45
From: David Ahern <hidden>
Date: 2017-06-12 15:00:45
On 6/12/17 8:14 AM, Jiri Pirko wrote:
quoted
quoted
The thing is, struct nla_flag_bits is tightly coupled with NLA_FLAG_BITS enum value. They should be in the same uapi file. That makes sense to me.Sure - they should be in the same file. But is it uapi/linux/netlink.h?Might be the netlink-types.h you mentioned above. ccing DavidA.
Just saw this patch set this morning. Few comments: 1. I think nla_bitfield or nla_bitmap is a better name than nla_flag_bits 2. The length should be open ended with the size of the array determined by nla_len / sizeof(struct nla_bitfield). That allows this to be extended to an arbitrary large bitfield as needed. 3. IMO since these are nla prefixes and new NLA type they should be in uapi/linux/netlink.h