aboutsummaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
authorPeter Mikus <peter.mikus@icloud.com>2025-02-04 13:37:54 +0100
committerPeter Mikus <peter.mikus@icloud.com>2025-02-11 09:48:01 +0100
commit7eb1aad3a37e067ada027d523b517cfafae5c198 (patch)
tree6aa28d7210a96edf7a21878c99243d67843e95f6 /resources
parentee113497fedcd1b3d6425255b6f683c59152fb5d (diff)
feat(infra): 3n-oct
Signed-off-by: Peter Mikus <peter.mikus@icloud.com> Change-Id: Ia5b4dff2aaf5b7baa88f85448616c59e51816873
Diffstat (limited to 'resources')
-rw-r--r--resources/libraries/bash/function/common.sh17
-rw-r--r--resources/libraries/python/Constants.py32
-rw-r--r--resources/libraries/python/VppConfigGenerator.py36
3 files changed, 83 insertions, 2 deletions
diff --git a/resources/libraries/bash/function/common.sh b/resources/libraries/bash/function/common.sh
index d1302170b0..80221035f3 100644
--- a/resources/libraries/bash/function/common.sh
+++ b/resources/libraries/bash/function/common.sh
@@ -1,5 +1,5 @@
-# Copyright (c) 2024 Cisco and/or its affiliates.
-# Copyright (c) 2024 PANTHEON.tech and/or its affiliates.
+# Copyright (c) 2025 Cisco and/or its affiliates.
+# Copyright (c) 2025 PANTHEON.tech and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@ -532,6 +532,10 @@ function get_test_code () {
NODENESS="3n"
FLAVOR="emr"
;;
+ *"3n-oct")
+ NODENESS="3n"
+ FLAVOR="oct"
+ ;;
*"-x-2n"*)
TESTBED="${TEST_CODE#${TEST_CODE%2n*}}"
NODENESS="${TESTBED%-${TEST_CODE#*-x-2n*-}}"
@@ -982,6 +986,9 @@ function select_tags () {
*"3n-emr")
default_nic="nic_intel-e810cq"
;;
+ *"3n-oct")
+ default_nic="nic_cavium-a063-100g"
+ ;;
*"1n-aws" | *"2n-aws" | *"3n-aws")
default_nic="nic_amazon-nitro-50g"
;;
@@ -1132,6 +1139,8 @@ function select_tags () {
;;
*"3n-emr")
;;
+ *"3n-oct")
+ ;;
*"3n-icx")
test_tag_array+=("!ipsechw")
test_tag_array+=("!3_node_double_link_topoANDnic_intel-xxv710")
@@ -1272,6 +1281,10 @@ function select_topology () {
TOPOLOGIES=( "${TOPOLOGIES_DIR}"/*3n_emr_*.yaml )
TOPOLOGIES_TAGS="3_node_*_link_topo"
;;
+ *"3n-oct")
+ TOPOLOGIES=( "${TOPOLOGIES_DIR}"/*3n_oct_*.yaml )
+ TOPOLOGIES_TAGS="3_node_*_link_topo"
+ ;;
*"3n-aws")
TOPOLOGIES=( "${TOPOLOGIES_DIR}"/*3n-aws*.yaml )
TOPOLOGIES_TAGS="3_node_single_link_topo"
diff --git a/resources/libraries/python/Constants.py b/resources/libraries/python/Constants.py
index 6a7b81b70d..e98d1bb0bb 100644
--- a/resources/libraries/python/Constants.py
+++ b/resources/libraries/python/Constants.py
@@ -332,6 +332,10 @@ 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,
}
@@ -350,6 +354,10 @@ 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,
}
@@ -369,6 +377,10 @@ 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",
}
NIC_CODE_TO_NAME = {
@@ -386,6 +398,10 @@ 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",
}
@@ -405,6 +421,10 @@ class Constants:
"100ge2p1cx6dx": "cx6dx",
"200ge2p1cx7veat": "cx7veat",
"200ge6p3cx7veat": "cx7veat",
+ "10ge2p1a063": "a063",
+ "40ge2p1a063": "a063",
+ "50ge2p1a063": "a063",
+ "100ge2p1a063": "a063",
"1ge1p82540em": "82540em",
}
@@ -423,6 +443,10 @@ 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"],
}
@@ -478,6 +502,10 @@ 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",
}
@@ -496,6 +524,10 @@ class Constants:
"100ge2p1cx6dx": 1,
"200ge2p1cx7veat": 1,
"200ge6p3cx7veat": 3,
+ "10ge2p1a063": 1,
+ "40ge2p1a063": 1,
+ "50ge2p1a063": 1,
+ "100ge2p1a063": 1,
"1ge1p82540em": 1,
}
diff --git a/resources/libraries/python/VppConfigGenerator.py b/resources/libraries/python/VppConfigGenerator.py
index 384964eae0..849a32982a 100644
--- a/resources/libraries/python/VppConfigGenerator.py
+++ b/resources/libraries/python/VppConfigGenerator.py
@@ -727,6 +727,42 @@ class VppConfigGenerator:
path = ["dsa", f"dev {device}"]
self.add_config_item(self._nodeconfig, "", path)
+ def add_octeon_dev(self, *devices):
+ """Add OCTEON PCI device configuration.
+
+ :param devices: PCI device(s) (format xxxx:xx:xx.x)
+ :type devices: tuple
+ """
+ for i, device in enumerate(devices):
+ if pci_dev_check(device):
+ path = ["devices", f"dev pci/{device}", "driver octeon"]
+ self.add_config_item(self._nodeconfig, "", path)
+ path = ["devices", f"dev pci/{device}", "port 0", f"name eth{i}"]
+ self.add_config_item(self._nodeconfig, "", path)
+ num_rx_queues = Topology.get_num_rx_queues(self._node)
+ num_tx_queues = Topology.get_num_tx_queues(self._node)
+ if num_rx_queues and num_tx_queues:
+ self.add_octeon_dev_default_rxq(device, num_rx_queues)
+ self.add_octeon_dev_default_txq(device, num_tx_queues)
+
+ def add_octeon_dev_default_rxq(self, device, value):
+ """Add OCTEON dev default rxq configuration.
+
+ :param value: Default number of rxqs.
+ :type value: str
+ """
+ path = ["devices", f"dev pci/{device}", "port 0", "num-rx-queues"]
+ self.add_config_item(self._nodeconfig, value, path)
+
+ def add_octeon_dev_default_txq(self, device, value):
+ """Add OCTEON dev default txq configuration.
+
+ :param value: Default number of txqs.
+ :type value: str
+ """
+ path = ["devices", f"dev pci/{device}", "port 0", "num-tx-queues"]
+ self.add_config_item(self._nodeconfig, value, path)
+
def add_logging_default_syslog_log_level(self, value="debug"):
"""Add default logging level for syslog.