]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Fix rdma aux device on devlink reload
authorParav Pandit <parav@nvidia.com>
Tue, 17 Aug 2021 12:59:17 +0000 (15:59 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 7 Sep 2021 21:16:46 +0000 (14:16 -0700)
commit4a21224e65da21dd53602e50fb8e39bfb729b606
tree4ebec4c5656c47cbd885a6ad24e0a300aa49edff
parent76c4333a7121c7e94ee52df20e52fccc933a9941
net/mlx5: Fix rdma aux device on devlink reload

RDMA auxdev parameter registration was skipped for eswitch manager PCI PF.
Due to this when devlink parameter is read, it reads as false in below
code flow.

$ devlink dev reload pci/0000:06:00.0
  devlink_reload()
    mlx5_load_one()
      mlx5_attach_device()
        is_ib_enabled()
          devlink_param_driverinit_value_get()

Due to this, is_ib_enabled() returns false for the RDMA auxiliary
device. This results into a skipping RDMA auxiliary device creation on
reload.

There is no need to check for eswitch manager capability to support RDMA
auxiliary device. Hence, fix it by skipping eswitch manager capability.

Fixes: ac846dc2f292 ("net/mlx5: Support enable_rdma devlink dev param")
Signed-off-by: Parav Pandit <parav@nvidia.com>
Reviewed-by: Shay Drory <shayd@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/devlink.c