From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932603AbdJ0VzI convert rfc822-to-8bit (ORCPT ); Fri, 27 Oct 2017 17:55:08 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:47537 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932190AbdJ0VzG (ORCPT ); Fri, 27 Oct 2017 17:55:06 -0400 MIME-Version: 1.0 Message-ID: <64ef31c8-cb1a-4579-ba12-11fbf6d1d5c0@default> Date: Fri, 27 Oct 2017 14:54:55 -0700 (PDT) From: Ghazale Hosseinabadi To: Cc: , , , , , , Subject: Re: [PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module X-Mailer: Zimbra on Oracle Beehive Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Content-Disposition: inline X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, ----- Original Message ----- From: hal@dev.mellanox.co.il To: parav@mellanox.com, tbogendoerfer@suse.de, matanb@mellanox.com, leonro@mellanox.com, dledford@redhat.com, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Cc: ghazale.hosseinabadi@oracle.com 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@dev.mellanox.co.il] >> Sent: Friday, October 27, 2017 3:19 PM >> To: Parav Pandit ; Thomas Bogendoerfer >> ; Matan Barak ; Leon >> Romanovsky ; Doug Ledford ; >> linux-rdma@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 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/> device>/ports//rate file which is supposed to be populated by the >> driver. Is there no rate file in this error case ? >> > <...>//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