> > On Thu, Mar 29, 2018 at 09:09:47AM -0700, Steve Wise wrote: > > Each provider can register a "fill entry" function with the restrack core. > > This function will be called when filling out a resource, allowing the > > provider to add provider-specific details. The details consist of a > > nltable of nested attributes, that are in the form of <key, [print-type], > > value> tuples. Both key and value attributes are mandatory. The key > > nlattr must be a string, and the value nlattr can be one of the provider > > attributes that are generic, but typed, allowing the attributes to be > > validated. Currently the provider nlattr types include string, s32, > > u32, s64, and u64. The print-type nlattr allows a provider to specify > > an alternative display format for user tools displaying the attribute. > > For example, a u32 attribute will default to "%u", but a print-type > > attribute can be included for it to be displayed in hex. This allows > > the user tool to print the number in the format desired by the provider > > driver. > > > > More attrs can be defined as they become needed by providers. > > > > Signed-off-by: Steve Wise <swise@xxxxxxxxxxxxxxxxxxxxx> > > --- > > drivers/infiniband/core/nldev.c | 38 > ++++++++++++++++++++++++++++++++++++++ > > include/rdma/restrack.h | 10 ++++++++++ > > include/uapi/rdma/rdma_netlink.h | 21 +++++++++++++++++++++ > > 3 files changed, 69 insertions(+) > > > > Steve, > > You forgot to nullify those new functions in restrack_init(), not a big > deal because we are calling to restrack_init() after kzalloc(), but > better to be explicit about it. > > Thanks, > Reviewed-by: Leon Romanovsky <leonro@xxxxxxxxxxxx> I apologize. My mistake; I intended to add them. Thanks for the review! Steve. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html