[PATCH v2 0/2] net/mlx5: improvements to link status handling
Dariusz Sosnowski
dsosnowski at nvidia.com
Tue Nov 3 12:04:39 CET 2026
> -----Original Message-----
> From: Stephen Hemminger <stephen at networkplumber.org>
> Sent: Monday, November 2, 2026 9:08 AM
> To: Dariusz Sosnowski <dsosnowski at nvidia.com>
> Cc: Slava Ovsiienko <viacheslavo at nvidia.com>; Bing Zhao
> <bingz at nvidia.com>; Ori Kam <orika at nvidia.com>; Suanming Mou
> <suanmingm at nvidia.com>; Matan Azrad <matan at nvidia.com>;
> dev at dpdk.org
> Subject: Re: [PATCH v2 0/2] net/mlx5: improvements to link status handling
>
> On Fri, 30 Oct 2026 18:28:41 +0100
> Dariusz Sosnowski <dsosnowski at nvidia.com> wrote:
>
> > This series is a result of splitting patch:
> > https://patches.dpdk.org/project/dpdk/patch/20261026160400.1290443-1-
> d
> > sosnowski at nvidia.com/
> >
> > Patch 1 - Fix for mlx5 link update function to query current link
> > carrier status, bypassing the delay introduced by linkwatch in Linux kernel.
> >
> > Patch 2 - Move to link status polling, in place of relying on netlink
> > events which can be delayed by linkwatch for up to 1s.
>
> Instead of polling is there a way to get the lsc directly from devx or ibv on
> mlx5? That would work around the issue and avoid the overhead.
>From DevX, unfortunately no.
In ibv there are 2 options:
- IBV_EVENT_PORT_ACTIVE/ERR - generated on up/down respectively;
On ethernet devices, these are generated from netdev carrier state, so they are
subjected to the same linkwatch delay.
- IBV_EVENT_DEVICE_SPEED_CHANGE - generated on up and down;
Is generated immediately on FW event reception.
It is available from Linux kernel v7.0 and rdma-core v62.0.
IBV_EVENT_DEVICE_SPEED_CHANGE would be ideal here,
but there's no good way to discover whether currently running kernel supports it.
Theoretically, this event was added alongside ibv_query_port_speed() IB verb.
Following logic could be implemented (for DPDK compiled with recent rdma-core)
- Call ibv_query_port_speed()
- If error:
- start listening on device speed change async event
- on event: query link status of DPDK ports on that device
- else if ENOTSUP:
- start link status poll loop
>
> Long term, it would be good if kernel had sysctl to set linkwatch per interface
> but it doesn't
More information about the dev
mailing list