Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/76193/?format=api
http://patches.dpdk.org/api/patches/76193/?format=api", "web_url": "http://patches.dpdk.org/project/dts/patch/20200901023522.49731-2-chenxux.di@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": "<20200901023522.49731-2-chenxux.di@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dts/20200901023522.49731-2-chenxux.di@intel.com", "date": "2020-09-01T02:35:22", "name": "[v4,2/2] tests: add TestSuite_cvl_rss_configure.py", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "fb222e8371b6132a4341853351126f1f1c149a4a", "submitter": { "id": 1409, "url": "http://patches.dpdk.org/api/people/1409/?format=api", "name": "Chenxu Di", "email": "chenxux.di@intel.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dts/patch/20200901023522.49731-2-chenxux.di@intel.com/mbox/", "series": [ { "id": 11865, "url": "http://patches.dpdk.org/api/series/11865/?format=api", "web_url": "http://patches.dpdk.org/project/dts/list/?series=11865", "date": "2020-09-01T02:35:21", "name": "[v4,1/2] test_plans: add cvl_rss_configure_test_plan.rst", "version": 4, "mbox": "http://patches.dpdk.org/series/11865/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/76193/comments/", "check": "pending", "checks": "http://patches.dpdk.org/api/patches/76193/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 881EBA04B2;\n\tTue, 1 Sep 2020 05:04:45 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id F373D1C0DB;\n\tTue, 1 Sep 2020 05:04:44 +0200 (CEST)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n by dpdk.org (Postfix) with ESMTP id E71751C0D2\n for <dts@dpdk.org>; Tue, 1 Sep 2020 05:04:43 +0200 (CEST)", "from orsmga002.jf.intel.com ([10.7.209.21])\n by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 31 Aug 2020 20:04:40 -0700", "from intel.sh.intel.com ([10.239.255.20])\n by orsmga002.jf.intel.com with ESMTP; 31 Aug 2020 20:04:39 -0700" ], "IronPort-SDR": [ "\n aAwR1q6EWsz7twl3ztzf2WRYLLSSmHaNLP40Phrpgd1hhvOqduURxwmvy/GE7eXDwrzVd+3tB7\n +m3+FPEU3uNg==", "\n kffBftlPvq1mqIGwxU/2v214On6WqKf/32hu5g3ednRRgK4d6EKl4iLQlfmD8dmYlog2emHxIm\n K4LmRRWOLT3w==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9730\"; a=\"154611224\"", "E=Sophos;i=\"5.76,377,1592895600\"; d=\"scan'208\";a=\"154611224\"", "E=Sophos;i=\"5.76,377,1592895600\"; d=\"scan'208\";a=\"314579476\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "From": "Chenxu Di <chenxux.di@intel.com>", "To": "dts@dpdk.org", "Cc": "qi.fu@intel.com,\n\tChenxu Di <chenxux.di@intel.com>", "Date": "Tue, 1 Sep 2020 02:35:22 +0000", "Message-Id": "<20200901023522.49731-2-chenxux.di@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20200901023522.49731-1-chenxux.di@intel.com>", "References": "<20200901023522.49731-1-chenxux.di@intel.com>", "Subject": "[dts] [PATCH v4 2/2] tests: add TestSuite_cvl_rss_configure.py", "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 new test suite for cvl rss configure\n\nSigned-off-by: Chenxu Di <chenxux.di@intel.com>\n---\n tests/TestSuite_cvl_rss_configure.py | 283 +++++++++++++++++++++++++++\n 1 file changed, 283 insertions(+)\n create mode 100644 tests/TestSuite_cvl_rss_configure.py", "diff": "diff --git a/tests/TestSuite_cvl_rss_configure.py b/tests/TestSuite_cvl_rss_configure.py\nnew file mode 100644\nindex 0000000..c8ca6d5\n--- /dev/null\n+++ b/tests/TestSuite_cvl_rss_configure.py\n@@ -0,0 +1,283 @@\n+import json\n+import time\n+import re\n+import packet\n+import os\n+from scapy.contrib.gtp import *\n+from test_case import TestCase\n+from pmd_output import PmdOutput\n+from utils import BLUE, RED\n+from collections import OrderedDict\n+from packet import IncreaseIP, IncreaseIPv6\n+import rte_flow_common as rfc\n+\n+out = os.popen(\"pip list|grep scapy \")\n+version_result =out.read()\n+p=re.compile('scapy\\s+2\\.3\\.\\d+')\n+m=p.search(version_result)\n+\n+tv_mac_ip_ipv4 = {\n+ \"name\":\"tv_mac_ip_ipv4\",\n+ \"scapy_str\":['Ether(dst=\"00:00:00:00:01:00\")/IP(src=\"192.168.0.%d\", dst=\"192.168.0.%d\")/(\"X\"*480)' %(i, i+10) for i in range(0,100)],\n+ \"check_func_param\": {\"expect_port\":0}\n+}\n+\n+tv_mac_ip_ipv6 = {\n+ \"name\":\"tv_mac_ip_ipv6\",\n+ \"scapy_str\": ['Ether(dst=\"00:00:00:00:01:00\")/IPv6(src=\"2001::%d\", dst=\"2001::%d\")/(\"X\"*480)' %(i, i+10) for i in range(0,100)],\n+ \"check_func_param\": {\"expect_port\":0}\n+}\n+\n+tv_mac_ipv4_udp_l3_random = {\n+ \"name\":\"tv_mac_ipv4_udp_l3_random\",\n+ \"scapy_str\":['Ether(dst=\"00:00:00:00:01:00\")/IP(src=\"192.168.0.%d\", dst=\"192.168.0.%d\")/UDP()/(\"X\"*480)' %(i,i+10) for i in range(0,100)],\n+ \"check_func_param\": {\"expect_port\":0}\n+}\n+\n+tv_mac_ipv4_udp_l4_random = {\n+ \"name\":\"tv_mac_ipv4_udp_l4_random\",\n+ \"scapy_str\":['Ether(dst=\"00:00:00:00:01:00\")/IP()/UDP(sport=%d, dport=%d)/(\"X\"*480)' %(i+50,i+55) for i in range(0,100)],\n+ \"check_func_param\": {\"expect_port\":0}\n+}\n+\n+tv_mac_ipv6_udp_l3_random = {\n+ \"name\":\"tv_mac_ipv6_udp_l3_random\",\n+ \"scapy_str\":['Ether(dst=\"00:00:00:00:01:00\")/IPv6(src=\"2001::%d\", dst=\"2001::%d\")/UDP()/(\"X\"*480)' %(i,i+10) for i in range(0,100)],\n+ \"check_func_param\": {\"expect_port\":0}\n+}\n+\n+tv_mac_ipv6_udp_l4_random = {\n+ \"name\":\"tv_mac_ipv6_udp_l4_random\",\n+ \"scapy_str\":['Ether(dst=\"00:00:00:00:01:00\")/IPv6()/UDP(sport=%d, dport=%d)/(\"X\"*480)' %(i+50,i+55) for i in range(0,100)],\n+ \"check_func_param\": {\"expect_port\":0}\n+}\n+\n+tv_mac_ipv4_tcp_l3_random = {\n+ \"name\":\"tv_mac_ipv4_tcp_l3_random\",\n+ \"scapy_str\":['Ether(dst=\"00:00:00:00:01:00\")/IP(src=\"192.168.0.%d\", dst=\"192.168.0.%d\")/TCP()/(\"X\"*480)' %(i,i+10) for i in range(0,100)],\n+ \"check_func_param\": {\"expect_port\":0}\n+}\n+\n+tv_mac_ipv4_tcp_l4_random = {\n+ \"name\":\"tv_mac_ipv4_tcp_l4_random\",\n+ \"scapy_str\":['Ether(dst=\"00:00:00:00:01:00\")/IP()/TCP(sport=%d, dport=%d)/(\"X\"*480)' %(i+50,i+55) for i in range(0,100)],\n+ \"check_func_param\": {\"expect_port\":0}\n+}\n+\n+tv_mac_ipv6_tcp_l3_random = {\n+ \"name\":\"tv_mac_ipv6_tcp_l3_random\",\n+ \"scapy_str\":['Ether(dst=\"00:00:00:00:01:00\")/IPv6(src=\"2001::%d\", dst=\"2001::%d\")/TCP()/(\"X\"*480)' %(i,i+10) for i in range(0,100)],\n+ \"check_func_param\": {\"expect_port\":0}\n+}\n+\n+tv_mac_ipv6_tcp_l4_random = {\n+ \"name\":\"tv_mac_ipv6_tcp_l4_random\",\n+ \"scapy_str\":['Ether(dst=\"00:00:00:00:01:00\")/IPv6()/TCP(sport=%d, dport=%d)/(\"X\"*480)' %(i+50,i+55) for i in range(0,100)],\n+ \"check_func_param\": {\"expect_port\":0}\n+}\n+\n+tv_mac_ipv4_sctp = {\n+ \"name\":\"tv_mac_ipv4_sctp\",\n+ \"scapy_str\":['Ether(dst=\"00:00:00:00:01:00\")/IP(src=\"192.168.0.%d\", dst=\"192.168.0.%d\")/SCTP()/(\"X\"*480)' %(i,i+10) for i in range(0,100)],\n+ \"check_func_param\": {\"expect_port\":0}\n+}\n+\n+tv_mac_ipv6_sctp = {\n+ \"name\":\"tv_mac_ipv6_sctp\",\n+ \"scapy_str\":['Ether(dst=\"00:00:00:00:01:00\")/IPv6(src=\"2001::%d\", dst=\"2001::%d\")/SCTP()/(\"X\"*480)' %(i,i+10) for i in range(0,100)],\n+ \"check_func_param\": {\"expect_port\":0}\n+}\n+\n+tvs_mac_rss_ip = [\n+ tv_mac_ip_ipv4,\n+ tv_mac_ip_ipv6\n+ ]\n+\n+tvs_mac_rss_l3 = [\n+ tv_mac_ip_ipv4,\n+ tv_mac_ip_ipv6,\n+ tv_mac_ipv4_udp_l3_random,\n+ tv_mac_ipv6_udp_l3_random,\n+ tv_mac_ipv4_tcp_l3_random,\n+ tv_mac_ipv6_tcp_l3_random,\n+ tv_mac_ipv4_sctp,\n+ tv_mac_ipv6_sctp\n+ ]\n+\n+tvs_mac_rss_l4 = [\n+ tv_mac_ipv4_udp_l4_random,\n+ tv_mac_ipv6_udp_l4_random,\n+ tv_mac_ipv4_tcp_l4_random,\n+ tv_mac_ipv6_tcp_l4_random\n+ ]\n+\n+tvs_mac_rss_udp = [\n+ tv_mac_ipv4_udp_l3_random,\n+ tv_mac_ipv4_udp_l4_random,\n+ tv_mac_ipv6_udp_l3_random,\n+ tv_mac_ipv6_udp_l4_random\n+ ]\n+\n+tvs_mac_rss_udp_l4 = [\n+ tv_mac_ipv4_udp_l4_random,\n+ tv_mac_ipv6_udp_l4_random\n+ ]\n+\n+tvs_mac_rss_tcp = [\n+ tv_mac_ipv4_tcp_l3_random,\n+ tv_mac_ipv4_tcp_l4_random,\n+ tv_mac_ipv6_tcp_l3_random,\n+ tv_mac_ipv6_tcp_l4_random\n+ ]\n+\n+tvs_mac_rss_tcp_l4 = [\n+ tv_mac_ipv4_tcp_l4_random,\n+ tv_mac_ipv6_tcp_l4_random\n+ ]\n+\n+tvs_mac_rss_sctp = [\n+ tv_mac_ipv4_sctp,\n+ tv_mac_ipv6_sctp\n+ ]\n+\n+tvs_mac_rss_all = [\n+ tv_mac_ip_ipv4,\n+ tv_mac_ip_ipv6,\n+ tv_mac_ipv4_udp_l3_random,\n+ tv_mac_ipv4_udp_l4_random,\n+ tv_mac_ipv6_udp_l3_random,\n+ tv_mac_ipv6_udp_l4_random,\n+ tv_mac_ipv4_tcp_l3_random,\n+ tv_mac_ipv4_tcp_l4_random,\n+ tv_mac_ipv6_tcp_l3_random,\n+ tv_mac_ipv6_tcp_l4_random,\n+ tv_mac_ipv4_sctp,\n+ tv_mac_ipv6_sctp\n+ ]\n+\n+test_results = OrderedDict()\n+\n+class RSSConfigureTest(TestCase):\n+\n+ def set_up_all(self):\n+ \"\"\"\n+ Run at the start of each test suite.\n+ Generic filter Prerequistites\n+ \"\"\"\n+ self.dut_ports = self.dut.get_ports(self.nic)\n+ # Verify that enough ports are available\n+ self.verify(len(self.dut_ports) >= 1, \"Insufficient ports\")\n+ #self.cores = \"1S/8C/1T\"\n+ self.pmdout = PmdOutput(self.dut)\n+\n+ localPort = self.tester.get_local_port(self.dut_ports[0])\n+ self.__tx_iface = self.tester.get_interface(localPort)\n+ self.pf_interface = self.dut.ports_info[self.dut_ports[0]]['intf']\n+ self.pf_mac = self.dut.get_mac_address(0)\n+ self.pf_pci = self.dut.ports_info[self.dut_ports[0]]['pci']\n+ self.verify(self.nic in [\"columbiaville_25g\",\"columbiaville_100g\"], \"%s nic not support ethertype filter\" % self.nic)\n+\n+ def set_up(self):\n+ \"\"\"\n+ Run before each test case.\n+ \"\"\"\n+ self.dut.kill_all()\n+\n+ def tear_down(self):\n+ \"\"\"\n+ Run after each test case.\n+ \"\"\"\n+ self.dut.kill_all()\n+ \n+ def tear_down_all(self):\n+ \"\"\"\n+ Run after each test suite.\n+ \"\"\"\n+ self.dut.kill_all()\n+\n+ def create_testpmd_command(self, line_option):\n+ \"\"\"\n+ Create testpmd command for non-pipeline mode\n+ \"\"\"\n+ #Prepare testpmd EAL and parameters \n+ all_eal_param = self.dut.create_eal_parameters(ports=[self.pf_pci])\n+ print(all_eal_param) #print eal parameters\n+ command = \"./%s/app/testpmd %s -- -i %s\" % (self.dut.target, all_eal_param, \"--rxq=10 --txq=10\" + line_option)\n+ return command\n+\n+ def _rss_validate_pattern(self, test_vectors, command, rss_type, is_rss):\n+\n+ global test_results\n+ out = self.dut.send_expect(command, \"testpmd> \", 120)\n+ self.logger.debug(out) #print the log\n+ self.dut.send_expect(\"set fwd rxonly\", \"testpmd> \", 15)\n+ self.dut.send_expect(\"set verbose 1\", \"testpmd> \", 15)\n+ if rss_type != \"\":\n+ self.dut.send_expect(\"port config all rss %s\" % rss_type, \"testpmd> \", 15)\n+\n+ test_results.clear()\n+ self.count = 1\n+ self.mac_count=100\n+ for tv in test_vectors:\n+ self.dut.send_expect(\"start\", \"testpmd> \", 15)\n+ time.sleep(2)\n+ tv[\"check_func_param\"][\"expect_port\"] = self.dut_ports[0]\n+ print(\"expect_port is\", self.dut_ports[0])\n+\n+ #send a packet\n+ pkt = packet.Packet()\n+ pkt.update_pkt(tv[\"scapy_str\"])\n+ pkt.send_pkt(self.tester, tx_port=self.__tx_iface, count=self.count)\n+\n+ out = self.dut.send_expect(\"stop\", \"testpmd> \",60)\n+ print(out)\n+ check_result = []\n+ check_result = rfc.check_packets_of_each_queue(out)\n+ self.verify(check_result[0] == is_rss, check_result[1])\n+\n+ self.dut.send_expect(\"quit\", \"#\")\n+\n+ def test_command_line_option_rss_ip(self):\n+ command = self.create_testpmd_command(line_option = \" --rss-ip\")\n+ self._rss_validate_pattern(tvs_mac_rss_l3, command, rss_type = \"\", is_rss = True)\n+ self._rss_validate_pattern(tvs_mac_rss_l4, command, rss_type = \"\", is_rss = False)\n+\n+ def test_command_line_option_rss_udp(self):\n+ command = self.create_testpmd_command(line_option = \" --rss-udp\")\n+ self._rss_validate_pattern(tvs_mac_rss_udp, command, rss_type = \"\", is_rss = True)\n+ self._rss_validate_pattern(tvs_mac_rss_ip, command, rss_type = \"\", is_rss = False)\n+ self._rss_validate_pattern(tvs_mac_rss_tcp, command, rss_type = \"\", is_rss = False)\n+ self._rss_validate_pattern(tvs_mac_rss_sctp, command, rss_type = \"\", is_rss = False)\n+\n+ def test_command_line_option_rss_disable(self):\n+ command = self.create_testpmd_command(line_option = \" --disable-rss\")\n+ self._rss_validate_pattern(tvs_mac_rss_all, command, rss_type = \"\", is_rss = False)\n+\n+ def test_rss_configure_to_ip(self):\n+ command = self.create_testpmd_command(line_option = \"\")\n+ self._rss_validate_pattern(tvs_mac_rss_l3, command, rss_type = \"\", is_rss = True)\n+ self._rss_validate_pattern(tvs_mac_rss_l4, command, rss_type = \"\", is_rss = False)\n+\n+ def test_rss_configure_to_udp(self):\n+ command = self.create_testpmd_command(line_option = \"\")\n+ self._rss_validate_pattern(tvs_mac_rss_udp, command, rss_type = \"udp\", is_rss = True)\n+ self._rss_validate_pattern(tvs_mac_rss_tcp_l4, command, rss_type = \"udp\", is_rss = False)\n+\n+ def test_rss_configure_to_tcp(self):\n+ command = self.create_testpmd_command(line_option = \"\")\n+ self._rss_validate_pattern(tvs_mac_rss_tcp, command, rss_type = \"tcp\", is_rss = True)\n+ self._rss_validate_pattern(tvs_mac_rss_udp_l4, command, rss_type = \"tcp\", is_rss = False)\n+\n+ def test_rss_configure_to_sctp(self):\n+ command = self.create_testpmd_command(line_option = \"\")\n+ self._rss_validate_pattern(tvs_mac_rss_sctp, command, rss_type = \"sctp\", is_rss = True)\n+ self._rss_validate_pattern(tvs_mac_rss_udp_l4, command, rss_type = \"sctp\", is_rss = False)\n+ self._rss_validate_pattern(tvs_mac_rss_tcp_l4, command, rss_type = \"sctp\", is_rss = False)\n+\n+ def test_rss_configure_to_all(self):\n+ command = self.create_testpmd_command(line_option = \"\")\n+ self._rss_validate_pattern(tvs_mac_rss_all, command, rss_type = \"all\", is_rss = True)\n+\n+ def test_rss_configure_to_default(self):\n+ command = self.create_testpmd_command(line_option = \"\")\n+ self._rss_validate_pattern(tvs_mac_rss_all, command, rss_type = \"default\", is_rss = True)\n", "prefixes": [ "v4", "2/2" ] }{ "id": 76193, "url": "