lkml.org 
[lkml]   [2019]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH net-next 0/3] make nla_nest_start() add NLA_F_NESTED flag
From
Date
On Fri, 2019-04-26 at 09:00 -0600, David Ahern wrote:
>
> What is a valid use case for an attribute sometimes being a nest and
> sometimes not? That seems really weird to me (ie., wrong). They should
> be 2 separate attributes even if the backend processing is the same.

Yeah, well, in the mentioned case - NL80211_ATTR_VENDOR_DATA - we
basically have something that each driver (sometimes each operation that
uses it) decides what it means, and most drivers like proper netlink
attributes so have nested stuff there. Sometimes not, though in Prague
we decided we should make that documented by requiring a nested policy
and (perhaps, TBD) using something like an ERR_PTR() for "I really want
this to be binary".

I think as far as this particular attribute is concerned the ship has
sailed, but in the future I'd probably advocate having two attributes.

johannes

\
 
 \ /
  Last update: 2019-04-26 18:03    [W:0.153 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site