On Tue, Sep 05, 2017 at 11:46:45AM +0200, Jiri Benc wrote: > On Tue, 5 Sep 2017 13:51:45 +0800, Yang, Yi wrote: > > But if we follow your way, how does nla_for_each_nested handle such > > pattern? > > > > attribute1 > > attribute1_mask > > attribute2 > > attribute2_mask > > attribute3 > > attribute3_mask > > Uh? That will just work. Note that nla len contains the size of the > whole attribute, i.e. includes both fields. > > > I don't think this can increase performance and readability. >
I got the point, actually value and mask are data of one attribute, so they are three attributes but not six.