Roland Dreier wrote: > So I would suggest reworking this into a series of patches: > > 1. Add a function ib_alloc_device_set_name() that does what your > ib_init_device() function does. (By the way, there is a problem with > your implementation, since alloc_name() just checks the list of > registered devices for a collision -- so devices that are allocated > but not registered could be assigned the same name, if the kernel > ever moves to parallelizing PCI probing or something like that -- so > you should probably fix alloc_name() to check a list of all allocated > devices or something like that) > The current implementation of IB core module doesn't maintain a list of allocated IB devices. Are you suggesting that we create a separate list of allocated but not registered devices in addition to the existing list of registered devices. Please clarify.
Alternatively, we can use the existing registered devices list named 'device_list' in the IB core module to keep track of both allocated and registered devices. Currently, the ib_device can be in one of three states(IB_DEV_UNINITIALIZED, IB_DEV_REGISTERED, IB_DEV_UNREGISTERED). We can enhance this to include 'INITIALIZED' state and add the ib_device to 'device_list' with this new state at ib_alloc_device_set_name() time. In this case, there will be no changes to alloc_name() as it is already checking for device name collision in a single list irrespective of the state of the device. > 2. For each RDMA driver (ie each of drivers/infiniband/hw/xxx), convert > to using ib_init_device_alloc_name() -- one patch per driver. > I wanted to point out that the proposed patch will not fix the /proc/interrupts reporting issue for ConnectX IB devices because request_irq() is done by mlx4_core and not by mlx4_ib. Also, mlx4_core doesn't plug into IB core module. > 3. Remove the old ib_alloc_device() and rename > ib_alloc_device_set_name() back to ib_alloc_device(). > > - R. > I assume that there will be a transition period to allow deprecation of ib_alloc_device_set_name() before we can apply this patch. Is my assumption correct? Regards, Benjamin _______________________________________________ general mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
