Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/99055/?format=api
http://patches.dpdk.org/api/patches/99055/?format=api", "web_url": "http://patches.dpdk.org/project/dts/patch/20210917113842.85846-3-yanx.xia@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": "<20210917113842.85846-3-yanx.xia@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dts/20210917113842.85846-3-yanx.xia@intel.com", "date": "2021-09-17T11:38:42", "name": "[V1,2/2] tests/generic_flow_api: move test_dual_vlan from fortville_rss_granularity_config to generic_flow_api", "commit_ref": null, "pull_url": null, "state": "not-applicable", "archived": false, "hash": "10e737f6a0f579fe60d0314d904590d426879f9e", "submitter": { "id": 2034, "url": "http://patches.dpdk.org/api/people/2034/?format=api", "name": "Yan Xia", "email": "yanx.xia@intel.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dts/patch/20210917113842.85846-3-yanx.xia@intel.com/mbox/", "series": [ { "id": 18991, "url": "http://patches.dpdk.org/api/series/18991/?format=api", "web_url": "http://patches.dpdk.org/project/dts/list/?series=18991", "date": "2021-09-17T11:38:40", "name": "*** move test_dual_vlan from", "version": 1, "mbox": "http://patches.dpdk.org/series/18991/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/99055/comments/", "check": "pending", "checks": "http://patches.dpdk.org/api/patches/99055/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 0C982A0C46;\n\tFri, 17 Sep 2021 05:37:01 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 07495410EB;\n\tFri, 17 Sep 2021 05:37:01 +0200 (CEST)", "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n by mails.dpdk.org (Postfix) with ESMTP id 6857A40689\n for <dts@dpdk.org>; Fri, 17 Sep 2021 05:36:59 +0200 (CEST)", "from fmsmga003.fm.intel.com ([10.253.24.29])\n by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 16 Sep 2021 20:36:58 -0700", "from unknown (HELO localhost.localdomain) ([10.240.183.77])\n by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 16 Sep 2021 20:36:57 -0700" ], "X-IronPort-AV": [ "E=McAfee;i=\"6200,9189,10109\"; a=\"286399338\"", "E=Sophos;i=\"5.85,299,1624345200\"; d=\"scan'208\";a=\"286399338\"", "E=Sophos;i=\"5.85,299,1624345200\"; d=\"scan'208\";a=\"546116188\"" ], "From": "Yan Xia <yanx.xia@intel.com>", "To": "dts@dpdk.org", "Cc": "Yan Xia <yanx.xia@intel.com>", "Date": "Fri, 17 Sep 2021 11:38:42 +0000", "Message-Id": "<20210917113842.85846-3-yanx.xia@intel.com>", "X-Mailer": "git-send-email 2.32.0", "In-Reply-To": "<20210917113842.85846-1-yanx.xia@intel.com>", "References": "<20210917113842.85846-1-yanx.xia@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dts] [PATCH V1 2/2] tests/generic_flow_api: move test_dual_vlan\n from fortville_rss_granularity_config to generic_flow_api", "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", "Sender": "\"dts\" <dts-bounces@dpdk.org>" }, "content": "move test_dual_vlan from fortville_rss_granularity_config to generic_flow_api\n\nSigned-off-by: Yan Xia <yanx.xia@intel.com>\n---\n tests/TestSuite_generic_flow_api.py | 121 ++++++++++++++++++++++++++++\n 1 file changed, 121 insertions(+)", "diff": "diff --git a/tests/TestSuite_generic_flow_api.py b/tests/TestSuite_generic_flow_api.py\nindex f64a5be5..c86f441b 100644\n--- a/tests/TestSuite_generic_flow_api.py\n+++ b/tests/TestSuite_generic_flow_api.py\n@@ -59,6 +59,8 @@ from scapy.utils import rdpcap\n \n MAX_VLAN = 4095\n MAX_QUEUE = 15\n+testQueues = [16]\n+reta_lines = []\n MAX_VFQUEUE = 3\n MAX_PORT = 65535\n MAX_TTL = 255\n@@ -642,6 +644,80 @@ class TestGeneric_flow_api(TestCase):\n self.pkt_obj.append_pkt(pktstr)\n self.pkt_obj.send_pkt(self.tester, tx_port=self.tester_itf, count=count)\n \n+ def send_packet(self, itf, tran_type, enable=None):\n+ \"\"\"\n+ Sends packets for l2_payload.\n+ \"\"\"\n+ global reta_lines\n+ global name\n+ global value\n+ self.tester.scapy_foreground()\n+ self.dut.send_expect(\"start\", \"testpmd>\")\n+ mac = self.dut.get_mac_address(0)\n+\n+ # send packet with different source and dest ip\n+ if tran_type == \"l2_payload\":\n+ if enable == \"ovlan\":\n+ packet = r'sendp([Ether(dst=\"%s\", src=get_if_hwaddr(\"%s\"))/Dot1Q(id=0x8100,vlan=4)/Dot1Q(id=0x8100,vlan=2,type=0xaaaa)/Raw(load=\"x\"*60)], iface=\"%s\")' % (\n+ mac, itf, itf)\n+ elif enable == \"ivlan\":\n+ packet = r'sendp([Ether(dst=\"%s\", src=get_if_hwaddr(\"%s\"))/Dot1Q(id=0x8100,vlan=1)/Dot1Q(id=0x8100,vlan=3,type=0xaaaa)/Raw(load=\"x\"*60)], iface=\"%s\")' % (\n+ mac, itf, itf)\n+ else:\n+ packet = r'sendp([Ether(dst=\"%s\", src=get_if_hwaddr(\"%s\"))/Dot1Q(id=0x8100,vlan=1)/Dot1Q(id=0x8100,vlan=2,type=0xaaaa)/Raw(load=\"x\"*60)], iface=\"%s\")' % (\n+ mac, itf, itf)\n+ self.tester.scapy_append(packet)\n+ self.tester.scapy_execute()\n+ time.sleep(.5)\n+ else:\n+ print(\"\\ntran_type error!\\n\")\n+\n+ out = self.dut.get_session_output(timeout=1)\n+ self.dut.send_expect(\"stop\", \"testpmd>\")\n+ lines = out.split(\"\\r\\n\")\n+ reta_line = {}\n+ # collect the hash result and the queue id\n+ for line in lines:\n+ line = line.strip()\n+ if len(line) != 0 and line.strip().startswith(\"port \"):\n+ reta_line = {}\n+ rexp = r\"port (\\d)/queue (\\d{1,2}): received (\\d) packets\"\n+ m = re.match(rexp, line.strip())\n+ if m:\n+ reta_line[\"port\"] = m.group(1)\n+ reta_line[\"queue\"] = m.group(2)\n+\n+ elif len(line) != 0 and line.startswith((\"src=\",)):\n+ for item in line.split(\"-\"):\n+ item = item.strip()\n+\n+ if(item.startswith(\"RSS hash\")):\n+ name, value = item.split(\"=\", 1)\n+\n+ reta_line[name.strip()] = value.strip()\n+ reta_lines.append(reta_line)\n+\n+ self.append_result_table()\n+\n+ def append_result_table(self):\n+ \"\"\"\n+ Append the hash value and queue id into table.\n+ \"\"\"\n+\n+ global reta_lines\n+\n+ # append the the hash value and queue id into table\n+ self.result_table_create(\n+ ['packet index', 'hash value', 'hash index', 'queue id'])\n+ i = 0\n+\n+ for tmp_reta_line in reta_lines:\n+\n+ # compute the hash result of five tuple into the 7 LSBs value.\n+ hash_index = int(tmp_reta_line[\"RSS hash\"], 16)\n+ self.result_table_add(\n+ [i, tmp_reta_line[\"RSS hash\"], hash_index, tmp_reta_line[\"queue\"]])\n+ i = i + 1\n def test_syn_filter(self):\n \"\"\"\n Only supported by ixgbe and igb.\n@@ -2399,6 +2475,51 @@ class TestGeneric_flow_api(TestCase):\n self.sendpkt(pktstr='Ether(dst=\"%s\")/IP()/UDP(dport=32)/Raw(\"x\" * 20)' % self.pf_mac)\n self.verify_result(\"pf\", expect_rxpkts=\"1\", expect_queue=\"2\", verify_mac=self.pf_mac)\n \n+ def test_dual_vlan(self):\n+ \"\"\"\n+ Test with flow type dual vlan(QinQ).\n+ \"\"\"\n+ self.verify(self.nic in [\"fortville_eagle\", \"fortville_spirit\", \"fortville_spirit_single\", \"fortville_25g\",\n+ \"carlsville\"], \"NIC Unsupported: \" + str(self.nic))\n+ for queue in testQueues:\n+ self.pmdout.start_testpmd(\n+ \"Default\", \" --portmask=0x1 --rxq=%d --txq=%d\" % (queue, queue))\n+\n+ self.dut.send_expect(\"set verbose 8\", \"testpmd> \")\n+ self.dut.send_expect(\"set fwd rxonly\", \"testpmd> \")\n+\n+ self.dut.send_expect(\"port stop all\", \"testpmd> \")\n+ self.dut.send_expect(\"vlan set extend on 0\", \"testpmd> \")\n+ self.dut.send_expect(\n+ \"flow create 0 ingress pattern eth / end actions rss types l2-payload end queues end func toeplitz / end\", \"testpmd> \")\n+ self.dut.send_expect(\"port start all\", \"testpmd> \")\n+ res = self.pmdout.wait_link_status_up(\"all\")\n+ self.verify(res is True, \"link is down\")\n+\n+ self.send_packet(self.tester_itf, \"l2_payload\")\n+\n+ # set flow rss type s-vlan c-vlan set by testpmd on dut\n+ self.dut.send_expect(\"flow create 0 ingress pattern eth / end actions rss types s-vlan c-vlan end key_len 0 queues end / end\", \"testpmd> \")\n+ self.send_packet(self.tester_itf, \"l2_payload\")\n+\n+ self.send_packet(self.tester_itf, \"l2_payload\", enable=\"ovlan\")\n+\n+ self.send_packet(self.tester_itf, \"l2_payload\", enable=\"ivlan\")\n+\n+ self.dut.send_expect(\"quit\", \"# \", 30)\n+\n+ self.result_table_print()\n+ result_rows = self.result_table_getrows()\n+ self.verify(len(result_rows) > 1, \"There is no data in the table, testcase failed!\")\n+\n+ # check the results\n+ self.verify(result_rows[1][1] != result_rows[2][1], \"The hash values should be different when setting rss to 'l2-payload' and 's-vlan c-vlan and sending the same packets.\")\n+ self.verify(result_rows[1][1] != result_rows[3][1], \"The hash values should be different when setting rss to 'l2-payload' and 's-vlan c-vlan' and sending packets with differernt ovlan.\")\n+ self.verify(result_rows[1][1] != result_rows[4][1], \"The hash values should be different when setting rss to 'l2-payload' and 's-vlan c-vlan' and sending packets with differernt ivlan.\")\n+ self.verify(result_rows[2][1] != result_rows[3][1], \"The hash values should be different when setting rss to 's-vlan c-vlan' and sending packet with differernt ovlan.\")\n+ self.verify(result_rows[2][1] != result_rows[4][1], \"The hash values should be different when setting rss to 's-vlan c-vlan' and sending packet with differernt ivlan.\")\n+ self.verify(result_rows[3][1] != result_rows[4][1], \"The hash values should be different when setting rss to 's-vlan c-vlan' and sending packet with differernt ovlan and ivlan\")\n+\n def tear_down(self):\n \"\"\"\n Run after each test case.\n", "prefixes": [ "V1", "2/2" ] }{ "id": 99055, "url": "