On Fri, Apr 20, 2018 at 01:20:44PM -0500, Steve Wise wrote: > > > > On Fri, Mar 30, 2018 at 11:03:36AM -0700, Steve Wise wrote: > > > diff --git a/drivers/infiniband/core/nldev.c > > b/drivers/infiniband/core/nldev.c > > > index 884843e..1a680a3 100644 > > > +++ b/drivers/infiniband/core/nldev.c > > > @@ -95,8 +95,25 @@ > > > [RDMA_NLDEV_ATTR_RES_PD_ENTRY] = { .type = > > NLA_NESTED }, > > > [RDMA_NLDEV_ATTR_RES_LOCAL_DMA_LKEY] = { .type = NLA_U32 }, > > > [RDMA_NLDEV_ATTR_RES_UNSAFE_GLOBAL_RKEY] = { .type = > > NLA_U32 }, > > > + [RDMA_NLDEV_ATTR_PROVIDER] = { .type = > > NLA_NESTED }, > > > + [RDMA_NLDEV_ATTR_PROVIDER_ENTRY] = { .type = > > NLA_NESTED }, > > > + [RDMA_NLDEV_ATTR_PROVIDER_STRING] = { .type = > > NLA_NUL_STRING, > > > + .len = RDMA_NLDEV_ATTR_ENTRY_STRLEN > > }, > > > + [RDMA_NLDEV_ATTR_PROVIDER_PRINT_TYPE] = { .type = NLA_U8 }, > > > + [RDMA_NLDEV_ATTR_PROVIDER_S32] = { .type = NLA_S32 }, > > > + [RDMA_NLDEV_ATTR_PROVIDER_U32] = { .type = NLA_U32 }, > > > + [RDMA_NLDEV_ATTR_PROVIDER_S64] = { .type = NLA_S64 }, > > > + [RDMA_NLDEV_ATTR_PROVIDER_U64] = { .type = NLA_U64 }, > > > > Why do we need 64 and 32 bit version of this? Pass everything as s64 > > or u64? > > > > To save skb space. You and Leon both seem to like only 64b. Guess 64b is > it then... Is space important? The u64 does get a bit expensive. I guess it doesn't matter either way. > > > + /* > > > + * provider-specific attributes. > > > + */ > > > + RDMA_NLDEV_ATTR_PROVIDER, /* nested table */ > > > + RDMA_NLDEV_ATTR_PROVIDER_ENTRY, /* nested > > table */ > > > + RDMA_NLDEV_ATTR_PROVIDER_STRING, /* string */ > > > + RDMA_NLDEV_ATTR_PROVIDER_PRINT_TYPE, /* u8 */ > > > > Document exactly what values PRINT_TYPE can take on, say, in an enum. > > It is in an enum. See rdma_nldev_print_type. I'll add a comment here. ah yes, saying 'u8' in the comment when there is an enum confuses :) But still need to specify the type, right /* u8 values from enum rdma_nldev_print_type */ ? Jason -- 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