get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/109805/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 109805,
    "url": "http://patches.dpdk.org/api/patches/109805/?format=api",
    "web_url": "http://patches.dpdk.org/project/dts/patch/20220419055645.943384-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": "<20220419055645.943384-1-weix.ling@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dts/20220419055645.943384-1-weix.ling@intel.com",
    "date": "2022-04-19T05:56:45",
    "name": "[V1,1/2] test_plans/vdev_primary_secondary_test_plan: add hutplug testcase2",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "8d548ee3d2ec54965169f0d9cfe4cc560947b0a0",
    "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/20220419055645.943384-1-weix.ling@intel.com/mbox/",
    "series": [
        {
            "id": 22544,
            "url": "http://patches.dpdk.org/api/series/22544/?format=api",
            "web_url": "http://patches.dpdk.org/project/dts/list/?series=22544",
            "date": "2022-04-19T05:56:22",
            "name": "[V1,1/2] test_plans/vdev_primary_secondary_test_plan: add hutplug testcase2",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/22544/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/109805/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/109805/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 3AD50A00C3;\n\tTue, 19 Apr 2022 07:56:57 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 32550406A2;\n\tTue, 19 Apr 2022 07:56:57 +0200 (CEST)",
            "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n by mails.dpdk.org (Postfix) with ESMTP id 98FB940150\n for <dts@dpdk.org>; Tue, 19 Apr 2022 07:56:54 +0200 (CEST)",
            "from orsmga006.jf.intel.com ([10.7.209.51])\n by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 18 Apr 2022 22:56:53 -0700",
            "from unknown (HELO localhost.localdomain) ([10.239.251.222])\n by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 18 Apr 2022 22:56:52 -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=1650347815; x=1681883815;\n h=from:to:cc:subject:date:message-id:mime-version:\n content-transfer-encoding;\n bh=O5w12qf645sjoecoV/r7ij0lVkqKjR9Azm+BZhzzDFA=;\n b=lcvUC4nAttRJahcwCaf3m9pHcaMKlJjsa5f7arhWo2D6epbFrXZDP2e6\n mZSych0D8uRlbsbCipzGt7kStDeGjDPqjPaqmVaOSHaCLJJaYizpPKRg7\n +NGXJdlHkU9Nn72TKsLoIb3Cgh+EXek4P4JEJpzboPVzzK72i1aM0c7zQ\n J4M6WroSRk5YKw2buFKhw0TQn1XIEtYtDI1isjUNMqddleJvxojDypVPA\n 0Sj3CdUTF/SgE8rjqKnVSfJDbn2SBlSdPzEkTbEObuLkVWA3scwnGFQ4z\n DNgNx7eGsAK/D9Ej7AewHxeAFfc9oynE9bvZcZNYVPxCbgNK6wWy8Lfqb g==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6400,9594,10321\"; a=\"326583632\"",
            "E=Sophos;i=\"5.90,271,1643702400\"; d=\"scan'208\";a=\"326583632\"",
            "E=Sophos;i=\"5.90,271,1643702400\"; d=\"scan'208\";a=\"529175296\""
        ],
        "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: add\n hutplug testcase2",
        "Date": "Tue, 19 Apr 2022 13:56:45 +0800",
        "Message-Id": "<20220419055645.943384-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": "Add hutplug testcase2 and modify testplan with new format.\n\nSigned-off-by: Wei Ling <weix.ling@intel.com>\n---\n .../vdev_primary_secondary_test_plan.rst      | 184 ++++++++----------\n 1 file changed, 80 insertions(+), 104 deletions(-)",
    "diff": "diff --git a/test_plans/vdev_primary_secondary_test_plan.rst b/test_plans/vdev_primary_secondary_test_plan.rst\nindex b98d2d04..70e897b6 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-* -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+=============\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+Topology\n+--------\n+Vhost-->Virtio-tmp\n \n-For example,\n-to build symmetric_mp::\n+Hardware\n+--------\n+Supportted NICs: all\n \n-    meson configure -Dexamples=multi_process/symmetric_mp <build_target>\n-    ninja -C <build_target>\n+General set up\n+--------------\n+1. Compile DPDK in host and VM::\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+    <dpdk dir># meson <dpdk build dir>\n+    <dpdk dir># ninja -C <dpdk build dir> -j 110\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+2. Compile symmetric_mp example application in VM::\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+   <dpdk dir># meson configure -Dexamples=multi_process/symmetric_mp <dpdk build dir>\n+   <dpdk dir># ninja -C <dpdk build dir> -j 110\n \n-Hotplug MP Application Description\n-----------------------------------\n+3. Compile hotplug_mp example application in VM::\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+    <dpdk dir># meson configure -Dexamples=multi_process/hotplug_mp <dpdk build dir>\n+    <dpdk dir># ninja -C <dpdk build dir> -j 110\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+Test case\n+=========\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+Common steps\n+------------\n+1. Bind the virtio port to vfio-pci in VM::\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+    <VM1 dpdk dir># modprobe vfio-pci\n+    <VM1 dpdk dir># echo 1 > /sys/module/vfio/parameters/enable_unsafe_noiommu_mode\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+    <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.\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+    <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-\n-    ./usertools/dpdk-devbind.py --bind=vfio-pci xx:xx.x\n-    ./usertools/dpdk-devbind.py --bind=vfio-pci xx:xx.x\n+3. In VM, get the virtio network device and bind bind it to vfio-pci as common steps 1-2.\n \n-4. Start sample code as primary process::\n+4. Start sample code as primary process and list all etherdev::\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",
    "prefixes": [
        "V1",
        "1/2"
    ]
}