aboutsummaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
Diffstat (limited to 'resources')
-rw-r--r--resources/libraries/bash/function/common.sh2
-rw-r--r--resources/libraries/python/Constants.py24
-rw-r--r--resources/libraries/python/DUTSetup.py15
-rw-r--r--resources/libraries/python/VPPUtil.py27
-rw-r--r--resources/libraries/robot/shared/default.robot19
-rw-r--r--resources/libraries/robot/shared/interfaces.robot4
6 files changed, 51 insertions, 40 deletions
diff --git a/resources/libraries/bash/function/common.sh b/resources/libraries/bash/function/common.sh
index 80221035f3..c68620b8ce 100644
--- a/resources/libraries/bash/function/common.sh
+++ b/resources/libraries/bash/function/common.sh
@@ -1023,6 +1023,8 @@ function select_tags () {
awk_nics_sub_cmd+='gsub("nitro-50g","50ge1p1ENA");'
awk_nics_sub_cmd+='gsub("nitro-100g","100ge1p1ENA");'
awk_nics_sub_cmd+='gsub("nitro-200g","200ge1p1ENA");'
+ awk_nics_sub_cmd+='gsub("cavium-50g","50ge2p1cavium50g");'
+ awk_nics_sub_cmd+='gsub("cavium-100g","100ge2p1cavium100g");'
awk_nics_sub_cmd+='gsub("virtual","1ge1p82540em");'
awk_nics_sub_cmd+='if ($9 =="drv_avf") drv="avf-";'
awk_nics_sub_cmd+='else if ($9 =="drv_rdma_core") drv ="rdma-";'
diff --git a/resources/libraries/python/Constants.py b/resources/libraries/python/Constants.py
index 297e937802..71369af098 100644
--- a/resources/libraries/python/Constants.py
+++ b/resources/libraries/python/Constants.py
@@ -332,8 +332,6 @@ class Constants:
"Amazon-Nitro-50G": 10000000000,
"Amazon-Nitro-100G": 10000000000,
"Amazon-Nitro-200G": 16000000000,
- "Cavium-A063-10G": 10000000000,
- "Cavium-A063-40G": 40000000000,
"Cavium-A063-50G": 50000000000,
"Cavium-A063-100G": 100000000000,
"virtual": 100000000,
@@ -354,8 +352,6 @@ class Constants:
"Amazon-Nitro-50G": 1500000,
"Amazon-Nitro-100G": 3000000,
"Amazon-Nitro-200G": 6000000,
- "Cavium-A063-10G": 78125000,
- "Cavium-A063-40G": 78125000,
"Cavium-A063-50G": 97656250,
"Cavium-A063-100G": 195312500,
"virtual": 14880952,
@@ -377,8 +373,6 @@ class Constants:
"Mellanox-CX6DX": "100ge2p1cx6dx",
"Mellanox-CX7VEAT": "200ge2p1cx7veat",
"Mellanox-CX7VEAT": "200ge6p3cx7veat",
- "Cavium-A063-10G": "10ge2p1a063",
- "Cavium-A063-40G": "40ge2p1a063",
"Cavium-A063-50G": "50ge2p1a063",
"Cavium-A063-100G": "100ge2p1a063",
"virtual": "1ge1p82540em",
@@ -398,8 +392,6 @@ class Constants:
"100ge2p1cx6dx": "Mellanox-CX6DX",
"200ge2p1cx7veat": "Mellanox-CX7VEAT",
"200ge6p3cx7veat": "Mellanox-CX7VEAT",
- "10ge2p1a063":"Cavium-A063-10G",
- "40ge2p1a063":"Cavium-A063-40G",
"50ge2p1a063":"Cavium-A063-50G",
"100ge2p1a063":"Cavium-A063-100G",
"1ge1p82540em": "virtual",
@@ -421,8 +413,6 @@ class Constants:
"100ge2p1cx6dx": "cx6dx",
"200ge2p1cx7veat": "cx7veat",
"200ge6p3cx7veat": "cx7veat",
- "10ge2p1a063": "a063",
- "40ge2p1a063": "a063",
"50ge2p1a063": "a063",
"100ge2p1a063": "a063",
"1ge1p82540em": "82540em",
@@ -443,8 +433,6 @@ class Constants:
"Mellanox-CX556A": ["rdma-core", "mlx5_core", "af_xdp"],
"Mellanox-CX6DX": ["rdma-core", "mlx5_core", "af_xdp"],
"Mellanox-CX7VEAT": ["rdma-core", "mlx5_core", "af_xdp"],
- "Cavium-A063-10G": ["vfio-pci"],
- "Cavium-A063-40G": ["vfio-pci"],
"Cavium-A063-50G": ["vfio-pci"],
"Cavium-A063-100G": ["vfio-pci"],
"virtual": ["vfio-pci"],
@@ -520,12 +508,6 @@ class Constants:
"mlx5_core": "dpdk_plugin.so",
"af_xdp": "af_xdp_plugin.so"
},
- "Cavium-A063-10G": {
- "vfio-pci": "dev_octeon_plugin.so"
- },
- "Cavium-A063-40G": {
- "vfio-pci": "dev_octeon_plugin.so"
- },
"Cavium-A063-50G": {
"vfio-pci": "dev_octeon_plugin.so"
},
@@ -580,8 +562,6 @@ class Constants:
"100ge2p1cx6dx": "nic_pfs}= | 2",
"200ge2p1cx7veat": "nic_pfs}= | 2",
"200ge6p3cx7veat": "nic_pfs}= | 6",
- "10ge2p1a063": "nic_pfs}= | 2",
- "40ge2p1a063": "nic_pfs}= | 2",
"50ge2p1a063": "nic_pfs}= | 2",
"100ge2p1a063": "nic_pfs}= | 2",
"1ge1p82540em": "nic_pfs}= | 2",
@@ -602,8 +582,6 @@ class Constants:
"100ge2p1cx6dx": 1,
"200ge2p1cx7veat": 1,
"200ge6p3cx7veat": 3,
- "10ge2p1a063": 1,
- "40ge2p1a063": 1,
"50ge2p1a063": 1,
"100ge2p1a063": 1,
"1ge1p82540em": 1,
@@ -624,8 +602,6 @@ class Constants:
"Mellanox-CX556A": ["mlx5_core"],
"Mellanox-CX6DX": ["mlx5_core"],
"Mellanox-CX7VEAT": ["mlx5_core"],
- "Cavium-A063-10G": ["vfio-pci"],
- "Cavium-A063-40G": ["vfio-pci"],
"Cavium-A063-50G": ["vfio-pci"],
"Cavium-A063-100G": ["vfio-pci"],
"virtual": ["vfio-pci"],
diff --git a/resources/libraries/python/DUTSetup.py b/resources/libraries/python/DUTSetup.py
index bc8af372df..8c240d9735 100644
--- a/resources/libraries/python/DUTSetup.py
+++ b/resources/libraries/python/DUTSetup.py
@@ -381,6 +381,21 @@ class DUTSetup:
DUTSetup.pci_driver_unbind(node, pci_addr)
@staticmethod
+ def bind_pci_devices_to_specific_driver(node, driver, *pci_addrs):
+ """Bind PCI devices to input driver on node. Unbind from previous.
+
+ :param node: DUT node.
+ :param driver: Driver to bind to.
+ :param pci_addrs: PCI device addresses.
+ :type node: dict
+ :type driver: str
+ :type pci_addrs: list
+ """
+ for pci_addr in pci_addrs:
+ DUTSetup.pci_driver_unbind(node, pci_addr)
+ DUTSetup.pci_driver_bind(node, pci_addr, driver)
+
+ @staticmethod
def pci_driver_bind(node, pci_addr, driver):
"""Bind PCI device to driver on node.
diff --git a/resources/libraries/python/VPPUtil.py b/resources/libraries/python/VPPUtil.py
index 29138da4f4..7faa4a891d 100644
--- a/resources/libraries/python/VPPUtil.py
+++ b/resources/libraries/python/VPPUtil.py
@@ -21,7 +21,9 @@ from resources.libraries.python.PapiExecutor import PapiSocketExecutor
from resources.libraries.python.model.ExportResult import (
export_dut_type_and_version
)
-from resources.libraries.python.ssh import exec_cmd_no_error, exec_cmd
+from resources.libraries.python.ssh import (
+ exec_cmd_no_error, exec_cmd, SSHTimeout
+)
from resources.libraries.python.topology import Topology, SocketType, NodeType
@@ -78,20 +80,29 @@ class VPPUtil:
:param node_key: Topology node key.
:type node: dict
:type node_key: str
+ :raises RuntimeError: If VPP is not killed within 10 seconds.
"""
PapiSocketExecutor.disconnect_all_sockets_by_node(node)
- command = "pkill -9 vpp; sleep 1"
- exec_cmd(node, command, timeout=180, sudo=True)
- command = (
- "/bin/rm -f /dev/shm/db /dev/shm/global_vm /dev/shm/vpe-api"
- )
- exec_cmd(node, command, timeout=180, sudo=True)
-
+ command = "pkill -9 vpp"
+ exec_cmd(node, command, timeout=1, sudo=True)
+ # Different testbeds need different time to confirm the kill is done.
+ unsure = False
+ command = "while pgrep vpp; do sleep 0.2; done"
+ try:
+ # Sudo is not needed, and would need bash -c to handle semicolons.
+ unsure, _, _ = exec_cmd(node, command, timeout=10)
+ except SSHTimeout:
+ unsure = True
+ # Continue cleanup even if VPP may still be running after 10 seconds.
+ command = "/bin/rm -f /dev/shm/db /dev/shm/global_vm /dev/shm/vpe-api"
+ exec_cmd(node, command, timeout=1, sudo=True)
if node_key:
if Topology.get_node_sockets(node, socket_type=SocketType.PAPI):
Topology.del_node_socket_id(node, SocketType.PAPI, node_key)
if Topology.get_node_sockets(node, socket_type=SocketType.STATS):
Topology.del_node_socket_id(node, SocketType.STATS, node_key)
+ if unsure:
+ raise RuntimeError(f"VPP kill not confirmed!")
@staticmethod
def stop_vpp_service_on_all_duts(nodes):
diff --git a/resources/libraries/robot/shared/default.robot b/resources/libraries/robot/shared/default.robot
index 094d277a11..3853cfafb2 100644
--- a/resources/libraries/robot/shared/default.robot
+++ b/resources/libraries/robot/shared/default.robot
@@ -145,6 +145,7 @@
| | FOR | ${dut} | IN | @{duts}
| | | Import Library | resources.libraries.python.VppConfigGenerator
| | | ... | WITH NAME | ${dut}
+| | | ${marvel}= | Get Node Model Bool | ${nodes['${dut}']} | Marvel-Octeon
| | | Run Keyword | ${dut}.Set Node | ${nodes['${dut}']} | node_key=${dut}
| | | Run Keyword | ${dut}.Add Unix Log
| | | Run Keyword | ${dut}.Add Unix CLI Listen
@@ -152,16 +153,22 @@
| | | Run Keyword | ${dut}.Add API Segment Prefix | ${dut}
| | | Run Keyword | ${dut}.Add Unix Coredump
| | | Run Keyword | ${dut}.Add Socksvr | ${SOCKSVR_PATH}
-| | | Run Keyword | ${dut}.Add Main Heap Size | ${${heap_size_mult}*${3}}G
-| | | Run Keyword | ${dut}.Add Main Heap Page Size | ${page_size}
-| | | Run Keyword | ${dut}.Add Default Hugepage Size | ${page_size}
+| | | Run Keyword If | not ${marvel}
+| | | ... | ${dut}.Add Main Heap Size | ${${heap_size_mult}*${3}}G
+| | | Run Keyword If | not ${marvel}
+| | | ... | ${dut}.Add Main Heap Page Size | ${page_size}
+| | | Run Keyword If | not ${marvel}
+| | | ... | ${dut}.Add Default Hugepage Size | ${page_size}
| | | Run Keyword | ${dut}.Add Statseg Size | 3G
-| | | Run Keyword | ${dut}.Add Statseg Page Size | ${page_size}
+| | | Run Keyword If | not ${marvel}
+| | | ... | ${dut}.Add Statseg Page Size | ${page_size}
| | | Run Keyword | ${dut}.Add Statseg Per Node Counters | on
| | | Run Keyword | ${dut}.Add Plugin | disable | default
| | | Run Keyword | ${dut}.Add Plugin | enable | @{plugins_to_enable}
-| | | Run Keyword | ${dut}.Add IP6 Hash Buckets | 2000000
-| | | Run Keyword | ${dut}.Add IP6 Heap Size | 3G
+| | | Run Keyword If | not ${marvel}
+| | | ... | ${dut}.Add IP6 Hash Buckets | 2000000
+| | | Run Keyword If | not ${marvel}
+| | | ... | ${dut}.Add IP6 Heap Size | 3G
| | | Run Keyword | ${dut}.Add Graph Node Variant | ${GRAPH_NODE_VARIANT}
| | END
diff --git a/resources/libraries/robot/shared/interfaces.robot b/resources/libraries/robot/shared/interfaces.robot
index 393811578e..929ff16196 100644
--- a/resources/libraries/robot/shared/interfaces.robot
+++ b/resources/libraries/robot/shared/interfaces.robot
@@ -146,8 +146,8 @@
| | Run Keyword If | ${nic_vfs}
| | ... | ${dut}.Add OCTEON Dev | @{${dut}_prevf_pci}
| | Run Keyword If | not ${nic_vfs}
-| | ... | Unbind PCI Devices From Other Driver | ${nodes['${dut}']} | vfio-pci |
-| | ... | ... | @{${dut}_pf_pci}
+| | ... | Bind PCI Devices To Specific Driver | ${nodes['${dut}']} | vfio-pci
+| | ... | @{${dut}_pf_pci}
| | Run Keyword If | not ${nic_vfs}
| | ... | ${dut}.Add OCTEON Dev | @{${dut}_pf_pci}