+ def start_l3fwd_on_all_duts(
+ nodes, topology_info, phy_cores, rx_queues=None, jumbo_frames=False,
+ rxd=None, txd=None):
+ """
+ Execute the l3fwd on all dut nodes.
+
+ :param nodes: All the nodes info from the topology file.
+ :param topology_info: All the info from the topology file.
+ :param phy_cores: Number of physical cores to use.
+ :param rx_queues: Number of RX queues.
+ :param jumbo_frames: Jumbo frames on/off.
+ :param rxd: Number of RX descriptors.
+ :param txd: Number of TX descriptors.
+
+ :type nodes: dict
+ :type topology_info: dict
+ :type phy_cores: int
+ :type rx_queues: int
+ :type jumbo_frames: bool
+ :type rxd: int
+ :type txd: int
+ :raises RuntimeError: If bash return code is not 0.
+ """
+ cpu_count_int = dp_count_int = int(phy_cores)
+ dp_cores = cpu_count_int+1
+ tg_flip = topology_info[f"tg_if1_pci"] > topology_info[f"tg_if2_pci"]
+ compute_resource_info = CpuUtils.get_affinity_vswitch(
+ nodes, phy_cores, rx_queues=rx_queues, rxd=rxd, txd=txd
+ )
+ for node_name, node in nodes.items():
+ if node["type"] == NodeType.DUT:
+ if dp_count_int > 1:
+ BuiltIn().set_tags('MTHREAD')
+ else:
+ BuiltIn().set_tags('STHREAD')
+ BuiltIn().set_tags(
+ f"{dp_count_int}T{cpu_count_int}C"
+ )
+
+ cpu_dp = compute_resource_info[f"{node_name}_cpu_dp"]
+ rxq_count_int = compute_resource_info["rxq_count_int"]
+ if1 = topology_info[f"{node_name}_pf1"][0]
+ if2 = topology_info[f"{node_name}_pf2"][0]
+ L3fwdTest.start_l3fwd(
+ nodes, node, if1=if1, if2=if2, lcores_list=cpu_dp,
+ nb_cores=dp_count_int, queue_nums=rxq_count_int,
+ jumbo_frames=jumbo_frames, tg_flip=tg_flip
+ )
+ for node in nodes:
+ if u"DUT" in node:
+ for i in range(3):
+ try:
+ L3fwdTest.check_l3fwd(nodes[node])
+ break
+ except RuntimeError:
+ L3fwdTest.start_l3fwd(
+ nodes, nodes[node], if1=if1, if2=if2,
+ lcores_list=cpu_dp, nb_cores=dp_count_int,
+ queue_nums=rxq_count_int, jumbo_frames=jumbo_frames,
+ tg_flip=tg_flip
+ )
+ else:
+ message = f"Failed to start l3fwd at node {node}"
+ raise RuntimeError(message)
+
+ @staticmethod
+ def start_l3fwd(
+ nodes, node, if1, if2, lcores_list, nb_cores, queue_nums,
+ jumbo_frames, tg_flip):