lkml.org 
[lkml]   [2017]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module
Date


> -----Original Message-----
> From: Hal Rosenstock [mailto:hal@dev.mellanox.co.il]
> Sent: Friday, October 27, 2017 3:19 PM
> To: Parav Pandit <parav@mellanox.com>; Thomas Bogendoerfer
> <tbogendoerfer@suse.de>; Matan Barak <matanb@mellanox.com>; Leon
> Romanovsky <leonro@mellanox.com>; Doug Ledford <dledford@redhat.com>;
> linux-rdma@vger.kernel.org; linux-kernel@vger.kernel.org
> Cc: Ghazale Hosseinabadi <ghazale.hosseinabadi@oracle.com>
> 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.

\
 
 \ /
  Last update: 2017-10-28 20:20    [W:0.874 / U:0.516 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site