X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FDPDK%2FL2fwdTest.py;h=70ca93c5122d8ff66f4de2bbac2aba35a0790d2f;hb=9fdc420129db69d20c8f603c15205f2aaf375d66;hp=65ad6a53a4a64924b1eb38431054bfdc05c80d21;hpb=5e7be479eacd4d1085cab152c35dcb6433a146ed;p=csit.git diff --git a/resources/libraries/python/DPDK/L2fwdTest.py b/resources/libraries/python/DPDK/L2fwdTest.py index 65ad6a53a4..70ca93c512 100644 --- a/resources/libraries/python/DPDK/L2fwdTest.py +++ b/resources/libraries/python/DPDK/L2fwdTest.py @@ -16,7 +16,7 @@ DUT nodes. """ from resources.libraries.python.ssh import SSH -from resources.libraries.python.constants import Constants +from resources.libraries.python.Constants import Constants from resources.libraries.python.topology import NodeType, Topology @@ -33,12 +33,13 @@ class L2fwdTest(object): :param cpu_cores: The DPDK run cores. :param nb_cores: The cores number for the forwarding. :param queue_nums: The queues number for the NIC. - :param jumbo_frames: Are jumbo frames used or not. + :param jumbo_frames: Indication if the jumbo frames are used (True) or + not (False). :type dut_node: dict :type cpu_cores: str :type nb_cores: str :type queue_nums: str - :type jumbo_frames: str + :type jumbo_frames: bool :raises RuntimeError: If the script "run_l2fwd.sh" fails. """ if dut_node['type'] == NodeType.DUT: @@ -46,11 +47,12 @@ class L2fwdTest(object): ssh.connect(dut_node) arch = Topology.get_node_arch(dut_node) + jumbo = 'yes' if jumbo_frames else 'no' cmd = '{fwdir}/tests/dpdk/dpdk_scripts/run_l2fwd.sh {cpu_cores} ' \ '{nb_cores} {queues} {jumbo} {arch}'.\ format(fwdir=Constants.REMOTE_FW_DIR, cpu_cores=cpu_cores, nb_cores=nb_cores, queues=queue_nums, - jumbo=jumbo_frames, arch=arch) + jumbo=jumbo, arch=arch) ret_code, _, _ = ssh.exec_command_sudo(cmd, timeout=600) if ret_code != 0: