linux-imx/Documentation/networking/devlink
Shay Drory a8ce7b26a5 devlink: Expose port function commands to control migratable
Expose port function commands to enable / disable migratable
capability, this is used to set the port function as migratable.

Live migration is the process of transferring a live virtual machine
from one physical host to another without disrupting its normal
operation.

In order for a VM to be able to perform LM, all the VM components must
be able to perform migration. e.g.: to be migratable.
In order for VF to be migratable, VF must be bound to VFIO driver with
migration support.

When migratable capability is enabled for a function of the port, the
device is making the necessary preparations for the function to be
migratable, which might include disabling features which cannot be
migrated.

Example of LM with migratable function configuration:
Set migratable of the VF's port function.

$ devlink port show pci/0000:06:00.0/2
pci/0000:06:00.0/2: type eth netdev enp6s0pf0vf1 flavour pcivf pfnum 0
vfnum 1
    function:
        hw_addr 00:00:00:00:00:00 migratable disable

$ devlink port function set pci/0000:06:00.0/2 migratable enable

$ devlink port show pci/0000:06:00.0/2
pci/0000:06:00.0/2: type eth netdev enp6s0pf0vf1 flavour pcivf pfnum 0
vfnum 1
    function:
        hw_addr 00:00:00:00:00:00 migratable enable

Bind VF to VFIO driver with migration support:
$ echo <pci_id> > /sys/bus/pci/devices/0000:08:00.0/driver/unbind
$ echo mlx5_vfio_pci > /sys/bus/pci/devices/0000:08:00.0/driver_override
$ echo <pci_id> > /sys/bus/pci/devices/0000:08:00.0/driver/bind

Attach VF to the VM.
Start the VM.
Perform LM.

Signed-off-by: Shay Drory <shayd@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Acked-by: Shannon Nelson <shannon.nelson@amd.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-12-07 20:09:18 -08:00
..
am65-nuss-cpsw-switch.rst net: ti: am65-cpsw-nuss: Add devlink support 2021-02-11 17:52:13 -08:00
bnxt.rst bnxt_en: Update bnxt.rst devlink documentation 2021-10-29 12:13:05 +01:00
devlink-dpipe.rst devlink: fix typo in documentation 2021-03-13 18:11:24 -08:00
devlink-flash.rst
devlink-health.rst docs: net: add missing devlink health cmd - trigger 2021-03-13 18:12:43 -08:00
devlink-info.rst
devlink-linecard.rst Revert "Merge branch 'mlxsw-line-card-model'" 2022-05-05 15:47:23 -07:00
devlink-params.rst devlink: Clarifies max_macs generic devlink param 2021-12-21 19:08:55 -08:00
devlink-port.rst devlink: Expose port function commands to control migratable 2022-12-07 20:09:18 -08:00
devlink-region.rst devlink: support directly reading from region memory 2022-11-30 20:54:30 -08:00
devlink-reload.rst
devlink-resource.rst
devlink-selftests.rst devlink: introduce framework for selftests 2022-07-28 21:56:53 -07:00
devlink-trap.rst devlink: Add packet traps for 802.1X operation 2022-11-09 19:06:14 -08:00
hns3.rst devlink: add documentation for hns3 driver 2021-07-26 12:16:03 +01:00
ice.rst ice: implement direct read for NVM and Shadow RAM regions 2022-11-30 20:54:31 -08:00
index.rst Documentation: devlink: fix the locking section 2022-08-24 19:32:02 -07:00
ionic.rst
iosm.rst net: wwan: iosm: correct devlink extra params 2021-10-02 16:05:20 +01:00
mlx4.rst
mlx5.rst Documentation: devlink: mlx5.rst: Fix htmldoc build warning 2022-01-06 16:22:55 -08:00
mlxsw.rst mlxsw: core_linecards: Expose device PSID over device info 2022-07-26 13:56:36 -07:00
mv88e6xxx.rst
netdevsim.rst Documentation: networking: correct possessive "its" 2022-08-31 12:36:08 -07:00
nfp.rst
octeontx2.rst devlink: add documentation for octeontx2 driver 2021-10-28 14:35:34 +01:00
prestera.rst documentation: networking: devlink: fix prestera.rst formatting that causes build warnings 2021-06-17 11:22:46 -07:00
qed.rst
ti-cpsw-switch.rst