Re: [PATCH infiniband-diags] ibstat no longer works with ibsim with latest libibumad in rdma-core

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/16/2018 3:11 PM, Jason Gunthorpe wrote:
> On Wed, May 16, 2018 at 02:40:58PM -0400, Hal Rosenstock wrote:
>>
>> If ibstat is run with ibsim, it no longer detects the local ports
>> with the latest libibumad from rdma-core with the following patch:
>>
>> commit abf72057c27750275d0668375d30c4971911d041
>> Author: Jason Gunthorpe <jgg@xxxxxxxxxxxx>
>> Date:   Thu Apr 5 11:04:14 2018 -0600
>>
>>     Now that we don't load the umad module if the HW doesn't use it (eg
>>     for roce only hardware) umad_init is failing to read the ABI version
>>     from the kernel.
>>
>>     Applications still want to use some libibumad services that are not
>>     related to the char device, so move the version check to umad_open_port
>>     instead.
>>
>>     Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx>
>>
>> umad_get_cas_names no longer finds any IB devices/ports
>> when running with ibsim as sysfs is no longer initialized with
>> the latest libibumad where this is not done as part of umad_init
>> but moved to umad_open_port.
> 
> Why is this not getting fixed in ibsim?

Unlike real hardware where sysfs is always /sys/class/..., with ibsim
moves that down a level with ./sys-nnnn/sys/class where the nnnn is per
client. It was the original umad_init in the client application and not
in libumad2sim that made this happen. Maybe I'm missing something but I
don't see way to move this into ibsim itself.

> IIRC the entire point of the above patch was to make ibstat work on
> rocee, so this seems to undo that effort.

How does it undo that ? The dummy umad_open_port call always fails
silently rather than treated as an error and ibstat continues on. On
RoCE hardware, this call does nothing. On IB hardware, it causes sysfs
to be properly populated. Without it, no IB devices are detected in
simulation but it works with real IB device.

I did not test this with RoCE as I don't have hardware but it should
work but I did test this with old and new libibumad (before and after
your patch) as well as IB hardware and IB simulation.

-- Hal
> Jason
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux