+ ssh.connect(tg_node)
+
+ if1_pci = topo.get_interface_pci_addr(tg_node, tg_if1)
+ if2_pci = topo.get_interface_pci_addr(tg_node, tg_if2)
+ if1_mac = topo.get_interface_mac(tg_node, tg_if1)
+ if2_mac = topo.get_interface_mac(tg_node, tg_if2)
+
+ if test_type == 'L2':
+ if1_adj_mac = if2_mac
+ if2_adj_mac = if1_mac
+ elif test_type == 'L3':
+ if1_adj_mac = topo.get_interface_mac(dut1_node, dut1_if1)
+ if2_adj_mac = topo.get_interface_mac(dut2_node, dut2_if2)
+ else:
+ raise Exception("test_type unknown")
+
+ if min(if1_pci, if2_pci) != if1_pci:
+ if1_mac, if2_mac = if2_mac, if1_mac
+ if1_pci, if2_pci = if2_pci, if1_pci
+ if1_adj_mac, if2_adj_mac = if2_adj_mac, if1_adj_mac
+ self._ifaces_reordered = 1
+
+ if1_mac_hex = "0x"+if1_mac.replace(":", ",0x")
+ if2_mac_hex = "0x"+if2_mac.replace(":", ",0x")
+ if1_adj_mac_hex = "0x"+if1_adj_mac.replace(":", ",0x")
+ if2_adj_mac_hex = "0x"+if2_adj_mac.replace(":", ",0x")