Re: [PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module

2017-10-28 Thread Hal Rosenstock
On 10/28/2017 6:42 AM, Thomas Bogendoerfer wrote: >> I must be missing something as to what is going on in this scenario. I think I see what's going on now. The -EINVAL in kernel sysfs/rate_show causes error to either open or read of file. I had checked that an empty file is parsed correctly but

Re: [PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module

2017-10-28 Thread Hal Rosenstock
On 10/28/2017 6:42 AM, Thomas Bogendoerfer wrote: >> I must be missing something as to what is going on in this scenario. I think I see what's going on now. The -EINVAL in kernel sysfs/rate_show causes error to either open or read of file. I had checked that an empty file is parsed correctly but

Re: [PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module

2017-10-28 Thread Thomas Bogendoerfer
On Fri, 27 Oct 2017 19:19:05 -0400 Hal Rosenstock wrote: > On 10/27/2017 7:04 PM, Ghazale Hosseinabadi wrote: > > > > > > On 10/27/2017 03:52 PM, Hal Rosenstock wrote: > >> On 10/27/2017 5:54 PM, Ghazale Hosseinabadi wrote: > >>> When running ibstat (if transceiver is

Re: [PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module

2017-10-28 Thread Thomas Bogendoerfer
On Fri, 27 Oct 2017 19:19:05 -0400 Hal Rosenstock wrote: > On 10/27/2017 7:04 PM, Ghazale Hosseinabadi wrote: > > > > > > On 10/27/2017 03:52 PM, Hal Rosenstock wrote: > >> On 10/27/2017 5:54 PM, Ghazale Hosseinabadi wrote: > >>> When running ibstat (if transceiver is not connected in

Re: [PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module

2017-10-27 Thread Ghazale Hosseinabadi
On 10/27/2017 04:19 PM, Hal Rosenstock wrote: On 10/27/2017 7:04 PM, Ghazale Hosseinabadi wrote: On 10/27/2017 03:52 PM, Hal Rosenstock wrote: On 10/27/2017 5:54 PM, Ghazale Hosseinabadi wrote: When running ibstat (if transceiver is not connected in adapter): ibpanic: [7851] main: stat of

Re: [PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module

2017-10-27 Thread Ghazale Hosseinabadi
On 10/27/2017 04:19 PM, Hal Rosenstock wrote: On 10/27/2017 7:04 PM, Ghazale Hosseinabadi wrote: On 10/27/2017 03:52 PM, Hal Rosenstock wrote: On 10/27/2017 5:54 PM, Ghazale Hosseinabadi wrote: When running ibstat (if transceiver is not connected in adapter): ibpanic: [7851] main: stat of

Re: [PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module

2017-10-27 Thread Ghazale Hosseinabadi
On 10/27/2017 05:17 PM, Hal Rosenstock wrote: On 10/27/2017 7:19 PM, Hal Rosenstock wrote: On 10/27/2017 7:04 PM, Ghazale Hosseinabadi wrote: On 10/27/2017 03:52 PM, Hal Rosenstock wrote: On 10/27/2017 5:54 PM, Ghazale Hosseinabadi wrote: When running ibstat (if transceiver is not

Re: [PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module

2017-10-27 Thread Ghazale Hosseinabadi
On 10/27/2017 05:17 PM, Hal Rosenstock wrote: On 10/27/2017 7:19 PM, Hal Rosenstock wrote: On 10/27/2017 7:04 PM, Ghazale Hosseinabadi wrote: On 10/27/2017 03:52 PM, Hal Rosenstock wrote: On 10/27/2017 5:54 PM, Ghazale Hosseinabadi wrote: When running ibstat (if transceiver is not

Re: [PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module

2017-10-27 Thread Hal Rosenstock
On 10/27/2017 7:19 PM, Hal Rosenstock wrote: > On 10/27/2017 7:04 PM, Ghazale Hosseinabadi wrote: >> >> >> On 10/27/2017 03:52 PM, Hal Rosenstock wrote: >>> On 10/27/2017 5:54 PM, Ghazale Hosseinabadi wrote: When running ibstat (if transceiver is not connected in adapter): ibpanic:

Re: [PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module

2017-10-27 Thread Hal Rosenstock
On 10/27/2017 7:19 PM, Hal Rosenstock wrote: > On 10/27/2017 7:04 PM, Ghazale Hosseinabadi wrote: >> >> >> On 10/27/2017 03:52 PM, Hal Rosenstock wrote: >>> On 10/27/2017 5:54 PM, Ghazale Hosseinabadi wrote: When running ibstat (if transceiver is not connected in adapter): ibpanic:

Re: [PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module

2017-10-27 Thread Hal Rosenstock
On 10/27/2017 7:04 PM, Ghazale Hosseinabadi wrote: > > > On 10/27/2017 03:52 PM, Hal Rosenstock wrote: >> On 10/27/2017 5:54 PM, Ghazale Hosseinabadi wrote: >>> When running ibstat (if transceiver is not connected in adapter): >>> >>> ibpanic: [7851] main: stat of IB device 'mlx5_1' failed:

Re: [PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module

2017-10-27 Thread Hal Rosenstock
On 10/27/2017 7:04 PM, Ghazale Hosseinabadi wrote: > > > On 10/27/2017 03:52 PM, Hal Rosenstock wrote: >> On 10/27/2017 5:54 PM, Ghazale Hosseinabadi wrote: >>> When running ibstat (if transceiver is not connected in adapter): >>> >>> ibpanic: [7851] main: stat of IB device 'mlx5_1' failed:

Re: [PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module

2017-10-27 Thread Ghazale Hosseinabadi
On 10/27/2017 03:52 PM, Hal Rosenstock wrote: On 10/27/2017 5:54 PM, Ghazale Hosseinabadi wrote: When running ibstat (if transceiver is not connected in adapter): ibpanic: [7851] main: stat of IB device 'mlx5_1' failed: Invalid argument Any output before that ? no, It only prints this

Re: [PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module

2017-10-27 Thread Ghazale Hosseinabadi
On 10/27/2017 03:52 PM, Hal Rosenstock wrote: On 10/27/2017 5:54 PM, Ghazale Hosseinabadi wrote: When running ibstat (if transceiver is not connected in adapter): ibpanic: [7851] main: stat of IB device 'mlx5_1' failed: Invalid argument Any output before that ? no, It only prints this

Re: [PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module

2017-10-27 Thread Hal Rosenstock
On 10/27/2017 5:54 PM, Ghazale Hosseinabadi wrote: > When running ibstat (if transceiver is not connected in adapter): > > ibpanic: [7851] main: stat of IB device 'mlx5_1' failed: Invalid argument Any output before that ? I'm trying to understand how far it gets. It looks to me that empty rate

Re: [PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module

2017-10-27 Thread Hal Rosenstock
On 10/27/2017 5:54 PM, Ghazale Hosseinabadi wrote: > When running ibstat (if transceiver is not connected in adapter): > > ibpanic: [7851] main: stat of IB device 'mlx5_1' failed: Invalid argument Any output before that ? I'm trying to understand how far it gets. It looks to me that empty rate

Re: [PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module

2017-10-27 Thread Ghazale Hosseinabadi
, 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:h...@dev.mellanox.co.il] >>

Re: [PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module

2017-10-27 Thread Ghazale Hosseinabadi
, 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:h...@dev.mellanox.co.il] >>

Re: [PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module

2017-10-27 Thread Hal Rosenstock
<tbogendoer...@suse.de>; Matan Barak <mat...@mellanox.com>; Leon >> Romanovsky <leo...@mellanox.com>; Doug Ledford <dledf...@redhat.com>; >> linux-r...@vger.kernel.org; linux-kernel@vger.kernel.org >> Cc: Ghazale Hosseinabadi <ghazale.hosseinab...@oracle.com> >&

Re: [PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module

2017-10-27 Thread Hal Rosenstock
gt; Romanovsky ; Doug Ledford ; >> linux-r...@vger.kernel.org; linux-kernel@vger.kernel.org >> Cc: Ghazale Hosseinabadi >> 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 wro

Re: [PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module

2017-10-27 Thread Ghazale Hosseinabadi
, 2017 1:18:50 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 2:32 PM, Parav Pandit wrote: > However I believe that ibstat tool should be enhanced to report unknown port > speed instead of expecting d

Re: [PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module

2017-10-27 Thread Ghazale Hosseinabadi
, 2017 1:18:50 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 2:32 PM, Parav Pandit wrote: > However I believe that ibstat tool should be enhanced to report unknown port > speed instead of expecting d

RE: [PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module

2017-10-27 Thread Parav Pandit
manovsky <leo...@mellanox.com>; Doug Ledford <dledf...@redhat.com>; > linux-r...@vger.kernel.org; linux-kernel@vger.kernel.org > Cc: Ghazale Hosseinabadi <ghazale.hosseinab...@oracle.com> > Subject: Re: [PATCH] IB/mlx5: give back valid speed/width even without plugged

RE: [PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module

2017-10-27 Thread Parav Pandit
nel.org > Cc: Ghazale Hosseinabadi > 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 inste

Re: [PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module

2017-10-27 Thread Hal Rosenstock
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//ports//rate file which is supposed

Re: [PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module

2017-10-27 Thread Hal Rosenstock
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//ports//rate file which is supposed

Re: [PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module

2017-10-27 Thread Leon Romanovsky
On Fri, Oct 27, 2017 at 02:30:11PM +0200, Thomas Bogendoerfer wrote: > If there is no SFP module plugged into a port of mlx5 cards > 'cat /sys/class/infniband/mlx5_X/ports/1/rate' returns Invalid argument. > This causes tools like 'ibstat' to malfunction. This change adjusts mlx5 > to all other

Re: [PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module

2017-10-27 Thread Leon Romanovsky
On Fri, Oct 27, 2017 at 02:30:11PM +0200, Thomas Bogendoerfer wrote: > If there is no SFP module plugged into a port of mlx5 cards > 'cat /sys/class/infniband/mlx5_X/ports/1/rate' returns Invalid argument. > This causes tools like 'ibstat' to malfunction. This change adjusts mlx5 > to all other

RE: [PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module

2017-10-27 Thread Parav Pandit
x.com>; Doug Ledford <dledf...@redhat.com>; linux- > r...@vger.kernel.org; linux-kernel@vger.kernel.org > Subject: [PATCH] IB/mlx5: give back valid speed/width even without plugged in > SFP module > > If there is no SFP module plugged into a port of mlx5 cards 'cat > /sy

RE: [PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module

2017-10-27 Thread Parav Pandit
nel.org; linux-kernel@vger.kernel.org > Subject: [PATCH] IB/mlx5: give back valid speed/width even without plugged in > SFP module > > If there is no SFP module plugged into a port of mlx5 cards 'cat > /sys/class/infniband/mlx5_X/ports/1/rate' returns Invalid argument. > This ca

[PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module

2017-10-27 Thread Thomas Bogendoerfer
If there is no SFP module plugged into a port of mlx5 cards 'cat /sys/class/infniband/mlx5_X/ports/1/rate' returns Invalid argument. This causes tools like 'ibstat' to malfunction. This change adjusts mlx5 to all other RoCE/iWarp drivers, which always return valid speed/width. Signed-off-by:

[PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module

2017-10-27 Thread Thomas Bogendoerfer
If there is no SFP module plugged into a port of mlx5 cards 'cat /sys/class/infniband/mlx5_X/ports/1/rate' returns Invalid argument. This causes tools like 'ibstat' to malfunction. This change adjusts mlx5 to all other RoCE/iWarp drivers, which always return valid speed/width. Signed-off-by: