get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 123776,
    "url": "http://patches.dpdk.org/api/patches/123776/?format=api",
    "web_url": "http://patches.dpdk.org/project/dts/patch/20230213083952.1350755-2-ke1.xu@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": "<20230213083952.1350755-2-ke1.xu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dts/20230213083952.1350755-2-ke1.xu@intel.com",
    "date": "2023-02-13T08:39:48",
    "name": "[V3,1/5] tests/vf_offload: add VLAN packets to test scope.",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "045c3b035991db1834bb4965a08ad77f41b4b5ab",
    "submitter": {
        "id": 2810,
        "url": "http://patches.dpdk.org/api/people/2810/?format=api",
        "name": "Ke Xu",
        "email": "ke1.xu@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dts/patch/20230213083952.1350755-2-ke1.xu@intel.com/mbox/",
    "series": [
        {
            "id": 26978,
            "url": "http://patches.dpdk.org/api/series/26978/?format=api",
            "web_url": "http://patches.dpdk.org/project/dts/list/?series=26978",
            "date": "2023-02-13T08:39:47",
            "name": "Update vf_offload cases for DPDK-v23.03 validation.",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/26978/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/123776/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/123776/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 A316641C84;\n\tMon, 13 Feb 2023 09:42:08 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 99501410F2;\n\tMon, 13 Feb 2023 09:42:08 +0100 (CET)",
            "from mga17.intel.com (mga17.intel.com [192.55.52.151])\n by mails.dpdk.org (Postfix) with ESMTP id 6137E40EF1\n for <dts@dpdk.org>; Mon, 13 Feb 2023 09:42:06 +0100 (CET)",
            "from fmsmga006.fm.intel.com ([10.253.24.20])\n by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 13 Feb 2023 00:42:06 -0800",
            "from dpdk-xuke-lab.sh.intel.com ([10.67.119.8])\n by fmsmga006.fm.intel.com with ESMTP; 13 Feb 2023 00:42:03 -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=1676277727; x=1707813727;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=qt9LivxkUapxa5JcWK7qXmgPPEhyUUPl7F+/VKZcOtU=;\n b=hinrESHxlfqGDPVxiVZzZ4UodgFUrFXfy97cNK4BPoym8vPbilb5HdWR\n ceqXlK7nB1Tx6NsDXdWNcKZ+5urC8rzrkWLzGQbKCPY6OEQaVXgKHuX5H\n i24tbiiau8yGbRxYRXq6oum30h3HecZqmvhjgIqeuIzWkuZag62Hatsj5\n yxNcTnLhpTbFAVOzk2rm8HzFaZL0vrLhq6LUmiEH2bsGPw5mdFSBfQq7g\n JY3M0l5IeV5a4552n/dx/IWFB6Zz+Cd7g1P5tCchli120+Xc3X4ino00M\n VHxSUao87RvX3MJJ7G7VEjI1Wb5sqO/epxl22MOiQswO2Rte9m9Uknho/ A==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6500,9779,10619\"; a=\"311203069\"",
            "E=Sophos;i=\"5.97,293,1669104000\"; d=\"scan'208\";a=\"311203069\"",
            "E=McAfee;i=\"6500,9779,10619\"; a=\"914243758\"",
            "E=Sophos;i=\"5.97,293,1669104000\"; d=\"scan'208\";a=\"914243758\""
        ],
        "X-ExtLoop1": "1",
        "From": "Ke Xu <ke1.xu@intel.com>",
        "To": "dts@dpdk.org",
        "Cc": "ke1.xu@intel.com, qi.fu@intel.com, lijuan.tu@intel.com,\n yux.jiang@intel.com, zhiminx.huang@intel.com",
        "Subject": "[DTS][PATCH V3 1/5] tests/vf_offload: add VLAN packets to test scope.",
        "Date": "Mon, 13 Feb 2023 16:39:48 +0800",
        "Message-Id": "<20230213083952.1350755-2-ke1.xu@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20230213083952.1350755-1-ke1.xu@intel.com>",
        "References": "<20230213083952.1350755-1-ke1.xu@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "dts@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "test suite reviews and discussions <dts.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dts>,\n <mailto:dts-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dts/>",
        "List-Post": "<mailto:dts@dpdk.org>",
        "List-Help": "<mailto:dts-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dts>,\n <mailto:dts-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dts-bounces@dpdk.org"
    },
    "content": "Add VLAN Packets to ensure checksum offload\n works well on complex packets.\n\nAdd VLAN to filter.\n\nUpdate checksum counting.\n\nSigned-off-by: Ke Xu <ke1.xu@intel.com>\n---\n tests/TestSuite_vf_offload.py | 252 +++++++++++++++++++++++++++++++---\n 1 file changed, 233 insertions(+), 19 deletions(-)",
    "diff": "diff --git a/tests/TestSuite_vf_offload.py b/tests/TestSuite_vf_offload.py\nindex 5def34c1..4a4ee5e1 100644\n--- a/tests/TestSuite_vf_offload.py\n+++ b/tests/TestSuite_vf_offload.py\n@@ -258,8 +258,8 @@ class TestVfOffload(TestCase):\n             p\n             for p in packets\n             if len(p.layers()) >= 3\n-            and p.layers()[1] in {IP, IPv6}\n-            and p.layers()[2] in {IP, IPv6, UDP, TCP, SCTP, GRE, MPLS}\n+            and p.layers()[1] in {IP, IPv6, Dot1Q}\n+            and p.layers()[2] in {IP, IPv6, Dot1Q, UDP, TCP, SCTP, GRE, MPLS}\n             and Raw in p\n         ]\n \n@@ -400,6 +400,70 @@ class TestVfOffload(TestCase):\n \n         self.verify(len(result) == 0, \",\".join(list(result.values())))\n \n+    def test_checksum_offload_vlan_enable(self):\n+        \"\"\"\n+        Enable HW checksum offload.\n+        Send packet with incorrect checksum,\n+        can rx it and report the checksum error,\n+        verify forwarded packets have correct checksum.\n+        \"\"\"\n+        self.launch_testpmd(\n+            dcf_flag=self.dcf_mode,\n+            param=\"--portmask=%s \" % (self.portMask) + \"--enable-rx-cksum \" + \"\",\n+        )\n+        self.vm0_testpmd.execute_cmd(\"set fwd csum\")\n+        self.vm0_testpmd.execute_cmd(\"csum mac-swap off 0\", \"testpmd>\")\n+        self.vm0_testpmd.execute_cmd(\"csum mac-swap off 1\", \"testpmd>\")\n+        self.vm0_testpmd.execute_cmd(\"set promisc 1 on\")\n+        self.vm0_testpmd.execute_cmd(\"set promisc 0 on\")\n+\n+        time.sleep(2)\n+        mac = self.vm0_testpmd.get_port_mac(0)\n+        sndIP = \"10.0.0.1\"\n+        sndIPv6 = \"::1\"\n+        pkts = {\n+            \"IP/UDP\": 'Ether(dst=\"%s\", src=\"52:00:00:00:00:00\")/Dot1Q(vlan=100)/IP(src=\"%s\", chksum=0xf)/UDP(chksum=0xf)/(\"X\"*46)'\n+            % (mac, sndIP),\n+            \"IP/TCP\": 'Ether(dst=\"%s\", src=\"52:00:00:00:00:00\")/Dot1Q(vlan=100)/IP(src=\"%s\", chksum=0xf)/TCP(chksum=0xf)/(\"X\"*46)'\n+            % (mac, sndIP),\n+            \"IP/SCTP\": 'Ether(dst=\"%s\", src=\"52:00:00:00:00:00\")/Dot1Q(vlan=100)/IP(src=\"%s\", chksum=0xf)/SCTP(chksum=0x0)/(\"X\"*48)'\n+            % (mac, sndIP),\n+            \"IPv6/UDP\": 'Ether(dst=\"%s\", src=\"52:00:00:00:00:00\")/Dot1Q(vlan=100)/IPv6(src=\"%s\")/UDP(chksum=0xf)/(\"X\"*46)'\n+            % (mac, sndIPv6),\n+            \"IPv6/TCP\": 'Ether(dst=\"%s\", src=\"52:00:00:00:00:00\")/Dot1Q(vlan=100)/IPv6(src=\"%s\")/TCP(chksum=0xf)/(\"X\"*46)'\n+            % (mac, sndIPv6),\n+        }\n+\n+        expIP = sndIP\n+        expIPv6 = sndIPv6\n+        pkts_ref = {\n+            \"IP/UDP\": 'Ether(dst=\"%s\", src=\"52:00:00:00:00:00\")/Dot1Q(vlan=100)/IP(src=\"%s\")/UDP()/(\"X\"*46)'\n+            % (mac, expIP),\n+            \"IP/TCP\": 'Ether(dst=\"%s\", src=\"52:00:00:00:00:00\")/Dot1Q(vlan=100)/IP(src=\"%s\")/TCP()/(\"X\"*46)'\n+            % (mac, expIP),\n+            \"IP/SCTP\": 'Ether(dst=\"%s\", src=\"52:00:00:00:00:00\")/Dot1Q(vlan=100)/IP(src=\"%s\")/SCTP()/(\"X\"*48)'\n+            % (mac, expIP),\n+            \"IPv6/UDP\": 'Ether(dst=\"%s\", src=\"52:00:00:00:00:00\")/Dot1Q(vlan=100)/IPv6(src=\"%s\")/UDP()/(\"X\"*46)'\n+            % (mac, expIPv6),\n+            \"IPv6/TCP\": 'Ether(dst=\"%s\", src=\"52:00:00:00:00:00\")/Dot1Q(vlan=100)/IPv6(src=\"%s\")/TCP()/(\"X\"*46)'\n+            % (mac, expIPv6),\n+        }\n+\n+        self.checksum_enablehw(0, self.vm_dut_0)\n+        self.checksum_enablehw(1, self.vm_dut_0)\n+\n+        self.vm0_testpmd.execute_cmd(\"start\")\n+        result = self.checksum_validate(pkts, pkts_ref)\n+\n+        # Validate checksum on the receive packet\n+        out = self.vm0_testpmd.execute_cmd(\"stop\")\n+        bad_ipcsum = self.vm0_testpmd.get_pmd_value(\"Bad-ipcsum:\", out)\n+        bad_l4csum = self.vm0_testpmd.get_pmd_value(\"Bad-l4csum:\", out)\n+        self.verify(bad_ipcsum == 3, \"Bad-ipcsum check error\")\n+        self.verify(bad_l4csum == 5, \"Bad-l4csum check error\")\n+\n+        self.verify(len(result) == 0, \",\".join(list(result.values())))\n+\n     @check_supported_nic(\n         [\"ICE_100G-E810C_QSFP\", \"ICE_25G-E810C_SFP\", \"ICE_25G-E810_XXV_SFP\"]\n     )\n@@ -429,8 +493,8 @@ class TestVfOffload(TestCase):\n         expIPv6 = sndIPv6\n \n         pkts_outer = {\n-            \"IP/UDP/VXLAN-GPE\": f'IP(src = \"{sndIP}\") / UDP(sport = 4790, dport = 4790, chksum = 0xff) / VXLAN()',\n-            \"IP/UDP/VXLAN-GPE/ETH\": f'IP(src = \"{sndIP}\") / UDP(sport = 4790, dport = 4790, chksum = 0xff) / VXLAN() / Ether()',\n+            \"IP/UDP/VXLAN-GPE\": f'IP(src = \"{sndIP}\", chksum = 0xff) / UDP(sport = 4790, dport = 4790, chksum = 0xff) / VXLAN()',\n+            \"IP/UDP/VXLAN-GPE/ETH\": f'IP(src = \"{sndIP}\", chksum = 0xff) / UDP(sport = 4790, dport = 4790, chksum = 0xff) / VXLAN() / Ether()',\n             \"IPv6/UDP/VXLAN-GPE\": f'IPv6(src = \"{sndIPv6}\") / UDP(sport = 4790, dport = 4790, chksum = 0xff) / VXLAN()',\n             \"IPv6/UDP/VXLAN-GPE/ETH\": f'IPv6(src = \"{sndIPv6}\") / UDP(sport = 4790, dport = 4790, chksum = 0xff) / VXLAN() / Ether()',\n             \"IP/GRE\": f'IP(src = \"{sndIP}\", proto = 47, chksum = 0xff) / GRE()',\n@@ -452,13 +516,12 @@ class TestVfOffload(TestCase):\n         }\n \n         if self.dcf_mode == \"enable\":\n-            pkts_outer[\n-                \"IP/UDP/VXLAN/ETH\"\n-            ] = f'IP(src = \"{sndIP}\") / UDP(sport = 4789, dport = 4789, chksum = 0xff) / VXLAN() / Ether()'\n-            pkts_outer[\n-                \"IPv6/UDP/VXLAN/ETH\"\n-            ] = f'IPv6(src = \"{sndIPv6}\") / UDP(sport = 4789, dport = 4789, chksum = 0xff) / VXLAN() / Ether()'\n-\n+            pkts_outer.update(\n+                {\n+                    \"IP/UDP/VXLAN/ETH\": f'IP(src = \"{sndIP}\") / UDP(sport = 4789, dport = 4789, chksum = 0xff) / VXLAN() / Ether()',\n+                    \"IPv6/UDP/VXLAN/ETH\": f'IPv6(src = \"{sndIPv6}\") / UDP(sport = 4789, dport = 4789, chksum = 0xff) / VXLAN() / Ether()',\n+                }\n+            )\n         pkts = {\n             key_outer\n             + \"/\"\n@@ -494,13 +557,156 @@ class TestVfOffload(TestCase):\n         }\n \n         if self.dcf_mode == \"enable\":\n-            pkts_outer_ref[\n-                \"IP/UDP/VXLAN/ETH\"\n-            ] = f'IP(src = \"{sndIP}\") / UDP(sport = 4789, dport = 4789) / VXLAN() / Ether()'\n-            pkts_outer_ref[\n-                \"IPv6/UDP/VXLAN/ETH\"\n-            ] = f'IPv6(src = \"{sndIPv6}\") / UDP(sport = 4789, dport = 4789) / VXLAN() / Ether()'\n+            pkts_outer.update(\n+                {\n+                    \"IP/UDP/VXLAN/ETH\": f'IP(src = \"{sndIP}\", chksum = 0xff) / UDP(sport = 4789, dport = 4789) / VXLAN() / Ether()',\n+                    \"IPv6/UDP/VXLAN/ETH\": f'IPv6(src = \"{sndIPv6}\") / UDP(sport = 4789, dport = 4789) / VXLAN() / Ether()',\n+                }\n+            )\n+        pkts_ref = {\n+            key_outer\n+            + \"/\"\n+            + key_inner: f'Ether(dst=\"{mac}\", src=\"52:00:00:00:00:00\") / '\n+            + p_outer\n+            + \" / \"\n+            + p_inner\n+            for key_outer, p_outer in pkts_outer_ref.items()\n+            for key_inner, p_inner in pkts_inner_ref.items()\n+        }\n+\n+        self.checksum_enablehw_tunnel(0, self.vm_dut_0)\n+        self.checksum_enablehw_tunnel(1, self.vm_dut_0)\n+\n+        self.vm0_testpmd.execute_cmd(\"start\")\n+        self.vm0_testpmd.wait_link_status_up(0)\n+        self.vm0_testpmd.wait_link_status_up(1)\n+        result = self.checksum_validate(pkts, pkts_ref)\n+        # Validate checksum on the receive packet\n+        out = self.vm0_testpmd.execute_cmd(\"stop\")\n+        bad_outer_ipcsum = self.vm0_testpmd.get_pmd_value(\"Bad-outer-ipcsum:\", out)\n+        bad_outer_l4csum = self.vm0_testpmd.get_pmd_value(\"Bad-outer-l4csum:\", out)\n+        bad_inner_ipcsum = self.vm0_testpmd.get_pmd_value(\"Bad-ipcsum:\", out)\n+        bad_inner_l4csum = self.vm0_testpmd.get_pmd_value(\"Bad-l4csum:\", out)\n+        if self.dcf_mode == \"enable\":\n+            # Outer IP checksum error = 7 (outer-ip) * 6 (inner packet)\n+            self.verify(bad_outer_ipcsum == 42, \"Bad-outer-ipcsum check error\")\n+            # Outer IP checksum error = 8 (outer-UDP) * 6 (inner packet)\n+            self.verify(bad_outer_l4csum == 48, \"Bad-outer-l4csum check error\")\n+            # Outer L4 checksum error = 14 (outer packets) * 3 (inner-IP)\n+            self.verify(bad_inner_ipcsum == 42, \"Bad-ipcsum check error\")\n+            # Outer L4 checksum error = 14 (outer packets) * 6 (inner-L4)\n+            self.verify(bad_inner_l4csum == 84, \"Bad-l4csum check error\")\n+        else:\n+            # Outer IP checksum error = 6 (outer-ip) * 6 (inner packet)\n+            self.verify(bad_outer_ipcsum == 36, \"Bad-outer-ipcsum check error\")\n+            # Outer IP checksum error = 6 (outer-UDP) * 6 (inner packet)\n+            self.verify(bad_outer_l4csum == 36, \"Bad-outer-l4csum check error\")\n+            # Outer L4 checksum error = 12 (outer packets) * 3 (inner-IP)\n+            self.verify(bad_inner_ipcsum == 36, \"Bad-ipcsum check error\")\n+            # Outer L4 checksum error = 12 (outer packets) * 6 (inner-L4)\n+            self.verify(bad_inner_l4csum == 72, \"Bad-l4csum check error\")\n+\n+        self.verify(len(result) == 0, \",\".join(list(result.values())))\n+\n+    @check_supported_nic(\n+        [\"ICE_100G-E810C_QSFP\", \"ICE_25G-E810C_SFP\", \"ICE_25G-E810_XXV_SFP\"]\n+    )\n+    @skip_unsupported_pkg([\"os default\"])\n+    def test_checksum_offload_vlan_tunnel_enable(self):\n+        \"\"\"\n+        Enable HW checksum offload.\n+        Send packet with inner and outer incorrect checksum,\n+        can rx it and report the checksum error,\n+        verify forwarded packets have correct checksum.\n+        \"\"\"\n+        self.launch_testpmd(\n+            dcf_flag=self.dcf_mode,\n+            param=\"--portmask=%s \" % (self.portMask) + \"--enable-rx-cksum \" + \"\",\n+        )\n+        self.vm0_testpmd.execute_cmd(\"set fwd csum\")\n+        self.vm0_testpmd.execute_cmd(\"set promisc 1 on\")\n+        self.vm0_testpmd.execute_cmd(\"set promisc 0 on\")\n+        self.vm0_testpmd.execute_cmd(\"csum mac-swap off 0\", \"testpmd>\")\n+        self.vm0_testpmd.execute_cmd(\"csum mac-swap off 1\", \"testpmd>\")\n+        time.sleep(2)\n+        port_id_0 = 0\n+        mac = self.vm0_testpmd.get_port_mac(0)\n+        sndIP = \"10.0.0.1\"\n+        sndIPv6 = \"::1\"\n+        expIP = sndIP\n+        expIPv6 = sndIPv6\n+\n+        pkts_outer = {\n+            \"VLAN/IP/UDP/VXLAN-GPE\": f'Dot1Q(vlan=100) / IP(src = \"{sndIP}\", chksum = 0xff) / UDP(sport = 4790, dport = 4790, chksum = 0xff) / VXLAN()',\n+            \"VLAN/IP/UDP/VXLAN-GPE/ETH\": f'Dot1Q(vlan=100) / IP(src = \"{sndIP}\", chksum = 0xff) / UDP(sport = 4790, dport = 4790, chksum = 0xff) / VXLAN() / Ether()',\n+            \"VLAN/IPv6/UDP/VXLAN-GPE\": f'Dot1Q(vlan=100) / IPv6(src = \"{sndIPv6}\") / UDP(sport = 4790, dport = 4790, chksum = 0xff) / VXLAN()',\n+            \"VLAN/IPv6/UDP/VXLAN-GPE/ETH\": f'Dot1Q(vlan=100) / IPv6(src = \"{sndIPv6}\") / UDP(sport = 4790, dport = 4790, chksum = 0xff) / VXLAN() / Ether()',\n+            \"VLAN/IP/GRE\": f'Dot1Q(vlan=100) / IP(src = \"{sndIP}\", proto = 47, chksum = 0xff) / GRE()',\n+            \"VLAN/IP/GRE/ETH\": f'Dot1Q(vlan=100) / IP(src = \"{sndIP}\", proto = 47, chksum = 0xff) / GRE() / Ether()',\n+            \"VLAN/IP/NVGRE/ETH\": f'Dot1Q(vlan=100) / IP(src = \"{sndIP}\", proto = 47, chksum = 0xff) / GRE(key_present=1, proto=0x6558, key=0x00000100) / Ether()',\n+            \"VLAN/IPv6/GRE\": f'Dot1Q(vlan=100) / IPv6(src = \"{sndIPv6}\", nh = 47) / GRE()',\n+            \"VLAN/IPv6/GRE/ETH\": f'Dot1Q(vlan=100) / IPv6(src = \"{sndIPv6}\", nh = 47) / GRE() / Ether()',\n+            \"VLAN/IPv6/NVGRE/ETH\": f'Dot1Q(vlan=100) / IPv6(src = \"{sndIPv6}\", nh = 47) / GRE(key_present=1, proto=0x6558, key=0x00000100) / Ether()',\n+            \"VLAN/IP/UDP/GTPU\": f'Dot1Q(vlan=100) / IP(src = \"{sndIP}\", chksum = 0xff) / UDP(dport = 2152, chksum = 0xff) / GTP_U_Header(gtp_type=255, teid=0x123456)',\n+            \"VLAN/IPv6/UDP/GTPU\": f'Dot1Q(vlan=100) / IPv6(src = \"{sndIPv6}\") / UDP(dport = 2152, chksum = 0xff) / GTP_U_Header(gtp_type=255, teid=0x123456)',\n+        }\n+        pkts_inner = {\n+            \"IP/UDP\": f'IP(src = \"{sndIP}\", chksum = 0xff) / UDP(sport = 29999, dport = 30000, chksum = 0xff) / Raw(\"x\" * 100)',\n+            \"IP/TCP\": f'IP(src = \"{sndIP}\", chksum = 0xff) / TCP(sport = 29999, dport = 30000, chksum = 0xff) / Raw(\"x\" * 100)',\n+            \"IP/SCTP\": f'IP(src = \"{sndIP}\", chksum = 0xff) / SCTP(sport = 29999, dport = 30000, chksum = 0x0) / Raw(\"x\" * 128)',\n+            \"IPv6/UDP\": f'IPv6(src = \"{sndIPv6}\") / UDP(sport = 29999, dport = 30000, chksum = 0xff) / Raw(\"x\" * 100)',\n+            \"IPv6/TCP\": f'IPv6(src = \"{sndIPv6}\") / TCP(sport = 29999, dport = 30000, chksum = 0xff) / Raw(\"x\" * 100)',\n+            \"IPv6/SCTP\": f'IPv6(src = \"{sndIPv6}\") / SCTP(sport = 29999, dport = 30000, chksum = 0x0) / Raw(\"x\" * 128)',\n+        }\n+\n+        if self.dcf_mode == \"enable\":\n+            pkts_outer.update(\n+                {\n+                    \"VLAN/IP/UDP/VXLAN/ETH\": f'Dot1Q(vlan=100) / IP(src = \"{sndIP}\", chksum = 0xff) / UDP(sport = 4789, dport = 4789, chksum = 0xff) / VXLAN() / Ether()',\n+                    \"VLAN/IPv6/UDP/VXLAN/ETH\": f'Dot1Q(vlan=100) / IPv6(src = \"{sndIPv6}\") / UDP(sport = 4789, dport = 4789, chksum = 0xff) / VXLAN() / Ether()',\n+                }\n+            )\n+        pkts = {\n+            key_outer\n+            + \"/\"\n+            + key_inner: f'Ether(dst=\"{mac}\", src=\"52:00:00:00:00:00\") / '\n+            + p_outer\n+            + \" / \"\n+            + p_inner\n+            for key_outer, p_outer in pkts_outer.items()\n+            for key_inner, p_inner in pkts_inner.items()\n+        }\n \n+        pkts_outer_ref = {\n+            \"VLAN/IP/UDP/VXLAN-GPE\": f'Dot1Q(vlan=100) / IP(src = \"{expIP}\") / UDP(sport = 4790, dport = 4790) / VXLAN()',\n+            \"VLAN/IP/UDP/VXLAN-GPE/ETH\": f'Dot1Q(vlan=100) / IP(src = \"{expIP}\") / UDP(sport = 4790, dport = 4790) / VXLAN() / Ether()',\n+            \"VLAN/IPv6/UDP/VXLAN-GPE\": f'Dot1Q(vlan=100) / IPv6(src = \"{expIPv6}\") / UDP(sport = 4790, dport = 4790) / VXLAN()',\n+            \"VLAN/IPv6/UDP/VXLAN-GPE/ETH\": f'Dot1Q(vlan=100) / IPv6(src = \"{expIPv6}\") / UDP(sport = 4790, dport = 4790) / VXLAN() / Ether()',\n+            \"VLAN/IP/GRE\": f'Dot1Q(vlan=100) / IP(src = \"{expIP}\", proto = 47) / GRE()',\n+            \"VLAN/IP/GRE/ETH\": f'Dot1Q(vlan=100) / IP(src = \"{expIP}\", proto = 47) / GRE() / Ether()',\n+            \"VLAN/IP/NVGRE/ETH\": f'Dot1Q(vlan=100) / IP(src = \"{expIP}\", proto = 47) / GRE(key_present=1, proto=0x6558, key=0x00000100) / Ether()',\n+            \"VLAN/IPv6/GRE\": f'Dot1Q(vlan=100) / IPv6(src = \"{expIPv6}\", nh = 47) / GRE()',\n+            \"VLAN/IPv6/GRE/ETH\": f'Dot1Q(vlan=100) / IPv6(src = \"{expIPv6}\", nh = 47) / GRE() / Ether()',\n+            \"VLAN/IPv6/NVGRE/ETH\": f'Dot1Q(vlan=100) / IPv6(src = \"{expIPv6}\", nh = 47) / GRE(key_present=1, proto=0x6558, key=0x00000100) / Ether()',\n+            \"VLAN/IP/UDP/GTPU\": f'Dot1Q(vlan=100) / IP(src = \"{expIP}\") / UDP(dport = 2152) / GTP_U_Header(gtp_type=255, teid=0x123456)',\n+            \"VLAN/IPv6/UDP/GTPU\": f'Dot1Q(vlan=100) / IPv6(src = \"{expIPv6}\") / UDP(dport = 2152) / GTP_U_Header(gtp_type=255, teid=0x123456)',\n+        }\n+        pkts_inner_ref = {\n+            \"IP/UDP\": f'IP(src = \"{expIP}\") / UDP(sport = 29999, dport = 30000) / Raw(\"x\" * 100)',\n+            \"IP/TCP\": f'IP(src = \"{expIP}\") / TCP(sport = 29999, dport = 30000) / Raw(\"x\" * 100)',\n+            \"IP/SCTP\": f'IP(src = \"{expIP}\") / SCTP(sport = 29999, dport = 30000) / Raw(\"x\" * 128)',\n+            \"IPv6/UDP\": f'IPv6(src = \"{expIPv6}\") / UDP(sport = 29999, dport = 30000) / Raw(\"x\" * 100)',\n+            \"IPv6/TCP\": f'IPv6(src = \"{expIPv6}\") / TCP(sport = 29999, dport = 30000) / Raw(\"x\" * 100)',\n+            \"IPv6/SCTP\": f'IPv6(src = \"{expIPv6}\") / SCTP(sport = 29999, dport = 30000) / Raw(\"x\" * 128)',\n+        }\n+\n+        if self.dcf_mode == \"enable\":\n+            pkts_outer.update(\n+                {\n+                    \"VLAN/IP/UDP/VXLAN/ETH\": f'Dot1Q(vlan=100) / IP(src = \"{sndIP}\", chksum = 0xff) / UDP(sport = 4789, dport = 4789) / VXLAN() / Ether()',\n+                    \"VLAN/IPv6/UDP/VXLAN/ETH\": f'Dot1Q(vlan=100) / IPv6(src = \"{sndIPv6}\") / UDP(sport = 4789, dport = 4789) / VXLAN() / Ether()',\n+                }\n+            )\n         pkts_ref = {\n             key_outer\n             + \"/\"\n@@ -526,14 +732,22 @@ class TestVfOffload(TestCase):\n         bad_inner_ipcsum = self.vm0_testpmd.get_pmd_value(\"Bad-ipcsum:\", out)\n         bad_inner_l4csum = self.vm0_testpmd.get_pmd_value(\"Bad-l4csum:\", out)\n         if self.dcf_mode == \"enable\":\n-            self.verify(bad_outer_ipcsum == 24, \"Bad-outer-ipcsum check error\")\n+            # Outer IP checksum error = 7 (outer-ip) * 6 (inner packet)\n+            self.verify(bad_outer_ipcsum == 42, \"Bad-outer-ipcsum check error\")\n+            # Outer IP checksum error = 8 (outer-UDP) * 6 (inner packet)\n             self.verify(bad_outer_l4csum == 48, \"Bad-outer-l4csum check error\")\n+            # Outer L4 checksum error = 14 (outer packets) * 3 (inner-IP)\n             self.verify(bad_inner_ipcsum == 42, \"Bad-ipcsum check error\")\n+            # Outer L4 checksum error = 14 (outer packets) * 6 (inner-L4)\n             self.verify(bad_inner_l4csum == 84, \"Bad-l4csum check error\")\n         else:\n-            self.verify(bad_outer_ipcsum == 24, \"Bad-outer-ipcsum check error\")\n+            # Outer IP checksum error = 6 (outer-ip) * 6 (inner packet)\n+            self.verify(bad_outer_ipcsum == 36, \"Bad-outer-ipcsum check error\")\n+            # Outer IP checksum error = 6 (outer-UDP) * 6 (inner packet)\n             self.verify(bad_outer_l4csum == 36, \"Bad-outer-l4csum check error\")\n+            # Outer L4 checksum error = 12 (outer packets) * 3 (inner-IP)\n             self.verify(bad_inner_ipcsum == 36, \"Bad-ipcsum check error\")\n+            # Outer L4 checksum error = 12 (outer packets) * 6 (inner-L4)\n             self.verify(bad_inner_l4csum == 72, \"Bad-l4csum check error\")\n \n         self.verify(len(result) == 0, \",\".join(list(result.values())))\n",
    "prefixes": [
        "V3",
        "1/5"
    ]
}