Hi Leon, > > Right, and this is what bothers me. > > I would more than happy to change nla_for_each_nested() to be something > like nla_for_each_nested_type(...., sizeof(u32)), which will skip empty > lines, for code which can't have them. > > Thanks > Well, nla_for_each_nested_type(...., sizeof(u32)) seems good if the nested attribute is sure to contain only one type of attribute with constant length. (like the case of RDMA_NLDEV_ATTR_STAT_HWCOUNTERS). I accept that it is another elegant solution here. But efforts are needed to make sure if this is true for other cases. Regards Lin