* [PATCH rdma-next] RDMA/mana_ib: Use ib_get_eth_speed for reporting port speed
@ 2026-05-12 9:40 Konstantin Taranov
2026-05-13 22:15 ` Long Li
0 siblings, 1 reply; 2+ messages in thread
From: Konstantin Taranov @ 2026-05-12 9:40 UTC (permalink / raw)
To: kotaranov, shirazsaleem, longli, jgg, leon; +Cc: linux-rdma, linux-kernel
From: Shiraz Saleem <shirazsaleem@microsoft.com>
Replace hardcoded IB_WIDTH_4X/IB_SPEED_EDR with ib_get_eth_speed()
to report the actual link speed in mana_ib_query_port().
Fixes: 4bda1d5332ec ("RDMA/mana_ib: Implement port parameters")
Signed-off-by: Shiraz Saleem <shirazsaleem@microsoft.com>
Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
---
drivers/infiniband/hw/mana/main.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/infiniband/hw/mana/main.c b/drivers/infiniband/hw/mana/main.c
index d4dfbec..9af92a4 100644
--- a/drivers/infiniband/hw/mana/main.c
+++ b/drivers/infiniband/hw/mana/main.c
@@ -633,8 +633,7 @@ int mana_ib_query_port(struct ib_device *ibdev, u32 port,
props->phys_state = IB_PORT_PHYS_STATE_DISABLED;
}
- props->active_width = IB_WIDTH_4X;
- props->active_speed = IB_SPEED_EDR;
+ ib_get_eth_speed(ibdev, port, &props->active_speed, &props->active_width);
props->pkey_tbl_len = 1;
if (mana_ib_is_rnic(dev)) {
props->gid_tbl_len = 16;
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* RE: [PATCH rdma-next] RDMA/mana_ib: Use ib_get_eth_speed for reporting port speed
2026-05-12 9:40 [PATCH rdma-next] RDMA/mana_ib: Use ib_get_eth_speed for reporting port speed Konstantin Taranov
@ 2026-05-13 22:15 ` Long Li
0 siblings, 0 replies; 2+ messages in thread
From: Long Li @ 2026-05-13 22:15 UTC (permalink / raw)
To: Konstantin Taranov, Konstantin Taranov, Shiraz Saleem,
jgg@ziepe.ca, leon@kernel.org
Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
> From: Shiraz Saleem <shirazsaleem@microsoft.com>
>
> Replace hardcoded IB_WIDTH_4X/IB_SPEED_EDR with ib_get_eth_speed() to
> report the actual link speed in mana_ib_query_port().
>
> Fixes: 4bda1d5332ec ("RDMA/mana_ib: Implement port parameters")
> Signed-off-by: Shiraz Saleem <shirazsaleem@microsoft.com>
> Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
> ---
> drivers/infiniband/hw/mana/main.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/infiniband/hw/mana/main.c
> b/drivers/infiniband/hw/mana/main.c
> index d4dfbec..9af92a4 100644
> --- a/drivers/infiniband/hw/mana/main.c
> +++ b/drivers/infiniband/hw/mana/main.c
> @@ -633,8 +633,7 @@ int mana_ib_query_port(struct ib_device *ibdev, u32
> port,
> props->phys_state = IB_PORT_PHYS_STATE_DISABLED;
> }
>
> - props->active_width = IB_WIDTH_4X;
> - props->active_speed = IB_SPEED_EDR;
> + ib_get_eth_speed(ibdev, port, &props->active_speed,
> +&props->active_width);
Should it check the return value, use default values as fallback?
Something like:
ret = ib_get_eth_speed(ibdev, port, &props->active_speed, &props->active_width);
if (ret) {
props->active_width = IB_WIDTH_4X;
props->active_speed = IB_SPEED_EDR;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-13 22:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-12 9:40 [PATCH rdma-next] RDMA/mana_ib: Use ib_get_eth_speed for reporting port speed Konstantin Taranov
2026-05-13 22:15 ` Long Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox