get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 94208,
    "url": "https://patches.dpdk.org/api/patches/94208/?format=api",
    "web_url": "https://patches.dpdk.org/project/dts/patch/20210615104613.14658-1-junx.dong@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": "<20210615104613.14658-1-junx.dong@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dts/20210615104613.14658-1-junx.dong@intel.com",
    "date": "2021-06-15T10:46:08",
    "name": "[V1,1/6] dts/*: remove fm10k related modules and patch",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "3955a407acea1af4cfdd4b6558016c5e63c3eb9c",
    "submitter": {
        "id": 2237,
        "url": "https://patches.dpdk.org/api/people/2237/?format=api",
        "name": "Jun Dong",
        "email": "junx.dong@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dts/patch/20210615104613.14658-1-junx.dong@intel.com/mbox/",
    "series": [
        {
            "id": 17333,
            "url": "https://patches.dpdk.org/api/series/17333/?format=api",
            "web_url": "https://patches.dpdk.org/project/dts/list/?series=17333",
            "date": "2021-06-15T10:46:08",
            "name": "[V1,1/6] dts/*: remove fm10k related modules and patch",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/17333/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/94208/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/94208/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 7CA1DA0C47;\n\tTue, 15 Jun 2021 12:46:28 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 6E6544067A;\n\tTue, 15 Jun 2021 12:46:28 +0200 (CEST)",
            "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n by mails.dpdk.org (Postfix) with ESMTP id E99A440140\n for <dts@dpdk.org>; Tue, 15 Jun 2021 12:46:25 +0200 (CEST)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 15 Jun 2021 03:46:24 -0700",
            "from unknown (HELO localhost.localdomain.sh.intel.com)\n ([10.240.182.57])\n by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 15 Jun 2021 03:46:22 -0700"
        ],
        "IronPort-SDR": [
            "\n KHkn+hrRnUHEkqHo2ujEmV0hUf7NZ4Ez4AffFtvug9T2BOF3QvsYG1+X2a6eTYpWo692l8qYdB\n rd+/gjL1vQsw==",
            "\n jVTctqBBnobSWEEo434v4K54v/HMtedxzjpfK+30pH8SuT8vTvGKGhQU/a54BCVpFzyPoQMCtw\n rLUB+5meLeXQ=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10015\"; a=\"291598475\"",
            "E=Sophos;i=\"5.83,275,1616482800\"; d=\"scan'208\";a=\"291598475\"",
            "E=Sophos;i=\"5.83,275,1616482800\"; d=\"scan'208\";a=\"484428172\""
        ],
        "From": "Jun Dong <junx.dong@intel.com>",
        "To": "junx.dong@intel.com",
        "Cc": "dts@dpdk.org",
        "Date": "Tue, 15 Jun 2021 18:46:08 +0800",
        "Message-Id": "<20210615104613.14658-1-junx.dong@intel.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dts] [PATCH V1 1/6] dts/*: remove fm10k related modules and patch",
        "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": "1. remove dep/fm10k-add-a-unit-test-for-FTAG-based-forwarding patch. \n2. remove nics/atwood module. \n3. remove nics/br module. \n4. remove nics/rrc module. \n5. remove tests/TestSuite_fm10k_perf test suite.\n\nSigned-off-by: Jun Dong <junx.dong@intel.com>\n---\n ...-unit-test-for-FTAG-based-forwarding.patch | 287 --------\n nics/atwood.py                                | 173 -----\n nics/br.py                                    | 275 --------\n nics/rrc.py                                   | 272 --------\n tests/TestSuite_fm10k_perf.py                 | 617 ------------------\n 5 files changed, 1624 deletions(-)\n delete mode 100644 dep/fm10k-add-a-unit-test-for-FTAG-based-forwarding.patch\n delete mode 100644 nics/atwood.py\n delete mode 100644 nics/br.py\n delete mode 100644 nics/rrc.py\n delete mode 100644 tests/TestSuite_fm10k_perf.py",
    "diff": "diff --git a/dep/fm10k-add-a-unit-test-for-FTAG-based-forwarding.patch b/dep/fm10k-add-a-unit-test-for-FTAG-based-forwarding.patch\ndeleted file mode 100644\nindex b756b511..00000000\n--- a/dep/fm10k-add-a-unit-test-for-FTAG-based-forwarding.patch\n+++ /dev/null\n@@ -1,287 +0,0 @@\n-From 0882390c731f8d39f81e52b0669651f5484683eb Mon Sep 17 00:00:00 2001\n-From: Wang Xiao <xiao.w.wang@intel.com>\n-Date: Wed, 10 Aug 2016 11:26:23 +0800\n-Subject: [PATCH] fm10k: add a unit test for FTAG based forwarding\n-\n-This patch adds a unit test case for FTAG functional test. Before running\n-the test, set PORT0_GLORT and PORT1_GLORT environment variables, and ensure\n-two fm10k ports are used for dpdk, glort info for each port can be shown in\n-TestPoint. In the unit test, a packet will be forwarded to the target port\n-by the switch without changing the destination mac address.\n-\n-diff --git a/app/test/test_fm10k_ftag.c b/app/test/test_fm10k_ftag.c\n-new file mode 100644\n-index 0000000..c75a7b1\n---- /dev/null\n-+++ b/app/test/test_fm10k_ftag.c\n-@@ -0,0 +1,267 @@\n-+/*-\n-+ *   BSD LICENSE\n-+ *\n-+ *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.\n-+ *   All rights reserved.\n-+ *\n-+ *   Redistribution and use in source and binary forms, with or without\n-+ *   modification, are permitted provided that the following conditions\n-+ *   are met:\n-+ *\n-+ *     * Redistributions of source code must retain the above copyright\n-+ *       notice, this list of conditions and the following disclaimer.\n-+ *     * Redistributions in binary form must reproduce the above copyright\n-+ *       notice, this list of conditions and the following disclaimer in\n-+ *       the documentation and/or other materials provided with the\n-+ *       distribution.\n-+ *     * Neither the name of Intel Corporation nor the names of its\n-+ *       contributors may be used to endorse or promote products derived\n-+ *       from this software without specific prior written permission.\n-+ *\n-+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n-+ *   \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n-+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n-+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n-+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n-+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n-+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n-+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n-+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n-+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n-+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n-+ */\n-+\n-+#include <stdint.h>\n-+#include <inttypes.h>\n-+#include <rte_eal.h>\n-+#include <rte_ethdev.h>\n-+#include <rte_cycles.h>\n-+#include <rte_lcore.h>\n-+#include <rte_mbuf.h>\n-+#include \"test.h\"\n-+\n-+#define RX_RING_SIZE 128\n-+#define TX_RING_SIZE 512\n-+\n-+#define NUM_MBUFS 8191\n-+#define MBUF_CACHE_SIZE 250\n-+#define BURST_SIZE 32\n-+\n-+struct fm10k_ftag {\n-+\tuint16_t swpri_type_user;\n-+\tuint16_t vlan;\n-+\tuint16_t sglort;\n-+\tuint16_t dglort;\n-+};\n-+\n-+static const struct rte_eth_conf port_conf_default = {\n-+\t.rxmode = { .max_rx_pkt_len = ETHER_MAX_LEN }\n-+};\n-+\n-+/*\n-+ * Initializes a given port using global settings and with the RX buffers\n-+ * coming from the mbuf_pool passed as a parameter.\n-+ */\n-+static inline int\n-+port_init(uint8_t port, struct rte_mempool *mbuf_pool)\n-+{\n-+\tstruct rte_eth_conf port_conf = port_conf_default;\n-+\tconst uint16_t rx_rings = 1, tx_rings = 1;\n-+\tint retval;\n-+\tuint16_t q;\n-+\tstruct ether_addr addr;\n-+\n-+\tif (port >= rte_eth_dev_count())\n-+\t\treturn -1;\n-+\n-+\t/* Configure the Ethernet device. */\n-+\tretval = rte_eth_dev_configure(port, rx_rings, tx_rings, &port_conf);\n-+\tif (retval != 0)\n-+\t\treturn retval;\n-+\n-+\t/* Allocate and set up 1 RX queue per Ethernet port. */\n-+\tfor (q = 0; q < rx_rings; q++) {\n-+\t\tretval = rte_eth_rx_queue_setup(port, q, RX_RING_SIZE,\n-+\t\t\t\trte_eth_dev_socket_id(port), NULL, mbuf_pool);\n-+\t\tif (retval < 0)\n-+\t\t\treturn retval;\n-+\t}\n-+\n-+\t/* Allocate and set up 1 TX queue per Ethernet port. */\n-+\tfor (q = 0; q < tx_rings; q++) {\n-+\t\tretval = rte_eth_tx_queue_setup(port, q, TX_RING_SIZE,\n-+\t\t\t\trte_eth_dev_socket_id(port), NULL);\n-+\t\tif (retval < 0)\n-+\t\t\treturn retval;\n-+\t}\n-+\n-+\t/* Start the Ethernet port. */\n-+\tretval = rte_eth_dev_start(port);\n-+\tif (retval < 0)\n-+\t\treturn retval;\n-+\n-+\t/* Display the port MAC address. */\n-+\trte_eth_macaddr_get(port, &addr);\n-+\tprintf(\"Port %u MAC: %02\" PRIx8 \" %02\" PRIx8 \" %02\" PRIx8\n-+\t\t\t   \" %02\" PRIx8 \" %02\" PRIx8 \" %02\" PRIx8 \"\\n\",\n-+\t\t\t(unsigned)port,\n-+\t\t\taddr.addr_bytes[0], addr.addr_bytes[1],\n-+\t\t\taddr.addr_bytes[2], addr.addr_bytes[3],\n-+\t\t\taddr.addr_bytes[4], addr.addr_bytes[5]);\n-+\n-+\treturn 0;\n-+}\n-+\n-+static int set_glort_value(const char *str, uint16_t *glort)\n-+{\n-+\tconst char *glort_str;\n-+\tchar *end = NULL;\n-+\n-+\tglort_str = getenv(str);\n-+\tif (glort_str == NULL) {\n-+\t\tprintf(\"Please set environment value %s first\\n\", str);\n-+\t\treturn -1;\n-+\t}\n-+\t*glort = (uint16_t)strtoul(glort_str, &end, 16);\n-+\tif ((glort_str[0] == '\\0') || (end == NULL) || (*end != '\\0')) {\n-+\t\tprintf(\"Glort value is not valid\\n\");\n-+\t\treturn -1;\n-+\t}\n-+\treturn 0;\n-+}\n-+\n-+static int test_ftag_rxtx(void)\n-+{\n-+\tuint8_t port = 0;\n-+\tuint16_t glort[2];\n-+\n-+\tstruct rte_mbuf *bufs[BURST_SIZE];\n-+\tuint16_t nb_rx, nb_tx, i;\n-+\tstruct fm10k_ftag *ftag_addr;\n-+\tint ret = 0;\n-+\n-+\t/* Get the glort value of the two ports */\n-+\tif ((set_glort_value(\"PORT0_GLORT\", &glort[0]) < 0) ||\n-+\t\t\t(set_glort_value(\"PORT1_GLORT\", &glort[1]) < 0))\n-+\t\treturn -1;\n-+\n-+\t/* Receive packets coming from EPL on any of the two ports */\n-+\tprintf(\"Please send some packets from Ethernet port to one PEP\\n\");\n-+\tdo {\n-+\t\tport ^= 1;\n-+\t\tnb_rx = rte_eth_rx_burst(port, 0, bufs, BURST_SIZE);\n-+\t} while (nb_rx <= 0);\n-+\tprintf(\"Receive %d packets on port %d\\n\", nb_rx, port);\n-+\n-+\t/* Check sglort value on mbuf->vlan_tci_outer. */\n-+\tfor (i = 0; i < nb_rx; i++) {\n-+\t\tif (bufs[i]->vlan_tci_outer == 0) {\n-+\t\t\tprintf(\"Find a packet with sglort 0\\n\");\n-+\t\t\treturn -1;\n-+\t\t}\n-+\t}\n-+\tprintf(\"test for FTAG RX passed\\n\");\n-+\n-+\t/* Put an FTAG header on each of the packets received and set FTAG\n-+\t * TX flag\n-+\t **/\n-+\tfor (i = 0; i < nb_rx; i++) {\n-+\t\tftag_addr = (struct fm10k_ftag *)rte_pktmbuf_prepend(bufs[i],\n-+\t\t\t\t\t\tsizeof(struct fm10k_ftag));\n-+\t\tftag_addr->swpri_type_user = 0;\n-+\t\tftag_addr->vlan = 0;\n-+\t\tftag_addr->dglort = rte_cpu_to_be_16(glort[port ^ 1]);\n-+\t\tftag_addr->sglort = rte_cpu_to_be_16(glort[port]);\n-+\t\tbufs[i]->timesync = 1;\n-+\t}\n-+\n-+\t/* Send packets to the other port by method of FTAG based forwarding */\n-+\tnb_tx = rte_eth_tx_burst(port, 0, bufs, nb_rx);\n-+\tif (nb_tx <= 0) {\n-+\t\tprintf(\"Can not send out packets with FTAG\\n\");\n-+\t\treturn -1;\n-+\t}\n-+\tif (unlikely(nb_tx < nb_rx)) {\n-+\t\tdo {\n-+\t\t\trte_pktmbuf_free(bufs[nb_tx]);\n-+\t\t} while (++nb_tx < nb_rx);\n-+\t}\n-+\tprintf(\"Send out %d packets with FTAG on port %d\\n\", nb_tx, port);\n-+\n-+\t/* Wait enough time for a burst of packets forwarding */\n-+\trte_delay_us(100);\n-+\n-+\tnb_rx = rte_eth_rx_burst(port ^ 1, 0, bufs, BURST_SIZE);\n-+\tprintf(\"Receive %d packets on port %d\\n\", nb_rx, port ^ 1);\n-+\tif (nb_rx < nb_tx) {\n-+\t\tprintf(\"Packet loss happens in FTAG TX test\\n\");\n-+\t\tret = -1;\n-+\t}\n-+\n-+\t/* check if the sglort value is right on the other port */\n-+\tfor (i = 0; i < nb_rx; i++)\t{\n-+\t\tif (bufs[i]->vlan_tci_outer != glort[port]) {\n-+\t\t\tprintf(\"sglort of the received packet is not right\\n\");\n-+\t\t\tret = -1;\n-+\t\t\tbreak;\n-+\t\t}\n-+\t}\n-+\tfor (i = 0; i < nb_rx; i++)\n-+\t\trte_pktmbuf_free(bufs[i]);\n-+\n-+\tif (!ret)\n-+\t\tprintf(\"test for FTAG TX passed\\n\");\n-+\treturn ret;\n-+}\n-+\n-+static int\n-+test_fm10k_ftag(void)\n-+{\n-+\tuint16_t nb_ports;\n-+\tuint16_t portid, pid;\n-+\tstruct rte_mempool *mbuf_pool;\n-+\tint ret = 0;\n-+\n-+\tprintf(\"Dump the devices args\\n\");\n-+\trte_eal_devargs_dump(stdout);\n-+\n-+\tnb_ports = rte_eth_dev_count();\n-+\tif (nb_ports != 2) {\n-+\t\tprintf(\"2 ports needed for fm10k ftag based forwarding test\\n\");\n-+\t\treturn -1;\n-+\t}\n-+\n-+\t/* Creates a new mempool in memory to hold the mbufs. */\n-+\tmbuf_pool = rte_mempool_lookup(\"MBUF_POOL_FTAG\");\n-+\tif (mbuf_pool == NULL)\n-+\t\tmbuf_pool = rte_pktmbuf_pool_create(\"MBUF_POOL_FTAG\",\n-+\t\t\tNUM_MBUFS * nb_ports, MBUF_CACHE_SIZE, 0,\n-+\t\t\tRTE_MBUF_DEFAULT_BUF_SIZE, rte_socket_id());\n-+\n-+\tif (mbuf_pool == NULL)\n-+\t\trte_exit(EXIT_FAILURE, \"Cannot create mbuf pool\\n\");\n-+\n-+\t/* Initialize all ports. */\n-+\tfor (portid = 0; portid < nb_ports; portid++)\n-+\t\tif (port_init(portid, mbuf_pool) != 0) {\n-+\t\t\tfor (pid = 0; pid < portid; pid++) {\n-+\t\t\t\trte_eth_dev_stop(portid);\n-+\t\t\t\t//rte_eth_dev_close(portid);\n-+\t\t\t}\n-+\t\t\trte_exit(EXIT_FAILURE, \"Cannot init port %\"PRIu8 \"\\n\",\n-+\t\t\t\t\tportid);\n-+\t\t}\n-+\n-+\tif (test_ftag_rxtx() < 0)\n-+\t\tret = -1;\n-+\n-+\t/* port tear down */\n-+\tfor (portid = 0; portid < nb_ports; portid++) {\n-+\t\trte_eth_dev_stop(portid);\n-+\t\t//rte_eth_dev_close(portid);\n-+\t}\n-+\n-+\treturn ret;\n-+}\n-+\n-+REGISTER_TEST_COMMAND(fm10k_ftag_autotest, test_fm10k_ftag);\n--- \n-1.9.3\n-\ndiff --git a/nics/atwood.py b/nics/atwood.py\ndeleted file mode 100644\nindex cf7a551b..00000000\n--- a/nics/atwood.py\n+++ /dev/null\n@@ -1,173 +0,0 @@\n-# BSD LICENSE\n-#\n-# Copyright(c) 2010-2016 Intel Corporation. All rights reserved.\n-# All rights reserved.\n-#\n-# Redistribution and use in source and binary forms, with or without\n-# modification, are permitted provided that the following conditions\n-# are met:\n-#\n-#   * Redistributions of source code must retain the above copyright\n-#     notice, this list of conditions and the following disclaimer.\n-#   * Redistributions in binary form must reproduce the above copyright\n-#     notice, this list of conditions and the following disclaimer in\n-#     the documentation and/or other materials provided with the\n-#     distribution.\n-#   * Neither the name of Intel Corporation nor the names of its\n-#     contributors may be used to endorse or promote products derived\n-#     from this software without specific prior written permission.\n-#\n-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n-# \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n-\n-from crb import Crb\n-from config import PortConf, PORTCONF\n-from exception import PortConfigParseException\n-from utils import GREEN\n-from net_device import NetDevice\n-from dts import drivername\n-\n-TP_BINARY = 'TestPoint'\n-\n-FUNC_RULES = [\n-            # disable cut through for jumbo frame case\n-            'set port config 1,2 tx_cut_through off',\n-            # disable mac learning\n-            'set port config 0..2 learning off',\n-            #redirect PEP0 to EPL0\n-            'create acl 0',\n-            'create acl-rule 0 0',\n-            'add acl-rule condition 0 0 src-port 0',\n-            'add acl-rule action 0 0 redirect 1',\n-            'add acl-rule action 0 0 count',\n-            'apply acl',\n-           ]\n-\n-PERF_RULES = [\n-             'set port config 0..1 parser_cfg L4', # frame parser up to L4\n-             # good for performance\n-             'set api attribute boolean api.paritySweeper.enable false',\n-             'reg dbg set 0 CM_SOFTDROP_WM 0x5f005f00 0 0',\n-             'reg dbg set 0 CM_SHARED_WM 0x5f00 0 0',\n-           ]\n-\n-class CtrlCrb(Crb):\n-    \"\"\"\n-    Simplified Crb class for  RedRockCanyou control session\n-    \"\"\"\n-\n-    def __init__(self, crb):\n-        self.crb = crb\n-        self.NAME = 'dut_atwood_control'\n-        super(CtrlCrb, self).__init__(crb, None, self.NAME)\n-\n-    def get_ip_address(self):\n-        return self.crb['IP']\n-\n-    def get_password(self):\n-        return self.crb['pass']\n-\n-\n-class Atwood(NetDevice):\n-    \"\"\"\n-    Class for RedRockCanyou, inherit from NetDevice class\n-    \"\"\"\n-\n-    def __init__(self, host, domain_id, bus_id, devfun_id):\n-        super(Atwood, self).__init__(host, domain_id, bus_id, devfun_id)\n-        self.tp_path = \"~\"\n-        self.host = host\n-\n-        # load port config\n-        portconf = PortConf(PORTCONF)\n-        portconf.load_ports_config(host.crb['IP'])\n-        pci_addr = ':'.join((domain_id, bus_id, devfun_id))\n-        if not portconf.check_port_available(pci_addr):\n-            raise PortConfigParseException(\"Atwood must configured\")\n-\n-        port_cfg = portconf.get_ports_config()[pci_addr]\n-\n-        if 'tp_ip' not in list(port_cfg.keys()):\n-            raise PortConfigParseException(\"Atwood must configure test point ip\")\n-        if 'passwd' not in list(port_cfg.keys()):\n-            raise PortConfigParseException(\"Atwood must configure host password\")\n-\n-        crb = {}\n-        crb['IP'] = port_cfg['tp_ip']\n-        crb['pass'] = port_cfg['passwd']\n-\n-        if 'tp_path' in list(port_cfg.keys()):\n-            self.tp_path = port_cfg['tp_path']\n-\n-        # create additional session\n-        self.ctrl_crb = CtrlCrb(crb)\n-\n-    def setup(self):\n-        # setup function should be called after bind to igb_uio\n-        self.bind_driver(driver=drivername)\n-        self.start_testpoint()\n-\n-    def optimize_perf(self, peer=\"\"):\n-        pass\n-\n-    def stop(self):\n-        # stop testpoint\n-        self.stop_testpoint()\n-\n-    def close(self):\n-        # close session\n-        if self.ctrl_crb.session:\n-            self.ctrl_crb.session.close()\n-            self.ctrl_crb.session = None\n-        if self.ctrl_crb.alt_session:\n-            self.ctrl_crb.alt_session.close()\n-            self.ctrl_crb.alt_session = None\n-\n-    def start_testpoint(self):\n-        \"\"\"\n-        Before any execution, must enable test point first\n-        \"\"\"\n-        self.ctrl_crb.send_expect(\"cd %s\" % self.tp_path, \"# \")\n-        if self.tp_path != \"~\":\n-            command = './' + TP_BINARY\n-        else:\n-            command = TP_BINARY\n-\n-        self.ctrl_crb.send_expect(\"%s\" % command, \"<0>%\", 120)\n-        for rule in FUNC_RULES:\n-            self.ctrl_crb.send_expect(\"%s\" %rule, \"<0>%\")\n-\n-    def stop_testpoint(self):\n-        \"\"\"\n-        Exit test point\n-        \"\"\"\n-        self.ctrl_crb.send_expect(\"quit\", \"# \")\n-\n-    def get_control(self):\n-        return self.ctrl_crb\n-\n-    def add_vlan(self, vlan_id=0):\n-        self.ctrl_crb.send_expect(\"create vlan %d\" % vlan_id, \"<0>%\")\n-        self.ctrl_crb.send_expect(\"add vlan port %d 0,1\" % vlan_id, \"<0>%\")\n-    \n-    def delete_vlan(self, vlan_id=0):\n-        self.ctrl_crb.send_expect(\"del vlan port %d 0,1\" % vlan_id, \"<0>%\")\n-        self.ctrl_crb.send_expect(\"del vlan %d\" % vlan_id, \"<0>%\")\n-\n-    def add_txvlan(self, vlan_id=0):\n-        self.ctrl_crb.send_expect(\"set vlan tagging %d 1 tag\" % vlan_id, \"<0>%\")\n-\n-    def delete_txvlan(self, vlan_id=0):\n-        self.ctrl_crb.send_expect(\"set vlan tagging %d 1 untag\" % vlan_id, \"<0>%\")\n-\n-    def enable_jumbo(self, framesize=0):\n-        self.ctrl_crb.send_expect(\"set port config 1 max_frame_size %d\" % framesize, \"<0>%\")\ndiff --git a/nics/br.py b/nics/br.py\ndeleted file mode 100644\nindex 88125e54..00000000\n--- a/nics/br.py\n+++ /dev/null\n@@ -1,275 +0,0 @@\n-# BSD LICENSE\n-#\n-# Copyright(c) 2010-2016 Intel Corporation. All rights reserved.\n-# All rights reserved.\n-#\n-# Redistribution and use in source and binary forms, with or without\n-# modification, are permitted provided that the following conditions\n-# are met:\n-#\n-#   * Redistributions of source code must retain the above copyright\n-#     notice, this list of conditions and the following disclaimer.\n-#   * Redistributions in binary form must reproduce the above copyright\n-#     notice, this list of conditions and the following disclaimer in\n-#     the documentation and/or other materials provided with the\n-#     distribution.\n-#   * Neither the name of Intel Corporation nor the names of its\n-#     contributors may be used to endorse or promote products derived\n-#     from this software without specific prior written permission.\n-#\n-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n-# \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n-\n-import re\n-from crb import Crb\n-from config import PortConf, PORTCONF\n-from exception import PortConfigParseException\n-from utils import GREEN\n-from net_device import NetDevice\n-from dts import drivername\n-\n-TP_BINARY = 'TestPoint'\n-\n-FUNC_RULES = [\n-            # disable cut through for jumbo frame case\n-            'set port config 0,11 tx_cut_through off',\n-            # disable mac learning\n-            'set port config 0..11 learning off',\n-            #redirect PEP0 to EPL0\n-            'create acl 0',\n-            'create acl-rule 0 0',\n-            'add acl-rule condition 0 0 src-port 0',\n-            'add acl-rule action 0 0 redirect 1',\n-            'add acl-rule action 0 0 count',\n-            #redirect PEP1 to EPL1\n-            'create acl 1',\n-            'create acl-rule 1 0',\n-            'add acl-rule condition 1 0 src-port 11',\n-            'add acl-rule action 1 0 redirect 5',\n-            'add acl-rule action 1 0 count',\n-            'apply acl',\n-           ]\n-\n-PERF_RULES = [\n-             'set port config 0..11 parser_cfg L4', # frame parser up to L4\n-             # good for performance\n-             'set api attribute boolean api.paritySweeper.enable false',\n-             'reg dbg set 0 CM_SOFTDROP_WM 0x5f005f00 0 0',\n-             'reg dbg set 0 CM_SHARED_WM 0x5f00 0 0',\n-             #redirect EPL0 to PEP0\n-             'create acl-rule 0 1',\n-             'add acl-rule condition 0 1 src-port 1',\n-             'add acl-rule action 0 1 redirect 0',\n-             'add acl-rule action 0 1 count',\n-             'create acl-rule 1 1',\n-             'add acl-rule condition 1 1 src-port 5',\n-             'add acl-rule action 1 1 redirect 11',\n-             'add acl-rule action 1 1 count',\n-             'apply acl',\n-           ]\n-\n-class CtrlCrb(Crb):\n-    \"\"\"\n-    Simplified Crb class for Boulder_rapid control session\n-    \"\"\"\n-\n-    def __init__(self, crb):\n-        self.crb = crb\n-        self.NAME = 'dut_boulderapid_control'\n-        super(CtrlCrb, self).__init__(crb, None, self.NAME)\n-\n-    def get_ip_address(self):\n-        return self.crb['IP']\n-\n-    def get_password(self):\n-        return self.crb['pass']\n-\n-\n-class BoulderRapid(NetDevice):\n-    \"\"\"\n-    Class for BoulderRapid, inherit from NetDevice class\n-    \"\"\"\n-\n-    def __init__(self, host, domain_id, bus_id, devfun_id):\n-        super(BoulderRapid, self).__init__(host, domain_id, bus_id, devfun_id)\n-\n-        self.tp_path = \"~\"\n-        self.sec_port = False\n-        self.host = host\n-\n-        # load port config\n-        portconf = PortConf(PORTCONF)\n-        portconf.load_ports_config(host.crb['IP'])\n-        pci_addr = ':'.join((domain_id, bus_id, devfun_id))\n-        if not portconf.check_port_available(pci_addr):\n-            raise PortConfigParseException(\"BoulderRapid must configured\")\n-\n-        port_cfg = portconf.get_ports_config()[pci_addr]\n-\n-        # secondary port do not need reinitialize\n-        if 'sec_port' in list(port_cfg.keys()):\n-            print(GREEN(\"Skip init second port test point session\"))\n-            if 'first_port' not in list(port_cfg.keys()):\n-                raise PortConfigParseException(\"BoulderRapid second port must configure first port\")\n-            # find net_device by pci_addr\n-            first_addr = port_cfg['first_port']\n-            port_info = self.host.get_port_info(first_addr)\n-            if port_info is None:\n-                raise PortConfigParseException(\"BoulderRapid first port not found\")\n-            # get additional session\n-            netdev = port_info['port']\n-            self.ctrl_crb = netdev.get_control()\n-            self.sec_port = True\n-            return\n-\n-\n-        if 'tp_ip' not in list(port_cfg.keys()):\n-            raise PortConfigParseException(\"BoulderRapid must configure test point ip\")\n-        if 'passwd' not in list(port_cfg.keys()):\n-            raise PortConfigParseException(\"BoulderRapid must configure host password\")\n-\n-        crb = {}\n-        crb['IP'] = port_cfg['tp_ip']\n-        crb['pass'] = port_cfg['passwd']\n-\n-        if 'tp_path' in list(port_cfg.keys()):\n-            self.tp_path = port_cfg['tp_path']\n-\n-        # create additional session\n-        self.ctrl_crb = CtrlCrb(crb)\n-\n-    def setup(self):\n-        # setup function called after bind to igb_uio\n-        self.start_testpoint()\n-\n-    def optimize_perf(self, peer0=\"\", peer1=\"\"):\n-        # rule which can optimize performance\n-        if self.sec_port is False:\n-            # applied rules\n-            for rule in PERF_RULES:\n-                self.ctrl_crb.send_expect(\"%s\" %rule, \"<0>%\")\n-            # add default mac rule\n-            self.ctrl_crb.send_expect(\"add mac %s 1 locked port 1\" % peer1, \"<0>%\")\n-            self.ctrl_crb.send_expect(\"add mac %s 1 locked port 5\" % peer0, \"<0>%\")\n-\n-    def stop(self):\n-        # second port do not need any operation\n-        if self.sec_port:\n-            return\n-\n-        # stop testpoint\n-        self.stop_testpoint()\n-\n-    def close(self):\n-        # second port do not need any operation\n-        if self.sec_port:\n-            return\n-\n-        # close session\n-        if self.ctrl_crb.session:\n-            self.ctrl_crb.session.close()\n-            self.ctrl_crb.session = None\n-        if self.ctrl_crb.alt_session:\n-            self.ctrl_crb.alt_session.close()\n-            self.ctrl_crb.alt_session = None\n-\n-    def start_testpoint(self):\n-        \"\"\"\n-        Before any execution, must enable test point first\n-        \"\"\"\n-        if self.sec_port:\n-            print(GREEN(\"Skip start second port testpoint\"))\n-            return\n-\n-        self.ctrl_crb.send_expect(\"cd %s\" % self.tp_path, \"# \")\n-        if self.tp_path != \"~\":\n-            command = './' + TP_BINARY\n-        else:\n-            command = TP_BINARY\n-\n-        # special commands for tp 4.1.6\n-        command += \" --api.platform.config.switch.0.uioDevName:text:/dev/uio0\"\n-        command += \" --api.platform.pktInterface:text:pti\"\n-\n-        self.ctrl_crb.send_expect(\"%s\" % command, \"<0>%\", 120)\n-        for rule in FUNC_RULES:\n-            self.ctrl_crb.send_expect(\"%s\" %rule, \"<0>%\")\n-\n-    def stop_testpoint(self):\n-        \"\"\"\n-        Exit test point\n-        \"\"\"\n-        self.ctrl_crb.send_expect(\"quit\", \"# \")\n-\n-    def get_control(self):\n-        return self.ctrl_crb\n-\n-    def add_vlan(self, vlan_id=0):\n-        self.ctrl_crb.send_expect(\"create vlan %d\" % vlan_id, \"<0>%\")\n-        if self.sec_port:\n-            self.ctrl_crb.send_expect(\"add vlan port %d 1,0\" % vlan_id, \"<0>%\")\n-        else:\n-            self.ctrl_crb.send_expect(\"add vlan port %d 5,11\" % vlan_id, \"<0>%\")\n-    \n-    def delete_vlan(self, vlan_id=0):\n-        if self.sec_port:\n-            self.ctrl_crb.send_expect(\"del vlan port %d 1,0\" % vlan_id, \"<0>%\")\n-        else:\n-            self.ctrl_crb.send_expect(\"del vlan port %d 5,11\" % vlan_id, \"<0>%\")\n-        self.ctrl_crb.send_expect(\"del vlan %d\" % vlan_id, \"<0>%\")\n-\n-    def add_txvlan(self, vlan_id=0):\n-        if self.sec_port:\n-            self.ctrl_crb.send_expect(\"set vlan tagging %d 1 tag\" % vlan_id, \"<0>%\")\n-        else:\n-            self.ctrl_crb.send_expect(\"set vlan tagging %d 5 tag\" % vlan_id, \"<0>%\")\n-\n-    def delete_txvlan(self, vlan_id=0):\n-        if self.sec_port:\n-            self.ctrl_crb.send_expect(\"set vlan tagging %d 1 untag\" % vlan_id, \"<0>%\")\n-        else:\n-            self.ctrl_crb.send_expect(\"set vlan tagging %d 5 untag\" % vlan_id, \"<0>%\")\n-\n-    def enable_jumbo(self, framesize=0):\n-        if self.sec_port:\n-            self.ctrl_crb.send_expect(\"set port config 1 max_frame_size %d\" % framesize, \"<0>%\")\n-        else:\n-            self.ctrl_crb.send_expect(\"set port config 5 max_frame_size %d\" % framesize, \"<0>%\")\n-   \n-    def get_glortid_bymac(self, dmac):\n-        out = self.ctrl_crb.send_expect(\"show mac table all\", \"<0>%\")\n-        pattern = r\"([0-9a-f]{2}:){5}([0-9a-f]{2})\"\n-        s = re.compile(pattern)\n-        res = s.search(dmac)\n-        if res is None:\n-            print(RED(\"search none mac filter\"))\n-            return None\n-        else:\n-            mac_filter = res.group(2)\n-        pattern = r\"(?<=%s)+([\\sA-Za-z0-9/])+([0-9]{4})\" %mac_filter\n-        s = re.compile(pattern)\n-        res = s.search(out)\n-        if res is None:\n-            print(RED(\"search none port value\"))\n-            return None\n-        else:\n-            port_value = res.group(2)\n-        out = self.ctrl_crb.send_expect(\"show stacking logical-port all\", \"<0>%\")\n-        pattern = r\"([0-9a-z]{6})+(\\s)+(%s)+\" %port_value\n-        s = re.compile(pattern)\n-        res = s.search(out)\n-        if res is None:\n-            print(RED(\"search none port glort id\"))\n-            return None\n-        else:\n-            port_glortid = res.group(1)\n-            return port_glortid\ndiff --git a/nics/rrc.py b/nics/rrc.py\ndeleted file mode 100644\nindex d0198858..00000000\n--- a/nics/rrc.py\n+++ /dev/null\n@@ -1,272 +0,0 @@\n-# BSD LICENSE\n-#\n-# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.\n-# All rights reserved.\n-#\n-# Redistribution and use in source and binary forms, with or without\n-# modification, are permitted provided that the following conditions\n-# are met:\n-#\n-#   * Redistributions of source code must retain the above copyright\n-#     notice, this list of conditions and the following disclaimer.\n-#   * Redistributions in binary form must reproduce the above copyright\n-#     notice, this list of conditions and the following disclaimer in\n-#     the documentation and/or other materials provided with the\n-#     distribution.\n-#   * Neither the name of Intel Corporation nor the names of its\n-#     contributors may be used to endorse or promote products derived\n-#     from this software without specific prior written permission.\n-#\n-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n-# \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n-\n-import re\n-from crb import Crb\n-from config import PortConf, PORTCONF\n-from exception import PortConfigParseException\n-from utils import GREEN\n-from net_device import NetDevice\n-\n-DEF_PASSWD = 's'\n-TP_BINARY = 'TestPoint'\n-\n-FUNC_RULES = [\n-            # disable cut through for jumbo frame case\n-            'set port config 20,22 tx_cut_through off',\n-            # disable mac learning\n-            'set port config 0..22 learning off',\n-            #redirect PEP0 to EPL0\n-            'create acl 0',\n-            'create acl-rule 0 0',\n-            'add acl-rule condition 0 0 src-port 20',\n-            'add acl-rule action 0 0 redirect 1',\n-            'add acl-rule action 0 0 count',\n-            #redirect PEP1 to EPL1\n-            'create acl 1',\n-            'create acl-rule 1 0',\n-            'add acl-rule condition 1 0 src-port 22',\n-            'add acl-rule action 1 0 redirect 5',\n-            'add acl-rule action 1 0 count',\n-            'apply acl',\n-           ]\n-\n-PERF_RULES = [\n-             'set port config 0..11 parser_cfg L4', # frame parser up to L4\n-             # good for performance\n-             'set api attribute boolean api.paritySweeper.enable false',\n-             'reg dbg set 0 CM_SOFTDROP_WM 0x5f005f00 0 0',\n-             'reg dbg set 0 CM_SHARED_WM 0x5f00 0 0',\n-             # rule for direct rx traffic\n-             # mac filter will be useless, so only enable for perf\n-             'create acl-rule 0 1',\n-             'add acl-rule condition 0 1 src-port 1',\n-             'add acl-rule action 0 1 redirect 20',\n-             'add acl-rule action 0 1 count',\n-             'create acl-rule 1 1',\n-             'add acl-rule condition 1 1 src-port 5',\n-             'add acl-rule action 1 1 redirect 22',\n-             'add acl-rule action 1 1 count',\n-             'apply acl',\n-           ]\n-\n-class CtrlCrb(Crb):\n-    \"\"\"\n-    Simplified Crb class for  RedRockCanyou control session\n-    \"\"\"\n-\n-    def __init__(self, crb):\n-        self.crb = crb\n-        self.NAME = 'dut_RRC_CONTROL'\n-        super(CtrlCrb, self).__init__(crb, None, self.NAME)\n-\n-    def get_ip_address(self):\n-        return self.crb['IP']\n-\n-    def get_password(self):\n-        return self.crb['pass']\n-\n-\n-class RedRockCanyou(NetDevice):\n-    \"\"\"\n-    Class for RedRockCanyou, inherit from NetDevice class\n-    \"\"\"\n-\n-    def __init__(self, host, domain_id, bus_id, devfun_id):\n-        super(RedRockCanyou, self).__init__(host, domain_id, bus_id, devfun_id)\n-\n-        self.tp_path = \"~\"\n-        self.sec_port = False\n-        self.host = host\n-\n-        # load port config\n-        portconf = PortConf(PORTCONF)\n-        portconf.load_ports_config(host.crb['IP'])\n-        pci_addr = ':'.join((domain_id, bus_id, devfun_id))\n-        if not portconf.check_port_available(pci_addr):\n-            raise PortConfigParseException(\"RRC must configured\")\n-\n-        port_cfg = portconf.get_ports_config()[pci_addr]\n-\n-        # secondary port do not need reinitialize\n-        if 'sec_port' in list(port_cfg.keys()):\n-            print(GREEN(\"Skip init second port test point session\"))\n-            if 'first_port' not in list(port_cfg.keys()):\n-                raise PortConfigParseException(\"RRC second port must configure first port\")\n-            # find net_device by pci_addr\n-            first_addr = port_cfg['first_port']\n-            port_info = self.host.get_port_info(first_addr)\n-            if port_info is None:\n-                raise PortConfigParseException(\"RRC first port not found\")\n-            # get additional session\n-            netdev = port_info['port']\n-            self.ctrl_crb = netdev.get_control()\n-            self.sec_port = True\n-            return\n-\n-        if 'tp_ip' not in list(port_cfg.keys()):\n-            raise PortConfigParseException(\"RRC must configure test point ip\")\n-\n-        crb = {}\n-        crb['IP'] = port_cfg['tp_ip']\n-        if 'passwd' not in list(port_cfg.keys()):\n-            crb['pass'] = DEF_PASSWD\n-        else:\n-            crb['pass'] = port_cfg['passwd']\n-\n-        if 'tp_path' in list(port_cfg.keys()):\n-            self.tp_path = port_cfg['tp_path']\n-\n-        # create additional session\n-        self.ctrl_crb = CtrlCrb(crb)\n-\n-    def setup(self):\n-        # setup function should be called after bind to igb_uio\n-        self.start_testpoint()\n-\n-    def optimize_perf(self, peer0=\"\", peer1=\"\"):\n-        # rule which can optimize performance\n-        if self.sec_port is False:\n-            # applied rules\n-            for rule in PERF_RULES:\n-                self.ctrl_crb.send_expect(\"%s\" %rule, \"<0>%\")\n-            # add default mac rule\n-            self.ctrl_crb.send_expect(\"add mac %s 1 locked port 1\" % peer0, \"<0>%\")\n-            self.ctrl_crb.send_expect(\"add mac %s 1 locked port 5\" % peer1, \"<0>%\")\n-\n-    def stop(self):\n-        # second port do not need any operation\n-        if self.sec_port:\n-            return\n-\n-        # stop testpoint\n-        self.stop_testpoint()\n-\n-    def close(self):\n-        # second port do not need any operation\n-        if self.sec_port:\n-            return\n-\n-        # close session\n-        if self.ctrl_crb.session:\n-            self.ctrl_crb.session.close()\n-            self.ctrl_crb.session = None\n-        if self.ctrl_crb.alt_session:\n-            self.ctrl_crb.alt_session.close()\n-            self.ctrl_crb.alt_session = None\n-\n-    def start_testpoint(self):\n-        \"\"\"\n-        Before any execution, must enable test point first\n-        \"\"\"\n-        if self.sec_port:\n-            print(GREEN(\"Skip start second port testpoint\"))\n-            return\n-        self.ctrl_crb.send_expect(\"cd %s\" % self.tp_path, \"# \")\n-        if self.tp_path != \"~\":\n-            command = './' + TP_BINARY\n-        else:\n-            command = TP_BINARY\n-\n-        self.ctrl_crb.send_expect(\"%s\" % command, \"<0>%\", 120)\n-        for rule in FUNC_RULES:\n-            self.ctrl_crb.send_expect(\"%s\" %rule, \"<0>%\")\n-\n-    def stop_testpoint(self):\n-        \"\"\"\n-        Exit test point\n-        \"\"\"\n-        self.ctrl_crb.send_expect(\"quit\", \"# \")\n-\n-    def get_control(self):\n-        return self.ctrl_crb\n-\n-    def add_vlan(self, vlan_id=0):\n-        self.ctrl_crb.send_expect(\"create vlan %d\" % vlan_id, \"<0>%\")\n-        if self.sec_port:\n-            self.ctrl_crb.send_expect(\"add vlan port %d 5,22\" % vlan_id, \"<0>%\")\n-        else:\n-            self.ctrl_crb.send_expect(\"add vlan port %d 1,20\" % vlan_id, \"<0>%\")\n-    \n-    def delete_vlan(self, vlan_id=0):\n-        if self.sec_port:\n-            self.ctrl_crb.send_expect(\"del vlan port %d 5,22\" % vlan_id, \"<0>%\")\n-        else:\n-            self.ctrl_crb.send_expect(\"del vlan port %d 1,20\" % vlan_id, \"<0>%\")\n-        self.ctrl_crb.send_expect(\"del vlan %d\" % vlan_id, \"<0>%\")\n-\n-    def add_txvlan(self, vlan_id=0):\n-        if self.sec_port:\n-            self.ctrl_crb.send_expect(\"set vlan tagging %d 5 tag\" % vlan_id, \"<0>%\")\n-        else:\n-            self.ctrl_crb.send_expect(\"set vlan tagging %d 1 tag\" % vlan_id, \"<0>%\")\n-\n-    def delete_txvlan(self, vlan_id=0):\n-        if self.sec_port:\n-            self.ctrl_crb.send_expect(\"set vlan tagging %d 5 untag\" % vlan_id, \"<0>%\")\n-        else:\n-            self.ctrl_crb.send_expect(\"set vlan tagging %d 1 untag\" % vlan_id, \"<0>%\")\n-\n-    def enable_jumbo(self, framesize=0):\n-        if self.sec_port:\n-            self.ctrl_crb.send_expect(\"set port config 5 max_frame_size %d\" % framesize, \"<0>%\")\n-        else:\n-            self.ctrl_crb.send_expect(\"set port config 1 max_frame_size %d\" % framesize, \"<0>%\")\n-\n-    def get_glortid_bymac(self, dmac):\n-        out = self.ctrl_crb.send_expect(\"show mac table all\", \"<0>%\")\n-        pattern = r\"([0-9a-f]{2}:){5}([0-9a-f]{2})\"\n-        s = re.compile(pattern)\n-        res = s.search(dmac)\n-        if res is None:\n-            print(\"search none mac filter\")\n-            return None\n-        else:\n-            mac_filter = res.group(2)\n-        pattern = r\"(?<=%s)+([\\sA-Za-z0-9/])+([0-9]{4})\" %mac_filter\n-        s = re.compile(pattern)\n-        res = s.search(out)\n-        if res is None:\n-            print(\"search none port value\")\n-            return None\n-        else:\n-            port_value = res.group(2)\n-        out = self.ctrl_crb.send_expect(\"show stacking logical-port all\", \"<0>%\")\n-        pattern = r\"([0-9a-z]{6})+(\\s)+(%s)+\" %port_value\n-        s = re.compile(pattern)\n-        res = s.search(out)\n-        if res is None:\n-            print(\"search none port glort id\")\n-            return None\n-        else:\n-            port_glortid = res.group(1)\n-            return port_glortid\n-\ndiff --git a/tests/TestSuite_fm10k_perf.py b/tests/TestSuite_fm10k_perf.py\ndeleted file mode 100644\nindex 5ff411dd..00000000\n--- a/tests/TestSuite_fm10k_perf.py\n+++ /dev/null\n@@ -1,617 +0,0 @@\n-# BSD LICENSE\n-#\n-# Copyright(c) 2010-2019 Intel Corporation. All rights reserved.\n-# All rights reserved.\n-#\n-# Redistribution and use in source and binary forms, with or without\n-# modification, are permitted provided that the following conditions\n-# are met:\n-#\n-#   * Redistributions of source code must retain the above copyright\n-#     notice, this list of conditions and the following disclaimer.\n-#   * Redistributions in binary form must reproduce the above copyright\n-#     notice, this list of conditions and the following disclaimer in\n-#     the documentation and/or other materials provided with the\n-#     distribution.\n-#   * Neither the name of Intel Corporation nor the names of its\n-#     contributors may be used to endorse or promote products derived\n-#     from this software without specific prior written permission.\n-#\n-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n-# \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n-\n-\"\"\"\n-DPDK Test suite.\n-Layer-3 forwarding test script.\n-\"\"\"\n-\n-import utils\n-import string\n-import re\n-import os\n-from test_case import TestCase\n-from exception import VerifyFailure\n-from settings import HEADER_SIZE\n-from utils import *\n-from pktgen import PacketGeneratorHelper\n-\n-class TestFM10kL3fwd(TestCase):\n-\n-    path = \"./examples/l3fwd/build/\"\n-\n-    test_cases_2_ports = {\n-                          \"1S/1C/1T\": \"%s -c %s -n %d -- -p %s  --config '(P0,0,C{1.1.0}), (P1,0,C{1.1.0})'\",\n-                          \"1S/2C/1T\": \"%s -c %s -n %d -- -p %s  --config '(P0,0,C{1.1.0}), (P1,0,C{1.2.0})'\",\n-                          \"1S/4C/1T\": \"%s -c %s -n %d -- -p %s  --config '(P0,0,C{1.1.0}), (P1,0,C{1.2.0}), (P0,1,C{1.3.0}), (P1,1,C{1.4.0})'\",\n-                          \"1S/8C/1T\": \"%s -c %s -n %d -- -p %s  --config '(P0,0,C{1.1.0}), (P0,1,C{1.2.0}), (P0,2,C{1.3.0}), (P0,3,C{1.4.0}),\" +\\\n-                                     \"(P1,0,C{1.5.0}),(P1,1,C{1.6.0}), (P1,2,C{1.7.0}), (P1,3,C{1.8.0})'\",\n-                          \"1S/16C/1T\": \"%s -c %s -n %d -- -p %s  --config '(P0,0,C{1.1.0}), (P0,1,C{1.2.0}), (P0,2,C{1.3.0}), (P0,3,C{1.4.0}),\" +\\\n-                                     \"(P0,4,C{1.1.1}), (P0,5,C{1.2.1}), (P0,6,C{1.3.1}), (P0,7,C{1.4.1}),\" +\\\n-                                     \"(P1,0,C{1.5.0}), (P1,1,C{1.6.0}), (P1,2,C{1.7.0}), (P1,3,C{1.8.0}),\" +\\\n-                                     \"(P1,4,C{1.5.1}), (P1,5,C{1.6.1}), (P1,6,C{1.7.1}), (P1,7,C{1.8.1})'\"\n-                          }\n-\n-    host_table = [\n-        \"{{IPv4(10,100,0,1), IPv4(1,2,3,4), 1, 10, IPPROTO_UDP}, P0}\",\n-        \"{{IPv4(10,101,0,1), IPv4(1,2,3,4), 1, 10, IPPROTO_UDP}, P0}\",\n-        \"{{IPv4(11,100,0,1), IPv4(1,2,3,4), 1, 11, IPPROTO_UDP}, P1}\",\n-        \"{{IPv4(11,101,0,1), IPv4(1,2,3,4), 1, 11, IPPROTO_UDP}, P1}\",\n-        \"{{IPv4(12,100,0,1), IPv4(1,2,3,4), 1, 12, IPPROTO_UDP}, P2}\",\n-        \"{{IPv4(12,101,0,1), IPv4(1,2,3,4), 1, 12, IPPROTO_UDP}, P2}\",\n-        \"{{IPv4(13,100,0,1), IPv4(1,2,3,4), 1, 13, IPPROTO_UDP}, P3}\",\n-        \"{{IPv4(13,101,0,1), IPv4(1,2,3,4), 1, 13, IPPROTO_UDP}, P3}\",\n-    ]\n-\n-    lpm_table = [\n-        \"{IPv4(10,100,0,0), 24, P0}\",\n-        \"{IPv4(10,101,0,0), 24, P0}\",\n-        \"{IPv4(11,100,0,0), 24, P1}\",\n-        \"{IPv4(11,101,0,0), 24, P1}\",\n-        \"{IPv4(12,100,0,0), 24, P2}\",\n-        \"{IPv4(12,101,0,0), 24, P2}\",\n-        \"{IPv4(13,100,0,0), 24, P3}\",\n-        \"{IPv4(13,101,0,0), 24, P3}\",\n-    ]\n-\n-    frame_sizes = [64, 128, 256, 512, 2048]  # 65, 128\n-    methods = ['lpm']\n-\n-    # Insert or move non-test functions here.\n-    def portRepl(self, match):\n-        \"\"\"\n-        Function to replace P([0123]) pattern in tables\n-        \"\"\"\n-\n-        portid = match.group(1)\n-        self.verify(int(portid) in range(4), \"invalid port id\")\n-        if int(portid) >= len(valports):\n-            return '0'\n-        else:\n-            return '%s' % valports[int(portid)]\n-\n-    def set_up_all(self):\n-        \"\"\"\n-        Run at the start of each test suite.\n-        L3fwd Prerequisites\n-        \"\"\"\n-        # Based on h/w type, choose how many ports to use\n-        ports = self.dut.get_ports(socket=1)\n-        if not ports:\n-            ports = self.dut.get_ports(socket=0)\n-\n-        self.tester.extend_external_packet_generator(TestFM10kL3fwd, self)\n-        # Verify that enough ports are available\n-        self.verify(len(ports) >= 2, \"Insufficient ports for speed testing\")\n-\n-        netdev = self.dut.ports_info[ports[0]]['port']\n-\n-        self.port_socket = netdev.socket\n-\n-        # Verify that enough threads are available\n-        cores = self.dut.get_core_list(\"2S/8C/2T\")\n-        self.verify(cores is not None, \"Insufficient cores for speed testing\")\n-\n-        global valports\n-        valports = [_ for _ in ports if self.tester.get_local_port(_) != -1]\n-\n-        self.verify(len(valports) >= 2, \"Insufficient active ports for speed testing\")\n-\n-        self.main_file = \"examples/l3fwd/main.c\"\n-        self.pf_file = \"drivers/net/fm10k/base/fm10k_pf.c\"\n-        # Update config file and rebuild to get best perf on FVL\n-        if \"redrockcanyou\" in self.nic:\n-            self.dut.send_expect(\"sed -i -e 's/FM10K_TQDLOC_BASE_32_DESC/FM10K_TQDLOC_BASE_128_DESC/' %s\" % self.pf_file, \"# \")\n-            self.dut.send_expect(\"sed -i -e 's/FM10K_TQDLOC_SIZE_32_DESC/FM10K_TQDLOC_SIZE_128_DESC/' %s\" % self.pf_file, \"# \")\n-            self.dut.send_expect(\"sed -i -e 's/FM10K_TDLEN_ITR_SCALE_GEN3;$/FM10K_TDLEN_ITR_SCALE_GEN3 * 2;/' %s\" % self.pf_file, \"# \")\n-\n-            self.dut.build_install_dpdk(self.target)\n-\n-        self.l3fwd_test_results = {'header': [],\n-                                   'data': []}\n-\n-        self.rebuild_l3fwd()\n-\n-        # get dts output path\n-        if self.logger.log_path.startswith(os.sep):\n-            self.output_path = self.logger.log_path\n-        else:\n-            cur_path = os.path.dirname(\n-                                os.path.dirname(os.path.realpath(__file__)))\n-            self.output_path = os.sep.join([cur_path, self.logger.log_path])\n-        # create an instance to set stream field setting\n-        self.pktgen_helper = PacketGeneratorHelper()\n-\n-    def rebuild_l3fwd(self):\n-        pat = re.compile(\"P([0123])\")\n-        # Prepare long prefix match table, replace P(x) port pattern\n-        lpmStr = \"static struct ipv4_l3fwd_route ipv4_l3fwd_route_array[] = {\\\\\\n\"\n-        for idx in range(len(TestFM10kL3fwd.lpm_table)):\n-            TestFM10kL3fwd.lpm_table[idx] = pat.sub(self.portRepl, TestFM10kL3fwd.lpm_table[idx])\n-            lpmStr = lpmStr + ' ' * 4 + TestFM10kL3fwd.lpm_table[idx] + \",\\\\\\n\"\n-        lpmStr = lpmStr + \"};\"\n-        self.logger.debug(lpmStr)\n-\n-        # Prepare host route table, replace P(x) port pattern\n-        exactStr = \"static struct ipv4_l3fwd_route ipv4_l3fwd_route_array[] = {\\\\\\n\"\n-        for idx in range(len(TestFM10kL3fwd.host_table)):\n-            TestFM10kL3fwd.host_table[idx] = pat.sub(self.portRepl, TestFM10kL3fwd.host_table[idx])\n-            exactStr = exactStr + ' ' * 4 + TestFM10kL3fwd.host_table[idx] + \",\\\\\\n\"\n-        exactStr = exactStr + \"};\"\n-        self.logger.debug(exactStr)\n-\n-        # Compile l3fwd with LPM lookup.\n-        self.dut.send_expect(r\"sed -i '/ipv4_l3fwd_route_array\\[\\].*{/,/^\\}\\;/c\\\\%s' examples/l3fwd/main.c\" % lpmStr, \"# \")\n-        out = self.dut.build_dpdk_apps(\"./examples/l3fwd\", \"USER_FLAGS=-DAPP_LOOKUP_METHOD=1\")\n-        self.verify(\"Error\" not in out, \"compilation error 1\")\n-        self.verify(\"No such file\" not in out, \"compilation error 2\")\n-\n-        # Backup the LPM exe and clean up the build.\n-        self.dut.send_expect(\"mv -f examples/l3fwd/build/l3fwd examples/l3fwd/build/l3fwd_lpm\", \"# \")\n-        out = self.dut.send_expect(\"make clean -C examples/l3fwd\", \"# \")\n-\n-    def flows(self):\n-        \"\"\"\n-        Return a list of packets that implements the flows described in the\n-        l3fwd test plan.\n-\n-        \"\"\"\n-        return [\n-            'IP(src=\"1.2.3.4\",dst=\"11.100.0.1\")',\n-            'IP(src=\"1.2.3.4\",dst=\"11.101.0.1\")',\n-            'IP(src=\"1.2.3.4\",dst=\"10.100.0.1\")',\n-            'IP(src=\"1.2.3.4\",dst=\"10.101.0.1\")',\n-            'IP(src=\"1.2.3.4\",dst=\"13.100.0.1\")',\n-            'IP(src=\"1.2.3.4\",dst=\"13.101.0.1\")',\n-            'IP(src=\"1.2.3.4\",dst=\"12.100.0.1\")',\n-            'IP(src=\"1.2.3.4\",dst=\"12.101.0.1\")']\n-\n-    def repl(self, match):\n-        pid = match.group(1)\n-        qid = match.group(2)\n-        self.logger.debug(\"%s\\n\" % match.group(3))\n-        lcid = self.dut.get_lcore_id(match.group(3))\n-        self.logger.debug(\"%s\\n\" % lcid)\n-\n-        global corelist\n-        corelist.append(int(lcid))\n-\n-        self.verify(int(pid) in range(4), \"invalid port id\")\n-        self.verify(lcid, \"invalid thread id\")\n-\n-        return '%s,%s,%s' % (str(valports[int(pid)]), qid, lcid)\n-\n-    def set_up(self):\n-        \"\"\"\n-        Run before each test case.\n-        \"\"\"\n-        pass\n-\n-    def fm10k_rxmode_set(self, mode=\"default\"):\n-        \"\"\"\n-        Change rxmode setting for RRC vector choice\n-        RRC rxmode choice will depend on rxmod\n-        \"\"\"\n-        if mode == \"scatter\":\n-            # enable ip checkcsum\n-            self.dut.send_expect(\"sed -i -e 's/.hw_ip_checksum = .*$/.hw_ip_checksum = 1,/g' %s\" % self.main_file, \"# \")\n-            # enable scatter mode\n-            self.dut.send_expect(\"sed -i -e 's/.enable_scatter = .*$/.enable_scatter = 1,/g' %s\" % self.main_file, \"# \")\n-        elif mode == \"scatter_vector\":\n-            # disable ip checksum\n-            self.dut.send_expect(\"sed -i -e 's/.hw_ip_checksum = .*$/.hw_ip_checksum = 0,/g' %s\" % self.main_file, \"# \")\n-            # enable scatter mode\n-            self.dut.send_expect(\"sed -i -e 's/.enable_scatter = .*$/.enable_scatter = 1,/g' %s\" % self.main_file, \"# \")\n-        elif mode == \"vector\":\n-            # disable ip checksum\n-            self.dut.send_expect(\"sed -i -e 's/.hw_ip_checksum = .*$/.hw_ip_checksum = 0,/g' %s\" % self.main_file, \"# \")\n-            # default l3fwd parameter, scatter will be disabled\n-            self.dut.send_expect(\"sed -i -e 's/.enable_scatter = .*$/.enable_scatter = 0,/g' %s\" % self.main_file, \"# \")\n-        elif mode == \"default\":\n-            # disable ip checksum\n-            self.dut.send_expect(\"sed -i -e 's/.hw_ip_checksum = .*$/.hw_ip_checksum = 1,/g' %s\" % self.main_file, \"# \")\n-            # default l3fwd parameter, scatter will be disabled\n-            self.dut.send_expect(\"sed -i -e 's/.enable_scatter = .*$/.enable_scatter = 0,' %s\" % self.main_file, \"# \")\n-\n-        # rebuild l3fwd\n-        self.rebuild_l3fwd()\n-\n-    def test_perf_fm10k_legacy_perf(self):\n-        # add setting for scatter\n-        # self.dut.send_expect(\"sed -i -e '/.hw_ip_checksum = .*$/a\\\\.enable_scatter = 0,' %s\" % self.main_file, \"# \")\n-\n-        # mode_settings = [{'rxmode': 'default', 'txmode': 'default'}, {'rxmode': 'vector', 'txmode': 'vector'}]\n-        mode_settings = [{'rxmode': 'default', 'txmode': 'default'}]\n-        for mode in mode_settings:\n-            self.fm10k_rxmode_set(mode = mode['rxmode'])\n-            if mode['txmode'] == 'default':\n-                # need --enable-jumbo parameter\n-                for key in list(TestFM10kL3fwd.test_cases_2_ports.keys()):\n-                    if \"--enable-jumbo\" not in TestFM10kL3fwd.test_cases_2_ports[key]:\n-                        TestFM10kL3fwd.test_cases_2_ports[key] += \" --enable-jumbo\"\n-            else:\n-                for key in list(TestFM10kL3fwd.test_cases_2_ports.keys()):\n-                    TestFM10kL3fwd.test_cases_2_ports[key].replace(\" --enable-jumbo\", \"\")\n-\n-            print((GREEN(\"Performance test for rxmode %s txmode %s\" % (mode['rxmode'], mode['txmode']))))\n-            self.perf_l3fwd_2ports()\n-\n-        # remove setting for scatter\n-        self.dut.send_expect(\"sed -i -e '/.enable_scatter= .*$/d' %s\" % self.main_file, \"# \")\n-\n-    def test_perf_fm10k_vec_perf(self):\n-        # add setting for scatter\n-        # self.dut.send_expect(\"sed -i -e '/.hw_ip_checksum = .*$/a\\\\.enable_scatter = 0,' %s\" % self.main_file, \"# \")\n-\n-        # mode_settings = [{'rxmode': 'default', 'txmode': 'default'}, {'rxmode': 'vector', 'txmode': 'vector'}]\n-        mode_settings = [{'rxmode': 'vector', 'txmode': 'vector'}]\n-        for mode in mode_settings:\n-            self.fm10k_rxmode_set(mode = mode['rxmode'])\n-            if mode['txmode'] == 'default':\n-                # need --enable-jumbo parameter\n-                for key in list(TestFM10kL3fwd.test_cases_2_ports.keys()):\n-                    if \"--enable-jumbo\" not in TestFM10kL3fwd.test_cases_2_ports[key]:\n-                        TestFM10kL3fwd.test_cases_2_ports[key] += \" --enable-jumbo\"\n-            else:\n-                for key in list(TestFM10kL3fwd.test_cases_2_ports.keys()):\n-                    TestFM10kL3fwd.test_cases_2_ports[key].replace(\" --enable-jumbo\", \"\")\n-\n-            print((GREEN(\"Performance test for rxmode %s txmode %s\" % (mode['rxmode'], mode['txmode']))))\n-            self.perf_l3fwd_2ports()\n-\n-        # remove setting for scatter\n-        self.dut.send_expect(\"sed -i -e '/.enable_scatter= .*$/d' %s\" % self.main_file, \"# \")\n-\n-    def perf_l3fwd_2ports(self):\n-        \"\"\"\n-        L3fwd main 2 ports.\n-        \"\"\"\n-\n-        header_row = [\"Frame\", \"mode\", \"S/C/T\", \"Mpps\", \"% linerate\", \"latency_max(us)\", \"latency_min(us)\", \"latency_avg(us)\"]\n-        self.l3fwd_test_results['header'] = header_row\n-        self.result_table_create(header_row)\n-        self.l3fwd_test_results['data'] = []\n-\n-        mac = [\"02:00:00:00:00:00\", \"02:00:00:00:00:01\"]\n-        for frame_size in TestFM10kL3fwd.frame_sizes:\n-\n-            # Prepare traffic flow\n-            payload_size = frame_size -  \\\n-                HEADER_SIZE['ip'] - HEADER_SIZE['eth']\n-            flows = []\n-            pcaps = {}\n-            for _port in range(2):\n-                dmac = self.dut.get_mac_address(valports[_port])\n-                cnt = 0\n-                for layer in self.flows()[_port * 2: (_port + 1) * 2]:\n-                    flow = 'Ether(dst=\"%s\", src=\"%s\")/%s/(\"X\"*%d)' % (\n-                                        dmac, mac[_port], flow, payload_size)\n-                    flows.append(flow)\n-                    pcap = os.sep.join([\n-                                self.output_path,\n-                                \"dst{0}_{1}.pcap\".format(valports[_port], cnt)])\n-                    self.tester.scapy_append('wrpcap(\"%s\", [%s])' % (pcap, flow))\n-                    self.tester.scapy_execute()\n-                    if valports[_port] not in pcaps:\n-                        pcaps[valports[_port]] = []\n-                    pcaps[valports[_port]].append(pcap)\n-                    cnt += 1\n-\n-            self.rst_report(\"Flows for 2 ports, %d frame size.\\n\" % (frame_size),\n-                       annex=True)\n-            self.rst_report(\"%s\" % string.join(flows, '\\n'),\n-                       frame=True, annex=True)\n-\n-            # Prepare the command line\n-            global corelist\n-            pat = re.compile(\"P([0123]),([01234567]),(C\\{\\d.\\d.\\d\\})\")\n-\n-            pat2 = re.compile(\"C\\{\\d\")\n-            repl1 = \"C{\" + str(self.port_socket)\n-\n-            coreMask = {}\n-            rtCmdLines = dict(TestFM10kL3fwd.test_cases_2_ports)\n-            for key in list(rtCmdLines.keys()):\n-                corelist = []\n-                while pat.search(rtCmdLines[key]):\n-                    # Change the socket to the NIC's socket\n-                    if key.find('1S') >= 0:\n-                        rtCmdLines[key] = pat2.sub(repl1, rtCmdLines[key])\n-                    rtCmdLines[key] = pat.sub(self.repl, rtCmdLines[key])\n-\n-                self.logger.info(\"%s\\n\" % str(corelist))\n-                coreMask[key] = utils.create_mask(set(corelist))\n-\n-            # measure by two different mode\n-            # methods = TestFM10kL3fwd.methods\n-\n-            for mode in TestFM10kL3fwd.methods:\n-\n-                # start l3fwd\n-                index = 0\n-                subtitle = []\n-                for cores in list(rtCmdLines.keys()):\n-\n-                    info = \"Executing l3fwd using %s mode, 2 ports, %s and %d frame size.\\n\" % (\n-                           mode, cores, frame_size)\n-\n-                    self.logger.info(info)\n-                    self.rst_report(info, annex=True)\n-\n-                    subtitle.append(cores)\n-                    cmdline = rtCmdLines[cores] % (TestFM10kL3fwd.path + \"l3fwd_\" + mode, coreMask[cores],\n-                                                   self.dut.get_memory_channels(), utils.create_mask(valports[:2]))\n-\n-                    if frame_size > 1518:\n-                        cmdline = cmdline + \" --max-pkt-len %d\" % frame_size\n-                    self.rst_report(cmdline + \"\\n\", frame=True, annex=True)\n-\n-                    out = self.dut.send_expect(cmdline, \"L3FWD:\", 120)\n-\n-                    # Measure test\n-                    tgenInput = []\n-                    for rxPort in range(2):\n-                        # No use on rx/tx limitation\n-                        if rxPort % 2 == 0:\n-                            txIntf = self.tester.get_local_port(valports[rxPort + 1])\n-                        else:\n-                            txIntf = self.tester.get_local_port(valports[rxPort - 1])\n-\n-                        rxIntf = self.tester.get_local_port(valports[rxPort])\n-                        port_id = valports[rxPort+1] if rxPort % 2 == 0 else \\\n-                                  valports[rxPort-1]\n-                        for pcap in pcaps[port_id]:\n-                            tgenInput.append((txIntf, rxIntf, pcap))\n-\n-                    vm_config = self.set_fields()\n-                    # clear streams before add new streams\n-                    self.tester.pktgen.clear_streams()\n-                    # run packet generator\n-                    streams = self.pktgen_helper.prepare_stream_from_tginput(tgenInput, 100,\n-                                            vm_config, self.tester.pktgen)\n-                    _, pps = self.tester.pktgen.measure_throughput(stream_ids=streams)\n-\n-                    self.verify(pps > 0, \"No traffic detected\")\n-                    pps /= 1000000.0\n-                    linerate = self.wirespeed(self.nic, frame_size, 2)\n-                    pct = pps * 100 / linerate\n-\n-                    # clear streams before add new streams\n-                    self.tester.pktgen.clear_streams()\n-                    # run packet generator\n-                    streams = self.pktgen_helper.prepare_stream_from_tginput(tgenInput, 100,\n-                                                 vm_config, self.tester.pktgen)\n-                    latencys = self.tester.pktgen.measure_latency(stream_ids=streams)\n-\n-                    index += 1\n-\n-                    # Stop l3fwd\n-                    self.dut.send_expect(\"^C\", \"#\")\n-                    print(latencys)\n-\n-                    for latency in latencys:\n-                        if latency['max'] > 0:\n-                            data_row = [frame_size, mode, cores, str(pps), str(pct), str(latency['max']/1000), str(latency['min']/1000), str(latency['average']/1000)]\n-                    utils.result_table_add(data_row)\n-                    self.l3fwd_test_results['data'].append(data_row)\n-\n-        self.result_table_print()\n-\n-    def perf_rfc2544(self):\n-\n-        header_row = [\"Frame\", \"mode\", \"S/C/T\", \"tx_pkts(1min)\", \"LR_rx_pkts(1min)\", \"LR_loss_pkts(1min)\", \"% zero_loss_rate(0.01%loss)\"]\n-        self.l3fwd_test_results['header'] = header_row\n-        self.result_table_create(header_row)\n-        self.l3fwd_test_results['data'] = []\n-\n-        for frame_size in TestFM10kL3fwd.frame_sizes:\n-\n-            # Prepare traffic flow\n-            payload_size = frame_size -  \\\n-                HEADER_SIZE['ip'] - HEADER_SIZE['eth']\n-            pcaps = {}\n-            flows = []\n-            for _port in range(2):\n-                index = valports[_port]\n-                dmac = self.dut.get_mac_address(index)\n-                cnt = 0\n-                for layer in self.flows()[_port * 2: (_port + 1) * 2]:\n-                    flow = 'Ether(dst=\"%s\")/%s/(\"X\"*%d)' % (\n-                                                    dmac, layer, payload_size)\n-                    flows.append(flow)\n-                    pcap = os.sep.join([\n-                                self.output_path,\n-                                \"dst{0}_{1}.pcap\".format(index, cnt)])\n-                    self.tester.scapy_append('wrpcap(\"%s\", [%s])' % (\n-                                                pcap, flow))\n-                    self.tester.scapy_execute()\n-                    if index not in pcaps:\n-                        pcaps[index] = []\n-                    pcaps[index].append(pcap)\n-                    cnt += 1\n-\n-            self.rst_report(\"Flows for 2 ports, %d frame size.\\n\" % (frame_size),\n-                       annex=True)\n-            self.rst_report(\"%s\" % string.join(flows, '\\n'),\n-                       frame=True, annex=True)\n-\n-            # Prepare the command line\n-            global corelist\n-            pat = re.compile(\"P([0123]),([0123]),(C\\{\\d.\\d.\\d\\})\")\n-\n-            pat2 = re.compile(\"C\\{\\d\")\n-            repl1 = \"C{\" + str(self.port_socket)\n-\n-            coreMask = {}\n-            rtCmdLines = dict(TestFM10kL3fwd.test_cases_2_ports)\n-            for key in list(rtCmdLines.keys()):\n-                corelist = []\n-                while pat.search(rtCmdLines[key]):\n-                    # Change the socket to the NIC's socket\n-                    if key.find('1S') >= 0:\n-                        rtCmdLines[key] = pat2.sub(repl1, rtCmdLines[key])\n-                    rtCmdLines[key] = pat.sub(self.repl, rtCmdLines[key])\n-\n-                self.logger.info(\"%s\\n\" % str(corelist))\n-                coreMask[key] = utils.create_mask(set(corelist))\n-\n-            # measure by two different mode\n-            for mode in TestFM10kL3fwd.methods:\n-\n-                # start l3fwd\n-                index = 0\n-                subtitle = []\n-                for cores in list(rtCmdLines.keys()):\n-\n-                    # in order to save time, only some of the cases will be run.\n-                    if mode == \"lpm\" and (cores == \"1S/1C/1T\" or cores == \"1S/4C/1T\"):\n-                        info = \"Executing l3fwd using %s mode, 2 ports, %s and %d frame size.\\n\" % (\n-                               mode, cores, frame_size)\n-\n-                        self.logger.info(info)\n-                        self.rst_report(info, annex=True)\n-\n-                        subtitle.append(cores)\n-                        cmdline = rtCmdLines[cores] % (TestFM10kL3fwd.path + \"l3fwd_\" + mode, coreMask[cores],\n-                                                       self.dut.get_memory_channels(), utils.create_mask(valports[:2]))\n-\n-                        if frame_size > 1518:\n-                            cmdline = cmdline + \" --max-pkt-len %d\" % frame_size\n-                        self.rst_report(cmdline + \"\\n\", frame=True, annex=True)\n-\n-                        out = self.dut.send_expect(cmdline, \"L3FWD:\", 120)\n-\n-                        # Measure test\n-                        tgenInput = []\n-                        for rxPort in range(2):\n-                            # No use on rx/tx limitation\n-                            if rxPort % 2 == 0:\n-                                txIntf = self.tester.get_local_port(valports[rxPort + 1])\n-                            else:\n-                                txIntf = self.tester.get_local_port(valports[rxPort - 1])\n-\n-                            rxIntf = self.tester.get_local_port(valports[rxPort])\n-\n-                            port_id = valports[rxPort+1] if rxPort % 2 == 0 else \\\n-                                      valports[rxPort-1]\n-                            for pcap in pcaps[port_id]:\n-                                tgenInput.append((txIntf, rxIntf, pcap))\n-\n-                        vm_config = self.set_fields()\n-                        # clear streams before add new streams\n-                        self.tester.pktgen.clear_streams()\n-                        # run packet generator\n-                        streams = self.pktgen_helper.prepare_stream_from_tginput(tgenInput,\n-                                            100, vm_config, self.tester.pktgen)\n-                        # set traffic option\n-                        traffic_opt = {'pdr': 0.01, 'duration': 5}\n-                        zero_loss_rate, tx_pkts, rx_pkts = self.tester.pktgen.measure_rfc2544(stream_ids=streams, options=traffic_opt)\n-\n-                        loss_pkts = tx_pkts - rx_pkts\n-                        self.dut.send_expect(\"^C\", \"#\")\n-\n-                        tx_pkts = human_read_number(tx_pkts)\n-                        rx_pkts = human_read_number(rx_pkts)\n-                        loss_pkts = human_read_number(loss_pkts)\n-\n-                        data_row = [frame_size, mode, cores, str(tx_pkts), str(rx_pkts), loss_pkts, zero_loss_rate]\n-                        self.result_table_add(data_row)\n-                        self.l3fwd_test_results['data'].append(data_row)\n-                    else:\n-                        pass\n-\n-                    index += 1\n-\n-        self.result_table_print()\n-\n-    def test_perf_rfc2544_vec(self):\n-        # add setting for scatter\n-\n-        # mode_settings = [{'rxmode': 'default', 'txmode': 'default'}, {'rxmode': 'vector', 'txmode': 'vector'}]\n-        mode_settings = [{'rxmode': 'vector', 'txmode': 'vector'}]\n-        for mode in mode_settings:\n-            self.fm10k_rxmode_set(mode = mode['rxmode'])\n-            if mode['txmode'] == 'default':\n-                # need --enable-jumbo parameter\n-                for key in list(TestFM10kL3fwd.test_cases_2_ports.keys()):\n-                    if \"--enable-jumbo\" not in TestFM10kL3fwd.test_cases_2_ports[key]:\n-                        TestFM10kL3fwd.test_cases_2_ports[key] += \" --enable-jumbo\"\n-            else:\n-                for key in list(TestFM10kL3fwd.test_cases_2_ports.keys()):\n-                    TestFM10kL3fwd.test_cases_2_ports[key].replace(\" --enable-jumbo\", \"\")\n-\n-            print((GREEN(\"Performance test for rxmode %s txmode %s\" % (mode['rxmode'], mode['txmode']))))\n-            self.perf_rfc2544()\n-\n-        # remove setting for scatter\n-        self.dut.send_expect(\"sed -i -e '/.enable_scatter= .*$/d' %s\" % self.main_file, \"# \")\n-\n-    def test_perf_rfc2544_legacy(self):\n-        # add setting for scatter\n-\n-        # mode_settings = [{'rxmode': 'default', 'txmode': 'default'}, {'rxmode': 'vector', 'txmode': 'vector'}]\n-        mode_settings = [{'rxmode': 'default', 'txmode': 'default'}]\n-        for mode in mode_settings:\n-            self.fm10k_rxmode_set(mode = mode['rxmode'])\n-            if mode['txmode'] == 'default':\n-                # need --enable-jumbo parameter\n-                for key in list(TestFM10kL3fwd.test_cases_2_ports.keys()):\n-                    if \"--enable-jumbo\" not in TestFM10kL3fwd.test_cases_2_ports[key]:\n-                        TestFM10kL3fwd.test_cases_2_ports[key] += \" --enable-jumbo\"\n-            else:\n-                for key in list(TestFM10kL3fwd.test_cases_2_ports.keys()):\n-                    TestFM10kL3fwd.test_cases_2_ports[key].replace(\" --enable-jumbo\", \"\")\n-\n-            print((GREEN(\"Performance test for rxmode %s txmode %s\" % (mode['rxmode'], mode['txmode']))))\n-            self.perf_rfc2544()\n-\n-        # remove setting for scatter\n-        self.dut.send_expect(\"sed -i -e '/.enable_scatter= .*$/d' %s\" % self.main_file, \"# \")\n-\n-    def set_fields(self):\n-        ''' set ip protocol field behavior '''\n-        fields_config = {\n-        'ip':  {'src': {'action': 'random'}}, }\n-        return fields_config\n-\n-    def tear_down(self):\n-        \"\"\"\n-        Run after each test case.\n-        \"\"\"\n-        pass\n-\n-    def tear_down_all(self):\n-        \"\"\"\n-        Run after each test suite.\n-        \"\"\"\n-        # remove setting for scatter\n-        self.dut.send_expect(\"sed -i -e '/.enable_scatter= .*$/d' %s\" % self.main_file, \"# \")\n-        pass\n",
    "prefixes": [
        "V1",
        "1/6"
    ]
}