net/mlx5: Support enable_vnet devlink dev param
authorParav Pandit <parav@nvidia.com>
Tue, 10 Aug 2021 13:24:24 +0000 (16:24 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Aug 2021 13:34:22 +0000 (14:34 +0100)
commit70862a5d609d7dc8f0501983391f1df9eca6714f
treea5e7f4cd8389d2ed1acea4a04ec602a0d1cbbb04
parent87158cedf00ef225ae111dba96973b172086420e
net/mlx5: Support enable_vnet devlink dev param

Enable user to disable VDPA net auxiliary device so that when it is not
required, user can disable it.

For example,

$ devlink dev param set pci/0000:06:00.0 \
              name enable_vnet value false cmode driverinit
$ devlink dev reload pci/0000:06:00.0

At this point devlink instance do not create auxiliary device
mlx5_core.vnet.2 for the VDPA net functionality.

Signed-off-by: Parav Pandit <parav@nvidia.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/dev.c
drivers/net/ethernet/mellanox/mlx5/core/devlink.c
drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h