DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] doc: add ice VF live migration guide
@ 2023-07-03  5:14 Lingyu Liu
  2023-07-04  2:27 ` [PATCH V2] doc: add iavf " Lingyu Liu
  0 siblings, 1 reply; 10+ messages in thread
From: Lingyu Liu @ 2023-07-03  5:14 UTC (permalink / raw)
  To: dev, yahui.cao, qi.z.zhang, beilei.xing; +Cc: Lingyu Liu

Describe VF live migration steps for Intel E810 device.

Signed-off-by: Lingyu Liu <lingyu.liu@intel.com>
---
 doc/guides/nics/intel_vf.rst           | 93 ++++++++++++++++++++++++++
 doc/guides/rel_notes/release_23_07.rst |  3 +
 2 files changed, 96 insertions(+)

diff --git a/doc/guides/nics/intel_vf.rst b/doc/guides/nics/intel_vf.rst
index d365dbc185..b0aed5f5a5 100644
--- a/doc/guides/nics/intel_vf.rst
+++ b/doc/guides/nics/intel_vf.rst
@@ -622,6 +622,99 @@ which belongs to the destination VF on the VM.
    Inter-VM Communication
 
 
+Live Migrating a VM running DPDK
+--------------------------------
+
+The following describes a target environment:
+
+*   Host Operating System: Ubuntu 20.04.5
+
+*   Guest Operating System: Ubuntu 20.04.5
+
+*   Linux Kernel Version: 5.15.0-72-generic
+
+*   Target Applications: dpdk-testpmd
+
+*   Ice Kernel Driver Version: 1.11.17.1 `<https://www.intel.com/content/www/us/en/download/19630>`_
+
+*   Qemu Version: 7.2
+
+The setup procedure is as follows:
+
+#.  Before booting the Host OS, open **BIOS setup** and enable **Intel® VT features**.
+
+#.  In the Host OS
+
+    Install the ice driver and migration driver:
+
+    .. code-block:: console
+
+        insmod ice.ko
+        insmod ice-vfio-pci.ko
+
+    Create 2 VFs and bind them to vfio pci driver:
+
+    .. code-block:: console
+
+        echo 2 > /sys/bus/pci/devices/0000:ca:00.1/sriov_numvfs
+        echo "8086 1889" > /sys/bus/pci/drivers/ice-vfio-pci/new_id
+        dpdk-devbind.py -b ice-vfio-pci 0000:ca:11.0
+        dpdk-devbind.py -b ice-vfio-pci 0000:ca:11.1
+
+    .. note::
+
+        The command above creates two vfs for device 0000:ca:00.1:
+
+    .. code-block:: console
+
+        0000:ca:11.0 'Ethernet Adaptive Virtual Function 1889' if= drv=ice-vfio-pci unused=iavf
+        0000:ca:11.1 'Ethernet Adaptive Virtual Function 1889' if= drv=ice-vfio-pci unused=iavf
+
+#.  Now, start the migration source Virtual Machine by running the following command:
+
+    .. code-block:: console
+
+        qemu/build/x86_64-softmmu/qemu-system-x86_64 -enable-kvm -cpu host -m 4G -smp 1 -device vfio-pci,host=0000:ca:11.0,x-enable-migration=true,x-pre-copy-dirty-page-tracking=off -drive file=ubuntu-2004.qcow2 -nic user,hostfwd=tcp::5555-:22 -monitor stdio
+
+    .. note::
+        The vfio-pci,host=0000:ca:11.0 value indicates that you want to attach a vfio PCI device
+        to a Virtual Machine and the respective (Bus:Device.Function) numbers should be passed,
+        x-enable-migration=true indicates that this VF supports migration. Dirty page tracking
+        is not supported, so set x-pre-copy-dirty-page-tracking=off.
+
+#.  In VM, install iavf driver and vfio-pci driver
+
+    .. code-block:: console
+
+        insmod iavf.ko
+        modprobe vfio enable_unsafe_noiommu_mode=1
+        moodprobe vfio-pci
+
+#.  Bind net device to vfio-pci driver and launch dpdk-testpmd
+
+    .. code-block:: console
+
+        dpdk-testpmd -l 0-1 -- -i
+        testpmd> set txpkts 64
+        testpmd> start tx_first
+
+#. Start the migration destination Virtual Machine
+
+    .. code-block:: console
+
+        qemu/build/x86_64-softmmu/qemu-system-x86_64 -enable-kvm -cpu host -m 4G -smp 1 -device vfio-pci,host=0000:ca:11.1,x-enable-migration=true,x-pre-copy-dirty-page-tracking=off -drive file=ubuntu-2004.qcow2 -nic user,hostfwd=tcp::5556-:22 -monitor stdio -incoming tcp:127.0.0.1:4444
+
+ #. Start migration by issuing the command in qemu console
+
+    .. code-block:: console
+
+        migrate -d tcp:127.0.0.1:4444
+
+#. Log in the destination VM, and dpdk-testpmd is not interrupt
+
+.. note::
+
+        Host kernel version above 5.17 is not supported.
 Windows Support
 ---------------
 
diff --git a/doc/guides/rel_notes/release_23_07.rst b/doc/guides/rel_notes/release_23_07.rst
index 4459144140..2ca766b397 100644
--- a/doc/guides/rel_notes/release_23_07.rst
+++ b/doc/guides/rel_notes/release_23_07.rst
@@ -200,6 +200,9 @@ New Features
 
   Enhanced the GRO library to support TCP packets over IPv6 network.
 
+* **Added document for VFIO live migration of Intel E810 device.**
+
+  * Steps to live migrate Intel E810 VFIO devices.
 
 Removed Items
 -------------
-- 
2.25.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-07-27 10:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-03  5:14 [PATCH] doc: add ice VF live migration guide Lingyu Liu
2023-07-04  2:27 ` [PATCH V2] doc: add iavf " Lingyu Liu
2023-07-04  5:01   ` Cao, Yahui
2023-07-06  7:24   ` [PATCH v3] " Lingyu Liu
2023-07-07  6:08     ` [PATCH v4] " Lingyu Liu
2023-07-07  6:21       ` Cao, Yahui
2023-07-07  6:41         ` Zhang, Qi Z
2023-07-11 19:54         ` Thomas Monjalon
2023-07-27  8:34           ` Liu, Lingyu
2023-07-27 10:42             ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).