aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--resources/libraries/python/InterfaceUtil.py43
-rw-r--r--resources/libraries/robot/shared/interfaces.robot20
-rw-r--r--tests/dpdk/perf/10ge2p1x710-eth-l2xcbase-testpmd-ndrpdr.robot1
-rw-r--r--tests/dpdk/perf/10ge2p1x710-ethip4-ip4base-l3fwd-ndrpdr.robot1
-rw-r--r--tests/dpdk/perf/2n1l-10ge2p1x710-eth-l2xcbase-testpmd-ndrpdr.robot1
-rw-r--r--tests/dpdk/perf/2n1l-10ge2p1x710-ethip4-ip4base-l3fwd-ndrpdr.robot1
6 files changed, 33 insertions, 34 deletions
diff --git a/resources/libraries/python/InterfaceUtil.py b/resources/libraries/python/InterfaceUtil.py
index 9dcd1f8321..5bb6264676 100644
--- a/resources/libraries/python/InterfaceUtil.py
+++ b/resources/libraries/python/InterfaceUtil.py
@@ -228,45 +228,20 @@ class InterfaceUtil:
)
@staticmethod
- def set_interface_ethernet_mtu(node, iface_key, mtu):
+ def set_interface_mtu(node, pf_pcis, mtu=9200):
"""Set Ethernet MTU for specified interface.
- Function can be used only for TGs.
-
- :param node: Node where the interface is.
- :param iface_key: Interface key from topology file.
- :param mtu: MTU to set.
- :type node: dict
- :type iface_key: str
+ :param node: Topology node.
+ :param pf_pcis: List of node's interfaces PCI addresses.
+ :param mtu: MTU to set. Default: 9200.
+ :type nodes: dict
+ :type pf_pcis: list
:type mtu: int
- :returns: Nothing.
- :raises ValueError: If the node type is "DUT".
- :raises ValueError: If the node has an unknown node type.
"""
- if node[u"type"] == NodeType.DUT:
- msg = f"Node {node[u'host']}: Setting Ethernet MTU for interface " \
- f"on DUT nodes not supported"
- elif node[u"type"] != NodeType.TG:
- msg = f"Node {node[u'host']} has unknown NodeType: {node[u'type']}"
- else:
- iface_name = Topology.get_interface_name(node, iface_key)
- cmd = f"ip link set {iface_name} mtu {mtu}"
+ for pf_pci in pf_pcis:
+ pf_eth = InterfaceUtil.pci_to_eth(node, pf_pci)
+ cmd = f"ip link set {pf_eth} mtu {mtu}"
exec_cmd_no_error(node, cmd, sudo=True)
- return
- raise ValueError(msg)
-
- @staticmethod
- def set_default_ethernet_mtu_on_all_interfaces_on_node(node):
- """Set default Ethernet MTU on all interfaces on node.
-
- Function can be used only for TGs.
-
- :param node: Node where to set default MTU.
- :type node: dict
- :returns: Nothing.
- """
- for ifc in node[u"interfaces"]:
- InterfaceUtil.set_interface_ethernet_mtu(node, ifc, 1500)
@staticmethod
def vpp_set_interface_mtu(node, interface, mtu=9200):
diff --git a/resources/libraries/robot/shared/interfaces.robot b/resources/libraries/robot/shared/interfaces.robot
index 5f743e6f18..195ba10472 100644
--- a/resources/libraries/robot/shared/interfaces.robot
+++ b/resources/libraries/robot/shared/interfaces.robot
@@ -114,6 +114,8 @@
| | ... | Pre-initialize vfio-pci driver by adding related sections to startup
| | ... | config on all DUTs.
| |
+| | ${index}= | Get Index From List | ${TEST TAGS} | DPDK
+| | Run Keyword If | ${index} >= 0 | Return From Keyword
| | FOR | ${dut} | IN | @{duts}
| | | Run keyword | ${dut}.Add DPDK Dev | @{${dut}_pf_pci}
| | | Run Keyword If | ${dpdk_no_tx_checksum_offload}
@@ -147,6 +149,17 @@
| |
| | No operation
+| Pre-initialize layer mlx5_core on all DUTs
+| | [Documentation]
+| | ... | Pre-initialize mlx5_core driver.
+| |
+| | FOR | ${dut} | IN | @{duts}
+| | | Run Keyword If | ${jumbo}
+| | | ... | Set Interface MTU | ${nodes['${dut}']} | ${${dut}_pf_pci} | mtu=9200
+| | | ... | ELSE
+| | | ... | Set Interface MTU | ${nodes['${dut}']} | ${${dut}_pf_pci} | mtu=1500
+| | END
+
| Initialize layer driver
| | [Documentation]
| | ... | Initialize driver based interfaces on all DUT. Interfaces are
@@ -286,6 +299,13 @@
| | ... | rxq_size=${nic_rxq_size} | txq_size=${nic_txq_size}
| | Set List Value | ${${dut}_vf${pf}} | 0 | ${_rdma}
+| Initialize layer mlx5_core on node
+| | [Documentation]
+| | ... | Initialize mlx5_core interfaces on DUT on NIC PF.
+| | ... | Currently no operation.
+| |
+| | No operation
+
| Initialize layer interface
| | [Documentation]
| | ... | Physical interfaces variables to be created on all DUTs.
diff --git a/tests/dpdk/perf/10ge2p1x710-eth-l2xcbase-testpmd-ndrpdr.robot b/tests/dpdk/perf/10ge2p1x710-eth-l2xcbase-testpmd-ndrpdr.robot
index 62dbd63be4..15842294de 100644
--- a/tests/dpdk/perf/10ge2p1x710-eth-l2xcbase-testpmd-ndrpdr.robot
+++ b/tests/dpdk/perf/10ge2p1x710-eth-l2xcbase-testpmd-ndrpdr.robot
@@ -70,6 +70,7 @@
| | Set Test Variable | \${frame_size}
| |
| | Given Set Max Rate And Jumbo
+| | And Pre-initialize layer driver | ${nic_driver}
| | When Start testpmd on all DUTs | ${phy_cores} | ${rxq} | ${jumbo}
| | Then Find NDR and PDR intervals using optimized search
diff --git a/tests/dpdk/perf/10ge2p1x710-ethip4-ip4base-l3fwd-ndrpdr.robot b/tests/dpdk/perf/10ge2p1x710-ethip4-ip4base-l3fwd-ndrpdr.robot
index ebacc7be06..92a9fc3f4f 100644
--- a/tests/dpdk/perf/10ge2p1x710-ethip4-ip4base-l3fwd-ndrpdr.robot
+++ b/tests/dpdk/perf/10ge2p1x710-ethip4-ip4base-l3fwd-ndrpdr.robot
@@ -70,6 +70,7 @@
| | Set Test Variable | \${frame_size}
| |
| | Given Set Max Rate And Jumbo
+| | And Pre-initialize layer driver | ${nic_driver}
| | When Start L3FWD on all DUTs | ${phy_cores} | ${rxq} | ${jumbo}
| | Then Find NDR and PDR intervals using optimized search
diff --git a/tests/dpdk/perf/2n1l-10ge2p1x710-eth-l2xcbase-testpmd-ndrpdr.robot b/tests/dpdk/perf/2n1l-10ge2p1x710-eth-l2xcbase-testpmd-ndrpdr.robot
index 90ed4237be..39c74a9e7c 100644
--- a/tests/dpdk/perf/2n1l-10ge2p1x710-eth-l2xcbase-testpmd-ndrpdr.robot
+++ b/tests/dpdk/perf/2n1l-10ge2p1x710-eth-l2xcbase-testpmd-ndrpdr.robot
@@ -70,6 +70,7 @@
| | Set Test Variable | \${frame_size}
| |
| | Given Set Max Rate And Jumbo
+| | And Pre-initialize layer driver | ${nic_driver}
| | When Start testpmd on all DUTs | ${phy_cores} | ${rxq} | ${jumbo}
| | Then Find NDR and PDR intervals using optimized search
diff --git a/tests/dpdk/perf/2n1l-10ge2p1x710-ethip4-ip4base-l3fwd-ndrpdr.robot b/tests/dpdk/perf/2n1l-10ge2p1x710-ethip4-ip4base-l3fwd-ndrpdr.robot
index 9a761758ff..2750e7ab88 100644
--- a/tests/dpdk/perf/2n1l-10ge2p1x710-ethip4-ip4base-l3fwd-ndrpdr.robot
+++ b/tests/dpdk/perf/2n1l-10ge2p1x710-ethip4-ip4base-l3fwd-ndrpdr.robot
@@ -70,6 +70,7 @@
| | Set Test Variable | \${frame_size}
| |
| | Given Set Max Rate And Jumbo
+| | And Pre-initialize layer driver | ${nic_driver}
| | When Start L3FWD on all DUTs | ${phy_cores} | ${rxq} | ${jumbo}
| | Then Find NDR and PDR intervals using optimized search