On Wed, Sep 26, 2018 at 09:03:42AM -0400, Dennis Dalessandro wrote: > On 9/25/2018 6:58 PM, Jason Gunthorpe wrote: > > diff --git a/include/rdma/rdma_vt.h b/include/rdma/rdma_vt.h > > index e32facdd9fd3d0..065c9fbe658995 100644 > > +++ b/include/rdma/rdma_vt.h > > @@ -429,7 +429,14 @@ static inline void rvt_set_ibdev_name(struct rvt_dev_info *rdi, > > const char *fmt, const char *name, > > const int unit) > > { > > - snprintf(rdi->ibdev.name, sizeof(rdi->ibdev.name), fmt, name, unit); > > + /* > > + * FIXME: rvt and its users want to touch the ibdev before > > + * registration and have things like the name work. We don't have the > > + * infrastructure in the core to support this directly today, hack it > > + * to work by setting the name manually here. > > + */ > > + dev_set_name(&rdi->ibdev.dev, fmt, name, unit); > > + strlcpy(rdi->ibdev.name, dev_name(&rdi->ibdev.dev), IB_DEVICE_NAME_MAX); > > } > > /** > > > > I'm OK with this. The comment seems to hint that we will have core > infrastructure to support this at some point, is that something you are > working on, or are hoping we would do? If we don't actually plan on it can > we just remove the FIXME and s/hack/make? Yeah, maybe, I have some code to make the device name locking change which might able adding a working 'set_name' API. I have to look at it. Jason