Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/84464/?format=api
http://patches.dpdk.org/api/patches/84464/?format=api", "web_url": "http://patches.dpdk.org/project/dts/patch/1606124992-45581-3-git-send-email-churchill.khangar@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": "<1606124992-45581-3-git-send-email-churchill.khangar@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dts/1606124992-45581-3-git-send-email-churchill.khangar@intel.com", "date": "2020-11-23T09:49:52", "name": "[2/2] tests/pipeline: add table default and normal rule tests", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "a47ff2bec8dfba41a6d5422406d45f8790f6b2c6", "submitter": { "id": 2045, "url": "http://patches.dpdk.org/api/people/2045/?format=api", "name": "Churchill Khangar", "email": "churchill.khangar@intel.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dts/patch/1606124992-45581-3-git-send-email-churchill.khangar@intel.com/mbox/", "series": [ { "id": 14034, "url": "http://patches.dpdk.org/api/series/14034/?format=api", "web_url": "http://patches.dpdk.org/project/dts/list/?series=14034", "date": "2020-11-23T09:49:50", "name": "Add pipeline additional table tests", "version": 1, "mbox": "http://patches.dpdk.org/series/14034/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/84464/comments/", "check": "pending", "checks": "http://patches.dpdk.org/api/patches/84464/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 C9587A04B1;\n\tMon, 23 Nov 2020 10:52:10 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id BFD9AC8E6;\n\tMon, 23 Nov 2020 10:52:09 +0100 (CET)", "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n by dpdk.org (Postfix) with ESMTP id A6362C8E6\n for <dts@dpdk.org>; Mon, 23 Nov 2020 10:52:07 +0100 (CET)", "from fmsmga006.fm.intel.com ([10.253.24.20])\n by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 23 Nov 2020 01:52:07 -0800", "from unknown (HELO bdcdev09.localdomain) ([10.190.193.143])\n by fmsmga006.fm.intel.com with ESMTP; 23 Nov 2020 01:52:05 -0800" ], "IronPort-SDR": [ "\n TlaEmgW72N8wuM+Pi/cz1c21sviFEfyYc+sIqM9KgfdMlpvlYKocbIh4eHivCaaKQ6JFjB/1SB\n yPRfhUBg/aQw==", "\n lcdGoPqgAAv/W3OVWzkmpF/23KSWhULli2LcN/gQsobKh667dyoG70uvZLf41uu4mDH0fctH5w\n VHTaRDRmcO7Q==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9813\"; a=\"235875832\"", "E=Sophos;i=\"5.78,363,1599548400\"; d=\"scan'208\";a=\"235875832\"", "E=Sophos;i=\"5.78,363,1599548400\"; d=\"scan'208\";a=\"534401174\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "From": "Churchill Khangar <churchill.khangar@intel.com>", "To": "dts@dpdk.org", "Cc": "cristian.dumitrescu@intel.com, venkata.suresh.kumar.p@intel.com,\n churchill.khangar@intel.com, yogesh.jangra@intel.com", "Date": "Mon, 23 Nov 2020 04:49:52 -0500", "Message-Id": "<1606124992-45581-3-git-send-email-churchill.khangar@intel.com>", "X-Mailer": "git-send-email 1.8.3.1", "In-Reply-To": "<1606124992-45581-1-git-send-email-churchill.khangar@intel.com>", "References": "<1606124992-45581-1-git-send-email-churchill.khangar@intel.com>", "Subject": "[dts] [PATCH 2/2] tests/pipeline: add table default and normal rule\n\ttests", "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 additional pipeline table test scenarios to verify the behavior of pipeline\nlibrary when table is populated with normal rules, default rule and action.\n\nSigned-off-by: Churchill Khangar <churchill.khangar@intel.com>\nTested-by: Venkata Suresh Kumar P <venkata.suresh.kumar.p@intel.com>\n---\n tests/TestSuite_pipeline.py | 215 ++++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 215 insertions(+)", "diff": "diff --git a/tests/TestSuite_pipeline.py b/tests/TestSuite_pipeline.py\nindex 9b13575..9933fd7 100644\n--- a/tests/TestSuite_pipeline.py\n+++ b/tests/TestSuite_pipeline.py\n@@ -32,6 +32,7 @@\n import utils\n import re\n import time\n+import socket\n \n from settings import HEADER_SIZE\n from test_case import TestCase\n@@ -5818,6 +5819,220 @@ class TestPipeline(TestCase):\n cmd = \"^C\"\n self.dut.send_expect(cmd, \"# \", 20)\n \n+ def test_table_002(self):\n+\n+ cli_file = '/tmp/pipeline/table_002/table_002.cli'\n+\n+ cmd = \"sed -i -e 's/0000:00:04.0/%s/' {}\".format(cli_file) % self.dut_p0_pci\n+ self.dut.send_expect(cmd, \"# \", 20)\n+ cmd = \"sed -i -e 's/0000:00:05.0/%s/' {}\".format(cli_file) % self.dut_p1_pci\n+ self.dut.send_expect(cmd, \"# \", 20)\n+ cmd = \"sed -i -e 's/0000:00:06.0/%s/' {}\".format(cli_file) % self.dut_p2_pci\n+ self.dut.send_expect(cmd, \"# \", 20)\n+ cmd = \"sed -i -e 's/0000:00:07.0/%s/' {}\".format(cli_file) % self.dut_p3_pci\n+ self.dut.send_expect(cmd, \"# \", 20)\n+\n+ DUT_PORTS = \" -w {0} -w {1} -w {2} -w {3} \"\\\n+ .format(self.dut_p0_pci, self.dut_p1_pci, self.dut_p2_pci, self.dut_p3_pci)\n+\n+ cmd = \"{0} -c 0x3 -n 4 {1} -- -s {2}\".format(self.app_pipeline_path, DUT_PORTS, cli_file)\n+ self.dut.send_expect(cmd, \"PIPELINE0 enable\", 60)\n+\n+ sleep(2)\n+\n+ # create TCP connection to the server\n+ SERVER_IP = '192.168.122.216'\n+ SERVER_PORT = 8086\n+ BUFFER_SIZE = 1024\n+\n+ try:\n+ s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n+ except socket.error as err:\n+ print(\"socket creation failed with error %s\" % (err))\n+\n+ try:\n+ s.connect((SERVER_IP, SERVER_PORT))\n+ except socket.error as err:\n+ print(\"socket connection failed with error %s\" % (err))\n+\n+ sleep(0.1)\n+ msg = s.recv(BUFFER_SIZE)\n+ response = msg.decode()\n+ # print('Rxd: ' + response)\n+ if \"pipeline>\" not in response:\n+ s.close()\n+ self.verify(0, \"CLI response error\")\n+\n+ # test empty table scenario\n+ in_pcap_file = 'pipeline/table_002/pcap_files/in_1.txt'\n+ out_pcap_file = 'pipeline/table_002/pcap_files/out_1.txt'\n+ filters = \"tcp\"\n+ sniff_pkts = self.send_and_sniff_pkts(0, 0, in_pcap_file, out_pcap_file, filters)\n+ sniff_pkts = self.send_and_sniff_pkts(1, 1, in_pcap_file, out_pcap_file, filters)\n+ sniff_pkts = self.send_and_sniff_pkts(2, 2, in_pcap_file, out_pcap_file, filters)\n+ sniff_pkts = self.send_and_sniff_pkts(3, 3, in_pcap_file, out_pcap_file, filters)\n+\n+ # test single rule scenario\n+ CMD_FILE = '/tmp/pipeline/table_002/cmd_files/cmd_2.txt'\n+ CLI_CMD = 'pipeline PIPELINE0 table table_002_table update {} none none\\n'.format(CMD_FILE)\n+ s.send(CLI_CMD.encode('utf-8'))\n+ sleep(0.1)\n+ msg = s.recv(BUFFER_SIZE)\n+ response = msg.decode()\n+ # print('Rxd: ' + response)\n+ if \"pipeline>\" not in response:\n+ s.close()\n+ self.verify(0, \"CLI response error\")\n+ filters = \"tcp\"\n+ in_pcap_file = 'pipeline/table_002/pcap_files/in_2.txt'\n+ out_pcap_file = 'pipeline/table_002/pcap_files/out_2.txt'\n+ sniff_pkts = self.send_and_sniff_pkts(0, 0, in_pcap_file, out_pcap_file, filters)\n+ sniff_pkts = self.send_and_sniff_pkts(1, 1, in_pcap_file, out_pcap_file, filters)\n+ sniff_pkts = self.send_and_sniff_pkts(2, 2, in_pcap_file, out_pcap_file, filters)\n+ sniff_pkts = self.send_and_sniff_pkts(3, 3, in_pcap_file, out_pcap_file, filters)\n+\n+ # test two rules scenario\n+ CMD_FILE = '/tmp/pipeline/table_002/cmd_files/cmd_3.txt'\n+ CLI_CMD = 'pipeline PIPELINE0 table table_002_table update {} none none\\n'.format(CMD_FILE)\n+ s.send(CLI_CMD.encode('utf-8'))\n+ sleep(0.1)\n+ msg = s.recv(BUFFER_SIZE)\n+ response = msg.decode()\n+ # print('Rxd: ' + response)\n+ if \"pipeline>\" not in response:\n+ s.close()\n+ self.verify(0, \"CLI response error\")\n+ filters = \"tcp\"\n+ in_pcap_file = 'pipeline/table_002/pcap_files/in_3.txt'\n+ out_pcap_file = 'pipeline/table_002/pcap_files/out_3.txt'\n+ sniff_pkts = self.send_and_sniff_pkts(0, 0, in_pcap_file, out_pcap_file, filters)\n+ sniff_pkts = self.send_and_sniff_pkts(1, 1, in_pcap_file, out_pcap_file, filters)\n+ sniff_pkts = self.send_and_sniff_pkts(2, 2, in_pcap_file, out_pcap_file, filters)\n+ sniff_pkts = self.send_and_sniff_pkts(3, 3, in_pcap_file, out_pcap_file, filters)\n+\n+ # delete one rule scenario\n+ CMD_FILE = '/tmp/pipeline/table_002/cmd_files/cmd_4_1.txt'\n+ CLI_CMD = 'pipeline PIPELINE0 table table_002_table update none {} none\\n'.format(CMD_FILE)\n+ s.send(CLI_CMD.encode('utf-8'))\n+ sleep(0.1)\n+ msg = s.recv(BUFFER_SIZE)\n+ response = msg.decode()\n+ # print('Rxd: ' + response)\n+ if \"pipeline>\" not in response:\n+ s.close()\n+ self.verify(0, \"CLI response error\")\n+ filters = \"tcp\"\n+ in_pcap_file = 'pipeline/table_002/pcap_files/in_4_1.txt'\n+ out_pcap_file = 'pipeline/table_002/pcap_files/out_4_1.txt'\n+ sniff_pkts = self.send_and_sniff_pkts(0, 0, in_pcap_file, out_pcap_file, filters)\n+ sniff_pkts = self.send_and_sniff_pkts(1, 1, in_pcap_file, out_pcap_file, filters)\n+ sniff_pkts = self.send_and_sniff_pkts(2, 2, in_pcap_file, out_pcap_file, filters)\n+ sniff_pkts = self.send_and_sniff_pkts(3, 3, in_pcap_file, out_pcap_file, filters)\n+\n+ # delete all rules scenario\n+ CMD_FILE = '/tmp/pipeline/table_002/cmd_files/cmd_4_2.txt'\n+ CLI_CMD = 'pipeline PIPELINE0 table table_002_table update none {} none\\n'.format(CMD_FILE)\n+ s.send(CLI_CMD.encode('utf-8'))\n+ sleep(0.1)\n+ msg = s.recv(BUFFER_SIZE)\n+ response = msg.decode()\n+ # print('Rxd: ' + response)\n+ if \"pipeline>\" not in response:\n+ s.close()\n+ self.verify(0, \"CLI response error\")\n+ filters = \"tcp\"\n+ in_pcap_file = 'pipeline/table_002/pcap_files/in_4_2.txt'\n+ out_pcap_file = 'pipeline/table_002/pcap_files/out_4_2.txt'\n+ sniff_pkts = self.send_and_sniff_pkts(0, 0, in_pcap_file, out_pcap_file, filters)\n+ sniff_pkts = self.send_and_sniff_pkts(1, 1, in_pcap_file, out_pcap_file, filters)\n+ sniff_pkts = self.send_and_sniff_pkts(2, 2, in_pcap_file, out_pcap_file, filters)\n+ sniff_pkts = self.send_and_sniff_pkts(3, 3, in_pcap_file, out_pcap_file, filters)\n+\n+ # action update scenario (restore one of the previously deleted rules and check the update)\n+ CMD_FILE = '/tmp/pipeline/table_002/cmd_files/cmd_5_1.txt'\n+ CLI_CMD = 'pipeline PIPELINE0 table table_002_table update {} none none\\n'.format(CMD_FILE)\n+ s.send(CLI_CMD.encode('utf-8'))\n+ sleep(0.1)\n+ msg = s.recv(BUFFER_SIZE)\n+ response = msg.decode()\n+ print('Rxd: ' + response)\n+ if \"pipeline>\" not in response:\n+ s.close()\n+ self.verify(0, \"CLI response error\")\n+ filters = \"tcp\"\n+ in_pcap_file = 'pipeline/table_002/pcap_files/in_5_1.txt'\n+ out_pcap_file = 'pipeline/table_002/pcap_files/out_5_1.txt'\n+ sniff_pkts = self.send_and_sniff_pkts(0, 0, in_pcap_file, out_pcap_file, filters)\n+\n+ # action update scenario (change the action of restored rule and check the update)\n+ CMD_FILE = '/tmp/pipeline/table_002/cmd_files/cmd_5_2.txt'\n+ CLI_CMD = 'pipeline PIPELINE0 table table_002_table update {} none none\\n'.format(CMD_FILE)\n+ s.send(CLI_CMD.encode('utf-8'))\n+ sleep(0.1)\n+ msg = s.recv(BUFFER_SIZE)\n+ response = msg.decode()\n+ print('Rxd: ' + response)\n+ if \"pipeline>\" not in response:\n+ s.close()\n+ self.verify(0, \"CLI response error\")\n+ filters = \"tcp\"\n+ in_pcap_file = 'pipeline/table_002/pcap_files/in_5_1.txt'\n+ out_pcap_file = 'pipeline/table_002/pcap_files/out_5_1.txt'\n+ sniff_pkts = self.send_and_sniff_pkts(0, 1, in_pcap_file, out_pcap_file, filters)\n+ sniff_pkts = self.send_and_sniff_pkts(1, 0, in_pcap_file, out_pcap_file, filters)\n+ sniff_pkts = self.send_and_sniff_pkts(2, 3, in_pcap_file, out_pcap_file, filters)\n+ sniff_pkts = self.send_and_sniff_pkts(3, 2, in_pcap_file, out_pcap_file, filters)\n+\n+ # deafult action scenario [empty table]\n+ '''\n+ Empty table => Lookup MISS with default action executed\n+ '''\n+ CMD_FILE = '/tmp/pipeline/table_002/cmd_files/cmd_6_1.txt' # delete the previously added rule\n+ CLI_CMD = 'pipeline PIPELINE0 table table_002_table update none {} none\\n'.format(CMD_FILE)\n+ s.send(CLI_CMD.encode('utf-8'))\n+ sleep(0.1)\n+ msg = s.recv(BUFFER_SIZE)\n+ response = msg.decode()\n+ print('Rxd: ' + response)\n+ if \"pipeline>\" not in response:\n+ s.close()\n+ self.verify(0, \"CLI response error\")\n+ filters = \"tcp\"\n+ in_pcap_file = 'pipeline/table_002/pcap_files/in_6_1.txt'\n+ out_pcap_file = 'pipeline/table_002/pcap_files/out_6_1.txt'\n+ sniff_pkts = self.send_and_sniff_pkts(0, 0, in_pcap_file, out_pcap_file, filters)\n+ sniff_pkts = self.send_and_sniff_pkts(1, 1, in_pcap_file, out_pcap_file, filters)\n+ sniff_pkts = self.send_and_sniff_pkts(2, 2, in_pcap_file, out_pcap_file, filters)\n+ sniff_pkts = self.send_and_sniff_pkts(3, 3, in_pcap_file, out_pcap_file, filters)\n+\n+ # deafult action scenario [table with one rule]\n+ '''\n+ Add key A => Lookup HIT for the right packet with the specific key associated action executed\n+ Lookup MISS for any other packets with default action executed\n+ '''\n+ CMD_FILE = '/tmp/pipeline/table_002/cmd_files/cmd_6_2.txt' # add a new rule\n+ CLI_CMD = 'pipeline PIPELINE0 table table_002_table update {} none none\\n'.format(CMD_FILE)\n+ s.send(CLI_CMD.encode('utf-8'))\n+ sleep(0.1)\n+ msg = s.recv(BUFFER_SIZE)\n+ response = msg.decode()\n+ print('Rxd: ' + response)\n+ if \"pipeline>\" not in response:\n+ s.close()\n+ self.verify(0, \"CLI response error\")\n+ filters = \"tcp\"\n+ in_pcap_file = 'pipeline/table_002/pcap_files/in_6_2.txt'\n+ out_pcap_file = 'pipeline/table_002/pcap_files/out_6_2.txt'\n+ sniff_pkts = self.send_and_sniff_pkts(0, 0, in_pcap_file, out_pcap_file, filters)\n+ sniff_pkts = self.send_and_sniff_pkts(1, 1, in_pcap_file, out_pcap_file, filters)\n+ sniff_pkts = self.send_and_sniff_pkts(2, 2, in_pcap_file, out_pcap_file, filters)\n+ sniff_pkts = self.send_and_sniff_pkts(3, 3, in_pcap_file, out_pcap_file, filters)\n+\n+ s.close()\n+ sleep(1)\n+ cmd = \"^C\"\n+ self.dut.send_expect(cmd, \"# \", 20)\n+\n def tear_down(self):\n \"\"\"\n Run after each test case.\n", "prefixes": [ "2/2" ] }{ "id": 84464, "url": "