get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 83629,
    "url": "https://patches.dpdk.org/api/patches/83629/?format=api",
    "web_url": "https://patches.dpdk.org/project/dts/patch/20201104102528.6880-2-qinx.sun@intel.com/",
    "project": {
        "id": 3,
        "url": "https://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": "<20201104102528.6880-2-qinx.sun@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dts/20201104102528.6880-2-qinx.sun@intel.com",
    "date": "2020-11-04T10:25:26",
    "name": "[V1,1/3] test_plans/cvl_limit_value_test",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "6d6f5c7c43bbb4576b7438b609f370260333dd70",
    "submitter": {
        "id": 1956,
        "url": "https://patches.dpdk.org/api/people/1956/?format=api",
        "name": "Sun, QinX",
        "email": "qinx.sun@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dts/patch/20201104102528.6880-2-qinx.sun@intel.com/mbox/",
    "series": [
        {
            "id": 13634,
            "url": "https://patches.dpdk.org/api/series/13634/?format=api",
            "web_url": "https://patches.dpdk.org/project/dts/list/?series=13634",
            "date": "2020-11-04T10:25:25",
            "name": "add test suite cvl_limit_value_test",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/13634/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/83629/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/83629/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id F2A8EA04E7;\n\tWed,  4 Nov 2020 02:47:47 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id EAD9BBE65;\n\tWed,  4 Nov 2020 02:47:46 +0100 (CET)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n by dpdk.org (Postfix) with ESMTP id BABD8BE63\n for <dts@dpdk.org>; Wed,  4 Nov 2020 02:47:44 +0100 (CET)",
            "from orsmga005.jf.intel.com ([10.7.209.41])\n by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 03 Nov 2020 17:47:44 -0800",
            "from unknown (HELO localhost.localdomain) ([10.240.183.105])\n by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 03 Nov 2020 17:47:42 -0800"
        ],
        "IronPort-SDR": [
            "\n ZoNCgsJCLc/QZ2nurfuz87E3AatTwvBIO87CY3eCFne9I37VKdFiINgTVPTbfBI9ZUKkqOMJf6\n foIjlWurSBAQ==",
            "\n 3Tg8yXlaxdunNqnt0AFPUPN37MdiU240lxa4+PjWrynzOdCGtq2Mwx3KaRxhDZJgL5GolVrjKZ\n zaA8Ops1XO2w=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9794\"; a=\"156141933\"",
            "E=Sophos;i=\"5.77,449,1596524400\"; d=\"scan'208\";a=\"156141933\"",
            "E=Sophos;i=\"5.77,449,1596524400\"; d=\"scan'208\";a=\"538713693\""
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "From": "sunqin <qinx.sun@intel.com>",
        "To": "dts@dpdk.org",
        "Cc": "sunqin <qinx.sun@intel.com>",
        "Date": "Wed,  4 Nov 2020 10:25:26 +0000",
        "Message-Id": "<20201104102528.6880-2-qinx.sun@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20201104102528.6880-1-qinx.sun@intel.com>",
        "References": "<20201104102528.6880-1-qinx.sun@intel.com>",
        "Subject": "[dts]  [PATCH V1 1/3] test_plans/cvl_limit_value_test",
        "X-BeenThere": "dts@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "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",
        "Sender": "\"dts\" <dts-bounces@dpdk.org>"
    },
    "content": "These 8 cases take a long time to run, so split them from 3 already existed\n\nsuites(iavf_fdir, cvl_fdir, cvl_dcf_switch_filter) and make them as a new test plan.\n\nSigned-off-by: sunqin <qinx.sun@intel.com>\n---\n test_plans/cvl_limit_value_test_test_plan.rst | 594 ++++++++++++++++++\n 1 file changed, 594 insertions(+)\n create mode 100644 test_plans/cvl_limit_value_test_test_plan.rst",
    "diff": "diff --git a/test_plans/cvl_limit_value_test_test_plan.rst b/test_plans/cvl_limit_value_test_test_plan.rst\nnew file mode 100644\nindex 0000000..4c141a1\n--- /dev/null\n+++ b/test_plans/cvl_limit_value_test_test_plan.rst\n@@ -0,0 +1,594 @@\n+.. Copyright (c) <2020>, Intel Corporation\n+   All rights reserved.\n+\n+   Redistribution and use in source and binary forms, with or without\n+   modification, are permitted provided that the following conditions\n+   are met:\n+\n+   - Redistributions of source code must retain the above copyright\n+     notice, this list of conditions and the following disclaimer.\n+\n+   - Redistributions in binary form must reproduce the above copyright\n+     notice, this list of conditions and the following disclaimer in\n+     the documentation and/or other materials provided with the\n+     distribution.\n+\n+   - Neither the name of Intel Corporation nor the names of its\n+     contributors may be used to endorse or promote products derived\n+     from this software without specific prior written permission.\n+\n+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+   \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\n+   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\n+   COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\n+   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n+   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n+   SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n+   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n+   STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n+   OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+\n+\n+Supported function type\n+-----------------------\n+\n+    validate\n+    create\n+    destroy\n+    flush\n+    list\n+\n+Supported action type\n+---------------------\n+\n+    queue index\n+    drop\n+    rss queues\n+    passthru\n+    mark\n+    mark/rss\n+\n+\n+Prerequisites\n+=============\n+\n+1. Hardware:\n+   columbiaville_25g/columbiaville_100g\n+\n+2. Software:\n+   DPDK: http://dpdk.org/git/dpdk\n+   scapy: http://www.secdev.org/projects/scapy/\n+\n+3. Copy specific ice package to /lib/firmware/intel/ice/ddp/ice.pkg\n+   Then reboot server, and compile DPDK\n+\n+4. Generate 2 VFs on each PF and set mac address for each VF::\n+\n+    echo 2 > /sys/bus/pci/devices/0000:86:00.0/sriov_numvfs\n+    echo 2 > /sys/bus/pci/devices/0000:86:00.1/sriov_numvfs\n+    ip link set enp134s0f0 vf 0 mac 00:11:22:33:44:55\n+    ip link set enp134s0f0 vf 1 mac 00:11:22:33:44:66\n+    ip link set enp134s0f1 vf 0 mac 00:11:22:33:44:77\n+    ip link set enp134s0f1 vf 1 mac 00:11:22:33:44:88\n+\n+   0000:86:00.0 generate 0000:86:01.0 and 0000:86:01.1\n+   0000:86:00.1 generate 0000:86:11.0 and 0000:86:11.1\n+   define 86:01.0 as vf00, 86:01.1 as vf01, 86:11.0 as vf10, 86:11.1 as vf11.\n+   assign mac address of pf0 is 68:05:ca:a3:1a:60,\n+   assign mac address of pf1 is 68:05:ca:a3:1a:61.\n+\n+5. Bind VFs to dpdk driver::\n+\n+    ./usertools/dpdk-devbind.py -b vfio-pci 86:01.0 86:01.1 86:11.0 86:11.1\n+\n+5. Launch the app ``testpmd`` with the following arguments::\n+\n+    ./testpmd -c 0xff -n 6 -w 86:01.0 -w 86:01.1 --file-prefix=vf -- -i --rxq=16 --txq=16\n+    testpmd> set fwd rxonly\n+    testpmd> set verbose 1\n+\n+6. on tester side, copy the layer python file to /root::\n+\n+    cp pfcp.py to /root\n+\n+   then import layers when start scapy::\n+\n+    >>> import sys\n+    >>> sys.path.append('/root')\n+    >>> from pfcp import PFCP\n+    >>> from scapy.contrib.gtp import *\n+    >>> from scapy.contrib.mpls import *\n+\n+Test case: Max number\n+=====================\n+All the max number cases are designed based on 2*100G NIC.\n+If the hardware is 4*25G NIC, the guaranteed rule number of PF is 512.\n+So in subcase 3 and subcase 4, there can be created at most 14848 rules on 1pf and 2vfs.\n+\n+Subcase 1: 14336 rules on 1 vf\n+------------------------------\n+\n+1. create 14336 rules on vf00::\n+\n+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.0 / end actions queue index 1 / mark / end\n+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.1 / end actions queue index 1 / mark / end\n+    ......\n+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.55.255 / end actions queue index 1 / mark / end\n+\n+   all the rules are created successfully.\n+\n+2. create one more rule::\n+\n+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.56.0 / end actions queue index 1 / mark / end\n+\n+   the rule failed to create. return the error message.\n+\n+3. check the rule list, there are 14336 rules listed.\n+\n+4. send matched packets for rule 0 and rule 14335::\n+\n+    sendp([Ether(dst=\"00:11:22:33:44:55\")/IP(src=\"192.168.0.20\",dst=\"192.168.0.0\")/Raw('x' * 80)],iface=\"enp134s0f1\")\n+    sendp([Ether(dst=\"00:11:22:33:44:55\")/IP(src=\"192.168.0.20\",dst=\"192.168.55.255\")/Raw('x' * 80)],iface=\"enp134s0f1\")\n+\n+   check all packets are redirected to expected queue with FDIR matched ID=0x0\n+\n+5. create a rule on vf01, it failed,\n+   check the error message, the rule number has expired the max rule number.\n+\n+6. create a rule on vf10, it failed,\n+   check the error message, the rule number has expired the max rule number.\n+\n+7. flush all the rules, check the rule list,\n+   there is no rule listed.\n+\n+8. verify matched packets for rule 0  and rule 14335 received without FDIR matched ID.\n+\n+Subcase 2: 14336 rules on 2 vfs of 2pfs\n+---------------------------------------\n+\n+1. start testpmd on vf00::\n+\n+    ./testpmd -c 0xf -n 6 -w 86:01.0 --file-prefix=vf00 -- -i --rxq=4 --txq=4\n+\n+   create 1 rule on vf00::\n+\n+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.0 / end actions queue index 1 / mark / end\n+\n+   created successfully, check the rule is listed.\n+\n+2. start testpmd on vf10::\n+\n+    ./testpmd -c 0xf0 -n 6 -w 86:0a.0 --file-prefix=vf10 -- -i --rxq=4 --txq=4\n+\n+   create 14336 rules on vf10::\n+\n+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.0 / end actions queue index 1 / mark / end\n+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.1 / end actions queue index 1 / mark / end\n+    ......\n+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.55.255 / end actions queue index 1 / mark / end\n+\n+   all the rules except the last one are created successfully.\n+   check the rule list, there listed 14335 rules.\n+\n+3. send matched packet to vf00 and matched packet for rule 14334 to vf10,\n+   check all packets are redirected to expected queue with FDIR matched ID=0x0\n+\n+4. flush all the rules, check the rule list,\n+   there is no rule listed.\n+\n+5. verify matched packet received without FDIR matched ID.\n+\n+Subcase 3: 1025 rules on 1pf and 14335 rules on 2vfs\n+----------------------------------------------------\n+each pf can create 1024 rules at least in 2 ports card.\n+each pf can create 512 rules at least in 4 ports card.\n+there are 14k rules shared by pfs and vfs.\n+so 1 pf and 2 vfs can create 15360 rules at most on 2 ports card.\n+1 pf and 2 vfs can create 14848 rules at most on 4 ports card.\n+\n+1. create 1025 rules on pf0::\n+\n+    ethtool -N enp134s0f0 flow-type tcp4 src-ip 192.168.0.0 dst-ip 192.168.100.2 src-port 32 dst-port 33 action 8\n+    ethtool -N enp134s0f0 flow-type tcp4 src-ip 192.168.0.1 dst-ip 192.168.100.2 src-port 32 dst-port 33 action 8\n+    ......\n+    ethtool -N enp134s0f0 flow-type tcp4 src-ip 192.168.3.255 dst-ip 192.168.100.2 src-port 32 dst-port 33 action 8\n+    ethtool -N enp134s0f0 flow-type tcp4 src-ip 192.168.4.0 dst-ip 192.168.100.2 src-port 32 dst-port 33 action 8\n+\n+   all the rules can be created successfully::\n+\n+    Added rule with ID <Rule ID>\n+\n+   List the rules on pf0::\n+\n+    ethtool -n enp134s0f0\n+\n+2. start testpmd on vf00::\n+\n+    ./testpmd -c 0xf -n 6 -w 86:01.0 --file-prefix=vf00 -- -i --rxq=4 --txq=4\n+\n+   create 1 rule on vf00::\n+\n+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.0 / end actions queue index 1 / mark / end\n+\n+   created successfully, check the rule is listed.\n+\n+2. start testpmd on vf10::\n+\n+    ./testpmd -c 0xf0 -n 6 -w 86:0a.0 --file-prefix=vf10 -- -i --rxq=4 --txq=4\n+\n+   create 14335 rules on vf10::\n+\n+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.0 / end actions queue index 1 / mark / end\n+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.1 / end actions queue index 1 / mark / end\n+    ......\n+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.55.254 / end actions queue index 1 / mark / end\n+\n+   all the rules except the last one are created successfully.\n+   check the rule list, there listed 14334 rules.\n+\n+3. send matched packet to vf00 and matched packet for rule 14333 to vf10,\n+   check all packets are redirected to expected queue with FDIR matched ID=0x0\n+\n+4. delete 1 rule on pf0::\n+\n+    ethtool -N enp134s0f0 delete <Rule ID>\n+\n+5. create one more rule on vf10::\n+\n+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.55.254 / end actions queue index 1 / mark / end\n+\n+   the rule can be created successfully.\n+\n+6. send matched packet to vf10, it can be redirected to queue 1 with FDIR matched ID=0x0.\n+\n+7. flush all the rules, check the rule list,\n+   there is no rule listed.\n+\n+8. verify matched packet received without FDIR matched ID.\n+\n+Subcase 3: 15360 rules on 1pf and 0 rules on 2vfs\n+-------------------------------------------------\n+each pf can create 1024 rules at least in 2 ports card.\n+each pf can create 512 rules at least in 4 ports card.\n+there are 14k rules shared by pfs and vfs.\n+so 1 pf and 2 vfs can create 15360 rules at most on 2 ports card.\n+1 pf and 2 vfs can create 14848 rules at most on 4 ports card.\n+so if create 15360/14848 rules on 1 pf, there can't create rule on vf successfully.\n+\n+1. create 15360 rules on pf0::\n+\n+    ethtool -N enp134s0f0 flow-type tcp4 src-ip 192.168.0.0 dst-ip 192.168.100.2 src-port 32 dst-port 33 action 8\n+    ethtool -N enp134s0f0 flow-type tcp4 src-ip 192.168.0.1 dst-ip 192.168.100.2 src-port 32 dst-port 33 action 8\n+    ......\n+    ethtool -N enp134s0f0 flow-type tcp4 src-ip 192.168.57.255 dst-ip 192.168.100.2 src-port 32 dst-port 33 action 8\n+\n+   all the rules can be created successfully::\n+\n+    Added rule with ID <Rule ID>\n+\n+2. failed to create one more rule on pf0::\n+\n+    ethtool -N enp134s0f0 flow-type tcp4 src-ip 192.168.58.0 dst-ip 192.168.100.2 src-port 32 dst-port 33 action 8\n+\n+3. start testpmd on vf00 and vf10::\n+\n+    ./testpmd -c 0xf -n 6 -w 86:01.0 -w 86:11.0 --file-prefix=vf00 -- -i --rxq=4 --txq=4\n+\n+   create 1 rule on vf00::\n+\n+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.0 / end actions queue index 1 / mark / end\n+\n+   failed to create the rule, check there is no rule listed.\n+\n+   create 1 rule on vf10::\n+\n+    flow create 1 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.0 / end actions queue index 1 / mark / end\n+\n+   failed to create the rule, check there is no rule listed.\n+\n+4. delete 1 rule on pf0::\n+\n+    ethtool -N enp134s0f0 delete <Rule ID>\n+\n+5. create 1 rule on vf00::\n+\n+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.55.254 / end actions queue index 1 / mark / end\n+\n+   the rule can be created successfully.\n+\n+   create 1 rule on vf10::\n+\n+    flow create 1 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.0 / end actions queue index 1 / mark / end\n+\n+   failed to create the rule, check there is no rule listed.\n+\n+6. send matched packet to vf00, it can be redirected to queue 1 with FDIR matched ID=0x0.\n+   send matched packet to vf10, it is received without FDIR matched ID.\n+\n+7. delete 1 more rule on pf0::\n+\n+    ethtool -N enp134s0f0 delete <Rule ID>\n+\n+8. create 1 rule on vf10::\n+\n+    flow create 1 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.0 / end actions queue index 1 / mark / end\n+\n+   the rule can be created successfully.\n+\n+9. send matched packet to vf00, it can be redirected to queue 1 with FDIR matched ID=0x0.\n+   send matched packet to vf10, it can be redirected to queue 1 with FDIR matched ID=0x0.\n+\n+\n+Test case: Stress test\n+======================\n+\n+Subcase 1: add/delete rules\n+---------------------------\n+\n+1. create two rules::\n+\n+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions queue index 1 / mark id 0 / end\n+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions rss queues 2 3 end / mark id 1 / end\n+\n+   return the message::\n+\n+    Flow rule #0 created\n+    Flow rule #1 created\n+\n+   list the rules::\n+\n+    testpmd> flow list 0\n+    ID      Group   Prio    Attr    Rule\n+    0       0       0       i--     ETH IPV4 UDP => QUEUE MARK\n+    1       0       0       i--     ETH IPV4 TCP => RSS MARK\n+\n+2. delete the rules::\n+\n+    testpmd> flow flush 0\n+\n+3. repeat the create and delete operations in step1-2 14336 times.\n+\n+4. create the two rules one more time, check the rules listed.\n+\n+5. send matched packet::\n+\n+    sendp([Ether(dst=\"00:11:22:33:44:55\")/IP(src=\"192.168.0.20\",dst=\"192.168.0.21\")/UDP(sport=22,dport=23)/Raw('x' * 80)],iface=\"enp134s0f1\")\n+    sendp([Ether(dst=\"00:11:22:33:44:55\")/IP(src=\"192.168.0.20\",dst=\"192.168.0.21\")/TCP(sport=22,dport=23)/Raw('x' * 80)],iface=\"enp134s0f1\")\n+\n+   check packet 1 is redirected to queue 1 with FDIR matched ID=0x0\n+   check packet 2 is redirected to queue 2 or queue 3 with FDIR matched ID=0x1\n+\n+Subcase 2: add/delete rules on two VFs\n+--------------------------------------\n+\n+1. create a rule on each vf::\n+\n+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.0 dst is 192.1.0.0 tos is 4 / tcp src is 22 dst is 23 / end actions queue index 5 / end\n+    flow create 1 ingress pattern eth / ipv4 src is 192.168.0.0 dst is 192.1.0.0 tos is 4 / tcp src is 22 dst is 23 / end actions queue index 5 / end\n+\n+   return the message::\n+\n+    Flow rule #0 created\n+    Flow rule #0 created\n+\n+   list the rules::\n+\n+    testpmd> flow list 0\n+    ID      Group   Prio    Attr    Rule\n+    0       0       0       i--     ETH IPV4 TCP => QUEUE\n+    testpmd> flow list 1\n+    ID      Group   Prio    Attr    Rule\n+    0       0       0       i--     ETH IPV4 TCP => QUEUE\n+\n+2. delete the rules::\n+\n+    flow destroy 0 rule 0\n+    flow destroy 1 rule 0\n+\n+3. repeate the create and delete operations in step1-2 14336 times with different IP src address.\n+\n+4. create the rule on each vf one more time, check the rules listed::\n+\n+    flow create 0 ingress pattern eth / ipv4 src is 192.168.56.0 dst is 192.1.0.0 tos is 4 / tcp src is 22 dst is 23 / end actions queue index 5 / end\n+    flow create 1 ingress pattern eth / ipv4 src is 192.168.56.0 dst is 192.1.0.0 tos is 4 / tcp src is 22 dst is 23 / end actions queue index 5 / end\n+\n+5. send matched packet::\n+\n+    sendp([Ether(dst=\"00:11:22:33:44:55\")/IP(src=\"192.168.56.0\",dst=\"192.1.0.0\",tos=4)/TCP(sport=22,dport=23)/Raw('x' * 80)],iface=\"enp134s0f1\")\n+    sendp([Ether(dst=\"00:11:22:33:44:66\")/IP(src=\"192.168.56.0\",dst=\"192.1.0.0\",tos=4)/TCP(sport=22,dport=23)/Raw('x' * 80)],iface=\"enp134s0f1\")\n+\n+   check the packet is redirected to queue 5 of two vfs.\n+\n+Prerequisites\n+=============\n+\n+1. Hardware:\n+   columbiaville_25g/columbiaville_100g\n+   design the cases with 2 ports card.\n+\n+2. Software:\n+   DPDK: http://dpdk.org/git/dpdk\n+   scapy: http://www.secdev.org/projects/scapy/\n+\n+3. Copy specific ice package to /lib/firmware/intel/ice/ddp/ice.pkg\n+   Then reboot server, and compile DPDK\n+\n+4. Bind the pf to dpdk driver::\n+\n+    ./usertools/dpdk-devbind.py -b igb_uio 86:00.0 86:00.1\n+\n+5. Launch the app ``testpmd`` with the following arguments::\n+\n+    ./testpmd -c 0xff -n 6 -w 86:00.0 --log-level=\"ice,7\" -- -i --portmask=0xff --rxq=64 --txq=64 --port-topology=loop\n+    testpmd> set fwd rxonly\n+    testpmd> set verbose 1\n+\n+   If set UDP tunnel flow rule::\n+\n+    testpmd> port config 0 udp_tunnel_port add vxlan 4789\n+    testpmd> start\n+\n+   Notes: if need two ports environment, launch ``testpmd`` with the following arguments::\n+\n+    ./testpmd -c 0xff -n 6 -w 86:00.0 -w 86:00.1 --log-level=\"ice,7\" -- -i --portmask=0xff --rxq=64 --txq=64 --port-topology=loop\n+\n+Test case: add/delete rules\n+---------------------------\n+\n+1. create two rules::\n+\n+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions queue index 1 / mark / end\n+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions rss queues 2 3 end / mark id 1 / end\n+\n+   return the message::\n+\n+    Flow rule #0 created\n+    Flow rule #1 created\n+\n+   list the rules::\n+\n+    testpmd> flow list 0\n+    ID      Group   Prio    Attr    Rule\n+    0       0       0       i--     ETH IPV4 UDP => QUEUE MARK\n+    1       0       0       i--     ETH IPV4 TCP => RSS MARK\n+\n+2. delete the rules::\n+\n+    testpmd> flow flush 0\n+\n+3. repeate the create and delete operations in step1-2 15360 times.\n+\n+4. create the two rules one more time, check the rules listed.\n+\n+5. send matched packet::\n+\n+    sendp([Ether(dst=\"00:11:22:33:44:55\")/IP(src=\"192.168.0.20\",dst=\"192.168.0.21\")/UDP(sport=22,dport=23)/Raw('x' * 80)],iface=\"enp175s0f0\")\n+    sendp([Ether(dst=\"00:11:22:33:44:55\")/IP(src=\"192.168.0.20\",dst=\"192.168.0.21\")/TCP(sport=22,dport=23)/Raw('x' * 80)],iface=\"enp175s0f0\")\n+\n+   check packet 1 is redirected to queue 1 with FDIR matched ID=0x0\n+   check packet 2 is redirected to queue 2 or queue 3 with FDIR matched ID=0x1\n+\n+Prerequisites\n+=============\n+\n+1. Hardware:\n+   columbiaville_25g/columbiaville_100g\n+   design the cases with 2 ports card.\n+\n+2. Software:\n+   dpdk: http://dpdk.org/git/dpdk\n+   scapy: http://www.secdev.org/projects/scapy/\n+\n+3. Copy specific ice package to /lib/firmware/updates/intel/ice/ddp/ice.pkg,\n+   then load driver::\n+\n+     rmmod ice\n+     insmod ice.ko\n+\n+4. Get the pci device id of DUT, for example::\n+\n+     ./usertools/dpdk-devbind.py -s\n+\n+     0000:18:00.0 'Device 1593' if=enp24s0f0 drv=ice unused=vfio-pci\n+     0000:18:00.1 'Device 1593' if=enp24s0f1 drv=ice unused=vfio-pci\n+\n+5. Generate 4 VFs on PF0::\n+\n+     echo 4 > /sys/bus/pci/devices/0000:18:00.0/sriov_numvfs\n+\n+     ./usertools/dpdk-devbind.py -s\n+     0000:18:01.0 'Ethernet Adaptive Virtual Function 1889' if=enp24s1 drv=iavf unused=vfio-pci\n+     0000:18:01.1 'Ethernet Adaptive Virtual Function 1889' if=enp24s1f1 drv=iavf unused=vfio-pci\n+     0000:18:01.2 'Ethernet Adaptive Virtual Function 1889' if=enp24s1f2 drv=iavf unused=vfio-pci\n+     0000:18:01.3 'Ethernet Adaptive Virtual Function 1889' if=enp24s1f3 drv=iavf unused=vfio-pci\n+\n+6. Set VF0 as trust::\n+\n+     ip link set enp24s0f0 vf 0 trust on\n+\n+7. Bind VFs to dpdk driver::\n+\n+     modprobe vfio-pci\n+     ./usertools/dpdk-devbind.py -b vfio-pci 0000:18:01.0 0000:18:01.1 0000:18:01.2 0000:18:01.3\n+\n+8. Launch dpdk on VF0 and VF1, and VF0 request DCF mode::\n+\n+     ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4 -w 0000:18:01.0,cap=dcf -w 0000:18:01.1 -- -i\n+     testpmd> set portlist 1\n+     testpmd> set fwd rxonly\n+     testpmd> set verbose 1\n+     testpmd> start\n+     testpmd> show port info all\n+\n+   check the VF0 driver is net_ice_dcf.\n+\n+9. on tester side, copy the layer python file to /root::\n+\n+      cp pfcp.py to /root\n+\n+    then import layers when start scapy::\n+\n+      >>> import sys\n+      >>> sys.path.append('/root')\n+      >>> from pfcp import PFCP\n+      >>> from scapy.contrib.igmp import *\n+\n+Test case: max rule number\n+==========================\n+\n+Description: 32k switch filter rules can be created on a CVL card,\n+and all PFs and VFs share the 32k rules. But the system will first create\n+some MAC_VLAN rules in switch table, and as the number of rules increased,\n+the hash conflicts in the switch filter table are increased, so we can\n+create a total of 32563 switch filter rules on a DCF.\n+\n+1. create 32563 rules with the same pattern, but different input set::\n+\n+     testpmd> flow create 0 ingress pattern eth / ipv4 src is 192.168.0.0 / end actions vf id 1 / end\n+     testpmd> flow create 0 ingress pattern eth / ipv4 src is 192.168.0.1 / end actions vf id 1 / end\n+     ......\n+     testpmd> flow create 0 ingress pattern eth / ipv4 src is 192.168.127.177 / end actions vf id 1 / end\n+     testpmd> flow list 0\n+\n+   check the rules exist in the list.\n+\n+2. create one more rule::\n+\n+     testpmd> flow create 0 ingress pattern eth / ipv4 src is 192.168.127.178 / end actions vf id 1 / end\n+\n+   check the rule can not be created successfully, and\n+   testpmd provide a friendly output, showing::\n+\n+     ice_flow_create(): Failed to create flow\n+     port_flow_complain(): Caught PMD error type 2 (flow rule (handle)): switch filter create flow fail: Invalid argument\n+\n+3. check the rule list\n+\n+     testpmd> flow list 0\n+\n+   check the rule in step 2 not exists in the list.\n+\n+4. send 32563 matched packets for rule 0-32562::\n+\n+     sendp([Ether(dst=\"68:05:ca:8d:ed:a8\")/IP(src=\"192.168.0.0\")/TCP(sport=25,dport=23)/(\"X\"*480)], iface=\"ens786f0\", count=1)\n+     sendp([Ether(dst=\"68:05:ca:8d:ed:a8\")/IP(src=\"192.168.0.1\")/TCP(sport=25,dport=23)/(\"X\"*480)], iface=\"ens786f0\", count=1)\n+     ......\n+     sendp([Ether(dst=\"68:05:ca:8d:ed:a8\")/IP(src=\"192.168.127.177\")/TCP(sport=25,dport=23)/(\"X\"*480)], iface=\"ens786f0\", count=1)\n+\n+   check port 1 receive the 32563 packets.\n+   send 1 mismatched packet::\n+\n+     sendp([Ether(dst=\"68:05:ca:8d:ed:a8\")/IP(src=\"192.167.0.1\")/TCP(sport=25,dport=23)/(\"X\"*480)], iface=\"ens786f0\", count=1)\n+\n+   check the packet are not to port 1.\n+\n+5. verify rules can be destroyed::\n+\n+     testpmd> flow flush 0\n+     testpmd> flow list 0\n+\n+   check the rules not exist in the list.\n+   send 32563 matched packets, check the packets are not to port 1.\n\\ No newline at end of file\n",
    "prefixes": [
        "V1",
        "1/3"
    ]
}