Re: [PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module
From: Ghazale Hosseinabadi
Date: Fri Oct 27 2017 - 17:55:13 EST
Hi,
----- Original Message -----
From: hal@xxxxxxxxxxxxxxxxxx
To: parav@xxxxxxxxxxxx, tbogendoerfer@xxxxxxx, matanb@xxxxxxxxxxxx, leonro@xxxxxxxxxxxx, dledford@xxxxxxxxxx, linux-rdma@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
Cc: ghazale.hosseinabadi@xxxxxxxxxx
Sent: Friday, October 27, 2017 2:30:33 PM GMT -08:00 US/Canada Pacific
Subject: Re: [PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module
On 10/27/2017 4:33 PM, Parav Pandit wrote:
>
>
>> -----Original Message-----
>> From: Hal Rosenstock [mailto:hal@xxxxxxxxxxxxxxxxxx]
>> Sent: Friday, October 27, 2017 3:19 PM
>> To: Parav Pandit <parav@xxxxxxxxxxxx>; Thomas Bogendoerfer
>> <tbogendoerfer@xxxxxxx>; Matan Barak <matanb@xxxxxxxxxxxx>; Leon
>> Romanovsky <leonro@xxxxxxxxxxxx>; Doug Ledford <dledford@xxxxxxxxxx>;
>> linux-rdma@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
>> Cc: Ghazale Hosseinabadi <ghazale.hosseinabadi@xxxxxxxxxx>
>> Subject: Re: [PATCH] IB/mlx5: give back valid speed/width even without plugged
>> in SFP module
>>
>> On 10/27/2017 2:32 PM, Parav Pandit wrote:
>>> However I believe that ibstat tool should be enhanced to report unknown port
>> speed instead of expecting drivers to supply some random number like this.
>>
>> ibstat gets the rate from libibumad via /sys/class/infiniband/<IB
>> device>/ports/<port number>/rate file which is supposed to be populated by the
>> driver. Is there no rate file in this error case ?
>>
> <...>/<port_num>/rate file exist.
>
> rate_show() has invalid active_width as expected due to nonexistence of SFP.
> So sysfs call return invalid value.
> We don't have invalid_active_width defined right now.
> So ibstat and other applications should not crash on such valid errors.
Agreed. I haven't seen ibstat crash reported though. Can someone provide
the crash details ?
When running ibstat (if transceiver is not connected in adapter):
ibpanic: [7851] main: stat of IB device 'mlx5_1' failed: Invalid argument
Thanks,
Ghazale