+ :raises RuntimeError: If it fails to cleanup the dpdk.
+ """
+ if dut_node['type'] == NodeType.DUT:
+ pci_address1 = Topology.get_interface_pci_addr(dut_node, dut_if1)
+ if1_driver = Topology.get_interface_driver(dut_node, dut_if1)
+ pci_address2 = Topology.get_interface_pci_addr(dut_node, dut_if2)
+ if2_driver = Topology.get_interface_driver(dut_node, dut_if2)
+
+ ssh = SSH()
+ ssh.connect(dut_node)
+
+ cmd = '{fwdir}/tests/dpdk/dpdk_scripts/cleanup_dpdk.sh ' \
+ '{drv1} {pci1} {drv2} {pci2}'.\
+ format(fwdir=Constants.REMOTE_FW_DIR, drv1=if1_driver,
+ pci1=pci_address1, drv2=if2_driver, pci2=pci_address2)
+
+ ret_code, _, _ = ssh.exec_command_sudo(cmd, timeout=600)
+ if ret_code != 0:
+ raise RuntimeError('Failed to cleanup the dpdk at node {name}'.
+ format(name=dut_node['host']))
+
+ @staticmethod
+ def install_dpdk_test(node):
+ """
+ Prepare the DPDK test environment
+
+ :param node: Dictionary created from topology
+ :type node: dict
+ :returns: nothing
+ :raises RuntimeError: If command returns nonzero return code.