Merge branch 'devlink-aux-devices'
Parav Pandit says:
====================
devlink: Control auxiliary devices
Currently, for mlx5 multi-function device, a user is not able to control
which functionality to enable/disable. For example, each PCI
PF, VF, SF function by default has netdevice, RDMA and vdpa-net
devices always enabled.
Hence, enable user to control which device functionality to enable/disable.
This is achieved by using existing devlink params [1] to
enable/disable eth, rdma and vdpa net functionality control knob.
For example user interested in only vdpa device function: performs,
$ devlink dev param set pci/0000:06:00.0 name enable_rdma value false \
cmode driverinit
$ devlink dev param set pci/0000:06:00.0 name enable_eth value false \
cmode driverinit
$ devlink dev param set pci/0000:06:00.0 name enable_vnet value true \
cmode driverinit
$ devlink dev reload pci/0000:06:00.0
Reload command honors parameters set, initializes the device that user
has composed using devlink dev params and resources.
Devices before reload:
mlx5_core.sf.4
(subfunction device)
/\
/| \
/ | \
/ | \
mlx5_core.eth.4 | mlx5_core.rdma.4
(SF eth aux dev) | (SF rdma aux dev)
| | |
| | |
enp6s0f0s88 | mlx5_0
(SF netdev) | (SF rdma device)
|
mlx5_core.vnet.4
(SF vnet aux dev)
|
|
auxiliary/mlx5_core.sf.4
(vdpa net mgmt device)
Above example reconfigures the device with only VDPA functionality.
Devices after reload:
mlx5_core.sf.4
(subfunction device)
/\
/ \
/ \
/ \
mlx5_core.vnet.4 no eth, no rdma aux devices
(SF vnet aux dev)
Above parameters enable user to compose the device as needed based
on the use case.
Since devlink params are done on the devlink instance, these
knobs are uniformly usable for PCI PF, VF and SF devices.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Showing
Please register or sign in to comment