On 8/3/2020 8:38 AM, Jiri Pirko wrote: > Sat, Aug 01, 2020 at 02:21:56AM CEST, jacob.e.kel...@intel.com wrote: > > [...] > >> + nla_mask = info->attrs[DEVLINK_ATTR_FLASH_UPDATE_OVERWRITE_MASK]; >> + if (nla_mask) { >> + if (!(supported_params & >> DEVLINK_SUPPORT_FLASH_UPDATE_OVERWRITE_MASK)) { >> + NL_SET_ERR_MSG_ATTR(info->extack, nla_mask, >> + "overwrite is not supported"); >> + return -EOPNOTSUPP; >> + } >> + params.overwrite_mask = nla_get_u32(nla_mask); > > It's a bitfield, should be NL_ATTR_TYPE_BITFIELD32. > I disagree. BITFIELD32 has both a mask and a field. This doesn't have the notion of a mask. The bits you allow are set, the bits you don't allow are not set. Having both a mask and a field over complicates this.
- [net-next v2 0/5] devlink flash update overwrite mask Jacob Keller
- [net-next v2 2/5] devlink: introduce flash update overwr... Jacob Keller
- Re: [net-next v2 2/5] devlink: introduce flash updat... Jiri Pirko
- Re: [net-next v2 2/5] devlink: introduce flash u... Jacob Keller
- Re: [net-next v2 2/5] devlink: introduce flash u... Jacob Keller
- [iproute2-next v2 4/5] Update devlink header for overwri... Jacob Keller
- [net-next v2 1/5] devlink: convert flash_update to use p... Jacob Keller
- [iproute2-next v2 5/5] devlink: support setting the over... Jacob Keller
- Re: [iproute2-next v2 5/5] devlink: support setting ... David Ahern
- Re: [iproute2-next v2 5/5] devlink: support sett... Jiri Pirko
- Re: [iproute2-next v2 5/5] devlink: support sett... Jacob Keller
- Re: [iproute2-next v2 5/5] devlink: support ... David Ahern
- Re: [iproute2-next v2 5/5] devlink: sup... Jacob Keller