[RFC PATCH 4/5] nvmf-tcp: add support for retrieving adapter link speed

Hannes Reinecke hare at suse.de
Mon Sep 22 00:38:47 PDT 2025


On 9/21/25 13:12, Nilay Shroff wrote:
> Add support for retrieving the negotiated NIC link speed (in Mbps).
> This value can be factored into path scoring for the adaptive I/O
> policy. For visibility and debugging, a new sysfs attribute "speed"
> is also added under the NVMe path block device.
> 
> Signed-off-by: Nilay Shroff <nilay at linux.ibm.com>
> ---
>   drivers/nvme/host/multipath.c | 11 ++++++
>   drivers/nvme/host/nvme.h      |  3 ++
>   drivers/nvme/host/sysfs.c     |  5 +++
>   drivers/nvme/host/tcp.c       | 66 +++++++++++++++++++++++++++++++++++
>   4 files changed, 85 insertions(+)
> 
Why not for FC? We can easily extract the link speed from there, too ...

But why do we need to do that? We already calculated the weighted
average, so we _know_ the latency of each path. And then it's
pretty much immaterial if a path runs with a given speed; if the
latency is lower, that path is being preferred.
Irrespective of the speed, which might be deceptive anyway as
you'll only ever be able to retrieve the speed of the local
link, not of the entire path.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                  Kernel Storage Architect
hare at suse.de                                +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich



More information about the Linux-nvme mailing list