get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 106980,
    "url": "http://patches.dpdk.org/api/patches/106980/?format=api",
    "web_url": "http://patches.dpdk.org/project/dts/patch/20220207232806.489821-1-yaqi.tang@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": "<20220207232806.489821-1-yaqi.tang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dts/20220207232806.489821-1-yaqi.tang@intel.com",
    "date": "2022-02-07T23:28:06",
    "name": "[V5] test_plans/dcf_lifecycle_test_plan: add test plan for CVL DCF enable device reset API",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "5817c6a74c46590bda8f3f4520587ca7284fa6ce",
    "submitter": {
        "id": 2357,
        "url": "http://patches.dpdk.org/api/people/2357/?format=api",
        "name": "Yaqi Tang",
        "email": "yaqi.tang@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dts/patch/20220207232806.489821-1-yaqi.tang@intel.com/mbox/",
    "series": [
        {
            "id": 21500,
            "url": "http://patches.dpdk.org/api/series/21500/?format=api",
            "web_url": "http://patches.dpdk.org/project/dts/list/?series=21500",
            "date": "2022-02-07T23:28:06",
            "name": "[V5] test_plans/dcf_lifecycle_test_plan: add test plan for CVL DCF enable device reset API",
            "version": 5,
            "mbox": "http://patches.dpdk.org/series/21500/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/106980/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/106980/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 D2B4EA04A3;\n\tMon,  7 Feb 2022 16:29:57 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 9CEFA410F3;\n\tMon,  7 Feb 2022 16:29:57 +0100 (CET)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n by mails.dpdk.org (Postfix) with ESMTP id 02134410EA\n for <dts@dpdk.org>; Mon,  7 Feb 2022 16:29:54 +0100 (CET)",
            "from fmsmga006.fm.intel.com ([10.253.24.20])\n by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 07 Feb 2022 07:29:53 -0800",
            "from dpdk-yaqi.sh.intel.com ([10.67.119.205])\n by fmsmga006.fm.intel.com with ESMTP; 07 Feb 2022 07:29:52 -0800"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1644247795; x=1675783795;\n h=from:to:cc:subject:date:message-id:mime-version:\n content-transfer-encoding;\n bh=f/8ihRIDZqfCVWSpeNfdvvUnkqcA0UOymiXiqshL6ek=;\n b=UGP5xWzX/UT71aJ1NOJVN3+wt7+5W63DKMUDyukuYXn81ZGhhO+im0rl\n OhcgtYvgi6BvN9vFSD/amxjQorFl+LBaq3EQoKdhnqXZgTD1D9QQgaimn\n 5gyTRYg1/D0CcbL7ZHSl088gYpoxu5hlTrmnospjtgZDXiN8Yy9DClPAQ\n 5BpXFaH6n0MYPmVWrjQvM7C7A7S1RaITL8W6iLjjxSV8hbtd5dBQDe80M\n IaMahUF7SCdayhRVae2w0kMi/jbkqB8P/yZ7UDEvlBknwfySHcpwyvEWS\n +gPAF2NJF6bUDq6/Mm6a90hIpdswmUrtV7g3+6k81sO/qNNKe8XN6k8oD A==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10250\"; a=\"236140785\"",
            "E=Sophos;i=\"5.88,350,1635231600\"; d=\"scan'208\";a=\"236140785\"",
            "E=Sophos;i=\"5.88,350,1635231600\"; d=\"scan'208\";a=\"770663621\""
        ],
        "X-ExtLoop1": "1",
        "From": "Yaqi Tang <yaqi.tang@intel.com>",
        "To": "dts@dpdk.org",
        "Cc": "Yaqi Tang <yaqi.tang@intel.com>",
        "Subject": "[dts][PATCH V5] test_plans/dcf_lifecycle_test_plan: add test plan for\n CVL DCF enable device reset API",
        "Date": "Mon,  7 Feb 2022 23:28:06 +0000",
        "Message-Id": "<20220207232806.489821-1-yaqi.tang@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": "The rte_eth_dev_reset API provides a more elegant way for the application to reset DCF through the command \"port reset all\" when reconnecting.\n\nSigned-off-by: Yaqi Tang <yaqi.tang@intel.com>\nTested-by: Yaqi Tang < yaqi.tang@intel.com>\n---\n test_plans/dcf_lifecycle_test_plan.rst | 787 +++++++++++++++++++++++++\n 1 file changed, 787 insertions(+)",
    "diff": "diff --git a/test_plans/dcf_lifecycle_test_plan.rst b/test_plans/dcf_lifecycle_test_plan.rst\nindex 2c8628f2..4d8dd8ac 100644\n--- a/test_plans/dcf_lifecycle_test_plan.rst\n+++ b/test_plans/dcf_lifecycle_test_plan.rst\n@@ -1071,3 +1071,790 @@ TC34: ACL DCF mode is active, add ACL filters by way of host based configuration\n \n     # ethtool -N enp24s0f1 flow-type tcp4 src-ip 192.168.10.0 m 0.255.255.255 dst-port 8000 m 0x00ff action -1\n     Added rule with ID 15871\n+\n+===============================\n+CVL DCF enable device reset API\n+===============================\n+\n+Description\n+===========\n+DCF PMD need to support rte_eth_dev_reset.The reason is that when a DCF instance be killed, all the flow rules still exist in hardware. when DCF gets to reconnect, \n+It has already lost the flow context, and if the application wants to create new rules, they may fail because FW reports that the rules already exist.The current \n+workaround assumes that the user can turn off / turn on VF trust mode, so kernel PF will reset DCF by removing all old rules.The rte_eth_dev_reset API provides \n+a more elegant way for the application to reset DCF through the command \"port reset all\" when reconnecting.\n+\n+Prerequisites\n+=============\n+\n+Hardware\n+--------\n+Supportted NICs: columbiaville_25g/columbiaville_100g\n+\n+Software\n+--------\n+dpdk: http://dpdk.org/git/dpdk\n+scapy: http://www.secdev.org/projects/scapy/\n+\n+General Set Up\n+--------------\n+1. Compile DPDK::\n+\n+    # CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib --default-library=static <dpdk build dir>\n+    # ninja -C <dpdk build dir> -j 110\n+\n+2. Get the pci device id and interface of DUT and tester. \n+   For example, 0000:3b:00.0 and 0000:af:00.0 is pci device id,\n+   ens785f0 and ens260f0 is interface::\n+\n+    <dpdk dir># ./usertools/dpdk-devbind.py -s\n+\n+    0000:3b:00.0 'Ethernet Controller E810-C for SFP 1593' if=ens785f0 drv=ice unused=vfio-pci\n+    0000:af:00.0 'Ethernet Controller XXV710 for 25GbE SFP28 158b' if=ens260f0 drv=i40e unused=vfio-pci\n+\n+3. Generate 4 VFs on PF0::\n+\n+    # echo 4 > /sys/bus/pci/devices/0000:3b:00.0/sriov_numvfs\n+\n+4. Get VF pci device id and interface of DUT.\n+\n+    # ./usertools/dpdk-devbind.py -s\n+\n+     0000:3b:01.0 'Ethernet Adaptive Virtual Function 1889' if=ens785f0v0 drv=iavf unused=vfio-pci\n+     0000:3b:01.1 'Ethernet Adaptive Virtual Function 1889' if=ens785f0v1 drv=iavf unused=vfio-pci\n+\n+5. Set VF0 as trust::\n+\n+    # ip link set ens785f0 vf 0 trust on\n+\n+6. Bind the DUT port to dpdk::\n+\n+    <dpdk dir># ./usertools/dpdk-devbind.py -b vfio-pci <DUT port pci device id>\n+    \n+Test case\n+=========\n+\n+Common Steps\n+------------\n+The common steps launch two testpmds and kill DCF process, then relaunch two testpmds.\n+\n+1. Launch the userland ``testpmd`` application on DUT as follows::\n+\n+    <dpdk build dir>/app/dpdk-testpmd <EAL options> -a <DUT port pci device id> -- -i \n+\n+..note:: \n+\n+    For <EAL options>, you can use \"-c 0x6 -n 4\", you can also refer to testpmd doc for other setings.\n+    For <DUT port pci device id>, you can use \"0000:3b:01.0,cap=dcf --file-prefix=dcf\" for this test plan.\n+  \n+2. Launch another ``testpmd`` application on the VF1 of DUT as follows::\n+\n+    <dpdk build dir>/app/dpdk-testpmd <EAL options> -a <DUT port pci device id> -- -i \n+\n+..note:: \n+\n+    For <EAL options>, you can use \"-c 0x18 -n 4\", you can also refer to testpmd doc for other setings.\n+    For this test plan, you can use \"0000:3b:01.1 --file-prefix=vf\" for this test plan. \n+\n+3. Set verbose in VF testpmd::\n+    \n+     testpmd> set verbose 1\n+    \n+4. Set fwd engine and start in VF testpmd::\n+\n+     testpmd> set fwd mac\n+     testpmd> start\n+\n+5. Validate a switch rule to VF1 in DCF testpmd::\n+\n+     testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is <ipv4 src> dst is <ipv4 dst> / end actions vf id 1 / end\n+\n+   Get the message::\n+\n+     Flow rule validated\n+\n+6. Create a switch rule to VF1 in DCF testpmd and list rules::\n+\n+     testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is <ipv4 src> dst is <ipv4 dst> / end actions vf id 1 / end\n+\n+   Get the message::\n+\n+     Flow rule #0 created\n+\n+   Check the flow list::\n+\n+     testpmd> flow list 0\n+   \n+   ID      Group   Prio    Attr    Rule\n+   0       0       0       i--     ETH IPV4 => VF\n+\n+7. Send a matched packet in scapy to VF1, check the VF1 of DUT can receive the packet.\n+\n+Tester::\n+\n+    >>> sendp([Ether(src=\"<src mac>\",dst=\"<dst mac>\")/IP(src=\"<ipv4 src>\",dst=\"<ipv4 dst>\")/(\"X\"*64)], iface=\"<tester interface>\")\n+\n+the VF1 of DUT::\n+\n+     testpmd> port 0/queue 0: received 1 packets\n+  src=00:11:22:33:44:55 - dst=C6:44:32:0A:EC:E1 - type=0x0800 - length=98 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x0\n+  ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN\n+\n+All the packets in this test plan use below settings:\n+dst src: 00:11:22:33:44:55\n+dst mac: C6:44:32:0A:EC:E1\n+ipv4 src: 192.168.0.2\n+ipv4 dst: 192.168.0.3\n+\n+Test Case 1: two_testpmd_dcf_reset_port\n+---------------------------------------\n+The test case resets DCF by killing DCF and resetting the port, and DCF should clean up all old rules.\n+\n+Test Steps\n+~~~~~~~~~~\n+1. Check the process ID and kill DCF process::\n+\n+    # ps -ef |grep testpmd \n+    # kill -9 #####\n+\n+2. Relaunch the userland ``testpmd`` application on DUT as follows::\n+\n+    <dpdk build dir>/app/dpdk-testpmd <EAL options> -a <DUT port pci device id> -- -i \n+\n+..note:: \n+\n+    For <EAL options>, you can use \"-c 0x6 -n 4\", you can also refer to testpmd doc for other setings.\n+    For <DUT port pci device id>, you can use \"0000:3b:01.0,cap=dcf --file-prefix=dcf\" for this test plan.\n+\n+3. Send a matched packet in scapy to VF1, DCF flow rule is still valid and check the VF1 of DUT can receive the packet.\n+\n+Tester::\n+\n+    >>> sendp([Ether(src=\"<src mac>\",dst=\"<dst mac>\")/IP(src=\"<ipv4 src>\",dst=\"<ipv4 dst>\")/(\"X\"*64)], iface=\"<tester interface>\")\n+\n+the VF1 of DUT::\n+\n+     testpmd> port 0/queue 0: received 1 packets\n+  src=00:11:22:33:44:55 - dst=C6:44:32:0A:EC:E1 - type=0x0800 - length=98 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x0\n+  ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN\n+\n+4. Reset port in DCF testpmd::\n+\n+    testpmd> stop\n+    testpmd> port stop all\n+    testpmd> port reset all\n+    testpmd> port start all\n+    testpmd> start\n+    testpmd> flow list 0\n+\n+5. Validate a switch rule to VF1 in DCF testpmd::\n+\n+     testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is <ipv4 src> dst is <ipv4 dst> / end actions vf id 1 / end\n+\n+   Get the message::\n+\n+     Flow rule validated\n+\n+6. Create a switch rule to VF1 in DCF testpmd and list rules::\n+\n+     testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is <ipv4 src> dst is <ipv4 dst> / end actions vf id 1 / end\n+\n+   Get the message::\n+\n+     Flow rule #0 created\n+\n+   Check the flow list::\n+\n+     testpmd> flow list 0\n+   \n+   ID      Group   Prio    Attr    Rule\n+   0       0       0       i--     ETH IPV4 => VF\n+\n+7. Send a matched packet in scapy to VF1, and check the VF1 of DUT can receive the packet.\n+\n+Tester::\n+\n+    >>> sendp([Ether(src=\"<src mac>\",dst=\"<dst mac>\")/IP(src=\"<ipv4 src>\",dst=\"<ipv4 dst>\")/(\"X\"*64)], iface=\"<tester interface>\")\n+\n+the VF1 of DUT::\n+\n+     testpmd> port 0/queue 0: received 1 packets\n+  src=00:11:22:33:44:55 - dst=C6:44:32:0A:EC:E1 - type=0x0800 - length=98 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x0\n+  ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN\n+\n+Test Case 2: two_testpmd_dcf_reset_device\n+-----------------------------------------\n+The test case resets DCF by resetting the device, and DCF should clean up all old rules.\n+\n+Test Steps\n+~~~~~~~~~~\n+1. Reset DCF device::\n+\n+    # echo 1 > /sys/bus/pci/devices/0000:3b:01.0/reset\n+\n+2. Reset port in DCF testpmd::\n+   \n+    testpmd> stop\n+    testpmd> port stop all\n+    testpmd> port reset all\n+    testpmd> port start all\n+    testpmd> start\n+    testpmd> flow list 0\n+\n+3. Validate a switch rule to VF1 in DCF testpmd::\n+\n+     testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is <ipv4 src> dst is <ipv4 dst> / end actions vf id 1 / end\n+\n+   Get the message::\n+\n+     Flow rule validated\n+\n+4. Create a switch rule to VF1 in DCF testpmd and list rules::\n+\n+     testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is <ipv4 src> dst is <ipv4 dst> / end actions vf id 1 / end\n+\n+   Get the message::\n+\n+     Flow rule #0 created\n+\n+   Check the flow list::\n+\n+     testpmd> flow list 0\n+   \n+   ID      Group   Prio    Attr    Rule\n+   0       0       0       i--     ETH IPV4 => VF\n+\n+5. Send a matched packet in scapy to VF1, and check the VF1 of DUT can receive the packet.\n+\n+Tester::\n+\n+    >>> sendp([Ether(src=\"<src mac>\",dst=\"<dst mac>\")/IP(src=\"<ipv4 src>\",dst=\"<ipv4 dst>\")/(\"X\"*64)], iface=\"<tester interface>\")\n+\n+the VF1 of DUT::\n+\n+     testpmd> port 0/queue 0: received 1 packets\n+  src=00:11:22:33:44:55 - dst=C6:44:32:0A:EC:E1 - type=0x0800 - length=98 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x0\n+  ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN\n+\n+Test Case 3: two_testpmd_dcf_reset_port_detach\n+----------------------------------------------\n+The test case resets DCF by detaching the port, and DCF should clean up all old rules.\n+\n+Test Steps\n+~~~~~~~~~~\n+1. Reset DCF device::\n+\n+    # echo 1 > /sys/bus/pci/devices/0000:3b:01.0/reset\n+\n+2. Detach and reset port in DCF testpmd::\n+    \n+    testpmd> stop \n+    testpmd> port stop 0\n+    testpmd> port detach 0\n+    testpmd> port attach 3b:01.0,cap=dcf\n+    testpmd> port reset 0\n+    testpmd> port start 0\n+    testpmd> start\n+    testpmd> flow list 0\n+\n+3. Validate a switch rule to VF1 in DCF testpmd::\n+\n+     testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is <ipv4 src> dst is <ipv4 dst> / end actions vf id 1 / end\n+\n+   Get the message::\n+\n+     Flow rule validated\n+\n+4. Create a switch rule to VF1 in DCF testpmd and list rules::\n+\n+     testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is <ipv4 src> dst is <ipv4 dst> / end actions vf id 1 / end\n+\n+   Get the message::\n+\n+     Flow rule #0 created\n+\n+   Check the flow list::\n+\n+     testpmd> flow list 0\n+   \n+   ID      Group   Prio    Attr    Rule\n+   0       0       0       i--     ETH IPV4 => VF\n+\n+5. Send a matched packet in scapy to VF1, and check the VF1 of DUT can receive the packet.\n+\n+Tester::\n+\n+    >>> sendp([Ether(src=\"<src mac>\",dst=\"<dst mac>\")/IP(src=\"<ipv4 src>\",dst=\"<ipv4 dst>\")/(\"X\"*64)], iface=\"<tester interface>\")\n+\n+the VF1 of DUT::\n+\n+     testpmd> port 0/queue 0: received 1 packets\n+  src=00:11:22:33:44:55 - dst=C6:44:32:0A:EC:E1 - type=0x0800 - length=98 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x0\n+  ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN    \n+\n+Test Case 4: two_testpmd_dcf_reset_mtu\n+--------------------------------------\n+The test case resets DCF by resetting the mtu, and DCF should clean up all old rules.\n+\n+Test Steps\n+~~~~~~~~~~\n+1. Modify the value of mtu::\n+\n+    # ifconfig ens785f0 mtu 3000\n+\n+2. Reset port in DCF testpmd::\n+   \n+    testpmd> stop\n+    testpmd> port stop all\n+    testpmd> port reset all\n+    testpmd> port start all\n+    testpmd> start\n+    testpmd> flow list 0\n+   \n+3. Validate a switch rule to VF1 in DCF testpmd::\n+\n+     testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is <ipv4 src> dst is <ipv4 dst> / end actions vf id 1 / end\n+\n+   Get the message::\n+\n+     Flow rule validated\n+\n+4. Create a switch rule to VF1 in DCF testpmd and list rules::\n+\n+     testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is <ipv4 src> dst is <ipv4 dst> / end actions vf id 1 / end\n+\n+   Get the message::\n+\n+     Flow rule #0 created\n+\n+   Check the flow list::\n+\n+     testpmd> flow list 0\n+   \n+   ID      Group   Prio    Attr    Rule\n+   0       0       0       i--     ETH IPV4 => VF\n+\n+5. Send a matched packet in scapy to VF1, and check the VF1 of DUT can receive the packet.\n+\n+Tester::\n+\n+    >>> sendp([Ether(src=\"<src mac>\",dst=\"<dst mac>\")/IP(src=\"<ipv4 src>\",dst=\"<ipv4 dst>\")/(\"X\"*64)], iface=\"<tester interface>\")\n+\n+the VF1 of DUT::\n+\n+     testpmd> port 0/queue 0: received 1 packets\n+  src=00:11:22:33:44:55 - dst=C6:44:32:0A:EC:E1 - type=0x0800 - length=98 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x0\n+  ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN\n+  \n+Test Case 5: two_testpmd_dcf_reset_mac\n+--------------------------------------\n+The test case resets DCF by resetting mac addr, and DCF should clean up all old rules.\n+\n+Test Steps\n+~~~~~~~~~~\n+1. Reset VF0 by set mac addr::\n+\n+    # ip link set ens785f0 vf 0 mac 00:01:02:03:04:05\n+\n+2. Reset port in DCF testpmd::\n+   \n+    testpmd> stop\n+    testpmd> port stop all\n+    testpmd> port reset all\n+    testpmd> port start all\n+    testpmd> start\n+    testpmd> flow list 0\n+\n+3. Validate a switch rule to VF1 in DCF testpmd::\n+\n+     testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is <ipv4 src> dst is <ipv4 dst> / end actions vf id 1 / end\n+\n+   Get the message::\n+\n+     Flow rule validated\n+\n+4. Create a switch rule to VF1 in DCF testpmd and list rules::\n+\n+     testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is <ipv4 src> dst is <ipv4 dst> / end actions vf id 1 / end\n+\n+   Get the message::\n+\n+     Flow rule #0 created\n+\n+   Check the flow list::\n+\n+     testpmd> flow list 0\n+   \n+   ID      Group   Prio    Attr    Rule\n+   0       0       0       i--     ETH IPV4 => VF\n+\n+5. Send a matched packet in scapy to VF1, and check the VF1 of DUT can receive the packet.\n+\n+Tester::\n+\n+    >>> sendp([Ether(src=\"<src mac>\",dst=\"<dst mac>\")/IP(src=\"<ipv4 src>\",dst=\"<ipv4 dst>\")/(\"X\"*64)], iface=\"<tester interface>\")\n+\n+the VF1 of DUT::\n+\n+     testpmd> port 0/queue 0: received 1 packets\n+  src=00:11:22:33:44:55 - dst=C6:44:32:0A:EC:E1 - type=0x0800 - length=98 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x0\n+  ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN\n+\n+Common Steps\n+------------\n+The common steps launch one testpmd and kill DCF process, then relaunch one testpmd.\n+\n+1. Launch the userland ``testpmd`` application on DUT as follows::\n+\n+    <dpdk build dir>/app/dpdk-testpmd <EAL options> -a <DUT port pci device id> -- -i \n+\n+..note:: \n+\n+    For <EAL options>, you can use \"-c 0x6 -n 4\", you can also refer to testpmd doc for other setings.\n+    For <DUT port pci device id>, you can use\"-a 3b:01.0,cap=dcf -a 3b:01.1 --file-prefix=dcf\" for this test plan.\n+\n+2. Set verbose::\n+    \n+     testpmd> set verbose 1\n+    \n+3. Set fwd engine and start::\n+\n+     testpmd> set fwd mac\n+     testpmd> start\n+\n+4. Validate a switch rule to VF1::\n+\n+     testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is <ipv4 src> dst is <ipv4 dst> / end actions vf id 1 / end\n+\n+   Get the message::\n+\n+     Flow rule validated\n+\n+5. Create a switch rule to VF1 and list rules::\n+\n+     testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is <ipv4 src> dst is <ipv4 dst> / end actions vf id 1 / end\n+\n+   Get the message::\n+\n+     Flow rule #0 created\n+\n+   Check the flow list::\n+\n+     testpmd> flow list 0\n+   \n+   ID      Group   Prio    Attr    Rule\n+   0       0       0       i--     ETH IPV4 => VF\n+\n+6. Send a matched packet in scapy to VF1, check DUT can receive the packet.\n+\n+Tester::\n+\n+    >>> sendp([Ether(src=\"<src mac>\",dst=\"<dst mac>\")/IP(src=\"<ipv4 src>\",dst=\"<ipv4 dst>\")/(\"X\"*64)], iface=\"<tester interface>\")\n+\n+DUT::\n+\n+    testpmd> port 1/queue 0: received 1 packets\n+  src=00:11:22:33:44:55 - dst=C6:44:32:0A:EC:E1 - type=0x0800 - length=98 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x0\n+  ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN\n+\n+Test Case 6: one_testpmd_dcf_reset_port\n+---------------------------------------\n+The test case resets DCF by killing DCF and resetting the port, and DCF should clean up all old rules.\n+\n+Test Steps\n+~~~~~~~~~~\n+1. Check the process ID and kill DCF process::\n+\n+    # ps -ef |grep testpmd \n+    # kill -9 #####\n+\n+2. Relaunch the userland ``testpmd`` application on DUT as follows::\n+\n+    <dpdk build dir>/app/dpdk-testpmd <EAL options> -a <DUT port pci device id> -- -i \n+\n+..note:: \n+\n+    For <EAL options>, you can use \"-c 0x6 -n 4\", you can also refer to testpmd doc for other setings.\n+    For <DUT port pci device id>, you can use\"-a 3b:01.0,cap=dcf -a 3b:01.1 --file-prefix=dcf\" for this test plan.\n+\n+3. Set verbose::\n+    \n+     testpmd> set verbose 1\n+    \n+4. Set fwd engine and start::\n+\n+     testpmd> set fwd mac\n+     testpmd> start\n+     testpmd> flow list 0\n+\n+5. Send a matched packet in scapy to VF1, DCF flow rule is cleared and check DUT can't receive the packet.\n+\n+Tester::\n+\n+    >>> sendp([Ether(src=\"<src mac>\",dst=\"<dst mac>\")/IP(src=\"<ipv4 src>\",dst=\"<ipv4 dst>\")/(\"X\"*64)], iface=\"<tester interface>\")\n+\n+DUT::\n+\n+    testpmd> \n+\n+6. Reset port in testpmd::\n+   \n+    testpmd> stop\n+    testpmd> port stop all\n+    testpmd> port reset all\n+    testpmd> port start all\n+    testpmd> start\n+\n+7. Validate a switch rule to VF1::\n+\n+     testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is <ipv4 src> dst is <ipv4 dst> / end actions vf id 1 / end\n+\n+   Get the message::\n+\n+     Flow rule validated\n+\n+8. Create a switch rule to VF1 and list rules::\n+\n+     testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is <ipv4 src> dst is <ipv4 dst> / end actions vf id 1 / end\n+\n+   Get the message::\n+\n+     Flow rule #0 created\n+\n+   Check the flow list::\n+\n+     testpmd> flow list 0\n+   \n+   ID      Group   Prio    Attr    Rule\n+   0       0       0       i--     ETH IPV4 => VF\n+\n+9. Send a matched packet in scapy to VF1, and check DUT can receive the packet.\n+\n+Tester::\n+\n+    >>> sendp([Ether(src=\"<src mac>\",dst=\"<dst mac>\")/IP(src=\"<ipv4 src>\",dst=\"<ipv4 dst>\")/(\"X\"*64)], iface=\"<tester interface>\")\n+\n+DUT::\n+\n+    testpmd> port 1/queue 0: received 1 packets\n+  src=00:11:22:33:44:55 - dst=C6:44:32:0A:EC:E1 - type=0x0800 - length=98 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x0\n+  ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN    \n+\n+Test Case 7: one_testpmd_dcf_reset_device\n+-----------------------------------------\n+The test case resets DCF by resetting the device, and DCF should clean up all old rules.\n+\n+Test Steps\n+~~~~~~~~~~\n+1. Reset DCF device::\n+\n+    # echo 1 > /sys/bus/pci/devices/0000:3b:01.0/reset\n+\n+2. Reset port in testpmd::\n+   \n+    testpmd> stop\n+    testpmd> port stop all\n+    testpmd> port reset all\n+    testpmd> port start all\n+    testpmd> start\n+    testpmd> flow list 0\n+\n+3. Validate a switch rule to VF1::\n+\n+     testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is <ipv4 src> dst is <ipv4 dst> / end actions vf id 1 / end\n+\n+   Get the message::\n+\n+     Flow rule validated\n+\n+4. Create a switch rule to VF1 and list rules::\n+\n+     testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is <ipv4 src> dst is <ipv4 dst> / end actions vf id 1 / end\n+\n+   Get the message::\n+\n+     Flow rule #0 created\n+\n+   Check the flow list::\n+\n+     testpmd> flow list 0\n+   \n+   ID      Group   Prio    Attr    Rule\n+   0       0       0       i--     ETH IPV4 => VF\n+\n+5. Send a matched packet in scapy to VF1, and check DUT can receive the packet.\n+\n+Tester::\n+\n+    >>> sendp([Ether(src=\"<src mac>\",dst=\"<dst mac>\")/IP(src=\"<ipv4 src>\",dst=\"<ipv4 dst>\")/(\"X\"*64)], iface=\"<tester interface>\")\n+\n+DUT::\n+\n+    testpmd> port 1/queue 0: received 1 packets\n+  src=00:11:22:33:44:55 - dst=C6:44:32:0A:EC:E1 - type=0x0800 - length=98 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x0\n+  ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN\n+\n+Test Case 8: one_testpmd_dcf_reset_port_detach\n+----------------------------------------------\n+The test case resets DCF by detaching the port, and DCF should clean up all old rules.\n+\n+Test Steps\n+~~~~~~~~~~\n+1. Reset DCF device::\n+\n+    # echo 1 > /sys/bus/pci/devices/0000:3b:01.0/reset\n+\n+2. Detach and reset port in DCF testpmd::\n+    \n+    testpmd> stop \n+    testpmd> port stop 0\n+    testpmd> port detach 0\n+    testpmd> port attach 3b:01.0,cap=dcf\n+    testpmd> port reset 0\n+    testpmd> port start 0\n+    testpmd> start\n+    testpmd> flow list 0\n+\n+3. Validate a switch rule to VF1::\n+\n+     testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is <ipv4 src> dst is <ipv4 dst> / end actions vf id 1 / end\n+\n+   Get the message::\n+\n+     Flow rule validated\n+\n+4. Create a switch rule to VF1 and list rules::\n+\n+     testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is <ipv4 src> dst is <ipv4 dst> / end actions vf id 1 / end\n+\n+   Get the message::\n+\n+     Flow rule #0 created\n+\n+   Check the flow list::\n+\n+     testpmd> flow list 0\n+   \n+   ID      Group   Prio    Attr    Rule\n+   0       0       0       i--     ETH IPV4 => VF\n+\n+5. Send a matched packet in scapy to VF1, and check DUT can receive the packet.\n+\n+Tester::\n+\n+    >>> sendp([Ether(src=\"<src mac>\",dst=\"<dst mac>\")/IP(src=\"<ipv4 src>\",dst=\"<ipv4 dst>\")/(\"X\"*64)], iface=\"<tester interface>\")\n+\n+DUT::\n+\n+    testpmd> port 1/queue 0: received 1 packets\n+  src=00:11:22:33:44:55 - dst=C6:44:32:0A:EC:E1 - type=0x0800 - length=98 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x0\n+  ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN    \n+\n+Test Case 9: one_testpmd_dcf_reset_mtu\n+--------------------------------------\n+The test case resets DCF by resetting the mtu, and DCF should clean up all old rules.\n+\n+Test Steps\n+~~~~~~~~~~\n+1. Modify the value of mtu::\n+\n+    # ifconfig ens785f0 mtu 3000\n+\n+2. Reset port in DCF testpmd::\n+   \n+    testpmd> stop\n+    testpmd> port stop all\n+    testpmd> port reset all\n+    testpmd> port start all\n+    testpmd> start\n+    testpmd> flow list 0    \n+\n+3. Validate a switch rule to VF1::\n+\n+     testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is <ipv4 src> dst is <ipv4 dst> / end actions vf id 1 / end\n+\n+   Get the message::\n+\n+     Flow rule validated\n+\n+4. Create a switch rule to VF1 and list rules::\n+\n+     testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is <ipv4 src> dst is <ipv4 dst> / end actions vf id 1 / end\n+\n+   Get the message::\n+\n+     Flow rule #0 created\n+\n+   Check the flow list::\n+\n+     testpmd> flow list 0\n+   \n+   ID      Group   Prio    Attr    Rule\n+   0       0       0       i--     ETH IPV4 => VF\n+\n+5. Send a matched packet in scapy to VF1, and check DUT can receive the packet.\n+\n+Tester::\n+\n+    >>> sendp([Ether(src=\"<src mac>\",dst=\"<dst mac>\")/IP(src=\"<ipv4 src>\",dst=\"<ipv4 dst>\")/(\"X\"*64)], iface=\"<tester interface>\")\n+\n+:wqDUT::\n+\n+    testpmd> port 1/queue 0: received 1 packets\n+  src=00:11:22:33:44:55 - dst=C6:44:32:0A:EC:E1 - type=0x0800 - length=98 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x0\n+  ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN   \n+\n+Test Case 10: one_testpmd_dcf_reset_mac\n+--------------------------------------\n+The test case resets DCF by resetting mac addr, and DCF should clean up all old rules.\n+\n+Test Steps\n+~~~~~~~~~~\n+1. Reset VF0 by set mac addr::\n+\n+    # ip link set ens785f0 vf 0 mac 00:01:02:03:04:05\n+\n+2. Reset port in DCF testpmd::\n+   \n+    testpmd> stop\n+    testpmd> port stop all\n+    testpmd> port reset all\n+    testpmd> port start all\n+    testpmd> start\n+    testpmd> flow list 0\n+\n+3. Validate a switch rule to VF1::\n+\n+     testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is <ipv4 src> dst is <ipv4 dst> / end actions vf id 1 / end\n+\n+   Get the message::\n+\n+     Flow rule validated\n+\n+4. Create a switch rule to VF1 and list rules::\n+\n+     testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is <ipv4 src> dst is <ipv4 dst> / end actions vf id 1 / end\n+\n+   Get the message::\n+\n+     Flow rule #0 created\n+\n+   Check the flow list::\n+\n+     testpmd> flow list 0\n+   \n+   ID      Group   Prio    Attr    Rule\n+   0       0       0       i--     ETH IPV4 => VF\n+\n+5. Send a matched packet in scapy to VF1, and check DUT can receive the packet.\n+\n+Tester::\n+\n+    >>> sendp([Ether(src=\"<src mac>\",dst=\"<dst mac>\")/IP(src=\"<ipv4 src>\",dst=\"<ipv4 dst>\")/(\"X\"*64)], iface=\"<tester interface>\")\n+\n+DUT::\n+\n+    testpmd> port 1/queue 0: received 1 packets\n+  src=00:11:22:33:44:55 - dst=C6:44:32:0A:EC:E1 - type=0x0800 - length=98 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 - Receive queue=0x0\n+  ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN\n+\n+\n",
    "prefixes": [
        "V5"
    ]
}