+ @staticmethod
+ def get_adj_mac(nodes_info, dut_node, dut_if1, dut_if2):
+ """
+ Get adjacency MAC addresses of the DUT node.
+
+ :param nodes_info: All the nodes info in the topology file.
+ :param dut_node: Will execute the l3fwd on this node
+ :param dut_if1: The test link interface 1.
+ :param dut_if2: The test link interface 2.
+ :type nodes_info: dict
+ :type dut_node: dict
+ :type dut_if1: str
+ :type dut_if2: str
+ :returns: Returns MAC addresses of adjacency DUT nodes.
+ :rtype: str
+ """
+ if_key0 = dut_if1
+ if_key1 = dut_if2
+ if_pci0 = Topology.get_interface_pci_addr(dut_node, if_key0)
+ if_pci1 = Topology.get_interface_pci_addr(dut_node, if_key1)
+
+ # detect which is the port 0
+ if min(if_pci0, if_pci1) != if_pci0:
+ if_key0, if_key1 = if_key1, if_key0
+
+ adj_node0, adj_if_key0 = Topology.get_adjacent_node_and_interface( \
+ nodes_info, dut_node, if_key0)
+ adj_node1, adj_if_key1 = Topology.get_adjacent_node_and_interface( \
+ nodes_info, dut_node, if_key1)
+
+ adj_mac0 = Topology.get_interface_mac(adj_node0, adj_if_key0)
+ adj_mac1 = Topology.get_interface_mac(adj_node1, adj_if_key1)
+
+ return adj_mac0, adj_mac1