test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH 0/6] Support Boulder Rapid
@ 2016-02-03  6:50 Yong Liu
  2016-02-03  6:50 ` [dts] [PATCH 1/6] nics fm10k: rename fm10k module to rrc Yong Liu
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Yong Liu @ 2016-02-03  6:50 UTC (permalink / raw)
  To: dts

Boulder Rapid just like RedRockCanyou, it also has two PEPs and EPLs.
The major difference is that RedRockCanyou has Rangely control plan
process. But Boulder Rapid do not have.
Another difference is that Special for pci address, Boulder Rapid port0 will
be assigned higher pci address.

Marvin Liu (6):
  nics fm10k: rename fm10k module to rrc
  framework settings: support boulderrapid nic
  framework test_case: add kernel driver variable
  nics: add support for Boulder Rapid
  nics net_device: support Boulder Rapid network object
  tests: support Boulder Rapid

 framework/settings.py               |   6 +-
 framework/test_case.py              |   3 +-
 nics/br.py                          | 244 ++++++++++++++++++++++++++++++++++++
 nics/fm10k.py                       | 240 -----------------------------------
 nics/net_device.py                  |   6 +-
 nics/rrc.py                         | 240 +++++++++++++++++++++++++++++++++++
 tests/TestSuite_checksum_offload.py |   6 +-
 tests/TestSuite_jumboframes.py      |   4 +-
 tests/TestSuite_pmdrssreta.py       |   6 +-
 tests/TestSuite_scatter.py          |   6 +-
 tests/TestSuite_shutdown_api.py     |  10 +-
 tests/TestSuite_tso.py              |   2 +-
 tests/TestSuite_vf_rss.py           |   4 +-
 tests/TestSuite_vlan.py             |  14 +--
 14 files changed, 521 insertions(+), 270 deletions(-)
 create mode 100644 nics/br.py
 delete mode 100644 nics/fm10k.py
 create mode 100644 nics/rrc.py

-- 
1.9.3

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dts] [PATCH 1/6] nics fm10k: rename fm10k module to rrc
  2016-02-03  6:50 [dts] [PATCH 0/6] Support Boulder Rapid Yong Liu
@ 2016-02-03  6:50 ` Yong Liu
  2016-02-03  6:50 ` [dts] [PATCH 2/6] framework settings: support boulderrapid nic Yong Liu
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Yong Liu @ 2016-02-03  6:50 UTC (permalink / raw)
  To: dts

FM10k is the family name, this family contained of several different
nics. Separated to different nic modules for each of them has specified
settings.

Signed-off-by: Marvin Liu <yong.liu@intel.com>

diff --git a/nics/fm10k.py b/nics/fm10k.py
deleted file mode 100644
index 7d42814..0000000
--- a/nics/fm10k.py
+++ /dev/null
@@ -1,240 +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.
-
-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, bus_id, devfun_id):
-        super(RedRockCanyou, self).__init__(host, 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((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 port_cfg.keys():
-            print GREEN("Skip init second port test point session")
-            if 'first_port' not in 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 addtional session
-            netdev = port_info['port']
-            self.ctrl_crb = netdev.get_control()
-            self.sec_port = True
-            return
-
-        if 'tp_ip' not in port_cfg.keys():
-            raise PortConfigParseException("RRC must configure test point ip")
-
-        crb = {}
-        crb['IP'] = port_cfg['tp_ip']
-        if 'passwd' not in port_cfg.keys():
-            crb['pass'] = DEF_PASSWD
-        else:
-            crb['pass'] = port_cfg['passwd']
-
-        if 'tp_path' in port_cfg.keys():
-            self.tp_path = port_cfg['tp_path']
-
-        # create addtional 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>%")
diff --git a/nics/net_device.py b/nics/net_device.py
index 0286aa4..2299e6f 100644
--- a/nics/net_device.py
+++ b/nics/net_device.py
@@ -829,7 +829,7 @@ def GetNicObj(crb, bus_id, devfun_id):
 
     if nic == 'redrockcanyou':
         # redrockcanyou nic need special initialization
-        from fm10k import RedRockCanyou
+        from rrc import RedRockCanyou
         obj = RedRockCanyou(crb, bus_id, devfun_id)
     elif nic == 'atwood':
         # atwood nic need special initialization
diff --git a/nics/rrc.py b/nics/rrc.py
new file mode 100644
index 0000000..7d42814
--- /dev/null
+++ b/nics/rrc.py
@@ -0,0 +1,240 @@
+# 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.
+
+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, bus_id, devfun_id):
+        super(RedRockCanyou, self).__init__(host, 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((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 port_cfg.keys():
+            print GREEN("Skip init second port test point session")
+            if 'first_port' not in 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 addtional session
+            netdev = port_info['port']
+            self.ctrl_crb = netdev.get_control()
+            self.sec_port = True
+            return
+
+        if 'tp_ip' not in port_cfg.keys():
+            raise PortConfigParseException("RRC must configure test point ip")
+
+        crb = {}
+        crb['IP'] = port_cfg['tp_ip']
+        if 'passwd' not in port_cfg.keys():
+            crb['pass'] = DEF_PASSWD
+        else:
+            crb['pass'] = port_cfg['passwd']
+
+        if 'tp_path' in port_cfg.keys():
+            self.tp_path = port_cfg['tp_path']
+
+        # create addtional 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>%")
-- 
1.9.3

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dts] [PATCH 2/6] framework settings: support boulderrapid nic
  2016-02-03  6:50 [dts] [PATCH 0/6] Support Boulder Rapid Yong Liu
  2016-02-03  6:50 ` [dts] [PATCH 1/6] nics fm10k: rename fm10k module to rrc Yong Liu
@ 2016-02-03  6:50 ` Yong Liu
  2016-02-03  6:50 ` [dts] [PATCH 3/6] framework test_case: add kernel driver variable Yong Liu
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Yong Liu @ 2016-02-03  6:50 UTC (permalink / raw)
  To: dts

Boulder Rapid is one of FM10k family nics. It has two EPLs and two PEPs.
Lport number of 0(PEP0), 1(EPL0), 5(EPL1), 11(PEP1).

Signed-off-by: Marvin Liu <yong.liu@intel.com>

diff --git a/framework/settings.py b/framework/settings.py
index dc4910a..068afce 100644
--- a/framework/settings.py
+++ b/framework/settings.py
@@ -78,7 +78,8 @@ NICS = {
     'fortpark':'8086:374c',
     'fvl10g_vf':'8086:154c',
     'atwood': '8086:15d5',
-    'ConnectX4':'15b3:1013'
+    'ConnectX4':'15b3:1013',
+    'boulderrapid': '8086:15d0',
 }
 
 DRIVERS = {
@@ -113,7 +114,8 @@ DRIVERS = {
     'fortpark':'i40e',
     'fvl10g_vf':'i40evf',
     'atwood': 'fm10k',
-    'ConnectX4':'mlx5_core'
+    'ConnectX4':'mlx5_core',
+    'boulderrapid': 'fm10k',
 }
 
 """
-- 
1.9.3

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dts] [PATCH 3/6] framework test_case: add kernel driver variable
  2016-02-03  6:50 [dts] [PATCH 0/6] Support Boulder Rapid Yong Liu
  2016-02-03  6:50 ` [dts] [PATCH 1/6] nics fm10k: rename fm10k module to rrc Yong Liu
  2016-02-03  6:50 ` [dts] [PATCH 2/6] framework settings: support boulderrapid nic Yong Liu
@ 2016-02-03  6:50 ` Yong Liu
  2016-02-03  6:50 ` [dts] [PATCH 4/6] nics: add support for Boulder Rapid Yong Liu
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Yong Liu @ 2016-02-03  6:50 UTC (permalink / raw)
  To: dts

Add kernel module name in test case module, most times nics in same family
belong to same kernel driver. With this variable, test case can handle
difference between NICs more easily.

Signed-off-by: Marvin Liu <yong.liu@intel.com>

diff --git a/framework/test_case.py b/framework/test_case.py
index f601381..9ef1c32 100644
--- a/framework/test_case.py
+++ b/framework/test_case.py
@@ -53,6 +53,7 @@ class TestCase(object):
             self.nic = self.nics[0]
         else:
             self.nic = ''
+        self.kdriver = self.get_nic_driver(self.nic)
 
     def set_up_all(self):
         pass
@@ -74,7 +75,7 @@ class TestCase(object):
         if nic_name in DRIVERS.keys():
             return DRIVERS[nic_name]
 
-        raise ValueError(nic_name)
+        return "Unknown"
 
     def get_nic_name(self, pci_id):
         for nic_name, pci in NICS.items():
-- 
1.9.3

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dts] [PATCH 4/6] nics: add support for Boulder Rapid
  2016-02-03  6:50 [dts] [PATCH 0/6] Support Boulder Rapid Yong Liu
                   ` (2 preceding siblings ...)
  2016-02-03  6:50 ` [dts] [PATCH 3/6] framework test_case: add kernel driver variable Yong Liu
@ 2016-02-03  6:50 ` Yong Liu
  2016-02-03  6:50 ` [dts] [PATCH 5/6] nics net_device: support Boulder Rapid network object Yong Liu
  2016-02-03  6:50 ` [dts] [PATCH 6/6] tests: support Boulder Rapid Yong Liu
  5 siblings, 0 replies; 7+ messages in thread
From: Yong Liu @ 2016-02-03  6:50 UTC (permalink / raw)
  To: dts

Boulder Rapid just like RedRockCanyou, it also has two PEPs and EPLs.
The major difference is that RedRockCanyou has Rangely control plan
process. But Boulder Rapid do not have.
Another difference is that Special for pci address, Boulder Rapid port0 will
be assigned higher pci address.

Signed-off-by: Marvin Liu <yong.liu@intel.com>

diff --git a/nics/br.py b/nics/br.py
new file mode 100644
index 0000000..8cfdacc
--- /dev/null
+++ b/nics/br.py
@@ -0,0 +1,244 @@
+# 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,5 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, bus_id, devfun_id):
+        super(BoulderRapid, self).__init__(host, 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((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 port_cfg.keys():
+            print GREEN("Skip init second port test point session")
+            if 'first_port' not in 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 addtional session
+            netdev = port_info['port']
+            self.ctrl_crb = netdev.get_control()
+            self.sec_port = True
+            return
+
+
+        if 'tp_ip' not in port_cfg.keys():
+            raise PortConfigParseException("BoulderRapid must configure test point ip")
+        if 'passwd' not in 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 port_cfg.keys():
+            self.tp_path = port_cfg['tp_path']
+
+        # create addtional 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>%")
-- 
1.9.3

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dts] [PATCH 5/6] nics net_device: support Boulder Rapid network object
  2016-02-03  6:50 [dts] [PATCH 0/6] Support Boulder Rapid Yong Liu
                   ` (3 preceding siblings ...)
  2016-02-03  6:50 ` [dts] [PATCH 4/6] nics: add support for Boulder Rapid Yong Liu
@ 2016-02-03  6:50 ` Yong Liu
  2016-02-03  6:50 ` [dts] [PATCH 6/6] tests: support Boulder Rapid Yong Liu
  5 siblings, 0 replies; 7+ messages in thread
From: Yong Liu @ 2016-02-03  6:50 UTC (permalink / raw)
  To: dts

Signed-off-by: Marvin Liu <yong.liu@intel.com>

diff --git a/nics/net_device.py b/nics/net_device.py
index 2299e6f..9d9e1ac 100644
--- a/nics/net_device.py
+++ b/nics/net_device.py
@@ -835,6 +835,10 @@ def GetNicObj(crb, bus_id, devfun_id):
         # atwood nic need special initialization
         from atwood import Atwood
         obj = Atwood(crb, bus_id, devfun_id)
+    elif nic == 'boulderrapid':
+        # atwood nic need special initialization
+        from br import BoulderRapid
+        obj = BoulderRapid(crb, bus_id, devfun_id)
     else:
         obj = NetDevice(crb, bus_id, devfun_id)
 
-- 
1.9.3

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dts] [PATCH 6/6] tests: support Boulder Rapid
  2016-02-03  6:50 [dts] [PATCH 0/6] Support Boulder Rapid Yong Liu
                   ` (4 preceding siblings ...)
  2016-02-03  6:50 ` [dts] [PATCH 5/6] nics net_device: support Boulder Rapid network object Yong Liu
@ 2016-02-03  6:50 ` Yong Liu
  5 siblings, 0 replies; 7+ messages in thread
From: Yong Liu @ 2016-02-03  6:50 UTC (permalink / raw)
  To: dts

Signed-off-by: Marvin Liu <yong.liu@intel.com>

diff --git a/tests/TestSuite_checksum_offload.py b/tests/TestSuite_checksum_offload.py
index a1f3280..7dc8ddc 100644
--- a/tests/TestSuite_checksum_offload.py
+++ b/tests/TestSuite_checksum_offload.py
@@ -169,7 +169,7 @@ class TestChecksumOffload(TestCase):
                     'IPv6/UDP': 'Ether(dst="02:00:00:00:00:00", src="%s")/Dot1Q(vlan=1)/IPv6(src="::2")/UDP()/("X"*46)' % mac,
                     'IPv6/TCP': 'Ether(dst="02:00:00:00:00:00", src="%s")/Dot1Q(vlan=1)/IPv6(src="::2")/TCP()/("X"*46)' % mac}
 
-        if self.nic in ['redrockcanyou', 'atwood']:
+        if self.kdriver == "fm10k":
             del pktsChkErr['IP/SCTP']
             del pkts['IP/SCTP']
 
@@ -200,7 +200,7 @@ class TestChecksumOffload(TestCase):
                     'IPv6/UDP': 'Ether(dst="02:00:00:00:00:00", src="%s")/IPv6(src="::2")/UDP()/("X"*46)' % mac,
                     'IPv6/TCP': 'Ether(dst="02:00:00:00:00:00", src="%s")/IPv6(src="::2")/TCP()/("X"*46)' % mac}
 
-        if self.nic in ['redrockcanyou', 'atwood']:
+        if self.kdriver == "fm10k":
             del pkts['IP/SCTP']
             del pkts_ref['IP/SCTP']
 
@@ -289,7 +289,7 @@ class TestChecksumOffload(TestCase):
                 'IPv6/UDP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6()/UDP()/("X"* (lambda x: x - 66 if x > 66 else 0)(%d))',
                 'IPv6/TCP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6()/TCP()/("X"* (lambda x: x - 78 if x > 78 else 0)(%d))'}
 
-        if self.nic in ['redrockcanyou', 'atwood']:
+        if self.kdriver == "fm10k":
             del pkts['IP/SCTP']
 
         lcore = "1S/2C/1T"
diff --git a/tests/TestSuite_jumboframes.py b/tests/TestSuite_jumboframes.py
index 813ed9d..95b2540 100644
--- a/tests/TestSuite_jumboframes.py
+++ b/tests/TestSuite_jumboframes.py
@@ -119,7 +119,7 @@ class TestJumboframes(TestCase):
 
         self.port_mask = dts.create_mask([self.rx_port, self.tx_port])
 
-        if self.nic in ["redrockcanyou", "atwood"]:
+        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']
@@ -157,7 +157,7 @@ class TestJumboframes(TestCase):
         jumbo frame support.
         """
         # RRC has no ability to set the max pkt len to hardware
-        if self.nic in ["redrockcanyou", "atwood"]:
+        if self.kdriver == "fm10k":
             print dts.RED("fm10k not support this case\n")
             return
         self.pmdout.start_testpmd("Default", "--max-pkt-len=%d --port-topology=loop" % (ETHER_STANDARD_MTU))
diff --git a/tests/TestSuite_pmdrssreta.py b/tests/TestSuite_pmdrssreta.py
index 5c62c72..9a0ad2f 100644
--- a/tests/TestSuite_pmdrssreta.py
+++ b/tests/TestSuite_pmdrssreta.py
@@ -148,7 +148,7 @@ class TestPmdrssreta(TestCase):
         i = 0
         for tmp_reta_line in reta_lines:
             status = "false"
-            if(self.nic in ["niantic", "redrockcanyou"]):
+            if(self.nic in ["niantic", "redrockcanyou", "atwood", "boulderrapid"]):
                 # compute the hash result of five tuple into the 7 LSBs value.
                 hash_index = int(tmp_reta_line["RSS hash"], 16) % 128
             else:
@@ -212,7 +212,7 @@ class TestPmdrssreta(TestCase):
                     "set nbcore %d" % (queue + 1), "testpmd> ")
 
                 # configure the reta with specific mappings.
-                if(self.nic in ["niantic", "redrockcanyou"]):
+                if(self.nic in ["niantic", "redrockcanyou", "atwood", "boulderrapid"]):
                     for i in range(128):
                         reta_entries.insert(i, random.randint(0, queue - 1))
                         self.dut.send_expect(
@@ -228,7 +228,7 @@ class TestPmdrssreta(TestCase):
             self.dut.send_expect("quit", "# ", 30)
 
     def test_rss_key_size(self):
-        nic_rss_key_size = {"fortville_eagle": 52, "fortville_spirit": 52, "fortville_spirit_single": 52, "niantic": 40, "e1000": 40, "redrockcanyou":40}
+        nic_rss_key_size = {"fortville_eagle": 52, "fortville_spirit": 52, "fortville_spirit_single": 52, "niantic": 40, "e1000": 40, "redrockcanyou": 40, "atwood": 40,  "boulderrapid": 40}
         self.verify(self.nic in nic_rss_key_size.keys(), "Not supporte rss key on %s" % self.nic)
 
         dutPorts = self.dut.get_ports(self.nic)
diff --git a/tests/TestSuite_scatter.py b/tests/TestSuite_scatter.py
index c8b86fa..44a55b6 100644
--- a/tests/TestSuite_scatter.py
+++ b/tests/TestSuite_scatter.py
@@ -66,13 +66,13 @@ class TestScatter(TestCase):
         self.pmdout = PmdOutput(self.dut)
         if self.nic in ["niantic", "sageville", "fortpark", "fortville_eagle",
                         "fortville_spirit", "fortville_spirit_single",
-                        "redrockcanyou", "atwood",
+                        "redrockcanyou", "atwood", "boulderrapid",
                         "ironpond", "twinpond", "springfountain"]:
             self.mbsize = 2048
         else:
             self.mbsize = 1024
 
-        if self.nic in ['redrockcanyou', 'atwood']:
+        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, "#")
@@ -131,7 +131,7 @@ class TestScatter(TestCase):
         """
         Run after each test suite.
         """
-        if self.nic in ['redrockcanyou', 'atwood']:
+        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 eea7b8e..f03734a 100644
--- a/tests/TestSuite_shutdown_api.py
+++ b/tests/TestSuite_shutdown_api.py
@@ -133,7 +133,7 @@ class TestShutdownApi(TestCase):
         rx_bytes_exp = pktSize
         tx_bytes_exp = pktSize
 
-        if self.nic in ['redrockcanyou', 'atwood']:
+        if self.kdriver == "fm10k":
             # RRC will always strip rx/tx crc
             rx_bytes_exp -= 4
             tx_bytes_exp -= 4
@@ -162,7 +162,7 @@ class TestShutdownApi(TestCase):
         Check link status of the ports.
         """
         # RRC not support link speed change
-        if self.nic in ['redrockcanyou', 'atwood']:
+        if self.kdriver == "fm10k":
             return
 
         for port in self.ports:
@@ -275,7 +275,7 @@ class TestShutdownApi(TestCase):
         """
         Change Link Speed.
         """
-        if self.nic in ["redrockcanyou", "atwood"]:
+        if self.kdriver == "fm10k":
             print dts.RED("RRC not support\n")
             return
 
@@ -321,7 +321,7 @@ class TestShutdownApi(TestCase):
         """
         Enable/Disable Jumbo Frames.
         """
-        if self.nic in ["redrockcanyou", "atwood"]:
+        if self.kdriver == "fm10k":
             print dts.RED("RRC not support\n")
             return
 
@@ -484,7 +484,7 @@ class TestShutdownApi(TestCase):
         """
         port link stats test
         """
-        if self.nic in ["redrockcanyou", "atwood"]:
+        if self.kdriver == "fm10k":
             print dts.RED("RRC not support\n")
             return
 
diff --git a/tests/TestSuite_tso.py b/tests/TestSuite_tso.py
index 65b30b7..142e0d1 100644
--- a/tests/TestSuite_tso.py
+++ b/tests/TestSuite_tso.py
@@ -84,7 +84,7 @@ class TestTSO(TestCase):
         self.verify(self.nic in ["kawela_2", "niantic", "bartonhills", "82545EM",
                                  "82540EM", "springfountain", "fortville_eagle",
                                  "fortville_spirit", "fortville_spirit_single",
-                                 "redrockcanyou"],
+                                 "redrockcanyou", "atwood", "boulderrapid"],
                     "NIC Unsupported: " + str(self.nic))
 
         # Based on h/w type, choose how many ports to use
diff --git a/tests/TestSuite_vf_rss.py b/tests/TestSuite_vf_rss.py
index 8695f8f..9b6ee6f 100644
--- a/tests/TestSuite_vf_rss.py
+++ b/tests/TestSuite_vf_rss.py
@@ -188,7 +188,7 @@ class TestVfRss(TestCase):
         i = 0
         for tmp_reta_line in reta_lines:
             status = "false"
-            if(self.nic in ["niantic", "redrockcanyou"]):
+            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
             else:
@@ -313,7 +313,7 @@ class TestVfRss(TestCase):
                     "set nbcore %d" % (queue + 1), "testpmd> ")
 
                 # configure the reta with specific mappings.
-                if(self.nic in ["niantic", "redrockcanyou"]):
+                if(self.nic in ["niantic", "redrockcanyou", "atwood", "boulderrapid"]):
                     for i in range(128):
                         reta_entries.insert(i, random.randint(0, queue - 1))
                         self.vm_dut_0.send_expect(
diff --git a/tests/TestSuite_vlan.py b/tests/TestSuite_vlan.py
index b32a0f8..ba3741e 100644
--- a/tests/TestSuite_vlan.py
+++ b/tests/TestSuite_vlan.py
@@ -75,14 +75,14 @@ class TestVlan(TestCase):
         self.dut.send_expect("set verbose 1", "testpmd> ")
         out = self.dut.send_expect("set fwd mac", "testpmd> ")
 
-        if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "redrockcanyou"]:
+        if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
             self.dut.send_expect("vlan set filter on %s" % dutRxPortId, "testpmd> ")
 
         self.dut.send_expect("vlan set strip off %s" % dutRxPortId, "testpmd> ")
         self.verify('Set mac packet forwarding mode' in out, "set fwd rxonly error")
         self.vlan = 51
 
-        if self.nic in ["redrockcanyou", "atwood"]:
+        if self.kdriver == "fm10k":
             netobj = self.dut.ports_info[dutRxPortId]['port']
             netobj.add_vlan(vlan_id = self.vlan)
 
@@ -132,7 +132,7 @@ class TestVlan(TestCase):
         Enable receipt of VLAN packets
         """
 
-        if self.nic in ["redrockcanyou", "atwood"]:
+        if self.kdriver == "fm10k":
             print dts.RED("fm10k not support this case\n")
             return
         self.dut.send_expect("rx_vlan add %d %s" % (self.vlan, dutRxPortId), "testpmd> ")
@@ -177,7 +177,7 @@ class TestVlan(TestCase):
 
     def test_vlan_strip_config_off(self):
 
-        if self.nic in ["redrockcanyou", "atwood"]:
+        if self.kdriver == "fm10k":
             print dts.RED("fm10k not support this case\n")
             return
         self.dut.send_expect("vlan set strip off %s" % dutRxPortId, "testpmd> ", 20)
@@ -195,7 +195,7 @@ class TestVlan(TestCase):
         """
         Enable VLAN header insertion in transmitted packets
         """
-        if self.nic in ["redrockcanyou", "atwood"]:
+        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)
@@ -214,7 +214,7 @@ class TestVlan(TestCase):
         self.dut.send_expect("tx_vlan reset %s" % dutTxPortId, "testpmd> ", 30)
         self.dut.send_expect("stop", "testpmd> ", 30)
 
-        if self.nic in ["redrockcanyou", "atwood"]:
+        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)
@@ -230,7 +230,7 @@ class TestVlan(TestCase):
         Run after each test suite.
         """
         self.dut.kill_all()
-        if self.nic in ["redrockcanyou", "atwood"]:
+        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)
-- 
1.9.3

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-02-03  6:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-03  6:50 [dts] [PATCH 0/6] Support Boulder Rapid Yong Liu
2016-02-03  6:50 ` [dts] [PATCH 1/6] nics fm10k: rename fm10k module to rrc Yong Liu
2016-02-03  6:50 ` [dts] [PATCH 2/6] framework settings: support boulderrapid nic Yong Liu
2016-02-03  6:50 ` [dts] [PATCH 3/6] framework test_case: add kernel driver variable Yong Liu
2016-02-03  6:50 ` [dts] [PATCH 4/6] nics: add support for Boulder Rapid Yong Liu
2016-02-03  6:50 ` [dts] [PATCH 5/6] nics net_device: support Boulder Rapid network object Yong Liu
2016-02-03  6:50 ` [dts] [PATCH 6/6] tests: support Boulder Rapid Yong Liu

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).