Skip to content

Commit 6eff336

Browse files
mark-blochgregkh
authored andcommitted
RDMA/mlx5: Obtain upper net device only when needed
[ Upstream commit 3ed7f9e ] Report the upper device's state as the RDMA port state only in RoCE LAG or switchdev LAG. Fixes: 27f9e0c ("net/mlx5: Lag, Add single RDMA device in multiport mode") Signed-off-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Michael Guralnik <michaelgur@nvidia.com> Link: https://patch.msgid.link/20240909173025.30422-3-michaelgur@nvidia.com Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent e8721e9 commit 6eff336

File tree

1 file changed

+1
-1
lines changed
  • drivers/infiniband/hw/mlx5

1 file changed

+1
-1
lines changed

drivers/infiniband/hw/mlx5/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ static int mlx5_query_port_roce(struct ib_device *device, u32 port_num,
539539
if (!ndev)
540540
goto out;
541541

542-
if (dev->lag_active) {
542+
if (mlx5_lag_is_roce(mdev) || mlx5_lag_is_sriov(mdev)) {
543543
rcu_read_lock();
544544
upper = netdev_master_upper_dev_get_rcu(ndev);
545545
if (upper) {

0 commit comments

Comments
 (0)