Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/109920/?format=api
http://patches.dpdk.org/api/patches/109920/?format=api", "web_url": "http://patches.dpdk.org/project/dts/patch/20220421020956.1551901-1-weix.ling@intel.com/", "project": { "id": 3, "url": "http://patches.dpdk.org/api/projects/3/?format=api", "name": "DTS", "link_name": "dts", "list_id": "dts.dpdk.org", "list_email": "dts@dpdk.org", "web_url": "", "scm_url": "git://dpdk.org/tools/dts", "webscm_url": "http://git.dpdk.org/tools/dts/", "list_archive_url": "https://inbox.dpdk.org/dts", "list_archive_url_format": "https://inbox.dpdk.org/dts/{}", "commit_url_format": "" }, "msgid": "<20220421020956.1551901-1-weix.ling@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dts/20220421020956.1551901-1-weix.ling@intel.com", "date": "2022-04-21T02:09:56", "name": "[V1,1/2] test_plans/vdev_primary_secondary_test_plan: modify testplan with new format", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "2d751ee807f441f98b96431496e6bf0edd3ea17c", "submitter": { "id": 1828, "url": "http://patches.dpdk.org/api/people/1828/?format=api", "name": "Ling, WeiX", "email": "weix.ling@intel.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dts/patch/20220421020956.1551901-1-weix.ling@intel.com/mbox/", "series": [ { "id": 22575, "url": "http://patches.dpdk.org/api/series/22575/?format=api", "web_url": "http://patches.dpdk.org/project/dts/list/?series=22575", "date": "2022-04-21T02:09:42", "name": "add hotplug testcase2", "version": 1, "mbox": "http://patches.dpdk.org/series/22575/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/109920/comments/", "check": "pending", "checks": "http://patches.dpdk.org/api/patches/109920/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dts-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 C6CB3A00C3;\n\tThu, 21 Apr 2022 04:11:42 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C02EC410FF;\n\tThu, 21 Apr 2022 04:11:42 +0200 (CEST)", "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n by mails.dpdk.org (Postfix) with ESMTP id 50A2C410E1\n for <dts@dpdk.org>; Thu, 21 Apr 2022 04:11:40 +0200 (CEST)", "from orsmga008.jf.intel.com ([10.7.209.65])\n by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 20 Apr 2022 19:10:06 -0700", "from unknown (HELO localhost.localdomain) ([10.239.251.222])\n by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 20 Apr 2022 19:10:03 -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=1650507100; x=1682043100;\n h=from:to:cc:subject:date:message-id:mime-version:\n content-transfer-encoding;\n bh=JuhZuKz7f4MUZHvUTbd9/6gMPQToeoOBQtYdNtjz4hU=;\n b=XBVJSR13PkCxYddRMcwSGCMNLomyToM340ujtqjqE39yi6cWxaAGsDVq\n pc0MFtG7qjtUBws7oMpAF96jG0AZV1499iAGhTUuBMkISt3C/5wGHcnUC\n al/6ddkpCQWCwEXBPXDhXNBobuTs9HU+5GQOkNOYKzo/7oJosDuWubtl3\n TI8dSdW8HZfE6z4saOl9COyD1788LUNdrHgNo+f6yxVeO/F/1LpV+cEPf\n MADSv1OjTchgpylECSVhQxkLKW/eY0r3PFBIBvzhMx1oE73Ret5AwgLjq\n uvjvAz4HyYarA5JY8taKq0u8PigsSW0d7W2pK30lxJTZmv3W+ZA6lmmqF A==;", "X-IronPort-AV": [ "E=McAfee;i=\"6400,9594,10323\"; a=\"263970239\"", "E=Sophos;i=\"5.90,277,1643702400\"; d=\"scan'208\";a=\"263970239\"", "E=Sophos;i=\"5.90,277,1643702400\"; d=\"scan'208\";a=\"576938642\"" ], "From": "Wei Ling <weix.ling@intel.com>", "To": "dts@dpdk.org", "Cc": "Wei Ling <weix.ling@intel.com>", "Subject": "[dts][PATCH V1 1/2] test_plans/vdev_primary_secondary_test_plan:\n modify testplan with new format", "Date": "Thu, 21 Apr 2022 10:09:56 +0800", "Message-Id": "<20220421020956.1551901-1-weix.ling@intel.com>", "X-Mailer": "git-send-email 2.25.1", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "dts@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "test suite reviews and discussions <dts.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dts>,\n <mailto:dts-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dts/>", "List-Post": "<mailto:dts@dpdk.org>", "List-Help": "<mailto:dts-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dts>,\n <mailto:dts-request@dpdk.org?subject=subscribe>", "Errors-To": "dts-bounces@dpdk.org" }, "content": "Modify testplan with new format and add hotplug testcase2.\n\nSigned-off-by: Wei Ling <weix.ling@intel.com>\n---\n .../vdev_primary_secondary_test_plan.rst | 205 ++++++++----------\n 1 file changed, 91 insertions(+), 114 deletions(-)", "diff": "diff --git a/test_plans/vdev_primary_secondary_test_plan.rst b/test_plans/vdev_primary_secondary_test_plan.rst\nindex b98d2d04..a3dec4a1 100644\n--- a/test_plans/vdev_primary_secondary_test_plan.rst\n+++ b/test_plans/vdev_primary_secondary_test_plan.rst\n@@ -34,172 +34,148 @@\n Virtio-pmd primary/secondary process test plan\n ==============================================\n \n-This test plan will test vdev primary/secondary with symmetric_mp, which demonstrates how a set of processes can run in parallel,\n-with each process performing the same set of packet processing operations. Also test vdev primary/secondary with hotplug_mp example.\n-\n-Symmetric MP Application Description\n-------------------------------------\n-\n-This test is a multi-process test which demonstrates how multiple processes can\n-work together to perform packet I/O and packet processing in parallel, much as\n-other example application work by using multiple threads. In this example, each\n-process reads packets from all network ports being used - though from a different\n-RX queue in each case. Those packets are then forwarded by each process which\n-sends them out by writing them directly to a suitable TX queue.\n+Description\n+===========\n+\n+This test plan will test vdev primary/secondary with symmetric_mp,\n+which demonstrates how a set of processes can run in parallel,\n+with each process performing the same set of packet processing operations,\n+each process reads packets from each of the network ports in use.\n+Each process reads a different RX queue and writes outgoing packets to a different TX queue on each port.\n+Also test vdev primary/secondary with hotplug_mp example.\n+The primary process work as a resource management process, it will create/destroy virtual device at runtime,\n+while the secondary process can deal with the network stuff with these devices,\n+that means attach or detach a device on any process will broadcast to all other processes through mp channel\n+then device information will be synchronized on all processes.\n+For more about the Symmetric MP Application example,\n+please refer to the dpdk docs: http://doc.dpdk.org/guides/sample_app_ug/multi_process.html\n \n Prerequisites\n--------------\n-\n-Assuming that DPDK build has been set up and the multi-process sample\n-applications have been built. It is also assumed that a traffic generator has\n-been configured and plugged in to the NIC ports 0 and 1.\n-\n-Test Methodology\n-----------------\n-\n-As with the simple_mp example, the first instance of the symmetric_mp process\n-must be run as the primary instance, though with a number of other application\n-specific parameters also provided after the EAL arguments. These additional\n-parameters are:\n+=============\n \n-* -p <portmask>, where portmask is a hexadecimal bitmask of what ports on the\n- system are to be used. For example: -p 3 to use ports 0 and 1 only.\n-* --num-procs <N>, where N is the total number of symmetric_mp instances that\n- will be run side-by-side to perform packet processing. This parameter is used to\n- configure the appropriate number of receive queues on each network port.\n-* --proc-id <n>, where n is a numeric value in the range 0 <= n < N (number of\n- processes, specified above). This identifies which symmetric_mp instance is being\n- run, so that each process can read a unique receive queue on each network port.\n+Topology\n+--------\n+Vhost<-->Virtio-pmd\n \n-The secondary symmetric_mp instances must also have these parameters specified,\n-and the first two must be the same as those passed to the primary instance, or errors\n-result.\n+Hardware\n+--------\n+Supportted NICs: all\n \n-For example,\n-to build symmetric_mp::\n+General set up\n+--------------\n+1. Compile DPDK in host and VM::\n \n- meson configure -Dexamples=multi_process/symmetric_mp <build_target>\n- ninja -C <build_target>\n+ <dpdk dir># meson <dpdk build dir>\n+ <dpdk dir># ninja -C <dpdk build dir> -j 110\n \n-to run a set of four symmetric_mp instances, running on lcores 1-4, all\n-performing level-2 forwarding of packets between ports 0 and 1, the following\n-commands can be used (assuming run as root)::\n+2. Compile symmetric_mp example application in VM::\n \n- ./<build_target>/examples/dpdk-symmetric_mp -c 2 --proc-type=auto -- -p 3 --num-procs=4 --proc-id=0\n- ./<build_target>/examples/dpdk-symmetric_mp -c 4 --proc-type=auto -- -p 3 --num-procs=4 --proc-id=1\n- ./<build_target>/examples/dpdk-symmetric_mp -c 8 --proc-type=auto -- -p 3 --num-procs=4 --proc-id=2\n- ./<build_target>/examples/dpdk-symmetric_mp -c 10 --proc-type=auto -- -p 3 --num-procs=4 --proc-id=3\n+ <dpdk dir># meson configure -Dexamples=multi_process/symmetric_mp <dpdk build dir>\n+ <dpdk dir># ninja -C <dpdk build dir> -j 110\n \n-To run only 1 or 2 instances, the above parameters to the 1 or 2 instances being\n-run should remain the same, except for the ``num-procs`` value, which should be\n-adjusted appropriately.\n+3. Compile hotplug_mp example application in VM::\n \n-Hotplug MP Application Description\n-----------------------------------\n+ <dpdk dir># meson configure -Dexamples=multi_process/hotplug_mp <dpdk build dir>\n+ <dpdk dir># ninja -C <dpdk build dir> -j 110\n \n-Currently secondary process will only sync ethdev from primary process at\n-init stage, but it will not be aware if device is attached/detached on\n-primary process at runtime.\n+Test case\n+=========\n \n-While there is the requirement from application that take\n-primary-secondary process model. The primary process work as a resource\n-management process, it will create/destroy virtual device at runtime,\n-while the secondary process deal with the network stuff with these devices.\n+Common steps\n+------------\n+1. Bind the virtio port to vfio-pci in VM::\n \n-So the orignial intention is to fix this gap, but beyond that the patch\n-set provide a more comprehesive solution to handle different hotplug\n-cases in multi-process situation, it cover below scenario:\n+ <VM1 dpdk dir># modprobe vfio-pci\n+ <VM1 dpdk dir># echo 1 > /sys/module/vfio/parameters/enable_unsafe_noiommu_mode\n \n-* Attach a device from the primary\n-* Detach a device from the primary\n-* Attach a device from a secondary\n-* Detach a device from a secondary\n-\n-In primary-secondary process model, we assume ethernet devices are shared\n-by default, that means attach or detach a device on any process will\n-broadcast to all other processes through mp channel then device\n-information will be synchronized on all processes.\n-\n-Any failure during attaching process will cause inconsistent status\n-between processes, so proper rollback action should be considered.\n+ <VM1 dpdk dir># ./usertools/dpdk-devbind.py --bind=vfio-pci 0000:00:05.0 0000:00:06.0\n \n Test Case 1: Virtio-pmd primary and secondary process symmetric test\n-====================================================================\n+--------------------------------------------------------------------\n+This case test vdev primary/secondary with two symmetric_mp process in VM, each process can reads a different RX queue on each port.\n \n-1. Bind one port to vfio-pci, launch testpmd by below command::\n+1. Launch testpmd with 2 vdev by below command::\n \n- ./<build_target>/app/dpdk-testpmd -l 1-6 -n 4 --file-prefix=vhost --vdev 'net_vhost,iface=vhost-net,queues=2,client=1' --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1' -- -i --nb-cores=4 --rxq=2 --txq=2 --txd=1024 --rxd=1024\n- testpmd>set fwd txonly\n- testpmd>start\n+ <dpdk dir># ./<dpdk build dir>/app/dpdk-testpmd -l 1-6 -n 4 --file-prefix=vhost \\\n+ --vdev 'net_vhost,iface=vhost-net,queues=2,client=1' --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1' \\\n+ -- -i --nb-cores=4 --rxq=2 --txq=2 --txd=1024 --rxd=1024\n \n 2. Launch VM with two virtio ports, must set queues=2 as app receive packets from special queue which index same with proc-id::\n \n- qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 4 -m 4096 \\\n- -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge,share=on \\\n- -numa node,memdev=mem -mem-prealloc -drive file=/home/osimg/ubuntu16.img \\\n- -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \\\n- -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \\\n- -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \\\n- -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6002-:22 \\\n- -chardev socket,id=char,path=./vhost-net,server -netdev type=vhost-user,id=mynet1,chardev=char,vhostforce,queues=2 \\\n- -device virtio-net-pci,mac=52:54:00:00:00:02,netdev=mynet1,mrg_rxbuf=on,csum=on,mq=on,vectors=15 \\\n- -chardev socket,id=char1,path=./vhost-net1,server -netdev type=vhost-user,id=mynet2,chardev=char1,vhostforce,queues=2 \\\n- -device virtio-net-pci,mac=52:54:00:00:00:03,netdev=mynet2,mrg_rxbuf=on,csum=on,mq=on,vectors=15 -vnc :10 -daemonize\n+\t<dpdk dir># qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 4 -m 4096 \\\n+\t-object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge,share=on \\\n+\t-numa node,memdev=mem -mem-prealloc -drive file=/home/osimg/ubuntu20-04.img \\\n+\t-chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \\\n+\t-device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \\\n+\t-monitor unix:/tmp/vm2_monitor.sock,server,nowait \\\n+\t-device e1000,netdev=nttsip1 \\\n+\t-netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6002-:22 \\\n+\t-chardev socket,id=char,path=./vhost-net,server -netdev type=vhost-user,id=mynet1,chardev=char,vhostforce,queues=2 \\\n+\t-device virtio-net-pci,mac=52:54:00:00:00:02,netdev=mynet1,mrg_rxbuf=on,csum=on,mq=on,vectors=15 \\\n+\t-chardev socket,id=char1,path=./vhost-net1,server -netdev type=vhost-user,id=mynet2,chardev=char1,vhostforce,queues=2 \\\n+\t-device virtio-net-pci,mac=52:54:00:00:00:03,netdev=mynet2,mrg_rxbuf=on,csum=on,mq=on,vectors=15 -vnc :10 -daemonize\n \n-3. Bind virtio port to vfio-pci::\n+3. In VM, get the virtio network device and bind bind it to vfio-pci as common steps 1.\n \n- ./usertools/dpdk-devbind.py --bind=vfio-pci xx:xx.x\n- ./usertools/dpdk-devbind.py --bind=vfio-pci xx:xx.x\n+4. In Vm, Compile symmetric_mp and hotplug_mp example as General set up step 2-3.\n \n-4. Launch two process by example::\n+4. Launch two process by symmetric_mp example in VM, each process will using ports 0 and 1, primary process using queue 0 of each port, secondary process using queue 1 of each port::\n \n- ./<build_target>/examples/dpdk-symmetric_mp -l 1 -n 4 --proc-type=auto -- -p 3 --num-procs=2 --proc-id=0\n- ./<build_target>/examples/dpdk-symmetric_mp -l 2 -n 4 --proc-type=secondary -- -p 3 --num-procs=2 --proc-id=1\n+ <VM1 dpdk dir># ./<dpdk build dir>/examples/dpdk-symmetric_mp -l 1 -n 4 --proc-type=auto -- -p 3 --num-procs=2 --proc-id=0\n+ <VM1 dpdk dir># ./<dpdk build dir>/examples/dpdk-symmetric_mp -l 2 -n 4 --proc-type=secondary -- -p 3 --num-procs=2 --proc-id=1\n \n-5. Quit all process, check the packets number in rx/tx statistic like below for both primary process and secondary process::\n+5. Send packets from vhost testpmd::\n \n- Port 0: RX - 27511680, TX - 256, Drop - 27499168\n- Port 1: RX - 27499424, TX - 256, Drop - 27511424\n+ testpmd> set fwd mac\n+ testpmd> start tx_first\n+\n+6. Quit all process, check the packets number in rx/tx statistic like below for both primary process and secondary process::\n+\n+ Port 0: RX - 22322016, TX - 22321184, Drop - 0\n+ Port 1: RX - 22321184, TX - 22322016, Drop - 0\n \n Test Case 2: Virtio-pmd primary and secondary process hotplug test\n-==================================================================\n+------------------------------------------------------------------\n+This case use hotplug_mp example to test the MP Application hotplug, attach or detach a device on any process will broadcast to all other processes through mp channel,\n+then device information will be synchronized on all processes. it cover below scenario: attach a device from the primary, detach a device from the primary,\n+attach a device from a secondary,detach a device from a secondary.\n \n 1. Launch testpmd by below command::\n \n- ./<build_target>/app/dpdk-testpmd -l 1-6 -n 4 --file-prefix=vhost --vdev 'net_vhost,iface=vhost-net,queues=2,client=1' --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1' -- -i --nb-cores=4 --rxq=2 --txq=2 --txd=1024 --rxd=1024\n- testpmd>set fwd txonly\n- testpmd>start\n+ <dpdk dir> ./<dpdk build dir>/app/dpdk-testpmd -l 1-6 -n 4 --file-prefix=vhost \\\n+ --vdev 'net_vhost,iface=vhost-net,queues=2,client=1' --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1' \\\n+ -- -i --nb-cores=4 --rxq=2 --txq=2 --txd=1024 --rxd=1024\n+ testpmd> set fwd txonly\n+ testpmd> start\n \n 2. Launch VM with two virtio ports, must set queues=2 as app receive packets from special queue which index same with proc-id::\n \n- qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 4 -m 4096 \\\n+ <dpdk dir># qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 4 -m 4096 \\\n -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge,share=on \\\n- -numa node,memdev=mem -mem-prealloc -drive file=/home/osimg/ubuntu16.img \\\n+ -numa node,memdev=mem -mem-prealloc -drive file=/home/osimg/ubuntu20-04.img \\\n -chardev socket,path=/tmp/vm2_qga0.sock,server,nowait,id=vm2_qga0 -device virtio-serial \\\n -device virtserialport,chardev=vm2_qga0,name=org.qemu.guest_agent.2 -daemonize \\\n- -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev=nttsip1 \\\n+ -monitor unix:/tmp/vm2_monitor.sock,server,nowait \\\n+ -device e1000,netdev=nttsip1 \\\n -netdev user,id=nttsip1,hostfwd=tcp:127.0.0.1:6002-:22 \\\n -chardev socket,id=char,path=./vhost-net,server -netdev type=vhost-user,id=mynet1,chardev=char,vhostforce,queues=2 \\\n -device virtio-net-pci,mac=52:54:00:00:00:02,netdev=mynet1,mrg_rxbuf=on,csum=on,mq=on,vectors=15 \\\n -chardev socket,id=char1,path=./vhost-net1,server -netdev type=vhost-user,id=mynet2,chardev=char1,vhostforce,queues=2 \\\n -device virtio-net-pci,mac=52:54:00:00:00:03,netdev=mynet2,mrg_rxbuf=on,csum=on,mq=on,vectors=15 -vnc :10 -daemonize\n \n-3. Bind virtio port to vfio-pci::\n+3. In VM, get the virtio network device and bind bind it to vfio-pci as common steps 1-2.\n \n- ./usertools/dpdk-devbind.py --bind=vfio-pci xx:xx.x\n- ./usertools/dpdk-devbind.py --bind=vfio-pci xx:xx.x\n+4. Start sample code as primary process and list all etherdev::\n \n-4. Start sample code as primary process::\n-\n- ./<build_target>/examples/dpdk-symmetric_mp --proc-type=auto -- -p 3 --num-procs=2 --proc-id=0\n+ <VM1 dpdk dir> ./<dpdk build dir>/examples/dpdk-hotplug_mp --proc-type=auto -- -p 3 --num-procs=2 --proc-id=0\n example> list\n list all etherdev\n 0 0000:00:05.0\n 1 0000:00:06.0\n \n-5. Start sample code as secondary process::\n+5. Start sample code as secondary process and list all etherdev::\n \n- ./<build_target>/examples/dpdk-symmetric_mp --proc-type=secondary -- -p 3 --num-procs=2 --proc-id=1\n+ <VM1 dpdk dir> ./<dpdk build dir>/examples/dpdk-hotplug_mp --proc-type=secondary -- -p 3 --num-procs=2 --proc-id=1\n example> list\n list all etherdev\n 0 0000:00:05.0\n@@ -221,3 +197,4 @@ Test Case 2: Virtio-pmd primary and secondary process hotplug test\n 1 0000:00:06.0\n \n 8. Repeat above attach and detach for 2 times.\n+\n", "prefixes": [ "V1", "1/2" ] }{ "id": 109920, "url": "