* [dts] [PATCH V1 1/6] dts/*: remove fm10k related modules and patch
@ 2021-06-15 10:46 Jun Dong
2021-06-15 10:46 ` [dts] [PATCH V1 2/6] conf/test_case_checklist: update test case checklist after removed fm10k Jun Dong
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Jun Dong @ 2021-06-15 10:46 UTC (permalink / raw)
To: junx.dong; +Cc: dts
1. remove dep/fm10k-add-a-unit-test-for-FTAG-based-forwarding patch.
2. remove nics/atwood module.
3. remove nics/br module.
4. remove nics/rrc module.
5. remove tests/TestSuite_fm10k_perf test suite.
Signed-off-by: Jun Dong <junx.dong@intel.com>
---
...-unit-test-for-FTAG-based-forwarding.patch | 287 --------
nics/atwood.py | 173 -----
nics/br.py | 275 --------
nics/rrc.py | 272 --------
tests/TestSuite_fm10k_perf.py | 617 ------------------
5 files changed, 1624 deletions(-)
delete mode 100644 dep/fm10k-add-a-unit-test-for-FTAG-based-forwarding.patch
delete mode 100644 nics/atwood.py
delete mode 100644 nics/br.py
delete mode 100644 nics/rrc.py
delete mode 100644 tests/TestSuite_fm10k_perf.py
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
deleted file mode 100644
index b756b511..00000000
--- a/dep/fm10k-add-a-unit-test-for-FTAG-based-forwarding.patch
+++ /dev/null
@@ -1,287 +0,0 @@
-From 0882390c731f8d39f81e52b0669651f5484683eb Mon Sep 17 00:00:00 2001
-From: Wang Xiao <xiao.w.wang@intel.com>
-Date: Wed, 10 Aug 2016 11:26:23 +0800
-Subject: [PATCH] fm10k: add a unit test for FTAG based forwarding
-
-This patch adds a unit test case for FTAG functional test. Before running
-the test, set PORT0_GLORT and PORT1_GLORT environment variables, and ensure
-two fm10k ports are used for dpdk, glort info for each port can be shown in
-TestPoint. In the unit test, a packet will be forwarded to the target port
-by the switch without changing the destination mac address.
-
-diff --git a/app/test/test_fm10k_ftag.c b/app/test/test_fm10k_ftag.c
-new file mode 100644
-index 0000000..c75a7b1
---- /dev/null
-+++ b/app/test/test_fm10k_ftag.c
-@@ -0,0 +1,267 @@
-+/*-
-+ * BSD LICENSE
-+ *
-+ * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
-+ * All rights reserved.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions
-+ * are met:
-+ *
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in
-+ * the documentation and/or other materials provided with the
-+ * distribution.
-+ * * Neither the name of Intel Corporation nor the names of its
-+ * contributors may be used to endorse or promote products derived
-+ * from this software without specific prior written permission.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+ */
-+
-+#include <stdint.h>
-+#include <inttypes.h>
-+#include <rte_eal.h>
-+#include <rte_ethdev.h>
-+#include <rte_cycles.h>
-+#include <rte_lcore.h>
-+#include <rte_mbuf.h>
-+#include "test.h"
-+
-+#define RX_RING_SIZE 128
-+#define TX_RING_SIZE 512
-+
-+#define NUM_MBUFS 8191
-+#define MBUF_CACHE_SIZE 250
-+#define BURST_SIZE 32
-+
-+struct fm10k_ftag {
-+ uint16_t swpri_type_user;
-+ uint16_t vlan;
-+ uint16_t sglort;
-+ uint16_t dglort;
-+};
-+
-+static const struct rte_eth_conf port_conf_default = {
-+ .rxmode = { .max_rx_pkt_len = ETHER_MAX_LEN }
-+};
-+
-+/*
-+ * Initializes a given port using global settings and with the RX buffers
-+ * coming from the mbuf_pool passed as a parameter.
-+ */
-+static inline int
-+port_init(uint8_t port, struct rte_mempool *mbuf_pool)
-+{
-+ struct rte_eth_conf port_conf = port_conf_default;
-+ const uint16_t rx_rings = 1, tx_rings = 1;
-+ int retval;
-+ uint16_t q;
-+ struct ether_addr addr;
-+
-+ if (port >= rte_eth_dev_count())
-+ return -1;
-+
-+ /* Configure the Ethernet device. */
-+ retval = rte_eth_dev_configure(port, rx_rings, tx_rings, &port_conf);
-+ if (retval != 0)
-+ return retval;
-+
-+ /* Allocate and set up 1 RX queue per Ethernet port. */
-+ for (q = 0; q < rx_rings; q++) {
-+ retval = rte_eth_rx_queue_setup(port, q, RX_RING_SIZE,
-+ rte_eth_dev_socket_id(port), NULL, mbuf_pool);
-+ if (retval < 0)
-+ return retval;
-+ }
-+
-+ /* Allocate and set up 1 TX queue per Ethernet port. */
-+ for (q = 0; q < tx_rings; q++) {
-+ retval = rte_eth_tx_queue_setup(port, q, TX_RING_SIZE,
-+ rte_eth_dev_socket_id(port), NULL);
-+ if (retval < 0)
-+ return retval;
-+ }
-+
-+ /* Start the Ethernet port. */
-+ retval = rte_eth_dev_start(port);
-+ if (retval < 0)
-+ return retval;
-+
-+ /* Display the port MAC address. */
-+ rte_eth_macaddr_get(port, &addr);
-+ printf("Port %u MAC: %02" PRIx8 " %02" PRIx8 " %02" PRIx8
-+ " %02" PRIx8 " %02" PRIx8 " %02" PRIx8 "\n",
-+ (unsigned)port,
-+ addr.addr_bytes[0], addr.addr_bytes[1],
-+ addr.addr_bytes[2], addr.addr_bytes[3],
-+ addr.addr_bytes[4], addr.addr_bytes[5]);
-+
-+ return 0;
-+}
-+
-+static int set_glort_value(const char *str, uint16_t *glort)
-+{
-+ const char *glort_str;
-+ char *end = NULL;
-+
-+ glort_str = getenv(str);
-+ if (glort_str == NULL) {
-+ printf("Please set environment value %s first\n", str);
-+ return -1;
-+ }
-+ *glort = (uint16_t)strtoul(glort_str, &end, 16);
-+ if ((glort_str[0] == '\0') || (end == NULL) || (*end != '\0')) {
-+ printf("Glort value is not valid\n");
-+ return -1;
-+ }
-+ return 0;
-+}
-+
-+static int test_ftag_rxtx(void)
-+{
-+ uint8_t port = 0;
-+ uint16_t glort[2];
-+
-+ struct rte_mbuf *bufs[BURST_SIZE];
-+ uint16_t nb_rx, nb_tx, i;
-+ struct fm10k_ftag *ftag_addr;
-+ int ret = 0;
-+
-+ /* Get the glort value of the two ports */
-+ if ((set_glort_value("PORT0_GLORT", &glort[0]) < 0) ||
-+ (set_glort_value("PORT1_GLORT", &glort[1]) < 0))
-+ return -1;
-+
-+ /* Receive packets coming from EPL on any of the two ports */
-+ printf("Please send some packets from Ethernet port to one PEP\n");
-+ do {
-+ port ^= 1;
-+ nb_rx = rte_eth_rx_burst(port, 0, bufs, BURST_SIZE);
-+ } while (nb_rx <= 0);
-+ printf("Receive %d packets on port %d\n", nb_rx, port);
-+
-+ /* Check sglort value on mbuf->vlan_tci_outer. */
-+ for (i = 0; i < nb_rx; i++) {
-+ if (bufs[i]->vlan_tci_outer == 0) {
-+ printf("Find a packet with sglort 0\n");
-+ return -1;
-+ }
-+ }
-+ printf("test for FTAG RX passed\n");
-+
-+ /* Put an FTAG header on each of the packets received and set FTAG
-+ * TX flag
-+ **/
-+ for (i = 0; i < nb_rx; i++) {
-+ ftag_addr = (struct fm10k_ftag *)rte_pktmbuf_prepend(bufs[i],
-+ sizeof(struct fm10k_ftag));
-+ ftag_addr->swpri_type_user = 0;
-+ ftag_addr->vlan = 0;
-+ ftag_addr->dglort = rte_cpu_to_be_16(glort[port ^ 1]);
-+ ftag_addr->sglort = rte_cpu_to_be_16(glort[port]);
-+ bufs[i]->timesync = 1;
-+ }
-+
-+ /* Send packets to the other port by method of FTAG based forwarding */
-+ nb_tx = rte_eth_tx_burst(port, 0, bufs, nb_rx);
-+ if (nb_tx <= 0) {
-+ printf("Can not send out packets with FTAG\n");
-+ return -1;
-+ }
-+ if (unlikely(nb_tx < nb_rx)) {
-+ do {
-+ rte_pktmbuf_free(bufs[nb_tx]);
-+ } while (++nb_tx < nb_rx);
-+ }
-+ printf("Send out %d packets with FTAG on port %d\n", nb_tx, port);
-+
-+ /* Wait enough time for a burst of packets forwarding */
-+ rte_delay_us(100);
-+
-+ nb_rx = rte_eth_rx_burst(port ^ 1, 0, bufs, BURST_SIZE);
-+ printf("Receive %d packets on port %d\n", nb_rx, port ^ 1);
-+ if (nb_rx < nb_tx) {
-+ printf("Packet loss happens in FTAG TX test\n");
-+ ret = -1;
-+ }
-+
-+ /* check if the sglort value is right on the other port */
-+ for (i = 0; i < nb_rx; i++) {
-+ if (bufs[i]->vlan_tci_outer != glort[port]) {
-+ printf("sglort of the received packet is not right\n");
-+ ret = -1;
-+ break;
-+ }
-+ }
-+ for (i = 0; i < nb_rx; i++)
-+ rte_pktmbuf_free(bufs[i]);
-+
-+ if (!ret)
-+ printf("test for FTAG TX passed\n");
-+ return ret;
-+}
-+
-+static int
-+test_fm10k_ftag(void)
-+{
-+ uint16_t nb_ports;
-+ uint16_t portid, pid;
-+ struct rte_mempool *mbuf_pool;
-+ int ret = 0;
-+
-+ printf("Dump the devices args\n");
-+ rte_eal_devargs_dump(stdout);
-+
-+ nb_ports = rte_eth_dev_count();
-+ if (nb_ports != 2) {
-+ printf("2 ports needed for fm10k ftag based forwarding test\n");
-+ return -1;
-+ }
-+
-+ /* Creates a new mempool in memory to hold the mbufs. */
-+ mbuf_pool = rte_mempool_lookup("MBUF_POOL_FTAG");
-+ if (mbuf_pool == NULL)
-+ mbuf_pool = rte_pktmbuf_pool_create("MBUF_POOL_FTAG",
-+ NUM_MBUFS * nb_ports, MBUF_CACHE_SIZE, 0,
-+ RTE_MBUF_DEFAULT_BUF_SIZE, rte_socket_id());
-+
-+ if (mbuf_pool == NULL)
-+ rte_exit(EXIT_FAILURE, "Cannot create mbuf pool\n");
-+
-+ /* Initialize all ports. */
-+ for (portid = 0; portid < nb_ports; portid++)
-+ if (port_init(portid, mbuf_pool) != 0) {
-+ for (pid = 0; pid < portid; pid++) {
-+ rte_eth_dev_stop(portid);
-+ //rte_eth_dev_close(portid);
-+ }
-+ rte_exit(EXIT_FAILURE, "Cannot init port %"PRIu8 "\n",
-+ portid);
-+ }
-+
-+ if (test_ftag_rxtx() < 0)
-+ ret = -1;
-+
-+ /* port tear down */
-+ for (portid = 0; portid < nb_ports; portid++) {
-+ rte_eth_dev_stop(portid);
-+ //rte_eth_dev_close(portid);
-+ }
-+
-+ return ret;
-+}
-+
-+REGISTER_TEST_COMMAND(fm10k_ftag_autotest, test_fm10k_ftag);
---
-1.9.3
-
diff --git a/nics/atwood.py b/nics/atwood.py
deleted file mode 100644
index cf7a551b..00000000
--- a/nics/atwood.py
+++ /dev/null
@@ -1,173 +0,0 @@
-# BSD LICENSE
-#
-# Copyright(c) 2010-2016 Intel Corporation. All rights reserved.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Intel Corporation nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-from crb import Crb
-from config import PortConf, PORTCONF
-from exception import PortConfigParseException
-from utils import GREEN
-from net_device import NetDevice
-from dts import drivername
-
-TP_BINARY = 'TestPoint'
-
-FUNC_RULES = [
- # disable cut through for jumbo frame case
- 'set port config 1,2 tx_cut_through off',
- # disable mac learning
- 'set port config 0..2 learning off',
- #redirect PEP0 to EPL0
- 'create acl 0',
- 'create acl-rule 0 0',
- 'add acl-rule condition 0 0 src-port 0',
- 'add acl-rule action 0 0 redirect 1',
- 'add acl-rule action 0 0 count',
- 'apply acl',
- ]
-
-PERF_RULES = [
- 'set port config 0..1 parser_cfg L4', # frame parser up to L4
- # good for performance
- 'set api attribute boolean api.paritySweeper.enable false',
- 'reg dbg set 0 CM_SOFTDROP_WM 0x5f005f00 0 0',
- 'reg dbg set 0 CM_SHARED_WM 0x5f00 0 0',
- ]
-
-class CtrlCrb(Crb):
- """
- Simplified Crb class for RedRockCanyou control session
- """
-
- def __init__(self, crb):
- self.crb = crb
- self.NAME = 'dut_atwood_control'
- super(CtrlCrb, self).__init__(crb, None, self.NAME)
-
- def get_ip_address(self):
- return self.crb['IP']
-
- def get_password(self):
- return self.crb['pass']
-
-
-class Atwood(NetDevice):
- """
- Class for RedRockCanyou, inherit from NetDevice class
- """
-
- def __init__(self, host, domain_id, bus_id, devfun_id):
- super(Atwood, self).__init__(host, domain_id, bus_id, devfun_id)
- self.tp_path = "~"
- self.host = host
-
- # load port config
- portconf = PortConf(PORTCONF)
- portconf.load_ports_config(host.crb['IP'])
- pci_addr = ':'.join((domain_id, bus_id, devfun_id))
- if not portconf.check_port_available(pci_addr):
- raise PortConfigParseException("Atwood must configured")
-
- port_cfg = portconf.get_ports_config()[pci_addr]
-
- if 'tp_ip' not in list(port_cfg.keys()):
- raise PortConfigParseException("Atwood must configure test point ip")
- if 'passwd' not in list(port_cfg.keys()):
- raise PortConfigParseException("Atwood must configure host password")
-
- crb = {}
- crb['IP'] = port_cfg['tp_ip']
- crb['pass'] = port_cfg['passwd']
-
- if 'tp_path' in list(port_cfg.keys()):
- self.tp_path = port_cfg['tp_path']
-
- # create additional session
- self.ctrl_crb = CtrlCrb(crb)
-
- def setup(self):
- # setup function should be called after bind to igb_uio
- self.bind_driver(driver=drivername)
- self.start_testpoint()
-
- def optimize_perf(self, peer=""):
- pass
-
- def stop(self):
- # stop testpoint
- self.stop_testpoint()
-
- def close(self):
- # close session
- if self.ctrl_crb.session:
- self.ctrl_crb.session.close()
- self.ctrl_crb.session = None
- if self.ctrl_crb.alt_session:
- self.ctrl_crb.alt_session.close()
- self.ctrl_crb.alt_session = None
-
- def start_testpoint(self):
- """
- Before any execution, must enable test point first
- """
- self.ctrl_crb.send_expect("cd %s" % self.tp_path, "# ")
- if self.tp_path != "~":
- command = './' + TP_BINARY
- else:
- command = TP_BINARY
-
- self.ctrl_crb.send_expect("%s" % command, "<0>%", 120)
- for rule in FUNC_RULES:
- self.ctrl_crb.send_expect("%s" %rule, "<0>%")
-
- def stop_testpoint(self):
- """
- Exit test point
- """
- self.ctrl_crb.send_expect("quit", "# ")
-
- def get_control(self):
- return self.ctrl_crb
-
- def add_vlan(self, vlan_id=0):
- self.ctrl_crb.send_expect("create vlan %d" % vlan_id, "<0>%")
- self.ctrl_crb.send_expect("add vlan port %d 0,1" % vlan_id, "<0>%")
-
- def delete_vlan(self, vlan_id=0):
- self.ctrl_crb.send_expect("del vlan port %d 0,1" % vlan_id, "<0>%")
- self.ctrl_crb.send_expect("del vlan %d" % vlan_id, "<0>%")
-
- def add_txvlan(self, vlan_id=0):
- self.ctrl_crb.send_expect("set vlan tagging %d 1 tag" % vlan_id, "<0>%")
-
- def delete_txvlan(self, vlan_id=0):
- self.ctrl_crb.send_expect("set vlan tagging %d 1 untag" % vlan_id, "<0>%")
-
- def enable_jumbo(self, framesize=0):
- self.ctrl_crb.send_expect("set port config 1 max_frame_size %d" % framesize, "<0>%")
diff --git a/nics/br.py b/nics/br.py
deleted file mode 100644
index 88125e54..00000000
--- a/nics/br.py
+++ /dev/null
@@ -1,275 +0,0 @@
-# BSD LICENSE
-#
-# Copyright(c) 2010-2016 Intel Corporation. All rights reserved.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Intel Corporation nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-import re
-from crb import Crb
-from config import PortConf, PORTCONF
-from exception import PortConfigParseException
-from utils import GREEN
-from net_device import NetDevice
-from dts import drivername
-
-TP_BINARY = 'TestPoint'
-
-FUNC_RULES = [
- # disable cut through for jumbo frame case
- 'set port config 0,11 tx_cut_through off',
- # disable mac learning
- 'set port config 0..11 learning off',
- #redirect PEP0 to EPL0
- 'create acl 0',
- 'create acl-rule 0 0',
- 'add acl-rule condition 0 0 src-port 0',
- 'add acl-rule action 0 0 redirect 1',
- 'add acl-rule action 0 0 count',
- #redirect PEP1 to EPL1
- 'create acl 1',
- 'create acl-rule 1 0',
- 'add acl-rule condition 1 0 src-port 11',
- 'add acl-rule action 1 0 redirect 5',
- 'add acl-rule action 1 0 count',
- 'apply acl',
- ]
-
-PERF_RULES = [
- 'set port config 0..11 parser_cfg L4', # frame parser up to L4
- # good for performance
- 'set api attribute boolean api.paritySweeper.enable false',
- 'reg dbg set 0 CM_SOFTDROP_WM 0x5f005f00 0 0',
- 'reg dbg set 0 CM_SHARED_WM 0x5f00 0 0',
- #redirect EPL0 to PEP0
- 'create acl-rule 0 1',
- 'add acl-rule condition 0 1 src-port 1',
- 'add acl-rule action 0 1 redirect 0',
- 'add acl-rule action 0 1 count',
- 'create acl-rule 1 1',
- 'add acl-rule condition 1 1 src-port 5',
- 'add acl-rule action 1 1 redirect 11',
- 'add acl-rule action 1 1 count',
- 'apply acl',
- ]
-
-class CtrlCrb(Crb):
- """
- Simplified Crb class for Boulder_rapid control session
- """
-
- def __init__(self, crb):
- self.crb = crb
- self.NAME = 'dut_boulderapid_control'
- super(CtrlCrb, self).__init__(crb, None, self.NAME)
-
- def get_ip_address(self):
- return self.crb['IP']
-
- def get_password(self):
- return self.crb['pass']
-
-
-class BoulderRapid(NetDevice):
- """
- Class for BoulderRapid, inherit from NetDevice class
- """
-
- def __init__(self, host, domain_id, bus_id, devfun_id):
- super(BoulderRapid, self).__init__(host, domain_id, bus_id, devfun_id)
-
- self.tp_path = "~"
- self.sec_port = False
- self.host = host
-
- # load port config
- portconf = PortConf(PORTCONF)
- portconf.load_ports_config(host.crb['IP'])
- pci_addr = ':'.join((domain_id, bus_id, devfun_id))
- if not portconf.check_port_available(pci_addr):
- raise PortConfigParseException("BoulderRapid must configured")
-
- port_cfg = portconf.get_ports_config()[pci_addr]
-
- # secondary port do not need reinitialize
- if 'sec_port' in list(port_cfg.keys()):
- print(GREEN("Skip init second port test point session"))
- if 'first_port' not in list(port_cfg.keys()):
- raise PortConfigParseException("BoulderRapid second port must configure first port")
- # find net_device by pci_addr
- first_addr = port_cfg['first_port']
- port_info = self.host.get_port_info(first_addr)
- if port_info is None:
- raise PortConfigParseException("BoulderRapid first port not found")
- # get additional session
- netdev = port_info['port']
- self.ctrl_crb = netdev.get_control()
- self.sec_port = True
- return
-
-
- if 'tp_ip' not in list(port_cfg.keys()):
- raise PortConfigParseException("BoulderRapid must configure test point ip")
- if 'passwd' not in list(port_cfg.keys()):
- raise PortConfigParseException("BoulderRapid must configure host password")
-
- crb = {}
- crb['IP'] = port_cfg['tp_ip']
- crb['pass'] = port_cfg['passwd']
-
- if 'tp_path' in list(port_cfg.keys()):
- self.tp_path = port_cfg['tp_path']
-
- # create additional session
- self.ctrl_crb = CtrlCrb(crb)
-
- def setup(self):
- # setup function called after bind to igb_uio
- self.start_testpoint()
-
- def optimize_perf(self, peer0="", peer1=""):
- # rule which can optimize performance
- if self.sec_port is False:
- # applied rules
- for rule in PERF_RULES:
- self.ctrl_crb.send_expect("%s" %rule, "<0>%")
- # add default mac rule
- self.ctrl_crb.send_expect("add mac %s 1 locked port 1" % peer1, "<0>%")
- self.ctrl_crb.send_expect("add mac %s 1 locked port 5" % peer0, "<0>%")
-
- def stop(self):
- # second port do not need any operation
- if self.sec_port:
- return
-
- # stop testpoint
- self.stop_testpoint()
-
- def close(self):
- # second port do not need any operation
- if self.sec_port:
- return
-
- # close session
- if self.ctrl_crb.session:
- self.ctrl_crb.session.close()
- self.ctrl_crb.session = None
- if self.ctrl_crb.alt_session:
- self.ctrl_crb.alt_session.close()
- self.ctrl_crb.alt_session = None
-
- def start_testpoint(self):
- """
- Before any execution, must enable test point first
- """
- if self.sec_port:
- print(GREEN("Skip start second port testpoint"))
- return
-
- self.ctrl_crb.send_expect("cd %s" % self.tp_path, "# ")
- if self.tp_path != "~":
- command = './' + TP_BINARY
- else:
- command = TP_BINARY
-
- # special commands for tp 4.1.6
- command += " --api.platform.config.switch.0.uioDevName:text:/dev/uio0"
- command += " --api.platform.pktInterface:text:pti"
-
- self.ctrl_crb.send_expect("%s" % command, "<0>%", 120)
- for rule in FUNC_RULES:
- self.ctrl_crb.send_expect("%s" %rule, "<0>%")
-
- def stop_testpoint(self):
- """
- Exit test point
- """
- self.ctrl_crb.send_expect("quit", "# ")
-
- def get_control(self):
- return self.ctrl_crb
-
- def add_vlan(self, vlan_id=0):
- self.ctrl_crb.send_expect("create vlan %d" % vlan_id, "<0>%")
- if self.sec_port:
- self.ctrl_crb.send_expect("add vlan port %d 1,0" % vlan_id, "<0>%")
- else:
- self.ctrl_crb.send_expect("add vlan port %d 5,11" % vlan_id, "<0>%")
-
- def delete_vlan(self, vlan_id=0):
- if self.sec_port:
- self.ctrl_crb.send_expect("del vlan port %d 1,0" % vlan_id, "<0>%")
- else:
- self.ctrl_crb.send_expect("del vlan port %d 5,11" % vlan_id, "<0>%")
- self.ctrl_crb.send_expect("del vlan %d" % vlan_id, "<0>%")
-
- def add_txvlan(self, vlan_id=0):
- if self.sec_port:
- self.ctrl_crb.send_expect("set vlan tagging %d 1 tag" % vlan_id, "<0>%")
- else:
- self.ctrl_crb.send_expect("set vlan tagging %d 5 tag" % vlan_id, "<0>%")
-
- def delete_txvlan(self, vlan_id=0):
- if self.sec_port:
- self.ctrl_crb.send_expect("set vlan tagging %d 1 untag" % vlan_id, "<0>%")
- else:
- self.ctrl_crb.send_expect("set vlan tagging %d 5 untag" % vlan_id, "<0>%")
-
- def enable_jumbo(self, framesize=0):
- if self.sec_port:
- self.ctrl_crb.send_expect("set port config 1 max_frame_size %d" % framesize, "<0>%")
- else:
- self.ctrl_crb.send_expect("set port config 5 max_frame_size %d" % framesize, "<0>%")
-
- def get_glortid_bymac(self, dmac):
- out = self.ctrl_crb.send_expect("show mac table all", "<0>%")
- pattern = r"([0-9a-f]{2}:){5}([0-9a-f]{2})"
- s = re.compile(pattern)
- res = s.search(dmac)
- if res is None:
- print(RED("search none mac filter"))
- return None
- else:
- mac_filter = res.group(2)
- pattern = r"(?<=%s)+([\sA-Za-z0-9/])+([0-9]{4})" %mac_filter
- s = re.compile(pattern)
- res = s.search(out)
- if res is None:
- print(RED("search none port value"))
- return None
- else:
- port_value = res.group(2)
- out = self.ctrl_crb.send_expect("show stacking logical-port all", "<0>%")
- pattern = r"([0-9a-z]{6})+(\s)+(%s)+" %port_value
- s = re.compile(pattern)
- res = s.search(out)
- if res is None:
- print(RED("search none port glort id"))
- return None
- else:
- port_glortid = res.group(1)
- return port_glortid
diff --git a/nics/rrc.py b/nics/rrc.py
deleted file mode 100644
index d0198858..00000000
--- a/nics/rrc.py
+++ /dev/null
@@ -1,272 +0,0 @@
-# BSD LICENSE
-#
-# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Intel Corporation nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-import re
-from crb import Crb
-from config import PortConf, PORTCONF
-from exception import PortConfigParseException
-from utils import GREEN
-from net_device import NetDevice
-
-DEF_PASSWD = 's'
-TP_BINARY = 'TestPoint'
-
-FUNC_RULES = [
- # disable cut through for jumbo frame case
- 'set port config 20,22 tx_cut_through off',
- # disable mac learning
- 'set port config 0..22 learning off',
- #redirect PEP0 to EPL0
- 'create acl 0',
- 'create acl-rule 0 0',
- 'add acl-rule condition 0 0 src-port 20',
- 'add acl-rule action 0 0 redirect 1',
- 'add acl-rule action 0 0 count',
- #redirect PEP1 to EPL1
- 'create acl 1',
- 'create acl-rule 1 0',
- 'add acl-rule condition 1 0 src-port 22',
- 'add acl-rule action 1 0 redirect 5',
- 'add acl-rule action 1 0 count',
- 'apply acl',
- ]
-
-PERF_RULES = [
- 'set port config 0..11 parser_cfg L4', # frame parser up to L4
- # good for performance
- 'set api attribute boolean api.paritySweeper.enable false',
- 'reg dbg set 0 CM_SOFTDROP_WM 0x5f005f00 0 0',
- 'reg dbg set 0 CM_SHARED_WM 0x5f00 0 0',
- # rule for direct rx traffic
- # mac filter will be useless, so only enable for perf
- 'create acl-rule 0 1',
- 'add acl-rule condition 0 1 src-port 1',
- 'add acl-rule action 0 1 redirect 20',
- 'add acl-rule action 0 1 count',
- 'create acl-rule 1 1',
- 'add acl-rule condition 1 1 src-port 5',
- 'add acl-rule action 1 1 redirect 22',
- 'add acl-rule action 1 1 count',
- 'apply acl',
- ]
-
-class CtrlCrb(Crb):
- """
- Simplified Crb class for RedRockCanyou control session
- """
-
- def __init__(self, crb):
- self.crb = crb
- self.NAME = 'dut_RRC_CONTROL'
- super(CtrlCrb, self).__init__(crb, None, self.NAME)
-
- def get_ip_address(self):
- return self.crb['IP']
-
- def get_password(self):
- return self.crb['pass']
-
-
-class RedRockCanyou(NetDevice):
- """
- Class for RedRockCanyou, inherit from NetDevice class
- """
-
- def __init__(self, host, domain_id, bus_id, devfun_id):
- super(RedRockCanyou, self).__init__(host, domain_id, bus_id, devfun_id)
-
- self.tp_path = "~"
- self.sec_port = False
- self.host = host
-
- # load port config
- portconf = PortConf(PORTCONF)
- portconf.load_ports_config(host.crb['IP'])
- pci_addr = ':'.join((domain_id, bus_id, devfun_id))
- if not portconf.check_port_available(pci_addr):
- raise PortConfigParseException("RRC must configured")
-
- port_cfg = portconf.get_ports_config()[pci_addr]
-
- # secondary port do not need reinitialize
- if 'sec_port' in list(port_cfg.keys()):
- print(GREEN("Skip init second port test point session"))
- if 'first_port' not in list(port_cfg.keys()):
- raise PortConfigParseException("RRC second port must configure first port")
- # find net_device by pci_addr
- first_addr = port_cfg['first_port']
- port_info = self.host.get_port_info(first_addr)
- if port_info is None:
- raise PortConfigParseException("RRC first port not found")
- # get additional session
- netdev = port_info['port']
- self.ctrl_crb = netdev.get_control()
- self.sec_port = True
- return
-
- if 'tp_ip' not in list(port_cfg.keys()):
- raise PortConfigParseException("RRC must configure test point ip")
-
- crb = {}
- crb['IP'] = port_cfg['tp_ip']
- if 'passwd' not in list(port_cfg.keys()):
- crb['pass'] = DEF_PASSWD
- else:
- crb['pass'] = port_cfg['passwd']
-
- if 'tp_path' in list(port_cfg.keys()):
- self.tp_path = port_cfg['tp_path']
-
- # create additional session
- self.ctrl_crb = CtrlCrb(crb)
-
- def setup(self):
- # setup function should be called after bind to igb_uio
- self.start_testpoint()
-
- def optimize_perf(self, peer0="", peer1=""):
- # rule which can optimize performance
- if self.sec_port is False:
- # applied rules
- for rule in PERF_RULES:
- self.ctrl_crb.send_expect("%s" %rule, "<0>%")
- # add default mac rule
- self.ctrl_crb.send_expect("add mac %s 1 locked port 1" % peer0, "<0>%")
- self.ctrl_crb.send_expect("add mac %s 1 locked port 5" % peer1, "<0>%")
-
- def stop(self):
- # second port do not need any operation
- if self.sec_port:
- return
-
- # stop testpoint
- self.stop_testpoint()
-
- def close(self):
- # second port do not need any operation
- if self.sec_port:
- return
-
- # close session
- if self.ctrl_crb.session:
- self.ctrl_crb.session.close()
- self.ctrl_crb.session = None
- if self.ctrl_crb.alt_session:
- self.ctrl_crb.alt_session.close()
- self.ctrl_crb.alt_session = None
-
- def start_testpoint(self):
- """
- Before any execution, must enable test point first
- """
- if self.sec_port:
- print(GREEN("Skip start second port testpoint"))
- return
- self.ctrl_crb.send_expect("cd %s" % self.tp_path, "# ")
- if self.tp_path != "~":
- command = './' + TP_BINARY
- else:
- command = TP_BINARY
-
- self.ctrl_crb.send_expect("%s" % command, "<0>%", 120)
- for rule in FUNC_RULES:
- self.ctrl_crb.send_expect("%s" %rule, "<0>%")
-
- def stop_testpoint(self):
- """
- Exit test point
- """
- self.ctrl_crb.send_expect("quit", "# ")
-
- def get_control(self):
- return self.ctrl_crb
-
- def add_vlan(self, vlan_id=0):
- self.ctrl_crb.send_expect("create vlan %d" % vlan_id, "<0>%")
- if self.sec_port:
- self.ctrl_crb.send_expect("add vlan port %d 5,22" % vlan_id, "<0>%")
- else:
- self.ctrl_crb.send_expect("add vlan port %d 1,20" % vlan_id, "<0>%")
-
- def delete_vlan(self, vlan_id=0):
- if self.sec_port:
- self.ctrl_crb.send_expect("del vlan port %d 5,22" % vlan_id, "<0>%")
- else:
- self.ctrl_crb.send_expect("del vlan port %d 1,20" % vlan_id, "<0>%")
- self.ctrl_crb.send_expect("del vlan %d" % vlan_id, "<0>%")
-
- def add_txvlan(self, vlan_id=0):
- if self.sec_port:
- self.ctrl_crb.send_expect("set vlan tagging %d 5 tag" % vlan_id, "<0>%")
- else:
- self.ctrl_crb.send_expect("set vlan tagging %d 1 tag" % vlan_id, "<0>%")
-
- def delete_txvlan(self, vlan_id=0):
- if self.sec_port:
- self.ctrl_crb.send_expect("set vlan tagging %d 5 untag" % vlan_id, "<0>%")
- else:
- self.ctrl_crb.send_expect("set vlan tagging %d 1 untag" % vlan_id, "<0>%")
-
- def enable_jumbo(self, framesize=0):
- if self.sec_port:
- self.ctrl_crb.send_expect("set port config 5 max_frame_size %d" % framesize, "<0>%")
- else:
- self.ctrl_crb.send_expect("set port config 1 max_frame_size %d" % framesize, "<0>%")
-
- def get_glortid_bymac(self, dmac):
- out = self.ctrl_crb.send_expect("show mac table all", "<0>%")
- pattern = r"([0-9a-f]{2}:){5}([0-9a-f]{2})"
- s = re.compile(pattern)
- res = s.search(dmac)
- if res is None:
- print("search none mac filter")
- return None
- else:
- mac_filter = res.group(2)
- pattern = r"(?<=%s)+([\sA-Za-z0-9/])+([0-9]{4})" %mac_filter
- s = re.compile(pattern)
- res = s.search(out)
- if res is None:
- print("search none port value")
- return None
- else:
- port_value = res.group(2)
- out = self.ctrl_crb.send_expect("show stacking logical-port all", "<0>%")
- pattern = r"([0-9a-z]{6})+(\s)+(%s)+" %port_value
- s = re.compile(pattern)
- res = s.search(out)
- if res is None:
- print("search none port glort id")
- return None
- else:
- port_glortid = res.group(1)
- return port_glortid
-
diff --git a/tests/TestSuite_fm10k_perf.py b/tests/TestSuite_fm10k_perf.py
deleted file mode 100644
index 5ff411dd..00000000
--- a/tests/TestSuite_fm10k_perf.py
+++ /dev/null
@@ -1,617 +0,0 @@
-# BSD LICENSE
-#
-# Copyright(c) 2010-2019 Intel Corporation. All rights reserved.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Intel Corporation nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""
-DPDK Test suite.
-Layer-3 forwarding test script.
-"""
-
-import utils
-import string
-import re
-import os
-from test_case import TestCase
-from exception import VerifyFailure
-from settings import HEADER_SIZE
-from utils import *
-from pktgen import PacketGeneratorHelper
-
-class TestFM10kL3fwd(TestCase):
-
- path = "./examples/l3fwd/build/"
-
- test_cases_2_ports = {
- "1S/1C/1T": "%s -c %s -n %d -- -p %s --config '(P0,0,C{1.1.0}), (P1,0,C{1.1.0})'",
- "1S/2C/1T": "%s -c %s -n %d -- -p %s --config '(P0,0,C{1.1.0}), (P1,0,C{1.2.0})'",
- "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})'",
- "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})," +\
- "(P1,0,C{1.5.0}),(P1,1,C{1.6.0}), (P1,2,C{1.7.0}), (P1,3,C{1.8.0})'",
- "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})," +\
- "(P0,4,C{1.1.1}), (P0,5,C{1.2.1}), (P0,6,C{1.3.1}), (P0,7,C{1.4.1})," +\
- "(P1,0,C{1.5.0}), (P1,1,C{1.6.0}), (P1,2,C{1.7.0}), (P1,3,C{1.8.0})," +\
- "(P1,4,C{1.5.1}), (P1,5,C{1.6.1}), (P1,6,C{1.7.1}), (P1,7,C{1.8.1})'"
- }
-
- host_table = [
- "{{IPv4(10,100,0,1), IPv4(1,2,3,4), 1, 10, IPPROTO_UDP}, P0}",
- "{{IPv4(10,101,0,1), IPv4(1,2,3,4), 1, 10, IPPROTO_UDP}, P0}",
- "{{IPv4(11,100,0,1), IPv4(1,2,3,4), 1, 11, IPPROTO_UDP}, P1}",
- "{{IPv4(11,101,0,1), IPv4(1,2,3,4), 1, 11, IPPROTO_UDP}, P1}",
- "{{IPv4(12,100,0,1), IPv4(1,2,3,4), 1, 12, IPPROTO_UDP}, P2}",
- "{{IPv4(12,101,0,1), IPv4(1,2,3,4), 1, 12, IPPROTO_UDP}, P2}",
- "{{IPv4(13,100,0,1), IPv4(1,2,3,4), 1, 13, IPPROTO_UDP}, P3}",
- "{{IPv4(13,101,0,1), IPv4(1,2,3,4), 1, 13, IPPROTO_UDP}, P3}",
- ]
-
- lpm_table = [
- "{IPv4(10,100,0,0), 24, P0}",
- "{IPv4(10,101,0,0), 24, P0}",
- "{IPv4(11,100,0,0), 24, P1}",
- "{IPv4(11,101,0,0), 24, P1}",
- "{IPv4(12,100,0,0), 24, P2}",
- "{IPv4(12,101,0,0), 24, P2}",
- "{IPv4(13,100,0,0), 24, P3}",
- "{IPv4(13,101,0,0), 24, P3}",
- ]
-
- frame_sizes = [64, 128, 256, 512, 2048] # 65, 128
- methods = ['lpm']
-
- # Insert or move non-test functions here.
- def portRepl(self, match):
- """
- Function to replace P([0123]) pattern in tables
- """
-
- portid = match.group(1)
- self.verify(int(portid) in range(4), "invalid port id")
- if int(portid) >= len(valports):
- return '0'
- else:
- return '%s' % valports[int(portid)]
-
- def set_up_all(self):
- """
- Run at the start of each test suite.
- L3fwd Prerequisites
- """
- # Based on h/w type, choose how many ports to use
- ports = self.dut.get_ports(socket=1)
- if not ports:
- ports = self.dut.get_ports(socket=0)
-
- self.tester.extend_external_packet_generator(TestFM10kL3fwd, self)
- # Verify that enough ports are available
- self.verify(len(ports) >= 2, "Insufficient ports for speed testing")
-
- netdev = self.dut.ports_info[ports[0]]['port']
-
- self.port_socket = netdev.socket
-
- # Verify that enough threads are available
- cores = self.dut.get_core_list("2S/8C/2T")
- self.verify(cores is not None, "Insufficient cores for speed testing")
-
- global valports
- valports = [_ for _ in ports if self.tester.get_local_port(_) != -1]
-
- self.verify(len(valports) >= 2, "Insufficient active ports for speed testing")
-
- self.main_file = "examples/l3fwd/main.c"
- self.pf_file = "drivers/net/fm10k/base/fm10k_pf.c"
- # Update config file and rebuild to get best perf on FVL
- if "redrockcanyou" in self.nic:
- self.dut.send_expect("sed -i -e 's/FM10K_TQDLOC_BASE_32_DESC/FM10K_TQDLOC_BASE_128_DESC/' %s" % self.pf_file, "# ")
- self.dut.send_expect("sed -i -e 's/FM10K_TQDLOC_SIZE_32_DESC/FM10K_TQDLOC_SIZE_128_DESC/' %s" % self.pf_file, "# ")
- self.dut.send_expect("sed -i -e 's/FM10K_TDLEN_ITR_SCALE_GEN3;$/FM10K_TDLEN_ITR_SCALE_GEN3 * 2;/' %s" % self.pf_file, "# ")
-
- self.dut.build_install_dpdk(self.target)
-
- self.l3fwd_test_results = {'header': [],
- 'data': []}
-
- self.rebuild_l3fwd()
-
- # get dts output path
- if self.logger.log_path.startswith(os.sep):
- self.output_path = self.logger.log_path
- else:
- cur_path = os.path.dirname(
- os.path.dirname(os.path.realpath(__file__)))
- self.output_path = os.sep.join([cur_path, self.logger.log_path])
- # create an instance to set stream field setting
- self.pktgen_helper = PacketGeneratorHelper()
-
- def rebuild_l3fwd(self):
- pat = re.compile("P([0123])")
- # Prepare long prefix match table, replace P(x) port pattern
- lpmStr = "static struct ipv4_l3fwd_route ipv4_l3fwd_route_array[] = {\\\n"
- for idx in range(len(TestFM10kL3fwd.lpm_table)):
- TestFM10kL3fwd.lpm_table[idx] = pat.sub(self.portRepl, TestFM10kL3fwd.lpm_table[idx])
- lpmStr = lpmStr + ' ' * 4 + TestFM10kL3fwd.lpm_table[idx] + ",\\\n"
- lpmStr = lpmStr + "};"
- self.logger.debug(lpmStr)
-
- # Prepare host route table, replace P(x) port pattern
- exactStr = "static struct ipv4_l3fwd_route ipv4_l3fwd_route_array[] = {\\\n"
- for idx in range(len(TestFM10kL3fwd.host_table)):
- TestFM10kL3fwd.host_table[idx] = pat.sub(self.portRepl, TestFM10kL3fwd.host_table[idx])
- exactStr = exactStr + ' ' * 4 + TestFM10kL3fwd.host_table[idx] + ",\\\n"
- exactStr = exactStr + "};"
- self.logger.debug(exactStr)
-
- # Compile l3fwd with LPM lookup.
- self.dut.send_expect(r"sed -i '/ipv4_l3fwd_route_array\[\].*{/,/^\}\;/c\\%s' examples/l3fwd/main.c" % lpmStr, "# ")
- out = self.dut.build_dpdk_apps("./examples/l3fwd", "USER_FLAGS=-DAPP_LOOKUP_METHOD=1")
- self.verify("Error" not in out, "compilation error 1")
- self.verify("No such file" not in out, "compilation error 2")
-
- # Backup the LPM exe and clean up the build.
- self.dut.send_expect("mv -f examples/l3fwd/build/l3fwd examples/l3fwd/build/l3fwd_lpm", "# ")
- out = self.dut.send_expect("make clean -C examples/l3fwd", "# ")
-
- def flows(self):
- """
- Return a list of packets that implements the flows described in the
- l3fwd test plan.
-
- """
- return [
- 'IP(src="1.2.3.4",dst="11.100.0.1")',
- 'IP(src="1.2.3.4",dst="11.101.0.1")',
- 'IP(src="1.2.3.4",dst="10.100.0.1")',
- 'IP(src="1.2.3.4",dst="10.101.0.1")',
- 'IP(src="1.2.3.4",dst="13.100.0.1")',
- 'IP(src="1.2.3.4",dst="13.101.0.1")',
- 'IP(src="1.2.3.4",dst="12.100.0.1")',
- 'IP(src="1.2.3.4",dst="12.101.0.1")']
-
- def repl(self, match):
- pid = match.group(1)
- qid = match.group(2)
- self.logger.debug("%s\n" % match.group(3))
- lcid = self.dut.get_lcore_id(match.group(3))
- self.logger.debug("%s\n" % lcid)
-
- global corelist
- corelist.append(int(lcid))
-
- self.verify(int(pid) in range(4), "invalid port id")
- self.verify(lcid, "invalid thread id")
-
- return '%s,%s,%s' % (str(valports[int(pid)]), qid, lcid)
-
- def set_up(self):
- """
- Run before each test case.
- """
- pass
-
- def fm10k_rxmode_set(self, mode="default"):
- """
- Change rxmode setting for RRC vector choice
- RRC rxmode choice will depend on rxmod
- """
- if mode == "scatter":
- # enable ip checkcsum
- self.dut.send_expect("sed -i -e 's/.hw_ip_checksum = .*$/.hw_ip_checksum = 1,/g' %s" % self.main_file, "# ")
- # enable scatter mode
- self.dut.send_expect("sed -i -e 's/.enable_scatter = .*$/.enable_scatter = 1,/g' %s" % self.main_file, "# ")
- elif mode == "scatter_vector":
- # disable ip checksum
- self.dut.send_expect("sed -i -e 's/.hw_ip_checksum = .*$/.hw_ip_checksum = 0,/g' %s" % self.main_file, "# ")
- # enable scatter mode
- self.dut.send_expect("sed -i -e 's/.enable_scatter = .*$/.enable_scatter = 1,/g' %s" % self.main_file, "# ")
- elif mode == "vector":
- # disable ip checksum
- self.dut.send_expect("sed -i -e 's/.hw_ip_checksum = .*$/.hw_ip_checksum = 0,/g' %s" % self.main_file, "# ")
- # default l3fwd parameter, scatter will be disabled
- self.dut.send_expect("sed -i -e 's/.enable_scatter = .*$/.enable_scatter = 0,/g' %s" % self.main_file, "# ")
- elif mode == "default":
- # disable ip checksum
- self.dut.send_expect("sed -i -e 's/.hw_ip_checksum = .*$/.hw_ip_checksum = 1,/g' %s" % self.main_file, "# ")
- # default l3fwd parameter, scatter will be disabled
- self.dut.send_expect("sed -i -e 's/.enable_scatter = .*$/.enable_scatter = 0,' %s" % self.main_file, "# ")
-
- # rebuild l3fwd
- self.rebuild_l3fwd()
-
- def test_perf_fm10k_legacy_perf(self):
- # add setting for scatter
- # self.dut.send_expect("sed -i -e '/.hw_ip_checksum = .*$/a\\.enable_scatter = 0,' %s" % self.main_file, "# ")
-
- # mode_settings = [{'rxmode': 'default', 'txmode': 'default'}, {'rxmode': 'vector', 'txmode': 'vector'}]
- mode_settings = [{'rxmode': 'default', 'txmode': 'default'}]
- for mode in mode_settings:
- self.fm10k_rxmode_set(mode = mode['rxmode'])
- if mode['txmode'] == 'default':
- # need --enable-jumbo parameter
- for key in list(TestFM10kL3fwd.test_cases_2_ports.keys()):
- if "--enable-jumbo" not in TestFM10kL3fwd.test_cases_2_ports[key]:
- TestFM10kL3fwd.test_cases_2_ports[key] += " --enable-jumbo"
- else:
- for key in list(TestFM10kL3fwd.test_cases_2_ports.keys()):
- TestFM10kL3fwd.test_cases_2_ports[key].replace(" --enable-jumbo", "")
-
- print((GREEN("Performance test for rxmode %s txmode %s" % (mode['rxmode'], mode['txmode']))))
- self.perf_l3fwd_2ports()
-
- # remove setting for scatter
- self.dut.send_expect("sed -i -e '/.enable_scatter= .*$/d' %s" % self.main_file, "# ")
-
- def test_perf_fm10k_vec_perf(self):
- # add setting for scatter
- # self.dut.send_expect("sed -i -e '/.hw_ip_checksum = .*$/a\\.enable_scatter = 0,' %s" % self.main_file, "# ")
-
- # mode_settings = [{'rxmode': 'default', 'txmode': 'default'}, {'rxmode': 'vector', 'txmode': 'vector'}]
- mode_settings = [{'rxmode': 'vector', 'txmode': 'vector'}]
- for mode in mode_settings:
- self.fm10k_rxmode_set(mode = mode['rxmode'])
- if mode['txmode'] == 'default':
- # need --enable-jumbo parameter
- for key in list(TestFM10kL3fwd.test_cases_2_ports.keys()):
- if "--enable-jumbo" not in TestFM10kL3fwd.test_cases_2_ports[key]:
- TestFM10kL3fwd.test_cases_2_ports[key] += " --enable-jumbo"
- else:
- for key in list(TestFM10kL3fwd.test_cases_2_ports.keys()):
- TestFM10kL3fwd.test_cases_2_ports[key].replace(" --enable-jumbo", "")
-
- print((GREEN("Performance test for rxmode %s txmode %s" % (mode['rxmode'], mode['txmode']))))
- self.perf_l3fwd_2ports()
-
- # remove setting for scatter
- self.dut.send_expect("sed -i -e '/.enable_scatter= .*$/d' %s" % self.main_file, "# ")
-
- def perf_l3fwd_2ports(self):
- """
- L3fwd main 2 ports.
- """
-
- header_row = ["Frame", "mode", "S/C/T", "Mpps", "% linerate", "latency_max(us)", "latency_min(us)", "latency_avg(us)"]
- self.l3fwd_test_results['header'] = header_row
- self.result_table_create(header_row)
- self.l3fwd_test_results['data'] = []
-
- mac = ["02:00:00:00:00:00", "02:00:00:00:00:01"]
- for frame_size in TestFM10kL3fwd.frame_sizes:
-
- # Prepare traffic flow
- payload_size = frame_size - \
- HEADER_SIZE['ip'] - HEADER_SIZE['eth']
- flows = []
- pcaps = {}
- for _port in range(2):
- dmac = self.dut.get_mac_address(valports[_port])
- cnt = 0
- for layer in self.flows()[_port * 2: (_port + 1) * 2]:
- flow = 'Ether(dst="%s", src="%s")/%s/("X"*%d)' % (
- dmac, mac[_port], flow, payload_size)
- flows.append(flow)
- pcap = os.sep.join([
- self.output_path,
- "dst{0}_{1}.pcap".format(valports[_port], cnt)])
- self.tester.scapy_append('wrpcap("%s", [%s])' % (pcap, flow))
- self.tester.scapy_execute()
- if valports[_port] not in pcaps:
- pcaps[valports[_port]] = []
- pcaps[valports[_port]].append(pcap)
- cnt += 1
-
- self.rst_report("Flows for 2 ports, %d frame size.\n" % (frame_size),
- annex=True)
- self.rst_report("%s" % string.join(flows, '\n'),
- frame=True, annex=True)
-
- # Prepare the command line
- global corelist
- pat = re.compile("P([0123]),([01234567]),(C\{\d.\d.\d\})")
-
- pat2 = re.compile("C\{\d")
- repl1 = "C{" + str(self.port_socket)
-
- coreMask = {}
- rtCmdLines = dict(TestFM10kL3fwd.test_cases_2_ports)
- for key in list(rtCmdLines.keys()):
- corelist = []
- while pat.search(rtCmdLines[key]):
- # Change the socket to the NIC's socket
- if key.find('1S') >= 0:
- rtCmdLines[key] = pat2.sub(repl1, rtCmdLines[key])
- rtCmdLines[key] = pat.sub(self.repl, rtCmdLines[key])
-
- self.logger.info("%s\n" % str(corelist))
- coreMask[key] = utils.create_mask(set(corelist))
-
- # measure by two different mode
- # methods = TestFM10kL3fwd.methods
-
- for mode in TestFM10kL3fwd.methods:
-
- # start l3fwd
- index = 0
- subtitle = []
- for cores in list(rtCmdLines.keys()):
-
- info = "Executing l3fwd using %s mode, 2 ports, %s and %d frame size.\n" % (
- mode, cores, frame_size)
-
- self.logger.info(info)
- self.rst_report(info, annex=True)
-
- subtitle.append(cores)
- cmdline = rtCmdLines[cores] % (TestFM10kL3fwd.path + "l3fwd_" + mode, coreMask[cores],
- self.dut.get_memory_channels(), utils.create_mask(valports[:2]))
-
- if frame_size > 1518:
- cmdline = cmdline + " --max-pkt-len %d" % frame_size
- self.rst_report(cmdline + "\n", frame=True, annex=True)
-
- out = self.dut.send_expect(cmdline, "L3FWD:", 120)
-
- # Measure test
- tgenInput = []
- for rxPort in range(2):
- # No use on rx/tx limitation
- if rxPort % 2 == 0:
- txIntf = self.tester.get_local_port(valports[rxPort + 1])
- else:
- txIntf = self.tester.get_local_port(valports[rxPort - 1])
-
- rxIntf = self.tester.get_local_port(valports[rxPort])
- port_id = valports[rxPort+1] if rxPort % 2 == 0 else \
- valports[rxPort-1]
- for pcap in pcaps[port_id]:
- tgenInput.append((txIntf, rxIntf, pcap))
-
- vm_config = self.set_fields()
- # clear streams before add new streams
- self.tester.pktgen.clear_streams()
- # run packet generator
- streams = self.pktgen_helper.prepare_stream_from_tginput(tgenInput, 100,
- vm_config, self.tester.pktgen)
- _, pps = self.tester.pktgen.measure_throughput(stream_ids=streams)
-
- self.verify(pps > 0, "No traffic detected")
- pps /= 1000000.0
- linerate = self.wirespeed(self.nic, frame_size, 2)
- pct = pps * 100 / linerate
-
- # clear streams before add new streams
- self.tester.pktgen.clear_streams()
- # run packet generator
- streams = self.pktgen_helper.prepare_stream_from_tginput(tgenInput, 100,
- vm_config, self.tester.pktgen)
- latencys = self.tester.pktgen.measure_latency(stream_ids=streams)
-
- index += 1
-
- # Stop l3fwd
- self.dut.send_expect("^C", "#")
- print(latencys)
-
- for latency in latencys:
- if latency['max'] > 0:
- data_row = [frame_size, mode, cores, str(pps), str(pct), str(latency['max']/1000), str(latency['min']/1000), str(latency['average']/1000)]
- utils.result_table_add(data_row)
- self.l3fwd_test_results['data'].append(data_row)
-
- self.result_table_print()
-
- def perf_rfc2544(self):
-
- header_row = ["Frame", "mode", "S/C/T", "tx_pkts(1min)", "LR_rx_pkts(1min)", "LR_loss_pkts(1min)", "% zero_loss_rate(0.01%loss)"]
- self.l3fwd_test_results['header'] = header_row
- self.result_table_create(header_row)
- self.l3fwd_test_results['data'] = []
-
- for frame_size in TestFM10kL3fwd.frame_sizes:
-
- # Prepare traffic flow
- payload_size = frame_size - \
- HEADER_SIZE['ip'] - HEADER_SIZE['eth']
- pcaps = {}
- flows = []
- for _port in range(2):
- index = valports[_port]
- dmac = self.dut.get_mac_address(index)
- cnt = 0
- for layer in self.flows()[_port * 2: (_port + 1) * 2]:
- flow = 'Ether(dst="%s")/%s/("X"*%d)' % (
- dmac, layer, payload_size)
- flows.append(flow)
- pcap = os.sep.join([
- self.output_path,
- "dst{0}_{1}.pcap".format(index, cnt)])
- self.tester.scapy_append('wrpcap("%s", [%s])' % (
- pcap, flow))
- self.tester.scapy_execute()
- if index not in pcaps:
- pcaps[index] = []
- pcaps[index].append(pcap)
- cnt += 1
-
- self.rst_report("Flows for 2 ports, %d frame size.\n" % (frame_size),
- annex=True)
- self.rst_report("%s" % string.join(flows, '\n'),
- frame=True, annex=True)
-
- # Prepare the command line
- global corelist
- pat = re.compile("P([0123]),([0123]),(C\{\d.\d.\d\})")
-
- pat2 = re.compile("C\{\d")
- repl1 = "C{" + str(self.port_socket)
-
- coreMask = {}
- rtCmdLines = dict(TestFM10kL3fwd.test_cases_2_ports)
- for key in list(rtCmdLines.keys()):
- corelist = []
- while pat.search(rtCmdLines[key]):
- # Change the socket to the NIC's socket
- if key.find('1S') >= 0:
- rtCmdLines[key] = pat2.sub(repl1, rtCmdLines[key])
- rtCmdLines[key] = pat.sub(self.repl, rtCmdLines[key])
-
- self.logger.info("%s\n" % str(corelist))
- coreMask[key] = utils.create_mask(set(corelist))
-
- # measure by two different mode
- for mode in TestFM10kL3fwd.methods:
-
- # start l3fwd
- index = 0
- subtitle = []
- for cores in list(rtCmdLines.keys()):
-
- # in order to save time, only some of the cases will be run.
- if mode == "lpm" and (cores == "1S/1C/1T" or cores == "1S/4C/1T"):
- info = "Executing l3fwd using %s mode, 2 ports, %s and %d frame size.\n" % (
- mode, cores, frame_size)
-
- self.logger.info(info)
- self.rst_report(info, annex=True)
-
- subtitle.append(cores)
- cmdline = rtCmdLines[cores] % (TestFM10kL3fwd.path + "l3fwd_" + mode, coreMask[cores],
- self.dut.get_memory_channels(), utils.create_mask(valports[:2]))
-
- if frame_size > 1518:
- cmdline = cmdline + " --max-pkt-len %d" % frame_size
- self.rst_report(cmdline + "\n", frame=True, annex=True)
-
- out = self.dut.send_expect(cmdline, "L3FWD:", 120)
-
- # Measure test
- tgenInput = []
- for rxPort in range(2):
- # No use on rx/tx limitation
- if rxPort % 2 == 0:
- txIntf = self.tester.get_local_port(valports[rxPort + 1])
- else:
- txIntf = self.tester.get_local_port(valports[rxPort - 1])
-
- rxIntf = self.tester.get_local_port(valports[rxPort])
-
- port_id = valports[rxPort+1] if rxPort % 2 == 0 else \
- valports[rxPort-1]
- for pcap in pcaps[port_id]:
- tgenInput.append((txIntf, rxIntf, pcap))
-
- vm_config = self.set_fields()
- # clear streams before add new streams
- self.tester.pktgen.clear_streams()
- # run packet generator
- streams = self.pktgen_helper.prepare_stream_from_tginput(tgenInput,
- 100, vm_config, self.tester.pktgen)
- # set traffic option
- traffic_opt = {'pdr': 0.01, 'duration': 5}
- zero_loss_rate, tx_pkts, rx_pkts = self.tester.pktgen.measure_rfc2544(stream_ids=streams, options=traffic_opt)
-
- loss_pkts = tx_pkts - rx_pkts
- self.dut.send_expect("^C", "#")
-
- tx_pkts = human_read_number(tx_pkts)
- rx_pkts = human_read_number(rx_pkts)
- loss_pkts = human_read_number(loss_pkts)
-
- data_row = [frame_size, mode, cores, str(tx_pkts), str(rx_pkts), loss_pkts, zero_loss_rate]
- self.result_table_add(data_row)
- self.l3fwd_test_results['data'].append(data_row)
- else:
- pass
-
- index += 1
-
- self.result_table_print()
-
- def test_perf_rfc2544_vec(self):
- # add setting for scatter
-
- # mode_settings = [{'rxmode': 'default', 'txmode': 'default'}, {'rxmode': 'vector', 'txmode': 'vector'}]
- mode_settings = [{'rxmode': 'vector', 'txmode': 'vector'}]
- for mode in mode_settings:
- self.fm10k_rxmode_set(mode = mode['rxmode'])
- if mode['txmode'] == 'default':
- # need --enable-jumbo parameter
- for key in list(TestFM10kL3fwd.test_cases_2_ports.keys()):
- if "--enable-jumbo" not in TestFM10kL3fwd.test_cases_2_ports[key]:
- TestFM10kL3fwd.test_cases_2_ports[key] += " --enable-jumbo"
- else:
- for key in list(TestFM10kL3fwd.test_cases_2_ports.keys()):
- TestFM10kL3fwd.test_cases_2_ports[key].replace(" --enable-jumbo", "")
-
- print((GREEN("Performance test for rxmode %s txmode %s" % (mode['rxmode'], mode['txmode']))))
- self.perf_rfc2544()
-
- # remove setting for scatter
- self.dut.send_expect("sed -i -e '/.enable_scatter= .*$/d' %s" % self.main_file, "# ")
-
- def test_perf_rfc2544_legacy(self):
- # add setting for scatter
-
- # mode_settings = [{'rxmode': 'default', 'txmode': 'default'}, {'rxmode': 'vector', 'txmode': 'vector'}]
- mode_settings = [{'rxmode': 'default', 'txmode': 'default'}]
- for mode in mode_settings:
- self.fm10k_rxmode_set(mode = mode['rxmode'])
- if mode['txmode'] == 'default':
- # need --enable-jumbo parameter
- for key in list(TestFM10kL3fwd.test_cases_2_ports.keys()):
- if "--enable-jumbo" not in TestFM10kL3fwd.test_cases_2_ports[key]:
- TestFM10kL3fwd.test_cases_2_ports[key] += " --enable-jumbo"
- else:
- for key in list(TestFM10kL3fwd.test_cases_2_ports.keys()):
- TestFM10kL3fwd.test_cases_2_ports[key].replace(" --enable-jumbo", "")
-
- print((GREEN("Performance test for rxmode %s txmode %s" % (mode['rxmode'], mode['txmode']))))
- self.perf_rfc2544()
-
- # remove setting for scatter
- self.dut.send_expect("sed -i -e '/.enable_scatter= .*$/d' %s" % self.main_file, "# ")
-
- def set_fields(self):
- ''' set ip protocol field behavior '''
- fields_config = {
- 'ip': {'src': {'action': 'random'}}, }
- return fields_config
-
- def tear_down(self):
- """
- Run after each test case.
- """
- pass
-
- def tear_down_all(self):
- """
- Run after each test suite.
- """
- # remove setting for scatter
- self.dut.send_expect("sed -i -e '/.enable_scatter= .*$/d' %s" % self.main_file, "# ")
- pass
--
2.27.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dts] [PATCH V1 2/6] conf/test_case_checklist: update test case checklist after removed fm10k
2021-06-15 10:46 [dts] [PATCH V1 1/6] dts/*: remove fm10k related modules and patch Jun Dong
@ 2021-06-15 10:46 ` Jun Dong
2021-06-15 10:46 ` [dts] [PATCH V1 3/6] framework/*: update framework " Jun Dong
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Jun Dong @ 2021-06-15 10:46 UTC (permalink / raw)
To: junx.dong; +Cc: dts
Signed-off-by: Jun Dong <junx.dong@intel.com>
---
conf/test_case_checklist.json | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/conf/test_case_checklist.json b/conf/test_case_checklist.json
index 1a686d8e..4726aac3 100644
--- a/conf/test_case_checklist.json
+++ b/conf/test_case_checklist.json
@@ -1508,10 +1508,7 @@
"ALL"
],
"NIC": [
- "redrockcanyou",
- "atwood",
- "boulderrapid",
- "foxville"
+ "foxville"
],
"Target": [
"ALL"
@@ -1540,9 +1537,6 @@
"ALL"
],
"NIC": [
- "redrockcanyou",
- "atwood",
- "boulderrapid",
"foxville"
],
"Target": [
@@ -1572,9 +1566,6 @@
"ALL"
],
"NIC": [
- "redrockcanyou",
- "atwood",
- "boulderrapid",
"foxville"
],
"Target": [
--
2.27.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dts] [PATCH V1 3/6] framework/*: update framework after removed fm10k
2021-06-15 10:46 [dts] [PATCH V1 1/6] dts/*: remove fm10k related modules and patch Jun Dong
2021-06-15 10:46 ` [dts] [PATCH V1 2/6] conf/test_case_checklist: update test case checklist after removed fm10k Jun Dong
@ 2021-06-15 10:46 ` Jun Dong
2021-06-15 10:46 ` [dts] [PATCH V1 4/6] nics/net_device: update NetDevice class " Jun Dong
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Jun Dong @ 2021-06-15 10:46 UTC (permalink / raw)
To: junx.dong; +Cc: dts
1. update framework/dut,remove fm10k related description.
2. update framework/project_dpdk,remove fm10k related build option.
3. update framework/settings,remove fm10k related NICs.
4. update framework/test_capabilities,remove fm10k.
5. update framework/test_case,remove redrockcanyou branch from function.
Signed-off-by: Jun Dong <junx.dong@intel.com>
---
framework/dut.py | 2 +-
framework/project_dpdk.py | 3 +--
framework/settings.py | 11 +----------
framework/test_capabilities.py | 2 +-
framework/test_case.py | 2 --
5 files changed, 4 insertions(+), 16 deletions(-)
diff --git a/framework/dut.py b/framework/dut.py
index ca1c9089..f5481d06 100644
--- a/framework/dut.py
+++ b/framework/dut.py
@@ -459,7 +459,7 @@ class Dut(Crb):
def stop_ports(self):
"""
- After all execution done, some special nic like fm10k should be stop
+ After all execution done, the nic should be stop
"""
for (pci_bus, pci_id) in self.pci_devices_info:
driver = settings.get_nic_driver(pci_id)
diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py
index f7946664..31827991 100644
--- a/framework/project_dpdk.py
+++ b/framework/project_dpdk.py
@@ -203,8 +203,7 @@ class DPDKdut(Dut):
'RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC': 'n'})
elif mode == 'novector':
self.set_build_options({'RTE_IXGBE_INC_VECTOR': 'n',
- 'RTE_LIBRTE_I40E_INC_VECTOR': 'n',
- 'RTE_LIBRTE_FM10K_INC_VECTOR': 'n'})
+ 'RTE_LIBRTE_I40E_INC_VECTOR': 'n'})
elif mode == 'avx512':
self.logger.warning(RED('*********AVX512 is not supported by makefile!!!********'))
else:
diff --git a/framework/settings.py b/framework/settings.py
index 23eb0075..9ceffe2e 100644
--- a/framework/settings.py
+++ b/framework/settings.py
@@ -83,24 +83,20 @@ NICS = {
'fortville_eagle': '8086:1572',
'fortville_spirit': '8086:1583',
'fortville_spirit_single': '8086:1584',
- 'redrockcanyou': '8086:15a4',
'fortpark': '8086:374c',
'fortpark_1g': '8086:37d1',
'fortpark_TLV': '8086:37d0',
'fortpark_BASE-T': '8086:37d2',
'fortpark_TLV_vf': '8086:37cd',
'fvl10g_vf': '8086:154c',
- 'atwood': '8086:15d5',
'ConnectX3_MT4103': '15b3:1007',
'ConnectX4_MT4115': '15b3:1013',
'ConnectX4_LX_MT4117': '15b3:1015',
'ConnectX5_MT4119': '15b3:1017',
'ConnectX5_MT4121': '15b3:1019',
- 'boulderrapid': '8086:15d0',
'fortville_25g': '8086:158b',
'cavium_a034': '177d:a034',
'cavium_0011': '177d:0011',
- 'hi1822': '19e5:1822',
'fortvile_bdw_de': '8086:15ac',
'cavium_a063': '177d:a063',
'cavium_a064': '177d:a064',
@@ -151,24 +147,20 @@ DRIVERS = {
'fortville_eagle': 'i40e',
'fortville_spirit': 'i40e',
'fortville_spirit_single': 'i40e',
- 'redrockcanyou': 'fm10k',
'fortpark': 'i40e',
'fortpark_1g': 'i40e',
'fortpark_TLV': 'i40e',
'fortpark_BASE-T': 'i40e',
'fortpark_TLV_vf': 'i40evf',
'fvl10g_vf': 'i40evf',
- 'atwood': 'fm10k',
'ConnectX3_MT4103': 'mlx4_core',
'ConnectX4_MT4115': 'mlx5_core',
'ConnectX4_LX_MT4117': 'mlx5_core',
'ConnectX5_MT4119': 'mlx5_core',
'ConnectX5_MT4121': 'mlx5_core',
- 'boulderrapid': 'fm10k',
'fortville_25g': 'i40e',
'cavium_a034': 'thunder-nicvf',
'cavium_0011': 'thunder-nicvf',
- 'hi1822': 'hinic',
'fortvile_bdw_de': 'ixgbe',
'cavium_a063': 'octeontx2-nicpf',
'cavium_a064': 'octeontx2-nicvf',
@@ -295,9 +287,8 @@ def get_nic_driver(pci_id):
"""
Return linux driver for specified pci device
"""
- driverlist = dict(list(zip(list(NICS.values()), list(DRIVERS.keys()))))
try:
- driver = DRIVERS[driverlist[pci_id]]
+ driver = DRIVERS[{NICS[key]:key for key in NICS}[pci_id]]
except Exception as e:
driver = None
return driver
diff --git a/framework/test_capabilities.py b/framework/test_capabilities.py
index 79a6dee6..350e7ee3 100644
--- a/framework/test_capabilities.py
+++ b/framework/test_capabilities.py
@@ -3,7 +3,7 @@
Dict used to skip parts of tests if NIC is known not to support them
"""
DRIVER_TEST_LACK_CAPA = {
- 'sctp_tx_offload' : ['thunder-nicvf', 'fm10k', 'qede']
+ 'sctp_tx_offload' : ['thunder-nicvf', 'qede']
}
diff --git a/framework/test_case.py b/framework/test_case.py
index 3347adad..98b716b9 100644
--- a/framework/test_case.py
+++ b/framework/test_case.py
@@ -507,8 +507,6 @@ class TestCase(object):
bitrate *= 10
elif nic == 'fortpark_TLV':
bitrate *= 10
- elif nic == 'redrockcanyou':
- bitrate *= 40
elif driver == 'thunder-nicvf':
bitrate *= 10
elif nic == 'fortville_25g':
--
2.27.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dts] [PATCH V1 4/6] nics/net_device: update NetDevice class after removed fm10k
2021-06-15 10:46 [dts] [PATCH V1 1/6] dts/*: remove fm10k related modules and patch Jun Dong
2021-06-15 10:46 ` [dts] [PATCH V1 2/6] conf/test_case_checklist: update test case checklist after removed fm10k Jun Dong
2021-06-15 10:46 ` [dts] [PATCH V1 3/6] framework/*: update framework " Jun Dong
@ 2021-06-15 10:46 ` Jun Dong
2021-06-15 10:46 ` [dts] [PATCH V1 5/6] test_plans/*: update test plan " Jun Dong
2021-06-15 10:46 ` [dts] [PATCH V1 6/6] tests/*: update test suits " Jun Dong
4 siblings, 0 replies; 7+ messages in thread
From: Jun Dong @ 2021-06-15 10:46 UTC (permalink / raw)
To: junx.dong; +Cc: dts
1. update method description base context
2. update NetDevice factory function about removed fm10k related NICs.
Signed-off-by: Jun Dong <junx.dong@intel.com>
---
nics/net_device.py | 26 +++++++-------------------
1 file changed, 7 insertions(+), 19 deletions(-)
diff --git a/nics/net_device.py b/nics/net_device.py
index 98d31237..3ddfc4eb 100644
--- a/nics/net_device.py
+++ b/nics/net_device.py
@@ -954,6 +954,7 @@ def get_from_list(host, domain_id, bus_id, devfun_id):
return nic['port']
return None
+
def remove_from_list(host):
"""
Remove network device object from global structure
@@ -963,38 +964,25 @@ def remove_from_list(host):
if host == nic['host']:
NICS_LIST.remove(nic)
+
def GetNicObj(crb, domain_id, bus_id, devfun_id):
"""
Get network device object. If network device has been initialized, just
- return object. Based on nic type, some special nics like RRC will return
- object different from default.
+ return object.
"""
# find existed NetDevice object
obj = get_from_list(crb.crb['My IP'], domain_id, bus_id, devfun_id)
if obj:
return obj
- pci_id = get_pci_id(crb, domain_id, bus_id, devfun_id)
- nic = settings.get_nic_name(pci_id)
-
- if nic == 'redrockcanyou':
- # redrockcanyou nic need special initialization
- from rrc import RedRockCanyou
- obj = RedRockCanyou(crb, domain_id, bus_id, devfun_id)
- elif nic == 'atwood':
- # atwood nic need special initialization
- from atwood import Atwood
- obj = Atwood(crb, domain_id, bus_id, devfun_id)
- elif nic == 'boulderrapid':
- # atwood nic need special initialization
- from br import BoulderRapid
- obj = BoulderRapid(crb, domain_id, bus_id, devfun_id)
- else:
- obj = NetDevice(crb, domain_id, bus_id, devfun_id)
+ # generate NetDevice object
+ obj = NetDevice(crb, domain_id, bus_id, devfun_id)
+ # save NetDevice object to cache, directly get it from cache next time
add_to_list(crb.crb['My IP'], obj)
return obj
+
def RemoveNicObj(crb):
"""
Remove network device object.
--
2.27.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dts] [PATCH V1 5/6] test_plans/*: update test plan after removed fm10k
2021-06-15 10:46 [dts] [PATCH V1 1/6] dts/*: remove fm10k related modules and patch Jun Dong
` (2 preceding siblings ...)
2021-06-15 10:46 ` [dts] [PATCH V1 4/6] nics/net_device: update NetDevice class " Jun Dong
@ 2021-06-15 10:46 ` Jun Dong
2021-06-15 10:46 ` [dts] [PATCH V1 6/6] tests/*: update test suits " Jun Dong
4 siblings, 0 replies; 7+ messages in thread
From: Jun Dong @ 2021-06-15 10:46 UTC (permalink / raw)
To: junx.dong; +Cc: dts
1. update test_plans/ABI_stable_test_plan,remove fm10k build option.
2. update test_plans/fortville_rss_input_test_plan,update doc description.
3. update test_plans/tx_preparation_test_plan,update doc description.
Signed-off-by: Jun Dong <junx.dong@intel.com>
---
test_plans/ABI_stable_test_plan.rst | 4 ++--
| 6 +++---
test_plans/tx_preparation_test_plan.rst | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/test_plans/ABI_stable_test_plan.rst b/test_plans/ABI_stable_test_plan.rst
index 47ef7876..c15af721 100644
--- a/test_plans/ABI_stable_test_plan.rst
+++ b/test_plans/ABI_stable_test_plan.rst
@@ -163,7 +163,7 @@ Prepare 1 patch file, 0001-rte_tx_burst_t_add-one-argument-at-the-end.patch ::
Subject: [PATCH] eth_tx_burst_t add one argument at the end
compile with:
- meson configure -Ddisable_drivers=net/af_packet,net/ark,net/atlantic,net/avp,net/axgbe,net/bond,net/bnx2x,net/bnxt,net/cxgbe,net/dpaa,net/dpaa2,net/e1000,net/ena,net/enetc,net/enic,net/fm10k,net/i40e,net/hinic,net/hns3,net/iavf,net/ice,net/kni,net/liquidio,net/memif,net/netvsc,net/nfp,net/null,net/octeontx,net/octeontx2,net/pcap,net/pfe,net/qede,net/sfc,net/softnic,net/tap,net/thunderx,net/vdev_netvsc,net/vhost,net/virtio,net/vmxnet3,common/cpt,common/dpaax,common/iavf,common/octeontx2,bus/dpaa,bus/fslmc,bus/ifpga,bus/vmbus,mempool/bucket,mempool/dpaa,mempool/dpaa2,mempool/octeontx2,mempool/stack,raw/dpaa2_cmdif,raw/dpaa2_qdma,raw/ioat,raw/ntb,raw/octeontx2_dma,raw/octeontx2_ep,raw/skeleton,crypto/caam_jr,crypto/ccp,crypto/dpaa_sec,crypto/dpaa2_sec,crypto/nitrox,crypto/null_crypto,crypto/octeontx_crypto,crypto/octeontx2_crypto,crypto/openssl,crypto/crypto_scheduler,crypto/virtio_crypto,vdpa/ifc,event/dpaa,event/dpaa2,event/octeontx2,event/opdl,event/skeleton,event/sw,event/dsw,event/octeontx,baseband/null,baseband/turbo_sw,baseband/fpga_lte_fec,net/failsafe
+ meson configure -Ddisable_drivers=net/af_packet,net/ark,net/atlantic,net/avp,net/axgbe,net/bond,net/bnx2x,net/bnxt,net/cxgbe,net/dpaa,net/dpaa2,net/e1000,net/ena,net/enetc,net/enic,net/i40e,net/hinic,net/hns3,net/iavf,net/ice,net/kni,net/liquidio,net/memif,net/netvsc,net/nfp,net/null,net/octeontx,net/octeontx2,net/pcap,net/pfe,net/qede,net/sfc,net/softnic,net/tap,net/thunderx,net/vdev_netvsc,net/vhost,net/virtio,net/vmxnet3,common/cpt,common/dpaax,common/iavf,common/octeontx2,bus/dpaa,bus/fslmc,bus/ifpga,bus/vmbus,mempool/bucket,mempool/dpaa,mempool/dpaa2,mempool/octeontx2,mempool/stack,raw/dpaa2_cmdif,raw/dpaa2_qdma,raw/ioat,raw/ntb,raw/octeontx2_dma,raw/octeontx2_ep,raw/skeleton,crypto/caam_jr,crypto/ccp,crypto/dpaa_sec,crypto/dpaa2_sec,crypto/nitrox,crypto/null_crypto,crypto/octeontx_crypto,crypto/octeontx2_crypto,crypto/openssl,crypto/crypto_scheduler,crypto/virtio_crypto,vdpa/ifc,event/dpaa,event/dpaa2,event/octeontx2,event/opdl,event/skeleton,event/sw,event/dsw,event/octeontx,baseband/null,baseband/turbo_sw,baseband/fpga_lte_fec,net/failsafe
Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
---
@@ -286,7 +286,7 @@ inject 4 bytes in tx_burst.
Build shared libraries, (just enable i40e pmd for testing)::
- meson configure -Ddisable_drivers=net/af_packet,net/ark,net/atlantic,net/avp,net/axgbe,net/bond,net/bnx2x,net/bnxt,net/cxgbe,net/dpaa,net/dpaa2,net/e1000,net/ena,net/enetc,net/enic,net/fm10k,net/hinic,net/hns3,net/iavf,net/ice,net/kni,net/liquidio,net/memif,net/netvsc,net/nfp,net/null,net/octeontx,net/octeontx2,net/pcap,net/pfe,net/qede,net/sfc,net/softnic,net/tap,net/thunderx,net/vdev_netvsc,net/vhost,net/virtio,net/vmxnet3,common/cpt,common/dpaax,common/iavf,common/octeontx2,bus/dpaa,bus/fslmc,bus/ifpga,bus/vmbus,mempool/bucket,mempool/dpaa,mempool/dpaa2,mempool/octeontx2,mempool/stack,raw/dpaa2_cmdif,raw/dpaa2_qdma,raw/ioat,raw/ntb,raw/octeontx2_dma,raw/octeontx2_ep,raw/skeleton,crypto/caam_jr,crypto/ccp,crypto/dpaa_sec,crypto/dpaa2_sec,crypto/nitrox,crypto/null_crypto,crypto/octeontx_crypto,crypto/octeontx2_crypto,crypto/openssl,crypto/crypto_scheduler,crypto/virtio_crypto,vdpa/ifc,event/dpaa,event/dpaa2,event/octeontx2,event/opdl,event/skeleton,event/sw,event/dsw,event/octeontx,baseband/null,baseband/turbo_sw,baseband/fpga_lte_fec,net/failsafe
+ meson configure -Ddisable_drivers=net/af_packet,net/ark,net/atlantic,net/avp,net/axgbe,net/bond,net/bnx2x,net/bnxt,net/cxgbe,net/dpaa,net/dpaa2,net/e1000,net/ena,net/enetc,net/enic,net/hinic,net/hns3,net/iavf,net/ice,net/kni,net/liquidio,net/memif,net/netvsc,net/nfp,net/null,net/octeontx,net/octeontx2,net/pcap,net/pfe,net/qede,net/sfc,net/softnic,net/tap,net/thunderx,net/vdev_netvsc,net/vhost,net/virtio,net/vmxnet3,common/cpt,common/dpaax,common/iavf,common/octeontx2,bus/dpaa,bus/fslmc,bus/ifpga,bus/vmbus,mempool/bucket,mempool/dpaa,mempool/dpaa2,mempool/octeontx2,mempool/stack,raw/dpaa2_cmdif,raw/dpaa2_qdma,raw/ioat,raw/ntb,raw/octeontx2_dma,raw/octeontx2_ep,raw/skeleton,crypto/caam_jr,crypto/ccp,crypto/dpaa_sec,crypto/dpaa2_sec,crypto/nitrox,crypto/null_crypto,crypto/octeontx_crypto,crypto/octeontx2_crypto,crypto/openssl,crypto/crypto_scheduler,crypto/virtio_crypto,vdpa/ifc,event/dpaa,event/dpaa2,event/octeontx2,event/opdl,event/skeleton,event/sw,event/dsw,event/octeontx,baseband/null,baseband/turbo_sw,baseband/fpga_lte_fec,net/failsafe
meson --werror -Dexamples=all --buildtype=debugoptimized --default-library=shared ./devtools/.. ./build-gcc-shared
ninja -C ./build-gcc-shared
--git a/test_plans/fortville_rss_input_test_plan.rst b/test_plans/fortville_rss_input_test_plan.rst
index 925a08d0..1f249ac9 100644
--- a/test_plans/fortville_rss_input_test_plan.rst
+++ b/test_plans/fortville_rss_input_test_plan.rst
@@ -38,9 +38,9 @@ Fortville Configuration of RSS in RTE Flow Tests
Description
===========
-The feature remove legacy filter API and switch to rte_flow in driver fm10k,
-i40e, ixgbe, ice. What is need is that remove the function in filter_ctrl
-ops in drivers and implement functions in rte_flow. Many functions have been
+The feature remove legacy filter API and switch to rte_flow in driver i40e,
+ixgbe, ice. What is need is that remove the function in filter_ctrl ops in
+drivers and implement functions in rte_flow. Many functions have been
implemented in rte_flow in the early patches. this feature implement that
set global configurations of hash filters, set symmetric hash configuration
enable and Set GRE key length for input set in driver i40e.
diff --git a/test_plans/tx_preparation_test_plan.rst b/test_plans/tx_preparation_test_plan.rst
index 978c7e6b..738d44ff 100644
--- a/test_plans/tx_preparation_test_plan.rst
+++ b/test_plans/tx_preparation_test_plan.rst
@@ -56,8 +56,8 @@ APPLICATION (CASE OF USE):
Prerequisites
=============
-Support igb_uio, test txprep forwarding features on e1000, i40e, ixgbe and
-fm10k drivers.Send packets from tester platform through the interface eth1 to
+Support igb_uio, test txprep forwarding features on e1000, i40e and ixgbe
+drivers.Send packets from tester platform through the interface eth1 to
the tested port 0, then testpmd sends back packet using same port and uses
tcpdump to capture packet information::
--
2.27.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dts] [PATCH V1 6/6] tests/*: update test suits after removed fm10k
2021-06-15 10:46 [dts] [PATCH V1 1/6] dts/*: remove fm10k related modules and patch Jun Dong
` (3 preceding siblings ...)
2021-06-15 10:46 ` [dts] [PATCH V1 5/6] test_plans/*: update test plan " Jun Dong
@ 2021-06-15 10:46 ` Jun Dong
[not found] ` <BN9PR11MB527491B1E7491772751169B7EA0F9@BN9PR11MB5274.namprd11.prod.outlook.com>
4 siblings, 1 reply; 7+ messages in thread
From: Jun Dong @ 2021-06-15 10:46 UTC (permalink / raw)
To: junx.dong; +Cc: dts
1. update TestSuit_jumboframes,remove fm10k related conditional branch.
2. update TestSuit_pmdrss_hash,remove fm10k related conditional branch.
3. update TestSuit_pmdrssreta,remove fm10k related conditional branch.
4. update TestSuite_rss_key_update,remove fm10k conditional branch.
5. update TestSuite_scatter,remove fm10k conditional branch.
6. update TestSuite_shutdown_api,remove fm10k conditional branch.
7. update TestSuite_vf_offload,remove fm10k conditional branch.
8. update TestSuite_vf_rss,remove fm10k conditional branch.
9. update TestSuite_vlan, remove fm10k conditional branch.
10. update TestSuite_vlan_ethertype_config,remove fm10k conditional branch.
Signed-off-by: Jun Dong <junx.dong@intel.com>
---
tests/TestSuite_jumboframes.py | 10 -------
| 16 +++--------
| 6 ++--
| 16 ++++-------
tests/TestSuite_scatter.py | 10 ++-----
tests/TestSuite_shutdown_api.py | 35 ++++--------------------
tests/TestSuite_vf_offload.py | 4 ---
| 19 ++++---------
tests/TestSuite_vlan.py | 22 ---------------
tests/TestSuite_vlan_ethertype_config.py | 13 ---------
10 files changed, 24 insertions(+), 127 deletions(-)
diff --git a/tests/TestSuite_jumboframes.py b/tests/TestSuite_jumboframes.py
index 181908d2..e277bace 100644
--- a/tests/TestSuite_jumboframes.py
+++ b/tests/TestSuite_jumboframes.py
@@ -126,12 +126,6 @@ class TestJumboframes(TestCase):
self.port_mask = utils.create_mask([self.rx_port, self.tx_port])
- if self.kdriver == "fm10k":
- netobj = self.dut.ports_info[self.tx_port]['port']
- netobj.enable_jumbo(framesize = ETHER_JUMBO_FRAME_MTU)
- netobj = self.dut.ports_info[self.rx_port]['port']
- netobj.enable_jumbo(framesize = ETHER_JUMBO_FRAME_MTU)
-
self.tester.send_expect("ifconfig %s mtu %s" % (self.tester.get_interface(self.tester.get_local_port(self.rx_port)), ETHER_JUMBO_FRAME_MTU + 200), "# ")
self.pmdout = PmdOutput(self.dut)
@@ -162,10 +156,6 @@ class TestJumboframes(TestCase):
This case aims to test transmitting jumbo frame packet on testpmd without
jumbo frame support.
"""
- # RRC has no ability to set the max pkt len to hardware
- if self.kdriver == "fm10k":
- print(utils.RED("fm10k not support this case\n"))
- return
self.pmdout.start_testpmd("Default", "--max-pkt-len=%d --port-topology=loop --tx-offloads=0x8000" % (ETHER_STANDARD_MTU))
self.dut.send_expect("set fwd mac", "testpmd> ")
self.dut.send_expect("start", "testpmd> ")
--git a/tests/TestSuite_pmdrss_hash.py b/tests/TestSuite_pmdrss_hash.py
index 54c0a89d..9ea6f9ae 100644
--- a/tests/TestSuite_pmdrss_hash.py
+++ b/tests/TestSuite_pmdrss_hash.py
@@ -414,8 +414,7 @@ class TestPmdrssHash(TestCase):
"""
self.verify(self.nic in ["columbiaville_25g", "columbiaville_100g","fortville_eagle", "fortville_spirit",
- "fortville_spirit_single", "redrockcanyou", "atwood",
- "boulderrapid", "fortpark_TLV", "fortpark_BASE-T","fortville_25g", "niantic", "carlsville", "foxville"],
+ "fortville_spirit_single", "fortpark_TLV", "fortpark_BASE-T","fortville_25g", "niantic", "carlsville", "foxville"],
"NIC Unsupported: " + str(self.nic))
global reta_num
global iptypes
@@ -436,13 +435,11 @@ class TestPmdrssHash(TestCase):
'ipv6-tcp': 'tcp',
'ipv6-frag': 'ip'
}
- elif self.nic in ["redrockcanyou", "atwood", "boulderrapid"]:
- reta_num = 128
else:
self.verify(False, "NIC Unsupported:%s" % str(self.nic))
ports = self.dut.get_ports(self.nic)
self.verify(len(ports) >= 1, "Not enough ports available")
- self.path=self.dut.apps_name['test-pmd']
+ self.path = self.dut.apps_name['test-pmd']
def set_up(self):
"""
@@ -543,10 +540,6 @@ class TestPmdrssHash(TestCase):
global reta_num
global iptypes
- if self.kdriver in ["fm10k"]:
- iptypes.pop('ipv4-sctp')
- iptypes.pop('ipv6-sctp')
-
self.dut.kill_all()
# test with different rss queues
@@ -564,9 +557,8 @@ class TestPmdrssHash(TestCase):
self.dut.send_expect("port stop all", "testpmd> ")
# some nic not support change hash algorithm
- if self.kdriver not in ["fm10k"]:
- self.dut.send_expect(
- "set_hash_global_config 0 simple_xor %s enable" % iptype, "testpmd> ")
+ self.dut.send_expect(
+ "set_hash_global_config 0 simple_xor %s enable" % iptype, "testpmd> ")
self.dut.send_expect("port start all", "testpmd> ")
out = self.dut.send_expect(
"port config all rss %s" % rsstype, "testpmd> ")
--git a/tests/TestSuite_pmdrssreta.py b/tests/TestSuite_pmdrssreta.py
index 4dd3a5a5..ce3ee421 100644
--- a/tests/TestSuite_pmdrssreta.py
+++ b/tests/TestSuite_pmdrssreta.py
@@ -154,7 +154,7 @@ class TestPmdrssreta(TestCase):
hash_index = int(tmp_reta_line["RSS hash"], 16) % 64
elif(self.nic in ["hi1822"]):
hash_index = int(tmp_reta_line["RSS hash"], 16) % 256
- elif (self.nic in ["niantic", "redrockcanyou", "atwood", "boulderrapid", "foxville", "twinpond"]):
+ elif (self.nic in ["niantic", "foxville", "twinpond"]):
# compute the hash result of five tuple into the 7 LSBs value.
hash_index = int(tmp_reta_line["RSS hash"], 16) % 128
else:
@@ -239,7 +239,7 @@ class TestPmdrssreta(TestCase):
reta_entries.insert(i, random.randint(0, queue - 1))
self.dut.send_expect(
"port config 0 rss reta (%d,%d)" % (i, reta_entries[i]), "testpmd> ")
- elif (self.nic in ["niantic", "redrockcanyou", "atwood", "boulderrapid", "foxville"]):
+ elif (self.nic in ["niantic", "foxville"]):
for i in range(128):
reta_entries.insert(i, random.randint(0, queue - 1))
self.dut.send_expect(
@@ -255,7 +255,7 @@ class TestPmdrssreta(TestCase):
self.dut.send_expect("quit", "# ", 30)
def test_rss_key_size(self):
- nic_rss_key_size = {"columbiaville_25g": 52, "columbiaville_100g": 52, "fortville_eagle": 52, "fortville_spirit": 52, "fortville_spirit_single": 52, "fortville_25g": 52, "niantic": 40, "e1000": 40, "redrockcanyou": 40, "atwood": 40, "boulderrapid": 40, "fortpark_TLV": 52,"fortpark_BASE-T": 52, "hi1822": 40, "cavium_a063": 48, "cavium_a064": 48, "carlsville": 52, "sagepond": 40, "sageville": 40, "foxville": 40, "twinpond": 40}
+ nic_rss_key_size = {"columbiaville_25g": 52, "columbiaville_100g": 52, "fortville_eagle": 52, "fortville_spirit": 52, "fortville_spirit_single": 52, "fortville_25g": 52, "niantic": 40, "e1000": 40, "fortpark_TLV": 52,"fortpark_BASE-T": 52, "hi1822": 40, "cavium_a063": 48, "cavium_a064": 48, "carlsville": 52, "sagepond": 40, "sageville": 40, "foxville": 40, "twinpond": 40}
self.verify(self.nic in list(nic_rss_key_size.keys()), "Not supporte rss key on %s" % self.nic)
dutPorts = self.dut.get_ports(self.nic)
--git a/tests/TestSuite_rss_key_update.py b/tests/TestSuite_rss_key_update.py
index 4a9e3d83..f74641cb 100644
--- a/tests/TestSuite_rss_key_update.py
+++ b/tests/TestSuite_rss_key_update.py
@@ -171,8 +171,7 @@ class TestRssKeyUpdate(TestCase):
"""
self.verify(self.nic in ["columbiaville_25g", "columbiaville_100g", "fortville_eagle", "fortville_spirit",
- "fortville_spirit_single", "redrockcanyou", "atwood",
- "boulderrapid", "fortpark_TLV", "fortpark_BASE-T", "fortville_25g", "niantic",
+ "fortville_spirit_single", "fortpark_TLV", "fortpark_BASE-T", "fortville_25g", "niantic",
"carlsville", "foxville"],
"NIC Unsupported: " + str(self.nic))
global reta_num
@@ -195,8 +194,6 @@ class TestRssKeyUpdate(TestCase):
'ipv6-tcp': 'tcp',
'ipv6-frag': 'ip'
}
- elif self.nic in ["redrockcanyou", "atwood", "boulderrapid"]:
- reta_num = 128
else:
self.verify(False, f"NIC Unsupported: {self.nic}")
@@ -301,13 +298,10 @@ class TestRssKeyUpdate(TestCase):
def test_set_hash_key_short_long(self):
nic_rss_key_size = {"columbiaville_25g": 52, "columbiaville_100g": 52, "fortville_eagle": 52,
- "fortville_spirit": 52,
- "fortville_spirit_single": 52, "fortville_25g": 52, "niantic": 40, "e1000": 40,
- "redrockcanyou": 40,
- "atwood": 40, "boulderrapid": 40, "fortpark_TLV": 52, "fortpark_BASE-T": 52, "hi1822": 40,
- "cavium_a063": 48,
- "cavium_a064": 48, "carlsville": 52, "sagepond": 40, "sageville": 40, "foxville": 40,
- "twinpond": 40}
+ "fortville_spirit": 52, "fortville_spirit_single": 52, "fortville_25g": 52,
+ "niantic": 40, "e1000": 40, "fortpark_TLV": 52, "fortpark_BASE-T": 52,
+ "hi1822": 40, "cavium_a063": 48, "cavium_a064": 48, "carlsville": 52,
+ "sagepond": 40, "sageville": 40, "foxville": 40, "twinpond": 40}
self.verify(self.nic in list(nic_rss_key_size.keys()), f"Not supported rss key on {self.nic}")
diff --git a/tests/TestSuite_scatter.py b/tests/TestSuite_scatter.py
index 525ecfeb..2049f357 100644
--- a/tests/TestSuite_scatter.py
+++ b/tests/TestSuite_scatter.py
@@ -65,15 +65,12 @@ class TestScatter(TestCase):
self.pmdout = PmdOutput(self.dut)
if self.nic in ["magnolia_park", "niantic", "sageville", "fortpark", "fortville_eagle",
"fortville_spirit", "fortville_spirit_single", "fortville_25g", "x722_37d2",
- "redrockcanyou", "atwood", "boulderrapid",
- "ironpond", "twinpond", "springfountain", "fortpark_TLV","fortpark_BASE-T", "sagepond", "carlsville","columbiaville_25g","columbiaville_100g"]:
+ "ironpond", "twinpond", "springfountain", "fortpark_TLV","fortpark_BASE-T",
+ "sagepond", "carlsville","columbiaville_25g","columbiaville_100g"]:
self.mbsize = 2048
else:
self.mbsize = 1024
- if self.kdriver == "fm10k":
- self.dut.ports_info[self.port]['port'].enable_jumbo(framesize=9000)
-
self.tester.send_expect("ifconfig %s mtu 9000" % self.intf, "#")
def scatter_pktgen_send_packet(self, pktsize):
@@ -130,7 +127,4 @@ class TestScatter(TestCase):
"""
Run after each test suite.
"""
- if self.kdriver == "fm10k":
- self.dut.ports_info[self.port]['port'].enable_jumbo(framesize=1518)
self.tester.send_expect("ifconfig %s mtu 1500" % self.intf, "#")
- pass
diff --git a/tests/TestSuite_shutdown_api.py b/tests/TestSuite_shutdown_api.py
index 03eb89ab..3810b53a 100644
--- a/tests/TestSuite_shutdown_api.py
+++ b/tests/TestSuite_shutdown_api.py
@@ -157,21 +157,12 @@ class TestShutdownApi(TestCase):
rx_bytes_exp = pktSize*4
tx_bytes_exp = pktSize*4
- if self.kdriver == "fm10k":
- # RRC will always strip rx/tx crc
- rx_bytes_exp -= 4
- tx_bytes_exp -= 4
- if vlan_strip is True:
- # RRC will always strip rx/tx vlan
- rx_bytes_exp -= 4
- tx_bytes_exp -= 4
- else:
- # some NIC will always include tx crc
- rx_bytes_exp -= 16
+ # The NIC will always include tx crc
+ rx_bytes_exp -= 16
+ tx_bytes_exp -= 16
+ if vlan_strip is True:
+ # vlan strip default is off
tx_bytes_exp -= 16
- if vlan_strip is True:
- # vlan strip default is off
- tx_bytes_exp -= 16
# fortville nic enable send lldp packet function when port setup
# now the tx-packets size is lldp_size(110) * n + forward packe size
@@ -188,10 +179,6 @@ class TestShutdownApi(TestCase):
"""
Check link status of the ports.
"""
- # RRC not support link speed change
- if self.kdriver == "fm10k":
- return
-
for port in self.ports:
out = self.tester.send_expect(
"ethtool %s" % self.tester.get_interface(self.tester.get_local_port(port)), "# ")
@@ -475,10 +462,6 @@ class TestShutdownApi(TestCase):
"""
Change Link Speed.
"""
- if self.kdriver == "fm10k":
- print((utils.RED("RRC not support\n")))
- return
-
self.pmdout.start_testpmd("Default", "--portmask=%s --port-topology=loop" % utils.create_mask(self.ports), socket=self.ports_socket)
self.dut.send_expect("set promisc all off", "testpmd>")
@@ -598,10 +581,6 @@ class TestShutdownApi(TestCase):
"""
Enable/Disable Jumbo Frames.
"""
- if self.kdriver == "fm10k":
- print((utils.RED("RRC not support\n")))
- return
-
jumbo_size = 2048
self.pmdout.start_testpmd("Default", "--portmask=%s --port-topology=loop" % utils.create_mask(self.ports), socket=self.ports_socket)
self.dut.send_expect("set promisc all off", "testpmd>")
@@ -779,10 +758,6 @@ class TestShutdownApi(TestCase):
"""
port link stats test
"""
- if self.kdriver == "fm10k":
- print((utils.RED("RRC not support\n")))
- return
-
self.pmdout.start_testpmd("Default", "--portmask=%s --port-topology=loop" % utils.create_mask(self.ports), socket=self.ports_socket)
self.dut.send_expect("set promisc all off", "testpmd>")
self.dut.send_expect("set fwd mac", "testpmd>")
diff --git a/tests/TestSuite_vf_offload.py b/tests/TestSuite_vf_offload.py
index b819c6c5..4a16134b 100644
--- a/tests/TestSuite_vf_offload.py
+++ b/tests/TestSuite_vf_offload.py
@@ -264,10 +264,6 @@ class TestVfOffload(TestCase):
'IPv6/UDP': 'Ether(dst="02:00:00:00:00:00", src="%s")/IPv6(src="%s")/UDP()/("X"*46)' % (mac, expIPv6),
'IPv6/TCP': 'Ether(dst="02:00:00:00:00:00", src="%s")/IPv6(src="%s")/TCP()/("X"*46)' % (mac, expIPv6)}
- if self.nic in ['redrockcanyou', 'atwood']:
- del pkts['IP/SCTP']
- del pkts_ref['IP/SCTP']
-
self.checksum_enablehw(0,self.vm_dut_0)
self.vm0_testpmd.execute_cmd('start')
--git a/tests/TestSuite_vf_rss.py b/tests/TestSuite_vf_rss.py
index 35d4ea2e..4e48163b 100644
--- a/tests/TestSuite_vf_rss.py
+++ b/tests/TestSuite_vf_rss.py
@@ -204,10 +204,7 @@ class TestVfRss(TestCase):
self.verify(len(reta_lines) > 0, "The testpmd output has no RSS hash!")
for tmp_reta_line in reta_lines:
status = "false"
- if self.kdriver == "fm10k":
- # compute the hash result of five tuple into the 7 LSBs value.
- hash_index = int(tmp_reta_line["RSS hash"], 16) % 128
- elif self.kdriver == 'i40e' or self.kdriver == 'ice' or self.nic in ['sageville', 'sagepond']:
+ if self.kdriver == 'i40e' or self.kdriver == 'ice' or self.nic in ['sageville', 'sagepond']:
# compute the hash result of five tuple into the 7 LSBs value.
hash_index = int(tmp_reta_line["RSS hash"], 16) % 64
else:
@@ -233,9 +230,9 @@ class TestVfRss(TestCase):
"""
self.verify(
- self.nic in ["redrockcanyou", "atwood", "boulderrapid", "fortville_eagle", "fortville_spirit",
- "fortville_spirit_single", "fortville_25g", "sageville", "sagepond", "fortpark_TLV",
- "fortpark_BASE-T", "carlsville", "columbiaville_25g", "columbiaville_100g"],
+ self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortville_25g",
+ "sageville", "sagepond", "fortpark_TLV","fortpark_BASE-T", "carlsville",
+ "columbiaville_25g", "columbiaville_100g"],
"NIC Unsupported: " + str(self.nic))
self.dut_ports = self.dut.get_ports(self.nic)
self.verify(len(self.dut_ports) >= 1, "Not enough ports available")
@@ -358,13 +355,7 @@ class TestVfRss(TestCase):
"set nbcore %d" % (queue + 1), "testpmd> ")
# configure the reta with specific mappings.
- if self.nic in ["redrockcanyou", "atwood", "boulderrapid"]:
- for i in range(128):
- reta_entries.insert(i, random.randint(0, queue - 1))
- self.vm_dut_0.send_expect(
- "port config 0 rss reta (%d,%d)" % (i, reta_entries[i]), "testpmd> ")
- self.vm_dut_0.send_expect("port config all rss %s" % rss_type, "testpmd> ")
- elif self.kdriver == 'i40e' or self.kdriver == 'ice' or self.nic in ['sageville', 'sagepond']:
+ if self.kdriver == 'i40e' or self.kdriver == 'ice' or self.nic in ['sageville', 'sagepond']:
if self.nic in ['sageville', 'sagepond'] and rss_type == 'sctp':
self.logger.info('sageville and sagepond do not support rsstype sctp')
continue
diff --git a/tests/TestSuite_vlan.py b/tests/TestSuite_vlan.py
index 95e8cffa..c1c09ee0 100644
--- a/tests/TestSuite_vlan.py
+++ b/tests/TestSuite_vlan.py
@@ -79,10 +79,6 @@ class TestVlan(TestCase):
self.dut.send_expect("vlan set strip off %s" % dutRxPortId, "testpmd> ")
self.vlan = 51
- if self.kdriver == "fm10k":
- netobj = self.dut.ports_info[dutRxPortId]['port']
- netobj.add_vlan(vlan_id = self.vlan)
-
def get_tcpdump_package(self):
pkts = self.tester.load_tcpdump_sniff_packets(self.inst)
vlans = []
@@ -128,10 +124,6 @@ class TestVlan(TestCase):
"""
Enable receipt of VLAN packets and strip off
"""
-
- if self.kdriver == "fm10k":
- print((utils.RED("fm10k not support this case\n")))
- return
self.dut.send_expect("rx_vlan add %d %s" % (self.vlan, dutRxPortId), "testpmd> ")
self.dut.send_expect("vlan set strip off %s" % dutRxPortId, "testpmd> ")
self.dut.send_expect("start", "testpmd> ", 120)
@@ -183,11 +175,6 @@ class TestVlan(TestCase):
"""
Enable VLAN header insertion in transmitted packets
"""
- if self.kdriver == "fm10k":
- netobj = self.dut.ports_info[dutTxPortId]['port']
- netobj.add_vlan(vlan_id = self.vlan)
- netobj.add_txvlan(vlan_id = self.vlan)
-
self.dut.send_expect("stop", "testpmd> ")
self.dut.send_expect("port stop all", "testpmd> ")
self.dut.send_expect("tx_vlan set %s %d" % (dutTxPortId, self.vlan), "testpmd> ")
@@ -204,11 +191,6 @@ class TestVlan(TestCase):
self.dut.send_expect("port start all", "testpmd> ")
self.dut.send_expect("stop", "testpmd> ", 30)
- if self.kdriver == "fm10k":
- netobj = self.dut.ports_info[dutTxPortId]['port']
- # not delete vlan for self.vlan will used later
- netobj.delete_txvlan(vlan_id = self.vlan)
-
def tear_down(self):
"""
Run after each test case.
@@ -220,7 +202,3 @@ class TestVlan(TestCase):
Run after each test suite.
"""
self.dut.kill_all()
- if self.kdriver == "fm10k":
- netobj = self.dut.ports_info[dutRxPortId]['port']
- netobj.delete_txvlan(vlan_id = self.vlan)
- netobj.delete_vlan(vlan_id = self.vlan)
diff --git a/tests/TestSuite_vlan_ethertype_config.py b/tests/TestSuite_vlan_ethertype_config.py
index c31f585a..514bdd1f 100644
--- a/tests/TestSuite_vlan_ethertype_config.py
+++ b/tests/TestSuite_vlan_ethertype_config.py
@@ -165,9 +165,6 @@ class TestVlanEthertypeConfig(TestCase):
"""
Test Case 1: change VLAN TPID
"""
- if self.kdriver == "fm10k":
- print((dts.RED("fm10k not support this case\n")))
- return
random_vlan = random.randint(1, MAX_VLAN - 1)
self.dut.send_expect("set fwd rxonly", "testpmd> ")
self.dut.send_expect("set verbose 1", "testpmd> ")
@@ -324,12 +321,6 @@ class TestVlanEthertypeConfig(TestCase):
vlan_string = str("%04x" % tpid) + str("%04x" % tx_vlan)
self.verify(vlan_string not in out, "Wrong vlan:" + str(out))
- if self.kdriver == "fm10k":
- for tx_vlan in tx_vlans:
- netobj = self.dut.ports_info[dutTxPortId]['port']
- # not delete vlan for self.vlan will used later
- netobj.delete_txvlan(vlan_id=tx_vlan)
-
def test_vlan_qinq_tpid(self):
"""
Test Case 6: Change S-Tag and C-Tag within QinQ
@@ -377,7 +368,3 @@ class TestVlanEthertypeConfig(TestCase):
Run after each test suite.
"""
self.dut.kill_all()
- if self.kdriver == "fm10k":
- netobj = self.dut.ports_info[dutRxPortId]['port']
- netobj.delete_txvlan(vlan_id=self.vlan)
- netobj.delete_vlan(vlan_id=self.vlan)
--
2.27.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dts] [PATCH V1 6/6] tests/*: update test suits after removed fm10k
[not found] ` <BN9PR11MB5274CA2BE703D61510E11755EA0F9@BN9PR11MB5274.namprd11.prod.outlook.com>
@ 2021-06-18 6:51 ` Tu, Lijuan
0 siblings, 0 replies; 7+ messages in thread
From: Tu, Lijuan @ 2021-06-18 6:51 UTC (permalink / raw)
To: Dong, JunX, dts
> -----Original Message-----
> From: Dong, JunX <junx.dong@intel.com>
> Sent: 2021年6月16日 11:31
> To: dts@dpdk.org
> Cc: Tu, Lijuan <lijuan.tu@intel.com>
> Subject: RE: [dts][PATCH V1 6/6] tests/*: update test suits after removed fm10k
>
>
>
> -----Original Message-----
> From: Dong, JunX <junx.dong@intel.com>
> Sent: Tuesday, June 15, 2021 6:46 PM
> To: Dong, JunX <junx.dong@intel.com>
> Cc: dts@dpdk.org
> Subject: [dts][PATCH V1 6/6] tests/*: update test suits after removed fm10k
> Signed-off-by: Jun Dong <junx.dong@intel.com>
>
>
> Tested-by: Jun Dong <junx.dong@intel.com>
Applied the series, thanks
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-06-18 6:51 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-15 10:46 [dts] [PATCH V1 1/6] dts/*: remove fm10k related modules and patch Jun Dong
2021-06-15 10:46 ` [dts] [PATCH V1 2/6] conf/test_case_checklist: update test case checklist after removed fm10k Jun Dong
2021-06-15 10:46 ` [dts] [PATCH V1 3/6] framework/*: update framework " Jun Dong
2021-06-15 10:46 ` [dts] [PATCH V1 4/6] nics/net_device: update NetDevice class " Jun Dong
2021-06-15 10:46 ` [dts] [PATCH V1 5/6] test_plans/*: update test plan " Jun Dong
2021-06-15 10:46 ` [dts] [PATCH V1 6/6] tests/*: update test suits " Jun Dong
[not found] ` <BN9PR11MB527491B1E7491772751169B7EA0F9@BN9PR11MB5274.namprd11.prod.outlook.com>
[not found] ` <BN9PR11MB5274CA2BE703D61510E11755EA0F9@BN9PR11MB5274.namprd11.prod.outlook.com>
2021-06-18 6:51 ` Tu, Lijuan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).