get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 78014,
    "url": "https://patches.dpdk.org/api/patches/78014/?format=api",
    "web_url": "https://patches.dpdk.org/project/dts/patch/1600356109-92875-1-git-send-email-yuan.peng@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": "<1600356109-92875-1-git-send-email-yuan.peng@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dts/1600356109-92875-1-git-send-email-yuan.peng@intel.com",
    "date": "2020-09-17T15:21:49",
    "name": "add validate step before creating rule",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "96d0ad4cdd1de68a028b0f6675ed26ac9408a4e6",
    "submitter": {
        "id": 429,
        "url": "https://patches.dpdk.org/api/people/429/?format=api",
        "name": "Peng, Yuan",
        "email": "yuan.peng@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dts/patch/1600356109-92875-1-git-send-email-yuan.peng@intel.com/mbox/",
    "series": [
        {
            "id": 12310,
            "url": "https://patches.dpdk.org/api/series/12310/?format=api",
            "web_url": "https://patches.dpdk.org/project/dts/list/?series=12310",
            "date": "2020-09-17T15:21:49",
            "name": "add validate step before creating rule",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/12310/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/78014/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/78014/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 9A14DA04B6;\n\tThu, 17 Sep 2020 10:16:57 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 839B61D582;\n\tThu, 17 Sep 2020 10:16:57 +0200 (CEST)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n by dpdk.org (Postfix) with ESMTP id 7A2791D581\n for <dts@dpdk.org>; Thu, 17 Sep 2020 10:16:55 +0200 (CEST)",
            "from fmsmga007.fm.intel.com ([10.253.24.52])\n by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 17 Sep 2020 01:16:54 -0700",
            "from npg_dpdk_nic_yuanpeng_tester62.sh.intel.com ([10.67.119.61])\n by fmsmga007.fm.intel.com with ESMTP; 17 Sep 2020 01:16:53 -0700"
        ],
        "IronPort-SDR": [
            "\n NjkxqQj/q1cxT706u6bzsHD0zTGW2aYzPDWIz6hnKQ7neq3jUdkLCdtVMw2jyNl9eQF05O53+V\n MszYt2nuvDHQ==",
            "\n mRsLa+JWOwZqkH9bBysiIuv6Kd9C5rQI1lxip0YRqUb73xxmQEnt0i9gBYyzlmC0b6lRLcFzSP\n JIiH5E1YJZuA=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9746\"; a=\"157034948\"",
            "E=Sophos;i=\"5.76,436,1592895600\"; d=\"scan'208\";a=\"157034948\"",
            "E=Sophos;i=\"5.76,436,1592895600\"; d=\"scan'208\";a=\"287485208\""
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Peng Yuan <yuan.peng@intel.com>",
        "To": "dts@dpdk.org",
        "Cc": "Peng Yuan <yuan.peng@intel.com>",
        "Date": "Thu, 17 Sep 2020 15:21:49 +0000",
        "Message-Id": "<1600356109-92875-1-git-send-email-yuan.peng@intel.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "Subject": "[dts] [PATCH] add validate step before creating rule",
        "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": "Add validate step before creating rule\nAdd recreating rule after deleting it for bug DPDK-23826\n\nSigned-off-by: Peng Yuan <yuan.peng@intel.com>",
    "diff": "diff --git a/test_plans/generic_flow_api_test_plan.rst b/test_plans/generic_flow_api_test_plan.rst\nindex 8bd82b33..33f5ec1c 100644\n--- a/test_plans/generic_flow_api_test_plan.rst\n+++ b/test_plans/generic_flow_api_test_plan.rst\n@@ -48,6 +48,9 @@ Prerequisites\n \n     ./usertools/dpdk-devbind.py -b igb_uio 05:00.0\n  \n+Note: validate the rules first before create it in each case.\n+All the rules that can be validated correctly should be created successfully.\n+The rules can't be validated correctly shouldn't be created successfully.\n \n Test case: Fortville ethertype\n ==============================\n@@ -101,8 +104,10 @@ Test case: Fortville fdir for L2 payload\n     testpmd> set verbose 1\n     testpmd> start\n \n-2. create filter rules::\n+2. validate and create filter rules::\n \n+    testpmd> flow validate 0 ingress pattern eth / vlan tci is 1 / end actions queue index 1 / end\n+    testpmd> flow validate 0 ingress pattern eth type is 0x0807 / end actions queue index 2 / end\n     testpmd> flow create 0 ingress pattern eth / vlan tci is 1 / end actions queue index 1 / end\n     testpmd> flow create 0 ingress pattern eth type is 0x0807 / end actions queue index 2 / end\n \n@@ -133,7 +138,7 @@ Test case: Fortville fdir for flexbytes\n     testpmd> set verbose 1\n     testpmd> start\n \n-2. create filter rules\n+2. validate and create filter rules\n \n    l2-payload::\n \n@@ -191,6 +196,14 @@ Test case: Fortville fdir for flexbytes\n     testpmd> flow flush 0\n     testpmd> flow list 0\n \n+5. verify rules can be recreated successfully after deleted::\n+\n+    testpmd> flow create 0 ingress pattern eth type is 0x0807 / raw relative is 1 pattern is ab / end actions queue index 1 / end\n+    testpmd> flow create 0 ingress pattern eth / vlan tci is 4095 / ipv4 proto is 255 ttl is 40 / raw relative is 1 offset is 2 pattern is ab / raw relative is 1 offset is 10 pattern is abcdefghij / raw relative is 1 offset is 0 pattern is abcd / end actions queue index 2 / end\n+    testpmd> flow create 0 ingress pattern eth / ipv4 src is 2.2.2.4 dst is 2.2.2.5 / udp src is 22 dst is 23 / raw relative is 1 offset is 2 pattern is fhds / end actions queue index 3 / end\n+    testpmd> flow create 0 ingress pattern eth / ipv4 src is 2.2.2.4 dst is 2.2.2.5 tos is 4 ttl is 3 / tcp src is 32 dst is 33 / raw relative is 1 offset is 2 pattern is hijk / end actions queue index 4 / end\n+    testpmd> flow create 0 ingress pattern eth / ipv4 src is 2.2.2.4 dst is 2.2.2.5 / sctp src is 42 / raw relative is 1 offset is 2 pattern is abcdefghijklmnop / end actions queue index 5 / end\n+    testpmd> flow create 0 ingress pattern eth / vlan tci is 1 / ipv6 src is 2001::1 dst is 2001::2 tc is 3 hop is 30 / tcp src is 32 dst is 33 / raw relative is 1 offset is 0 pattern is hijk / raw relative is 1 offset is 8 pattern is abcdefgh / end actions queue index 6 / end\n \n Test case: Fortville fdir for ipv4\n ==================================\n@@ -219,7 +232,7 @@ Test case: Fortville fdir for ipv4\n     testpmd> set verbose 1\n     testpmd> start\n \n-2. create filter rules\n+2. validate and create the filter rules.\n \n    ipv4-other::\n \n@@ -324,7 +337,7 @@ Test case: Fortville fdir for ipv6\n     testpmd> set verbose 1\n     testpmd> start\n \n-2. create filter rules\n+2. validated and create filter rules\n \n    ipv6-other::\n \ndiff --git a/tests/TestSuite_generic_flow_api.py b/tests/TestSuite_generic_flow_api.py\nindex 5852f4ac..da061fed 100644\n--- a/tests/TestSuite_generic_flow_api.py\n+++ b/tests/TestSuite_generic_flow_api.py\n@@ -674,7 +674,11 @@ class TestGeneric_flow_api(TestCase):\n         self.dut.send_expect(\"start\", \"testpmd> \", 120)\n         time.sleep(2)\n \n-        # create the flow rules\n+        # validate and create the flow rules\n+        self.dut.send_expect(\n+            \"flow validate 0 ingress pattern eth / ipv4 / tcp flags spec 0x02 flags mask 0x02 / end actions queue index 3 / end\",\n+            \"validated\")\n+\n         self.dut.send_expect(\n             \"flow create 0 ingress pattern eth / ipv4 / tcp flags spec 0x02 flags mask 0x02 / end actions queue index 3 / end\",\n             \"created\")\n@@ -688,8 +692,12 @@ class TestGeneric_flow_api(TestCase):\n         # the ipv6 rule is conflicted with ipv4 rule.\n         self.dut.send_expect(\"flow destroy 0 rule 0\", \"testpmd> \", 120)\n \n-        # create the flow rules\n+        # validate and create the flow rules\n         q_idx = '2' if self.nic == 'foxville' else '4'\n+        self.dut.send_expect(\n+            \"flow validate 0 ingress pattern eth / ipv6 / tcp flags spec 0x02 flags mask 0x02 / end actions queue index %s / end\" %(q_idx),\n+            \"validated\")\n+\n         self.dut.send_expect(\n             \"flow create 0 ingress pattern eth / ipv6 / tcp flags spec 0x02 flags mask 0x02 / end actions queue index %s / end\" %(q_idx),\n             \"created\")\n@@ -716,6 +724,13 @@ class TestGeneric_flow_api(TestCase):\n         time.sleep(2)\n         # create the flow rules\n         basic_flow_actions = [\n+            {'create': 'validate', 'flows': ['ipv4', 'sip', 'dip'], 'actions': ['queue']},\n+            {'create': 'validate', 'flows': ['ipv4', 'sip', 'dip', 'proto', 'udp', 'sport', 'dport'],\n+             'actions': ['queue']},\n+            {'create': 'validate', 'flows': ['ipv4', 'sip', 'dip', 'proto', 'tcp', 'sport', 'dport'],\n+             'actions': ['queue']},\n+            {'create': 'validate', 'flows': ['ipv4', 'sip', 'dip', 'proto', 'sctp', 'sport', 'dport'],\n+             'actions': ['queue']},\n             {'create': 'create', 'flows': ['ipv4', 'sip', 'dip'], 'actions': ['queue']},\n             {'create': 'create', 'flows': ['ipv4', 'sip', 'dip', 'proto', 'udp', 'sport', 'dport'],\n              'actions': ['queue']},\n@@ -756,11 +771,15 @@ class TestGeneric_flow_api(TestCase):\n         # create the flow rules\n         if self.nic in [\"fortville_eagle\", \"fortville_25g\", \"fortville_spirit\"]:\n             basic_flow_actions = [\n+                {'create': 'validate', 'flows': ['ipv4', 'udp', 'dport'], 'actions': ['queue']},\n+                {'create': 'validate', 'flows': ['ipv4', 'tcp', 'dport'], 'actions': ['queue']},\n                 {'create': 'create', 'flows': ['ipv4', 'udp', 'dport'], 'actions': ['queue']},\n                 {'create': 'create', 'flows': ['ipv4', 'tcp', 'dport'], 'actions': ['queue']},\n             ]\n         else:\n             basic_flow_actions = [\n+                {'create': 'validate', 'flows': ['ipv4', 'proto', 'udp', 'dport'], 'actions': ['queue']},\n+                {'create': 'validate', 'flows': ['ipv4', 'proto', 'tcp', 'dport'], 'actions': ['queue']},\n                 {'create': 'create', 'flows': ['ipv4', 'proto', 'udp', 'dport'], 'actions': ['queue']},\n                 {'create': 'create', 'flows': ['ipv4', 'proto', 'tcp', 'dport'], 'actions': ['queue']},\n             ]\n@@ -861,6 +880,9 @@ class TestGeneric_flow_api(TestCase):\n \n         # create the flow rules\n         basic_flow_actions = [\n+            {'create': 'validate', 'flows': ['etag'], 'actions': ['vf0']},\n+            {'create': 'validate', 'flows': ['etag'], 'actions': ['vf1']},\n+            {'create': 'validate', 'flows': ['etag'], 'actions': ['pf']},\n             {'create': 'create', 'flows': ['etag'], 'actions': ['vf0']},\n             {'create': 'create', 'flows': ['etag'], 'actions': ['vf1']},\n             {'create': 'create', 'flows': ['etag'], 'actions': ['pf']},\n@@ -879,13 +901,15 @@ class TestGeneric_flow_api(TestCase):\n         self.verify(self.nic in [\"fortville_eagle\", \"fortville_25g\", \"fortville_spirit\", \"carlsville\",\n                                  \"fortville_spirit_single\", \"fortpark_TLV\",\"fortpark_BASE-T\", \"foxville\"], \"%s nic not support fdir L2 payload filter\" % self.nic)\n \n-        self.pmdout.start_testpmd(\"%s\" % self.pf_cores, \"--pkt-filter-mode=perfect --rxq=%d --txq=%d\" % (MAX_QUEUE+1, MAX_QUEUE+1), \"-w %s --file-prefix=test1\" % self.pf_pci)\n+        self.pmdout.start_testpmd(\"%s\" % self.pf_cores, \"--rxq=%d --txq=%d\" % (MAX_QUEUE+1, MAX_QUEUE+1), \"-w %s --file-prefix=test1\" % self.pf_pci)\n         self.dut.send_expect(\"set fwd rxonly\", \"testpmd> \", 120)\n         self.dut.send_expect(\"set verbose 1\", \"testpmd> \", 120)\n         self.dut.send_expect(\"start\", \"testpmd> \", 120)\n         time.sleep(2)\n \n         basic_flow_actions = [\n+            {'create': 'validate', 'flows': ['vlan'], 'actions': ['queue']},\n+            {'create': 'validate', 'flows': ['ether', 'ppp'], 'actions': ['queue']},\n             {'create': 'create', 'flows': ['vlan'], 'actions': ['queue']},\n             {'create': 'create', 'flows': ['ether', 'ppp'], 'actions': ['queue']},\n         ]\n@@ -1286,16 +1310,25 @@ class TestGeneric_flow_api(TestCase):\n         time.sleep(2)\n \n         # ip in command\n+        self.dut.send_expect(\n+            \"flow validate 0 ingress pattern eth dst is 11:11:11:11:11:11 / ipv4 dst is 1.1.1.1 / end actions mark id 2 / rss / end\",\n+            \"error\")\n         self.dut.send_expect(\n             \"flow create 0 ingress pattern eth dst is 11:11:11:11:11:11 / ipv4 dst is 1.1.1.1 / end actions mark id 2 / rss / end\",\n             \"error\")\n \n         # udp in command\n+        self.dut.send_expect(\n+            \"flow validate 0 ingress pattern eth dst is 11:11:11:11:11:11 / ipv4 / udp dst is 111 / end actions mark id 2 / rss / end\",\n+            \"error\")\n         self.dut.send_expect(\n             \"flow create 0 ingress pattern eth dst is 11:11:11:11:11:11 / ipv4 / udp dst is 111 / end actions mark id 2 / rss / end\",\n             \"error\")\n \n         # tcp in command\n+        self.dut.send_expect(\n+            \"flow validate 0 ingress pattern eth dst is 11:11:11:11:11:11 / ipv4 / tcp dst is 111 / end actions mark id 2 / rss / end\",\n+            \"error\")\n         self.dut.send_expect(\n             \"flow create 0 ingress pattern eth dst is 11:11:11:11:11:11 / ipv4 / tcp dst is 111 / end actions mark id 2 / rss / end\",\n             \"error\")\n@@ -1333,7 +1366,7 @@ class TestGeneric_flow_api(TestCase):\n                                  \"fortville_spirit_single\", \"fortpark_TLV\",\"fortpark_BASE-T\", \"foxville\"], \"%s nic not support fdir vlan filter\" % self.nic)\n         self.setup_env()\n         # start testpmd on pf\n-        self.pmdout.start_testpmd(\"%s\" % self.pf_cores, \"--pkt-filter-mode=perfect --disable-rss --rxq=%d --txq=%d\" % (MAX_QUEUE+1, MAX_QUEUE+1), \"-w %s --file-prefix=pf --socket-mem 1024,1024 --legacy-mem\" % self.pf_pci)\n+        self.pmdout.start_testpmd(\"%s\" % self.pf_cores, \"--disable-rss --rxq=%d --txq=%d\" % (MAX_QUEUE+1, MAX_QUEUE+1), \"-w %s --file-prefix=pf --socket-mem 1024,1024 --legacy-mem\" % self.pf_pci)\n         self.dut.send_expect(\"set fwd rxonly\", \"testpmd> \", 120)\n         self.dut.send_expect(\"set verbose 1\", \"testpmd> \", 120)\n         self.dut.send_expect(\"start\", \"testpmd> \", 120)\n@@ -1352,6 +1385,22 @@ class TestGeneric_flow_api(TestCase):\n         time.sleep(2)\n         # create the flow rules\n         basic_flow_actions = [\n+            {'create': 'validate', 'flows': ['vlan', 'ipv4'], 'actions': ['queue']},\n+            {'create': 'validate', 'flows': ['vlan', 'ipv4', 'udp'], 'actions': ['queue']},\n+            {'create': 'validate', 'flows': ['vlan', 'ipv4', 'tcp'], 'actions': ['queue']},\n+            {'create': 'validate', 'flows': ['vlan', 'ipv4', 'sctp'], 'actions': ['queue']},\n+            {'create': 'validate', 'flows': ['vlan', 'ipv4', 'vf0'], 'actions': ['queue']},\n+            {'create': 'validate', 'flows': ['vlan', 'ipv4', 'sctp', 'vf1'], 'actions': ['queue']},\n+            {'create': 'validate', 'flows': ['vlan', 'ipv4', 'sctp'], 'actions': ['drop']},\n+            {'create': 'validate', 'flows': ['vlan', 'ipv4', 'udp', 'vf1'], 'actions': ['drop']},\n+            {'create': 'validate', 'flows': ['vlan', 'ipv6'], 'actions': ['queue']},\n+            {'create': 'validate', 'flows': ['vlan', 'ipv6', 'udp'], 'actions': ['queue']},\n+            {'create': 'validate', 'flows': ['vlan', 'ipv6', 'tcp'], 'actions': ['queue']},\n+            {'create': 'validate', 'flows': ['vlan', 'ipv6', 'sctp'], 'actions': ['queue']},\n+            {'create': 'validate', 'flows': ['vlan', 'ipv6', 'vf0'], 'actions': ['queue']},\n+            {'create': 'validate', 'flows': ['vlan', 'ipv6', 'tcp', 'vf1'], 'actions': ['queue']},\n+            {'create': 'validate', 'flows': ['vlan', 'ipv6', 'sctp'], 'actions': ['drop']},\n+            {'create': 'validate', 'flows': ['vlan', 'ipv6', 'tcp', 'vf1'], 'actions': ['drop']},\n             {'create': 'create', 'flows': ['vlan', 'ipv4'], 'actions': ['queue']},\n             {'create': 'create', 'flows': ['vlan', 'ipv4', 'udp'], 'actions': ['queue']},\n             {'create': 'create', 'flows': ['vlan', 'ipv4', 'tcp'], 'actions': ['queue']},\n@@ -1429,26 +1478,50 @@ class TestGeneric_flow_api(TestCase):\n                          \"fortville_spirit_single\", \"fortpark_TLV\",\"fortpark_BASE-T\", \"foxville\", \"carlsville\"]):\n             self.setup_env()\n             # start testpmd on pf\n-            self.pmdout.start_testpmd(\"%s\" % self.pf_cores, \"--pkt-filter-mode=perfect --disable-rss --rxq=%d --txq=%d\" % (MAX_QUEUE+1, MAX_QUEUE+1), \"-w %s --file-prefix=pf --socket-mem 1024,1024 --legacy-mem\" % self.pf_pci)\n+            self.pmdout.start_testpmd(\"%s\" % self.pf_cores, \"--disable-rss --rxq=%d --txq=%d\" % (MAX_QUEUE+1, MAX_QUEUE+1), \"-w %s --file-prefix=pf --socket-mem 1024,1024 --legacy-mem\" % self.pf_pci)\n             self.dut.send_expect(\"set fwd rxonly\", \"testpmd> \", 120)\n             self.dut.send_expect(\"set verbose 1\", \"testpmd> \", 120)\n             self.dut.send_expect(\"start\", \"testpmd> \", 120)\n             time.sleep(2)\n             # start testpmd on vf0\n-            self.session_secondary.send_expect(\"%s -c 0x1e0000 -n 4 --socket-mem 1024,1024 --legacy-mem -w %s --file-prefix=vf1 -- -i --rxq=4 --txq=4 --disable-rss --pkt-filter-mode=perfect\" % (self.app_path, self.sriov_vfs_port[0].pci), \"testpmd>\", 120)\n+            self.session_secondary.send_expect(\"%s -c 0x1e0000 -n 4 --socket-mem 1024,1024 --legacy-mem -w %s --file-prefix=vf1 -- -i --rxq=4 --txq=4 --disable-rss\" % (self.app_path, self.sriov_vfs_port[0].pci), \"testpmd>\", 120)\n             self.session_secondary.send_expect(\"set fwd rxonly\", \"testpmd>\")\n             self.session_secondary.send_expect(\"set verbose 1\", \"testpmd>\")\n             self.session_secondary.send_expect(\"start\", \"testpmd>\")\n             time.sleep(2)\n             # start testpmd on vf1\n-            self.session_third.send_expect(\"%s -c 0x1e000000 -n 4 --socket-mem 1024,1024 --legacy-mem -w %s --file-prefix=vf2 -- -i --rxq=4 --txq=4 --disable-rss --pkt-filter-mode=perfect\" % (self.app_path, self.sriov_vfs_port[1].pci), \"testpmd>\", 120)\n+            self.session_third.send_expect(\"%s -c 0x1e000000 -n 4 --socket-mem 1024,1024 --legacy-mem -w %s --file-prefix=vf2 -- -i --rxq=4 --txq=4 --disable-rss\" % (self.app_path, self.sriov_vfs_port[1].pci), \"testpmd>\", 120)\n             self.session_third.send_expect(\"set fwd rxonly\", \"testpmd>\")\n             self.session_third.send_expect(\"set verbose 1\", \"testpmd>\")\n             self.session_third.send_expect(\"start\", \"testpmd>\")\n             time.sleep(2)\n \n-            # create the flow rules\n+            # validate and create the flow rules\n             basic_flow_actions = [\n+                {'create': 'validate', 'flows': ['ipv4', 'sip', 'dip', 'proto'], 'actions': ['queue']},\n+                {'create': 'validate', 'flows': ['ipv4', 'sip', 'dip', 'ttl', 'udp', 'sport', 'dport'],\n+                 'actions': ['queue']},\n+                {'create': 'validate', 'flows': ['ipv4', 'sip', 'dip', 'tos', 'tcp', 'sport', 'dport'],\n+                 'actions': ['queue']},\n+                {'create': 'validate',\n+                 'flows': ['vlan', 'ipv4', 'sip', 'dip', 'tos', 'ttl', 'sctp', 'sport', 'dport', 'tag'],\n+                 'actions': ['queue']},\n+                {'create': 'validate',\n+                 'flows': ['vlan', 'ipv4', 'sip', 'dip', 'tos', 'ttl', 'sctp', 'sport', 'dport', 'tag'],\n+                 'actions': ['drop']},\n+                {'create': 'validate', 'flows': ['ipv4', 'sip', 'dip', 'proto', 'vf0'], 'actions': ['invalid']},\n+                {'create': 'validate', 'flows': ['ipv4', 'sip', 'dip', 'proto', 'vf0'], 'actions': ['queue']},\n+                {'create': 'validate',\n+                 'flows': ['vlan', 'ipv4', 'sip', 'dip', 'tos', 'ttl', 'sctp', 'sport', 'dport', 'tag', 'vf1'],\n+                 'actions': ['queue']},\n+                {'create': 'validate',\n+                 'flows': ['vlan', 'ipv4', 'sip', 'dip', 'tos', 'ttl', 'sctp', 'sport', 'dport', 'tag'],\n+                 'actions': ['passthru', 'flag']},\n+                {'create': 'validate', 'flows': ['ipv4', 'sip', 'dip', 'ttl', 'udp', 'sport', 'dport'],\n+                 'actions': ['queue', 'flag']},\n+                {'create': 'validate', 'flows': ['ipv4', 'sip', 'dip', 'tos', 'tcp', 'sport', 'dport'],\n+                 'actions': ['queue', 'mark']},\n+                {'create': 'validate', 'flows': ['ipv4', 'sip', 'dip', 'proto'], 'actions': ['passthru', 'mark']},\n                 {'create': 'create', 'flows': ['ipv4', 'sip', 'dip', 'proto'], 'actions': ['queue']},\n                 {'create': 'create', 'flows': ['ipv4', 'sip', 'dip', 'ttl', 'udp', 'sport', 'dport'],\n                  'actions': ['queue']},\n@@ -1492,6 +1565,14 @@ class TestGeneric_flow_api(TestCase):\n             if (self.nic in [\"sagepond\", \"sageville\"]):\n                 # create the flow rules\n                 basic_flow_actions = [\n+                    {'create': 'validate', 'flows': ['ipv4', 'sip', 'dip', 'udp', 'sport', 'dport'],\n+                     'actions': ['queue']},\n+                    {'create': 'validate', 'flows': ['ipv4', 'sip', 'dip', 'tcp', 'sport', 'dport'],\n+                     'actions': ['queue']},\n+                    {'create': 'validate', 'flows': ['ipv4', 'sip', 'dip', 'sctp', 'sport', 'dport'],\n+                     'actions': ['queue']},\n+                    {'create': 'validate', 'flows': ['ipv4', 'sip', 'dip', 'sctp', 'sport', 'dport'],\n+                     'actions': ['drop']},\n                     {'create': 'create', 'flows': ['ipv4', 'sip', 'dip', 'udp', 'sport', 'dport'],\n                      'actions': ['queue']},\n                     {'create': 'create', 'flows': ['ipv4', 'sip', 'dip', 'tcp', 'sport', 'dport'],\n@@ -1511,6 +1592,12 @@ class TestGeneric_flow_api(TestCase):\n                 self.verify_rulenum(rule_num)\n             else:\n                 basic_flow_actions = [\n+                    {'create': 'validate', 'flows': ['ipv4', 'sip', 'dip', 'udp', 'sport', 'dport'],\n+                     'actions': ['queue']},\n+                    {'create': 'validate', 'flows': ['ipv4', 'sip', 'dip', 'tcp', 'sport', 'dport'],\n+                     'actions': ['queue']},\n+                    {'create': 'validate', 'flows': ['ipv4', 'sip', 'dip', 'sctp'], 'actions': ['queue']},\n+                    {'create': 'validate', 'flows': ['ipv4', 'sip', 'dip', 'sctp'], 'actions': ['drop']},\n                     {'create': 'create', 'flows': ['ipv4', 'sip', 'dip', 'udp', 'sport', 'dport'],\n                      'actions': ['queue']},\n                     {'create': 'create', 'flows': ['ipv4', 'sip', 'dip', 'tcp', 'sport', 'dport'],\n@@ -1537,17 +1624,17 @@ class TestGeneric_flow_api(TestCase):\n         if (self.nic in [\"fortville_eagle\", \"fortville_25g\", \"fortville_spirit\",\"columbiaville_25g\",\"columbiaville_100g\",\n                          \"fortville_spirit_single\", \"fortpark_TLV\",\"fortpark_BASE-T\", \"carlsville\"]):\n             self.setup_env()\n-            self.pmdout.start_testpmd(\"%s\" % self.pf_cores, \"--pkt-filter-mode=perfect --disable-rss --rxq=%d --txq=%d\" % (MAX_QUEUE+1, MAX_QUEUE+1), \"-w %s --file-prefix=pf --socket-mem 1024,1024 --legacy-mem\" % self.pf_pci)\n+            self.pmdout.start_testpmd(\"%s\" % self.pf_cores, \"--disable-rss --rxq=%d --txq=%d\" % (MAX_QUEUE+1, MAX_QUEUE+1), \"-w %s --file-prefix=pf --socket-mem 1024,1024 --legacy-mem\" % self.pf_pci)\n             self.dut.send_expect(\"set fwd rxonly\", \"testpmd> \", 120)\n             self.dut.send_expect(\"set verbose 1\", \"testpmd> \", 120)\n             self.dut.send_expect(\"start\", \"testpmd> \", 120)\n             time.sleep(2)\n-            self.session_secondary.send_expect(\"%s -c 0x1e0000 -n 4 --socket-mem 1024,1024 --legacy-mem -w %s --file-prefix=vf1 -- -i --rxq=4 --txq=4 --disable-rss --pkt-filter-mode=perfect\" % (self.app_path, self.sriov_vfs_port[0].pci), \"testpmd>\", 120)\n+            self.session_secondary.send_expect(\"%s -c 0x1e0000 -n 4 --socket-mem 1024,1024 --legacy-mem -w %s --file-prefix=vf1 -- -i --rxq=4 --txq=4 --disable-rss\" % (self.app_path, self.sriov_vfs_port[0].pci), \"testpmd>\", 120)\n             self.session_secondary.send_expect(\"set fwd rxonly\", \"testpmd>\")\n             self.session_secondary.send_expect(\"set verbose 1\", \"testpmd>\")\n             self.session_secondary.send_expect(\"start\", \"testpmd>\")\n             time.sleep(2)\n-            self.session_third.send_expect(\"%s -c 0x1e000000 -n 4 --socket-mem 1024,1024 --legacy-mem -w %s --file-prefix=vf2 -- -i --rxq=4 --txq=4 --disable-rss --pkt-filter-mode=perfect\" % (self.app_path, self.sriov_vfs_port[1].pci), \"testpmd>\", 120)\n+            self.session_third.send_expect(\"%s -c 0x1e000000 -n 4 --socket-mem 1024,1024 --legacy-mem -w %s --file-prefix=vf2 -- -i --rxq=4 --txq=4 --disable-rss\" % (self.app_path, self.sriov_vfs_port[1].pci), \"testpmd>\", 120)\n             self.session_third.send_expect(\"set fwd rxonly\", \"testpmd>\")\n             self.session_third.send_expect(\"set verbose 1\", \"testpmd>\")\n             self.session_third.send_expect(\"start\", \"testpmd>\")\n@@ -1555,6 +1642,26 @@ class TestGeneric_flow_api(TestCase):\n \n             # create the flow rules\n             basic_flow_actions = [\n+                {'create': 'validate', 'flows': ['vlan', 'ipv6', 'sip', 'dip', 'proto', 'tc', 'hop'],\n+                 'actions': ['queue']},\n+                {'create': 'validate', 'flows': ['vlan', 'ipv6', 'sip', 'dip', 'tc', 'hop', 'udp', 'sport', 'dport'],\n+                 'actions': ['queue']},\n+                {'create': 'validate', 'flows': ['vlan', 'ipv6', 'sip', 'dip', 'tc', 'hop', 'tcp', 'sport', 'dport'],\n+                 'actions': ['queue']},\n+                {'create': 'validate',\n+                 'flows': ['vlan', 'ipv6', 'sip', 'dip', 'tc', 'hop', 'sctp', 'sport', 'dport', 'tag'],\n+                 'actions': ['queue']},\n+                {'create': 'validate', 'flows': ['vlan', 'ipv6', 'sip', 'dip', 'proto', 'tc', 'hop', 'vf0'],\n+                 'actions': ['queue']},\n+                {'create': 'validate',\n+                 'flows': ['vlan', 'ipv6', 'sip', 'dip', 'tc', 'hop', 'tcp', 'sport', 'dport', 'vf1'],\n+                 'actions': ['queue']},\n+                {'create': 'validate',\n+                 'flows': ['vlan', 'ipv6', 'sip', 'dip', 'tc', 'hop', 'sctp', 'sport', 'dport', 'tag'],\n+                 'actions': ['drop']},\n+                {'create': 'validate',\n+                 'flows': ['vlan', 'ipv6', 'sip', 'dip', 'tc', 'hop', 'tcp', 'sport', 'dport', 'vf1'],\n+                 'actions': ['drop']},\n                 {'create': 'create', 'flows': ['vlan', 'ipv6', 'sip', 'dip', 'proto', 'tc', 'hop'],\n                  'actions': ['queue']},\n                 {'create': 'create', 'flows': ['vlan', 'ipv6', 'sip', 'dip', 'tc', 'hop', 'udp', 'sport', 'dport'],\n@@ -1593,6 +1700,16 @@ class TestGeneric_flow_api(TestCase):\n             if (self.nic in [\"niantic\", \"twinville\"]):\n                 # create the flow rules\n                 basic_flow_actions = [\n+                    {'create': 'validate', 'flows': ['fuzzy', 'ipv6', 'sip', 'dip'], 'actions': ['queue']},\n+                    {'create': 'validate', 'flows': ['fuzzy', 'ipv4', 'sip', 'dip'], 'actions': ['queue']},\n+                    {'create': 'validate', 'flows': ['fuzzy', 'ipv4', 'sip', 'dip', 'udp', 'sport', 'dport'],\n+                     'actions': ['queue']},\n+                    {'create': 'validate', 'flows': ['fuzzy', 'ipv6', 'sip', 'dip', 'tcp', 'sport', 'dport'],\n+                     'actions': ['queue']},\n+                    {'create': 'validate', 'flows': ['fuzzy', 'ipv4', 'sip', 'dip', 'tcp', 'sport', 'dport'],\n+                     'actions': ['queue']},\n+                    {'create': 'validate', 'flows': ['fuzzy', 'ipv6', 'sip', 'dip', 'sctp'], 'actions': ['queue']},\n+                    {'create': 'validate', 'flows': ['fuzzy', 'ipv4', 'sip', 'dip', 'sctp'], 'actions': ['queue']},\n                     {'create': 'create', 'flows': ['fuzzy', 'ipv6', 'sip', 'dip'], 'actions': ['queue']},\n                     {'create': 'create', 'flows': ['fuzzy', 'ipv4', 'sip', 'dip'], 'actions': ['queue']},\n                     {'create': 'create', 'flows': ['fuzzy', 'ipv4', 'sip', 'dip', 'udp', 'sport', 'dport'],\n@@ -1605,6 +1722,9 @@ class TestGeneric_flow_api(TestCase):\n                     {'create': 'create', 'flows': ['fuzzy', 'ipv4', 'sip', 'dip', 'sctp'], 'actions': ['queue']},\n                 ]\n                 extrapkt_rulenum = self.all_flows_process(basic_flow_actions)\n+                self.dut.send_expect(\n+                    \"flow validate 0 ingress pattern fuzzy thresh spec 2 thresh last 5 thresh mask 0xffffffff / ipv6 src is 2001::1 dst is 2001::2 / udp src is 22 dst is 23 / end actions queue index 1 / end\",\n+                    \"validated\")\n                 self.dut.send_expect(\n                     \"flow create 0 ingress pattern fuzzy thresh spec 2 thresh last 5 thresh mask 0xffffffff / ipv6 src is 2001::1 dst is 2001::2 / udp src is 22 dst is 23 / end actions queue index 1 / end\",\n                     \"created\")\n@@ -1620,6 +1740,16 @@ class TestGeneric_flow_api(TestCase):\n             elif (self.nic in [\"sagepond\", \"sageville\"]):\n                 # create the flow rules\n                 basic_flow_actions = [\n+                    {'create': 'validate', 'flows': ['fuzzy', 'ipv4', 'sip', 'dip', 'udp', 'sport', 'dport'],\n+                     'actions': ['queue']},\n+                    {'create': 'validate', 'flows': ['fuzzy', 'ipv6', 'sip', 'dip', 'tcp', 'sport', 'dport'],\n+                     'actions': ['queue']},\n+                    {'create': 'validate', 'flows': ['fuzzy', 'ipv4', 'sip', 'dip', 'tcp', 'sport', 'dport'],\n+                     'actions': ['queue']},\n+                    {'create': 'validate', 'flows': ['fuzzy', 'ipv6', 'sip', 'dip', 'sctp', 'sport', 'dport'],\n+                     'actions': ['queue']},\n+                    {'create': 'validate', 'flows': ['fuzzy', 'ipv4', 'sip', 'dip', 'sctp', 'sport', 'dport'],\n+                     'actions': ['queue']},\n                     {'create': 'create', 'flows': ['fuzzy', 'ipv4', 'sip', 'dip', 'udp', 'sport', 'dport'],\n                      'actions': ['queue']},\n                     {'create': 'create', 'flows': ['fuzzy', 'ipv6', 'sip', 'dip', 'tcp', 'sport', 'dport'],\n@@ -1632,6 +1762,9 @@ class TestGeneric_flow_api(TestCase):\n                      'actions': ['queue']},\n                 ]\n                 extrapkt_rulenum = self.all_flows_process(basic_flow_actions)\n+                self.dut.send_expect(\n+                    \"flow validate 0 ingress pattern fuzzy thresh spec 2 thresh last 5 thresh mask 0xffffffff / ipv6 src is 2001::1 dst is 2001::2 / udp src is 22 dst is 23 / end actions queue index 1 / end\",\n+                    \"validated\")\n                 self.dut.send_expect(\n                     \"flow create 0 ingress pattern fuzzy thresh spec 2 thresh last 5 thresh mask 0xffffffff / ipv6 src is 2001::1 dst is 2001::2 / udp src is 22 dst is 23 / end actions queue index 1 / end\",\n                     \"created\")\n@@ -1656,7 +1789,7 @@ class TestGeneric_flow_api(TestCase):\n         # i40e\n         if (self.nic in [\"fortville_eagle\", \"fortville_25g\", \"fortville_spirit\", \"carlsville\",\n                          \"fortville_spirit_single\", \"fortpark_TLV\",\"fortpark_BASE-T\"]):\n-            self.pmdout.start_testpmd(\"%s\" % self.pf_cores, \"--pkt-filter-mode=perfect --disable-rss --rxq=%d --txq=%d\" % (MAX_QUEUE+1, MAX_QUEUE+1), \"-w %s --file-prefix=pf\" % self.pf_pci)\n+            self.pmdout.start_testpmd(\"%s\" % self.pf_cores, \"--disable-rss --rxq=%d --txq=%d\" % (MAX_QUEUE+1, MAX_QUEUE+1), \"-w %s --file-prefix=pf\" % self.pf_pci)\n             self.dut.send_expect(\"set fwd rxonly\", \"testpmd> \", 120)\n             self.dut.send_expect(\"set verbose 1\", \"testpmd> \", 120)\n             self.dut.send_expect(\"start\", \"testpmd> \", 120)\n@@ -1664,10 +1797,57 @@ class TestGeneric_flow_api(TestCase):\n \n             # creat the flow rules\n             # l2-payload exceeds the  max length of raw match is 16bytes\n+            self.dut.send_expect(\n+                \"flow validate 0 ingress pattern eth type is 0x0807 / raw relative is 1 pattern is abcdefghijklmnopq / end actions queue index 1 / end\",\n+                \"error\")\n             self.dut.send_expect(\n                 \"flow create 0 ingress pattern eth type is 0x0807 / raw relative is 1 pattern is abcdefghijklmnopq / end actions queue index 1 / end\",\n                 \"Exceeds maxmial payload limit\")\n             # l2-payload equal the max length of raw match is 16bytes\n+            self.dut.send_expect(\n+                \"flow validate 0 ingress pattern eth type is 0x0807 / raw relative is 1 pattern is abcdefghijklmnop / end actions queue index 1 / end\",\n+                \"validated\")\n+\n+            self.dut.send_expect(\n+                \"flow create 0 ingress pattern eth type is 0x0807 / raw relative is 1 pattern is abcdefghijklmnop / end actions queue index 1 / end\",\n+                \"created\")\n+            # ipv4-other the most 3 fields can be matched, and the max sum bytes of the three fields is 16 bytes.\n+            self.dut.send_expect(\n+                \"flow validate 0 ingress pattern eth / vlan tci is 4095 / ipv4 proto is 255 ttl is 40 / raw relative is 1 offset is 2 pattern is ab / raw relative is 1 offset is 10 pattern is abcdefghij / raw relative is 1 offset is 0 pattern is abcd / end actions queue index 2 / end\",\n+                \"validated\")\n+\n+            self.dut.send_expect(\n+                \"flow create 0 ingress pattern eth / vlan tci is 4095 / ipv4 proto is 255 ttl is 40 / raw relative is 1 offset is 2 pattern is ab / raw relative is 1 offset is 10 pattern is abcdefghij / raw relative is 1 offset is 0 pattern is abcd / end actions queue index 2 / end\",\n+                \"created\")\n+            # ipv4-udp\n+            self.dut.send_expect(\n+                \"flow validate 0 ingress pattern eth / ipv4 src is 2.2.2.4 dst is 2.2.2.5 / udp src is 22 dst is 23 / raw relative is 1 offset is 2 pattern is fhds / end actions queue index 3 / end\",\n+                \"validated\")\n+\n+            self.dut.send_expect(\n+                \"flow create 0 ingress pattern eth / ipv4 src is 2.2.2.4 dst is 2.2.2.5 / udp src is 22 dst is 23 / raw relative is 1 offset is 2 pattern is fhds / end actions queue index 3 / end\",\n+                \"created\")\n+            # ipv4-tcp\n+            self.dut.send_expect(\n+                \"flow validate 0 ingress pattern eth / ipv4 src is 2.2.2.4 dst is 2.2.2.5 tos is 4 ttl is 3 / tcp src is 32 dst is 33 / raw relative is 1 offset is 2 pattern is hijk / end actions queue index 4 / end\",\n+                \"validated\")\n+\n+            self.dut.send_expect(\n+                \"flow create 0 ingress pattern eth / ipv4 src is 2.2.2.4 dst is 2.2.2.5 tos is 4 ttl is 3 / tcp src is 32 dst is 33 / raw relative is 1 offset is 2 pattern is hijk / end actions queue index 4 / end\",\n+                \"created\")\n+            # ipv4-sctp\n+            self.dut.send_expect(\n+                \"flow validate 0 ingress pattern eth / ipv4 src is 2.2.2.4 dst is 2.2.2.5 / sctp src is 42 / raw relative is 1 offset is 2 pattern is abcd / end actions queue index 5 / end\",\n+                \"validated\")\n+\n+            self.dut.send_expect(\n+                \"flow create 0 ingress pattern eth / ipv4 src is 2.2.2.4 dst is 2.2.2.5 / sctp src is 42 / raw relative is 1 offset is 2 pattern is abcd / end actions queue index 5 / end\",\n+                \"created\")\n+\n+            # flush all the rules, then re-create the rules, fix DPDK-23826\n+            self.dut.send_expect(\n+                \"flow flush 0\", \"testpmd> \")\n+            # l2-payload equal the max length of raw match is 16bytes\n             self.dut.send_expect(\n                 \"flow create 0 ingress pattern eth type is 0x0807 / raw relative is 1 pattern is abcdefghijklmnop / end actions queue index 1 / end\",\n                 \"created\")\n@@ -1713,13 +1893,17 @@ class TestGeneric_flow_api(TestCase):\n             self.dut.send_expect(\"quit\", \"# \")\n             time.sleep(2)\n \n-            self.pmdout.start_testpmd(\"%s\" % self.pf_cores, \"--pkt-filter-mode=perfect --disable-rss --rxq=%d --txq=%d\" % (MAX_QUEUE+1, MAX_QUEUE+1), \"-w %s --file-prefix=pf --socket-mem 1024,1024\" % self.pf_pci)\n+            self.pmdout.start_testpmd(\"%s\" % self.pf_cores, \"--disable-rss --rxq=%d --txq=%d\" % (MAX_QUEUE+1, MAX_QUEUE+1), \"-w %s --file-prefix=pf --socket-mem 1024,1024\" % self.pf_pci)\n             self.dut.send_expect(\"set fwd rxonly\", \"testpmd> \", 120)\n             self.dut.send_expect(\"set verbose 1\", \"testpmd> \", 120)\n             self.dut.send_expect(\"start\", \"testpmd> \", 120)\n             time.sleep(2)\n \n             # ipv6-tcp\n+            self.dut.send_expect(\n+                \"flow validate 0 ingress pattern eth / vlan tci is 1 / ipv6 src is 2001::1 dst is 2001::2 tc is 3 hop is 30 / tcp src is 32 dst is 33 / raw relative is 1 offset is 0 pattern is hijk / raw relative is 1 offset is 8 pattern is abcdefgh / end actions queue index 6 / end\",\n+                \"validated\")\n+\n             self.dut.send_expect(\n                 \"flow create 0 ingress pattern eth / vlan tci is 1 / ipv6 src is 2001::1 dst is 2001::2 tc is 3 hop is 30 / tcp src is 32 dst is 33 / raw relative is 1 offset is 0 pattern is hijk / raw relative is 1 offset is 8 pattern is abcdefgh / end actions queue index 6 / end\",\n                 \"created\")\n@@ -1729,6 +1913,16 @@ class TestGeneric_flow_api(TestCase):\n                 'Ether(dst=\"%s\")/Dot1Q(vlan=1)/IPv6(src=\"2001::1\", dst=\"2001::2\", tc=3, hlim=30)/TCP(sport=32,dport=33)/Raw(load=\"hijkabcdefghabcdefghijklmn\")' % self.outer_mac)\n             self.verify_result(\"pf\", expect_rxpkts=\"1\", expect_queue=\"6\", verify_mac=self.outer_mac)\n \n+            # destroy the rule, then re-create the rule, fix DPDK-23826\n+            self.dut.send_expect(\n+                \"flow destroy 0 rule 0\", \"testpmd> \")\n+            self.dut.send_expect(\n+                \"flow create 0 ingress pattern eth / vlan tci is 1 / ipv6 src is 2001::1 dst is 2001::2 tc is 3 hop is 30 / tcp src is 32 dst is 33 / raw relative is 1 offset is 0 pattern is hijk / raw relative is 1 offset is 8 pattern is abcdefgh / end actions queue index 6 / end\",\n+                \"created\")\n+            self.sendpkt(\n+                'Ether(dst=\"%s\")/Dot1Q(vlan=1)/IPv6(src=\"2001::1\", dst=\"2001::2\", tc=3, hlim=30)/TCP(sport=32,dport=33)/Raw(load=\"hijkabcdefghabcdefghijklmn\")' % self.outer_mac)\n+            self.verify_result(\"pf\", expect_rxpkts=\"1\", expect_queue=\"6\", verify_mac=self.outer_mac)\n+\n         # ixgbe\n         else:\n             self.pmdout.start_testpmd(\"%s\" % self.cores, \"--pkt-filter-mode=perfect --disable-rss --rxq=%d --txq=%d\" % (MAX_QUEUE+1, MAX_QUEUE+1))\n@@ -1738,6 +1932,9 @@ class TestGeneric_flow_api(TestCase):\n             time.sleep(2)\n \n             # ipv4-udp-flexbytes\n+            self.dut.send_expect(\n+                \"flow validate 0 ingress pattern eth / ipv4 src is 192.168.0.1 dst is 192.168.0.2 / udp src is 24 dst is 25 / raw relative is 0 search is 0 offset is 44 limit is 0 pattern is 86 / end actions queue index 1 / end\",\n+                \"validated\")\n             self.dut.send_expect(\n                 \"flow create 0 ingress pattern eth / ipv4 src is 192.168.0.1 dst is 192.168.0.2 / udp src is 24 dst is 25 / raw relative is 0 search is 0 offset is 44 limit is 0 pattern is 86 / end actions queue index 1 / end\",\n                 \"created\")\n@@ -1758,6 +1955,15 @@ class TestGeneric_flow_api(TestCase):\n             time.sleep(2)\n \n             # ipv4-tcp-flexbytes spec-mask\n+            self.dut.send_expect(\n+                \"flow validate 0 ingress pattern eth / ipv4 src is 192.168.0.3 dst is 192.168.0.4 / tcp src is 22 dst is 23 / raw relative spec 0 relative mask 1 search spec 0 search mask 1 offset spec 54 offset mask 0xffffffff limit spec 0 limit mask 0xffff pattern is ab pattern is cd / end actions queue index 2 / end\",\n+                \"validated\")\n+            self.dut.send_expect(\n+                \"flow create 0 ingress pattern eth / ipv4 src is 192.168.0.3 dst is 192.168.0.4 / tcp src is 22 dst is 23 / raw relative spec 0 relative mask 1 search spec 0 search mask 1 offset spec 54 offset mask 0xffffffff limit spec 0 limit mask 0xffff pattern is ab pattern is cd / end actions queue index 2 / end\",\n+                \"created\")\n+            # destroy the rule, then re-create the rule, fix DPDK-23826\n+            self.dut.send_expect(\n+                \"flow destroy 0 rule 0\", \"testpmd> \")\n             self.dut.send_expect(\n                 \"flow create 0 ingress pattern eth / ipv4 src is 192.168.0.3 dst is 192.168.0.4 / tcp src is 22 dst is 23 / raw relative spec 0 relative mask 1 search spec 0 search mask 1 offset spec 54 offset mask 0xffffffff limit spec 0 limit mask 0xffff pattern is ab pattern is cd / end actions queue index 2 / end\",\n                 \"created\")\n@@ -1782,10 +1988,16 @@ class TestGeneric_flow_api(TestCase):\n \n             # ipv4-sctp-flexbytes\n             if (self.nic in [\"sagepond\", \"sageville\"]):\n+                self.dut.send_expect(\n+                    \"flow validate 0 ingress pattern fuzzy thresh is 6 / eth / ipv4 src is 192.168.0.1 dst is 192.168.0.2 / sctp src is 24 dst is 25 / raw relative is 0 search is 0 offset is 48 limit is 0 pattern is ab / end actions queue index 3 / end\",\n+                    \"validated\")\n                 self.dut.send_expect(\n                     \"flow create 0 ingress pattern fuzzy thresh is 6 / eth / ipv4 src is 192.168.0.1 dst is 192.168.0.2 / sctp src is 24 dst is 25 / raw relative is 0 search is 0 offset is 48 limit is 0 pattern is ab / end actions queue index 3 / end\",\n                     \"created\")\n             else:\n+                self.dut.send_expect(\n+                    \"flow validate 0 ingress pattern fuzzy thresh is 6 / eth / ipv4 src is 192.168.0.1 dst is 192.168.0.2 / sctp / raw relative is 0 search is 0 offset is 48 limit is 0 pattern is ab / end actions queue index 3 / end\",\n+                    \"validated\")\n                 self.dut.send_expect(\n                     \"flow create 0 ingress pattern fuzzy thresh is 6 / eth / ipv4 src is 192.168.0.1 dst is 192.168.0.2 / sctp / raw relative is 0 search is 0 offset is 48 limit is 0 pattern is ab / end actions queue index 3 / end\",\n                     \"created\")\n@@ -1809,6 +2021,9 @@ class TestGeneric_flow_api(TestCase):\n                 self.dut.send_expect(\"start\", \"testpmd> \", 120)\n                 time.sleep(2)\n \n+                self.dut.send_expect(\n+                    \"flow validate 0 ingress pattern fuzzy thresh is 6 / ipv6 src is 2001::1 dst is 2001::2 / raw relative is 0 search is 0 offset is 56 limit is 0 pattern is 86 / end actions queue index 4 / end\",\n+                    \"validated\")\n                 self.dut.send_expect(\n                     \"flow create 0 ingress pattern fuzzy thresh is 6 / ipv6 src is 2001::1 dst is 2001::2 / raw relative is 0 search is 0 offset is 56 limit is 0 pattern is 86 / end actions queue index 4 / end\",\n                     \"created\")\n@@ -1833,26 +2048,44 @@ class TestGeneric_flow_api(TestCase):\n \n         # create the flow rules\n         # l2_payload\n+        self.dut.send_expect(\n+            \"flow validate 0 ingress pattern raw relative is 0 offset is 14 pattern is fhds / end actions queue index 1 / end\",\n+            \"validated\")\n         self.dut.send_expect(\n             \"flow create 0 ingress pattern raw relative is 0 offset is 14 pattern is fhds / end actions queue index 1 / end\",\n             \"created\")\n         # ipv4 packet\n+        self.dut.send_expect(\n+            \"flow validate 0 ingress pattern raw relative is 0 offset is 34 pattern is ab / end actions queue index 2 / end\",\n+            \"validated\")\n         self.dut.send_expect(\n             \"flow create 0 ingress pattern raw relative is 0 offset is 34 pattern is ab / end actions queue index 2 / end\",\n             \"created\")\n         # ipv6 packet\n+        self.dut.send_expect(\n+            \"flow validate 0 ingress pattern raw relative is 0 offset is 58 pattern is efgh / end actions queue index 3 / end\",\n+            \"validated\")\n         self.dut.send_expect(\n             \"flow create 0 ingress pattern raw relative is 0 offset is 58 pattern is efgh / end actions queue index 3 / end\",\n             \"created\")\n         # 3 fields relative is 0\n+        self.dut.send_expect(\n+            \"flow validate 0 ingress pattern raw relative is 0 offset is 38 pattern is ab / raw relative is 0 offset is 34 pattern is cd / raw relative is 0 offset is 42 pattern is efgh / end actions queue index 4 / end\",\n+            \"validated\")\n         self.dut.send_expect(\n             \"flow create 0 ingress pattern raw relative is 0 offset is 38 pattern is ab / raw relative is 0 offset is 34 pattern is cd / raw relative is 0 offset is 42 pattern is efgh / end actions queue index 4 / end\",\n             \"created\")\n         # 4 fields relative is 0 and 1\n+        self.dut.send_expect(\n+            \"flow validate 0 ingress pattern raw relative is 0 offset is 48 pattern is ab / raw relative is 1 offset is 0 pattern is cd / raw relative is 0 offset is 44 pattern is efgh / raw relative is 1 offset is 10 pattern is hijklmnopq / end actions queue index 5 / end\",\n+            \"validated\")\n         self.dut.send_expect(\n             \"flow create 0 ingress pattern raw relative is 0 offset is 48 pattern is ab / raw relative is 1 offset is 0 pattern is cd / raw relative is 0 offset is 44 pattern is efgh / raw relative is 1 offset is 10 pattern is hijklmnopq / end actions queue index 5 / end\",\n             \"created\")\n         # 3 fields offset confilict\n+        self.dut.send_expect(\n+            \"flow validate 0 ingress pattern raw relative is 0 offset is 64 pattern is ab / raw relative is 1 offset is 4 pattern is cdefgh / raw relative is 0 offset is 68 pattern is klmn / end actions queue index 6 / end\",\n+            \"validated\")\n         self.dut.send_expect(\n             \"flow create 0 ingress pattern raw relative is 0 offset is 64 pattern is ab / raw relative is 1 offset is 4 pattern is cdefgh / raw relative is 0 offset is 68 pattern is klmn / end actions queue index 6 / end\",\n             \"created\")\n@@ -1880,19 +2113,34 @@ class TestGeneric_flow_api(TestCase):\n         self.dut.send_expect(\"flow flush 0\", \"testpmd> \", 120)\n \n         # 1 field 128bytes\n+        self.dut.send_expect(\n+            \"flow validate 0 ingress pattern raw relative is 0 offset is 128 pattern is ab / end actions queue index 1 / end\",\n+            \"error\")\n         self.dut.send_expect(\n             \"flow create 0 ingress pattern raw relative is 0 offset is 128 pattern is ab / end actions queue index 1 / end\",\n             \"Failed to create flow\")\n+        self.dut.send_expect(\n+            \"flow validate 0 ingress pattern raw relative is 0 offset is 126 pattern is abcd / end actions queue index 1 / end\",\n+            \"error\")\n         self.dut.send_expect(\n             \"flow create 0 ingress pattern raw relative is 0 offset is 126 pattern is abcd / end actions queue index 1 / end\",\n             \"Failed to create flow\")\n+        self.dut.send_expect(\n+            \"flow validate 0 ingress pattern raw relative is 0 offset is 126 pattern is ab / end actions queue index 1 / end\",\n+            \"validated\")\n         self.dut.send_expect(\n             \"flow create 0 ingress pattern raw relative is 0 offset is 126 pattern is ab / end actions queue index 1 / end\",\n             \"created\")\n         # 2 field 128bytes\n+        self.dut.send_expect(\n+            \"flow validate 0 ingress pattern raw relative is 0 offset is 68 pattern is ab / raw relative is 1 offset is 58 pattern is cd / end actions queue index 2 / end\",\n+            \"error\")\n         self.dut.send_expect(\n             \"flow create 0 ingress pattern raw relative is 0 offset is 68 pattern is ab / raw relative is 1 offset is 58 pattern is cd / end actions queue index 2 / end\",\n             \"Failed to create flow\")\n+        self.dut.send_expect(\n+            \"flow validate 0 ingress pattern raw relative is 0 offset is 68 pattern is ab / raw relative is 1 offset is 56 pattern is cd / end actions queue index 2 / end\",\n+            \"validated\")\n         self.dut.send_expect(\n             \"flow create 0 ingress pattern raw relative is 0 offset is 68 pattern is ab / raw relative is 1 offset is 56 pattern is cd / end actions queue index 2 / end\",\n             \"created\")\n@@ -1926,11 +2174,15 @@ class TestGeneric_flow_api(TestCase):\n         # create the flow rules\n         if self.nic in [\"fortville_eagle\", \"fortville_25g\", \"fortville_spirit\"]:\n             basic_flow_actions = [\n+                {'create': 'validate', 'flows': ['vlan'], 'actions': ['queue']},\n+                {'create': 'validate', 'flows': ['vlan'], 'actions': ['queue']},\n                 {'create': 'create', 'flows': ['vlan'], 'actions': ['queue']},\n                 {'create': 'create', 'flows': ['vlan'], 'actions': ['queue']}\n             ]\n         else:\n             basic_flow_actions = [\n+                {'create': 'validate', 'flows': ['dst_mac', 'vlan'], 'actions': ['queue']},\n+                {'create': 'validate', 'flows': ['dst_mac', 'vlan'], 'actions': ['queue']},\n                 {'create': 'create', 'flows': ['dst_mac', 'vlan'], 'actions': ['queue']},\n                 {'create': 'create', 'flows': ['dst_mac', 'vlan'], 'actions': ['queue']},\n             ]\n@@ -1952,6 +2204,8 @@ class TestGeneric_flow_api(TestCase):\n \n         # create the flow rules\n         basic_flow_actions = [\n+            {'create': 'validate', 'flows': ['ipv4', 'udp', 'vxlan', 'vni', 'ineth', 'invlan'], 'actions': ['queue']},\n+            {'create': 'validate', 'flows': ['ipv4', 'udp', 'vxlan', 'vni', 'ineth', 'invlan'], 'actions': ['drop']},\n             {'create': 'create', 'flows': ['ipv4', 'udp', 'vxlan', 'vni', 'ineth', 'invlan'], 'actions': ['queue']},\n             {'create': 'create', 'flows': ['ipv4', 'udp', 'vxlan', 'vni', 'ineth', 'invlan'], 'actions': ['drop']},\n         ]\n@@ -1973,6 +2227,8 @@ class TestGeneric_flow_api(TestCase):\n \n         # create the flow rules\n         basic_flow_actions = [\n+            {'create': 'validate', 'flows': ['ipv4', 'nvgre', 'tni', 'ineth', 'invlan'], 'actions': ['queue']},\n+            {'create': 'validate', 'flows': ['ipv4', 'nvgre', 'tni', 'ineth', 'invlan'], 'actions': ['drop']},\n             {'create': 'create', 'flows': ['ipv4', 'nvgre', 'tni', 'ineth', 'invlan'], 'actions': ['queue']},\n             {'create': 'create', 'flows': ['ipv4', 'nvgre', 'tni', 'ineth', 'invlan'], 'actions': ['drop']},\n         ]\n@@ -2008,6 +2264,17 @@ class TestGeneric_flow_api(TestCase):\n \n         # create the flow rules\n         basic_flow_actions = [\n+            {'create': 'validate', 'flows': ['ipv4', 'udp', 'vxlan', 'ineth'], 'actions': ['pf', 'queue']},\n+            {'create': 'validate', 'flows': ['ipv4', 'udp', 'vxlan', 'vni', 'ineth'], 'actions': ['pf', 'queue']},\n+            {'create': 'validate', 'flows': ['ipv4', 'udp', 'vxlan', 'ineth', 'invlan'], 'actions': ['pf', 'queue']},\n+            {'create': 'validate', 'flows': ['ipv4', 'udp', 'vxlan', 'vni', 'ineth', 'invlan'],\n+             'actions': ['pf', 'queue']},\n+            {'create': 'validate', 'flows': ['dst_mac', 'ipv4', 'udp', 'vxlan', 'vni', 'ineth'],\n+             'actions': ['pf', 'queue']},\n+            {'create': 'validate', 'flows': ['ipv4', 'udp', 'vxlan', 'vni', 'ineth', 'invlan'],\n+             'actions': ['vf0', 'queue']},\n+            {'create': 'validate', 'flows': ['dst_mac', 'ipv4', 'udp', 'vxlan', 'vni', 'ineth'],\n+             'actions': ['vf1', 'queue']},\n             {'create': 'create', 'flows': ['ipv4', 'udp', 'vxlan', 'ineth'], 'actions': ['pf', 'queue']},\n             {'create': 'create', 'flows': ['ipv4', 'udp', 'vxlan', 'vni', 'ineth'], 'actions': ['pf', 'queue']},\n             {'create': 'create', 'flows': ['ipv4', 'udp', 'vxlan', 'ineth', 'invlan'], 'actions': ['pf', 'queue']},\n@@ -2071,6 +2338,13 @@ class TestGeneric_flow_api(TestCase):\n \n         # create the flow rules\n         basic_flow_actions = [\n+            {'create': 'validate', 'flows': ['ipv4', 'nvgre', 'ineth'], 'actions': ['pf', 'queue']},\n+            {'create': 'validate', 'flows': ['ipv4', 'nvgre', 'tni', 'ineth'], 'actions': ['pf', 'queue']},\n+            {'create': 'validate', 'flows': ['ipv4', 'nvgre', 'ineth', 'invlan'], 'actions': ['pf', 'queue']},\n+            {'create': 'validate', 'flows': ['ipv4', 'nvgre', 'tni', 'ineth', 'invlan'], 'actions': ['pf', 'queue']},\n+            {'create': 'validate', 'flows': ['dst_mac', 'ipv4', 'nvgre', 'tni', 'ineth'], 'actions': ['pf', 'queue']},\n+            {'create': 'validate', 'flows': ['ipv4', 'nvgre', 'tni', 'ineth', 'invlan'], 'actions': ['vf0', 'queue']},\n+            {'create': 'validate', 'flows': ['dst_mac', 'ipv4', 'nvgre', 'tni', 'ineth'], 'actions': ['vf1', 'queue']},\n             {'create': 'create', 'flows': ['ipv4', 'nvgre', 'ineth'], 'actions': ['pf', 'queue']},\n             {'create': 'create', 'flows': ['ipv4', 'nvgre', 'tni', 'ineth'], 'actions': ['pf', 'queue']},\n             {'create': 'create', 'flows': ['ipv4', 'nvgre', 'ineth', 'invlan'], 'actions': ['pf', 'queue']},\n",
    "prefixes": []
}