Re: [RFC PATCH net-next 3/3] net/mlx5e: Expose link down reason to ethtool

2017-06-23 Thread Gal Pressman
> On Thu, 22 Jun 2017 11:33:39 +0300, Gal Pressman wrote: >>> Is my reading correct that in case the reason is not in the >>> pddr2ethtool_table opaque binary data will be passed from the firmware >>> to user space? Is there any particular reason to allow for this? If >>> it's just for the rare

Re: [RFC PATCH net-next 3/3] net/mlx5e: Expose link down reason to ethtool

2017-06-22 Thread Jakub Kicinski
On Thu, 22 Jun 2017 11:33:39 +0300, Gal Pressman wrote: > > Is my reading correct that in case the reason is not in the > > pddr2ethtool_table opaque binary data will be passed from the firmware > > to user space? Is there any particular reason to allow for this? If > > it's just for the rare sce

Re: [RFC PATCH net-next 3/3] net/mlx5e: Expose link down reason to ethtool

2017-06-22 Thread Gal Pressman
> Is my reading correct that in case the reason is not in the > pddr2ethtool_table opaque binary data will be passed from the firmware > to user space? Is there any particular reason to allow for this? If > it's just for the rare scenario where a new error code needs to be > added perhaps it wou

Re: [RFC PATCH net-next 3/3] net/mlx5e: Expose link down reason to ethtool

2017-06-22 Thread Gal Pressman
>> +if (!netif_running(netdev)) { >> +ldr->reason = ETHTOOL_LINK_NETDEV_CARRIER_DOWN; >> +return 0; >> +} > This is generic, will work for any interface. The same is true for > ADMIN_DOWN. Either it is not required at all, since the information is > available via ot

Re: [RFC PATCH net-next 3/3] net/mlx5e: Expose link down reason to ethtool

2017-06-21 Thread Jakub Kicinski
On Wed, 21 Jun 2017 16:04:46 +0300, Gal Pressman wrote: > Use the new ethtool link down reason api, and expose troubleshooting > info regarding the link status. > > Signed-off-by: Gal Pressman > Signed-off-by: Saeed Mahameed Is my reading correct that in case the reason is not in the pddr2ethto

Re: [RFC PATCH net-next 3/3] net/mlx5e: Expose link down reason to ethtool

2017-06-21 Thread Andrew Lunn
> +static int mlx5e_get_link_down_reason(struct net_device *netdev, > + struct ethtool_link_down_reason *ldr) > +{ > + struct mlx5e_priv *priv = netdev_priv(netdev); > + u16 monitor_opcode; > + int err; > + > + if (!netif_running(netdev)) { > +

[RFC PATCH net-next 3/3] net/mlx5e: Expose link down reason to ethtool

2017-06-21 Thread Gal Pressman
Use the new ethtool link down reason api, and expose troubleshooting info regarding the link status. Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 107 + .../net/ethernet/mellanox/mlx5/core/mlx5_core.h|