Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/129369/?format=api
http://patches.dpdk.org/api/patches/129369/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230707060841.70826-1-lingyu.liu@intel.com/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20230707060841.70826-1-lingyu.liu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230707060841.70826-1-lingyu.liu@intel.com", "date": "2023-07-07T06:08:41", "name": "[v4] doc: add iavf live migration guide", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "817d4a48fc8f02cc486b7e2d43d55ad8ca1d678b", "submitter": { "id": 2079, "url": "http://patches.dpdk.org/api/people/2079/?format=api", "name": "Liu, Lingyu", "email": "lingyu.liu@intel.com" }, "delegate": { "id": 1540, "url": "http://patches.dpdk.org/api/users/1540/?format=api", "username": "qzhan15", "first_name": "Qi", "last_name": "Zhang", "email": "qi.z.zhang@intel.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20230707060841.70826-1-lingyu.liu@intel.com/mbox/", "series": [ { "id": 28872, "url": "http://patches.dpdk.org/api/series/28872/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=28872", "date": "2023-07-07T06:08:41", "name": "[v4] doc: add iavf live migration guide", "version": 4, "mbox": "http://patches.dpdk.org/series/28872/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/129369/comments/", "check": "warning", "checks": "http://patches.dpdk.org/api/patches/129369/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 83CC942DF4;\n\tFri, 7 Jul 2023 08:08:49 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 5CCA5410FD;\n\tFri, 7 Jul 2023 08:08:49 +0200 (CEST)", "from mga17.intel.com (mga17.intel.com [192.55.52.151])\n by mails.dpdk.org (Postfix) with ESMTP id 183BB40685\n for <dev@dpdk.org>; Fri, 7 Jul 2023 08:08:47 +0200 (CEST)", "from fmsmga008.fm.intel.com ([10.253.24.58])\n by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 06 Jul 2023 23:08:46 -0700", "from dpdk-liulingy-2.sh.intel.com ([10.67.119.34])\n by fmsmga008.fm.intel.com with ESMTP; 06 Jul 2023 23:08:45 -0700" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1688710128; x=1720246128;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=HYv2zQlpyOIWU8OAt2zqWf45dnscYDukrYbptUgvsxw=;\n b=M8+RrYk3S+eVS574PvddhyLAgOeiQgSt8WFtf64xpaQhErvvc5KgYurw\n ttKoi6FP8IEosT21Z/wATjm6cLC6Jtxvfn2eGBlRQLS40OBIW5PDMDpFA\n H8yaQ21ekqH7NneMe++FjccvEsknryO0xK2VxhKDnSWjvcOjP9UAWwD1v\n SNUvWPQH/glQnoPYMDUFgIU67QpF9WYnr2i6hL85C3gndJkeTGQIIx60c\n kn0waeQVVCzQip2sprcaUWY1bds7RuIVO8BNGZuhAQjAzwD0ofxkN/UlC\n r5yzlFF/Lw0OQaP/x1JvUsq6c+BH80kd4f4KYtVif7DYDF2KSMrDThWeP Q==;", "X-IronPort-AV": [ "E=McAfee;i=\"6600,9927,10763\"; a=\"344145043\"", "E=Sophos;i=\"6.01,187,1684825200\"; d=\"scan'208\";a=\"344145043\"", "E=McAfee;i=\"6600,9927,10763\"; a=\"785224094\"", "E=Sophos;i=\"6.01,187,1684825200\"; d=\"scan'208\";a=\"785224094\"" ], "X-ExtLoop1": "1", "From": "Lingyu Liu <lingyu.liu@intel.com>", "To": "dev@dpdk.org, yahui.cao@intel.com, qi.z.zhang@intel.com,\n beilei.xing@intel.com", "Cc": "Lingyu Liu <lingyu.liu@intel.com>", "Subject": "[PATCH v4] doc: add iavf live migration guide", "Date": "Fri, 7 Jul 2023 06:08:41 +0000", "Message-Id": "<20230707060841.70826-1-lingyu.liu@intel.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20230706072448.30063-1-lingyu.liu@intel.com>", "References": "<20230706072448.30063-1-lingyu.liu@intel.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org" }, "content": "Add iavf live migration steps based on KVM VFIO migration.\n\nSigned-off-by: Lingyu Liu <lingyu.liu@intel.com>\n---\nv2: Fixed CI.\n Added brief introduction about live migration.\n Clarified this is iavf feature.\n\nv3: Added intro and link about vfio live migration.\n Added description about kernel boot parameters.\n Changed to use sysfs to bind device to driver.\n Noted for running dpdk-testpmd.\n Highlighted KVM vfio migration.\n\nv4: Removed ice kernel driver version.\n---\n doc/guides/nics/intel_vf.rst | 113 +++++++++++++++++++++++++\n doc/guides/rel_notes/release_23_07.rst | 3 +\n 2 files changed, 116 insertions(+)", "diff": "diff --git a/doc/guides/nics/intel_vf.rst b/doc/guides/nics/intel_vf.rst\nindex d365dbc185..85b3b4fc24 100644\n--- a/doc/guides/nics/intel_vf.rst\n+++ b/doc/guides/nics/intel_vf.rst\n@@ -622,6 +622,119 @@ which belongs to the destination VF on the VM.\n Inter-VM Communication\n \n \n+Live Migrating a VM running DPDK\n+--------------------------------\n+\n+Live migration refers to the process of moving a running virtual machine (VM) or application\n+between different physical machines without disconnecting the client or application\n+(see https://en.wikipedia.org/wiki/Live_migration for more information).\n+\n+VFIO device migration refers to migrating a VM which have VFIO device pass-through\n+(see https://qemu.readthedocs.io/en/latest/devel/vfio-migration.html for more information).\n+\n+This part describes stpes to migrate a VM which has a iavf device pass through.\n+\n+The following describes a target environment:\n+\n+* Host Operating System: Ubuntu 20.04.5\n+\n+* Guest Operating System: Ubuntu 20.04.5\n+\n+* Linux Kernel Version: 5.15.0-72-generic\n+\n+* Target Applications: dpdk-testpmd\n+\n+* Ice Kernel Driver: Download from `<https://www.intel.com/content/www/us/en/download/19630>`_\n+\n+* Qemu Version: 7.2\n+\n+The setup procedure is as follows:\n+\n+#. Before booting the Host OS, open **BIOS setup** and enable **Intel® VT features**.\n+\n+#. While booting the Host OS kernel, pass the intel_iommu=on kernel command line argument using GRUB.\n+\n+#. In the Host OS\n+\n+ Install the ice driver and migration driver:\n+\n+ .. code-block:: console\n+\n+ insmod ice.ko\n+ insmod ice-vfio-pci.ko\n+\n+ Create 2 VFs and bind them to vfio pci driver:\n+\n+ .. code-block:: console\n+\n+ echo 2 > /sys/bus/pci/devices/0000:ca:00.1/sriov_numvfs\n+ echo \"8086 1889\" > /sys/bus/pci/drivers/ice-vfio-pci/new_id\n+ echo 0000:ca:11.0 > /sys/bus/pci/devices/0000:ca:11.0/driver/unbind\n+ echo 0000:ca:11.0 > /sys/bus/pci/drivers/ice-vfio-pci/bind\n+ echo 0000:ca:11.1 > /sys/bus/pci/devices/0000:ca:11.1/driver/unbind\n+ echo 0000:ca:11.1 > /sys/bus/pci/drivers/ice-vfio-pci/bind\n+\n+ .. note::\n+\n+ The command above creates two vfs for device 0000:ca:00.1:\n+\n+ .. code-block:: console\n+\n+ 0000:ca:11.0 'Ethernet Adaptive Virtual Function 1889' if= drv=ice-vfio-pci unused=iavf\n+ 0000:ca:11.1 'Ethernet Adaptive Virtual Function 1889' if= drv=ice-vfio-pci unused=iavf\n+\n+#. Now, start the migration source Virtual Machine by running the following command:\n+\n+ .. code-block:: console\n+\n+ 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\n+\n+ .. note::\n+ The vfio-pci,host=0000:ca:11.0 value indicates that you want to attach a vfio PCI device\n+ to a Virtual Machine and the respective (Bus:Device.Function) numbers should be passed,\n+ x-enable-migration=true indicates that this VF supports migration. Dirty page tracking\n+ is not supported, so set x-pre-copy-dirty-page-tracking=off.\n+\n+#. In VM, install iavf driver and vfio-pci driver\n+\n+ .. code-block:: console\n+\n+ insmod iavf.ko\n+ modprobe vfio enable_unsafe_noiommu_mode=1\n+ moodprobe vfio-pci\n+\n+#. Bind net device to vfio-pci driver and launch dpdk-testpmd\n+\n+ .. code-block:: console\n+\n+ dpdk-testpmd -l 0-1 -- -i\n+ testpmd> set txpkts 64\n+ testpmd> start tx_first\n+\n+ .. note::\n+ Please ensure dpdk-testpmd to run independently of ssh console.\n+ Suggest to put it in a background process like tmux/screen so that\n+ migration will not causing ssh console exit and dpdk-testpmd killed.\n+\n+#. Start the migration destination Virtual Machine\n+\n+ .. code-block:: console\n+\n+ 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\n+\n+ #. Start migration by issuing the command in qemu console\n+\n+ .. code-block:: console\n+\n+ migrate -d tcp:127.0.0.1:4444\n+\n+#. Log in the destination VM, and dpdk-testpmd is not interrupt\n+\n+.. note::\n+\n+ Host kernel version above 5.17 is currently not supported due to kAPI change.\n+\n+\n Windows Support\n ---------------\n \ndiff --git a/doc/guides/rel_notes/release_23_07.rst b/doc/guides/rel_notes/release_23_07.rst\nindex 4459144140..794a86eba3 100644\n--- a/doc/guides/rel_notes/release_23_07.rst\n+++ b/doc/guides/rel_notes/release_23_07.rst\n@@ -200,6 +200,9 @@ New Features\n \n Enhanced the GRO library to support TCP packets over IPv6 network.\n \n+* **Updated Intel iavf driver.**\n+\n+ Added the document for iavf driver live migration based on KVM vfio migration.\n \n Removed Items\n -------------\n", "prefixes": [ "v4" ] }{ "id": 129369, "url": "