On Sun, Aug 30, 2020 at 01:14:30PM +0300, Leon Romanovsky wrote: > diff --git a/include/rdma/restrack.h b/include/rdma/restrack.h > index 10bfed0fcd32..d52f7ad6641f 100644 > +++ b/include/rdma/restrack.h > @@ -68,6 +68,14 @@ struct rdma_restrack_entry { > * As an example for that, see mlx5 QPs with type MLX5_IB_QPT_HW_GSI > */ > bool valid; > + /** > + * @no_track: don't add this entry to restrack DB > + * > + * This field is used to mark an entry that doesn't need to be added to > + * internal restrack DB and presented later to the users at the nldev > + * query stage. > + */ > + u8 no_track : 1; > /* > * @kref: Protect destroy of the resource > */ The valid may as well be changed to a bitfield too > +/** > + * rdma_restrack_no_track() - don't add resource to the DB > + * @res: resource entry > + * > + * Every user of thie API should be cross examined. > + * Probaby you don't need to use this function. > + */ > +static inline void rdma_restrack_no_track(struct rdma_restrack_entry *res) > +{ > + res->no_track = true; > +} > +static inline bool rdma_restrack_is_tracked(struct rdma_restrack_entry *res) > +{ > + return !res->no_track; > +} Are these wrappers really necessary? Jason