On Tue, Nov 20, 2018 at 04:46:37PM +0530, Selvin Xavier wrote: > On Tue, Nov 20, 2018 at 3:33 AM Jason Gunthorpe <jgg@xxxxxxxxxxxx> wrote: > > > > On Sun, Nov 18, 2018 at 04:29:32PM +0200, Leon Romanovsky wrote: > > > Hi, > > > > > > I want to clarify why IB device rename functionality didn't change > > > debugfs and would like to ask what to do next. > > > > > > In drivers/infiniband/hw/*, we have 6 devices which are calling > > > to debugfs_create_dir() in order to create debugfs root. > > > > > > The output is located in /sys/kernel/debug/. > > > > > > Such folders are created during driver module load and some of the drivers > > > creates subfolders for every device initialized, during device probe. > > > > > > 1. PCI-based connection > > > MLX5 and cxgb4 drivers separate the different device by their PCIs. > > > [leonro@server ~]$ sudo ls /sys/kernel/debug/mlx5/ > > > 0000:00:0c.0 > > > > > > 2. Based on IB device name > > > HFI1, ocrdma and qib create subfolders with device index embedded in it, > > > like hfi1_0,...,hfi1_N > > > > > > 3. No-separation between devices > > > USNIC like this. > > > > > > So device rename works seamlessly for type #1 and #3. Wile for type #2, > > > the debugfs entries don't change. > > > > > > Right now, I see three options: > > > 1. Do nothing. > > > > I don't think this is an option. If we don't also rename debugfs > > entries then debugfs entry add will fail during hotplug as the names > > will be in use. > > > > The name assigner chooses the lowest number, so, ie, if it plug in > > hfi0, and rename it to rdma0 then the next plugin will be hfi0 and the > > debugfs will fail. Presumably the driver will then fail to load. > > > > Since this is basically a race condition with userspace it has to be > > fixed. > > > > Jason > > Will do the PCI-ID based change for ocrdma and send it during the next > feature cycle. Thanks > > Thanks, > Selvin Xavier
Attachment:
signature.asc
Description: PGP signature