Re: [PATCH 2/3] RDMA/hfi1, rdmavt: open-code rvt_set_ibdev_name()

From: Leon Romanovsky

Date: Mon Mar 23 2026 - 07:02:18 EST


On Mon, Mar 23, 2026 at 09:48:59AM +0100, Arnd Bergmann wrote:
> On Mon, Mar 23, 2026, at 09:08, Leon Romanovsky wrote:
> > On Fri, Mar 20, 2026 at 04:53:04PM +0100, Arnd Bergmann wrote:
> >> On Fri, Mar 20, 2026, at 16:12, Arnd Bergmann wrote:
> >>
> >> > + */
> >> > + ibdev = &dd->verbs_dev.rdi.ibdev;
> >> > + dev_set_name(&ibdev->dev, "%s_%d", class_name(), dd->unit);
> >> > + strscpy(&ibdev->name, dev_name(&ibdev->dev), IB_DEVICE_NAME_MAX);
> >> > +
> >>
> >> I messed this up during a rebase, that should have been
> >>
> >> strscpy(ibdev->name, dev_name(&ibdev->dev), IB_DEVICE_NAME_MAX);
> >>
> >> (without the extra &). I'll wait for comments before resending.
> >
> > The hfi1 driver is scheduled for removal. Dennis has already posted the
> > hfi2 driver, which serves as its replacement.
>
> Ok, that does sound like a sensible decision, and I'll just drop
> patches 1 and 3 then, which are just cleanups.
>
> The cover letter at [1] suggests that the two drivers will still
> coexist for a bit though, so I think we'd still want patch 2/3
> in order to get a clean 'allmodconfig' build when the
> -Wmissing-format-attribute is enabled by defaultt. I have a couple
> of patches in flight.

Sure, builds need to be fixed.

>
> I took a quick look at the hfi2 driver, and noticed a few things
> that that may be worth addressing before it gets merged, mostly
> stuff copied from hfi1:
>
> - A few global functions with questionable namespacing:
> user_event_ack, ctxt_reset, iowait_init, register_pinning_interface,
> sc_{alloc,free,enable,disable}, pio_copy, acquire_hw_mutex,
> load_firmware, cap_mask.
> It would make sense to prefix all global identifiers with 'hfi2_',
> both out of principle, and to allow building hfi1 and hfi2 into
> an allyesconfig kernel without link failures.
>
> - The use of INFINIBAND_RDMAVT seems unnecessary: right now
> this is only used by hfi1, now shared with hfi2 but later to
> be exclusive to the latter. Since it is unlikely to ever
> be used by another driver again, this may be a good time
> to drop the abstraction again and integrate it all into
> hfi2, with the old version getting dropped along with hfi1.

The best approach is to drop rdmavt as well, since hfi2 is expected to
align with the other drivers in drivers/infiniband/hw.

Dennis, is this feasible?

Thanks