Re: [dpdk-dev] [PATCH] net/mlx5: fix link speed info when link is down

2019-08-05 Thread Raslan Darawsheh
Hi, > -Original Message- > From: dev On Behalf Of Xiaoyu Min > Sent: Monday, August 5, 2019 11:02 AM > To: Shahaf Shuler ; Yongseok Koh > ; Slava Ovsiienko > Cc: dev@dpdk.org; sta...@dpdk.org > Subject: [dpdk-dev] [PATCH] net/mlx5: fix link speed info when link

Re: [dpdk-dev] [PATCH] net/mlx5: fix link speed info when link is down

2019-08-05 Thread Slava Ovsiienko
> -Original Message- > From: Xiaoyu Min > Sent: Monday, August 5, 2019 11:02 > To: Shahaf Shuler ; Yongseok Koh > ; Slava Ovsiienko > Cc: dev@dpdk.org; sta...@dpdk.org > Subject: [PATCH] net/mlx5: fix link speed info when link is down > > When the link is down, the link speed returned by

[dpdk-dev] [PATCH] net/mlx5: fix link speed info when link is down

2019-08-05 Thread Xiaoyu Min
When the link is down, the link speed returned by ethtool is UINT32_MAX and the link status is 0. In this case, the DPDK ethdev link speed should be set to ETH_SPEED_NUM_NONE. Otherwise since link speed is non-zero but link status is zero, this is an inconsistent situation and -EAGAIN is returned,

Re: [dpdk-dev] [PATCH] net/mlx5: fix link speed

2018-02-05 Thread Shahaf Shuler
Monday, February 5, 2018 2:29 PM, Nélio Laranjeiro: > Subject: Re: [PATCH] net/mlx5: fix link speed > > On Mon, Feb 05, 2018 at 08:01:44PM +0800, Yuanhan Liu wrote: > > When the link is down, mlx5 kernel driver reports the link speed as -1 > > (UNKNOWN_SPEED). We need turn it to 0 for such case, o

Re: [dpdk-dev] [PATCH] net/mlx5: fix link speed

2018-02-05 Thread Nélio Laranjeiro
On Mon, Feb 05, 2018 at 08:01:44PM +0800, Yuanhan Liu wrote: > When the link is down, mlx5 kernel driver reports the link speed as -1 > (UNKNOWN_SPEED). We need turn it to 0 for such case, otherwise, it > will be re-queried again due to the link_speed is not 0, due to following > code: > > 1201

[dpdk-dev] [PATCH] net/mlx5: fix link speed

2018-02-05 Thread Yuanhan Liu
When the link is down, mlx5 kernel driver reports the link speed as -1 (UNKNOWN_SPEED). We need turn it to 0 for such case, otherwise, it will be re-queried again due to the link_speed is not 0, due to following code: 1201 if (((link->link_speed == 0) && link->link_status) || 1202