X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FDpdkUtil.py;h=41c79a84cf8aca71d39a1ad54f8e043c5d21ec89;hb=ada7009a3c826430e83a29c31bdf9a5973986ad9;hp=b8c1d15a9fc5ea55ee5d4d73a97e09aaa4c27238;hpb=491d727115e757aa2d5a7df8048fe17b5ceb16ce;p=csit.git diff --git a/resources/libraries/python/DpdkUtil.py b/resources/libraries/python/DpdkUtil.py index b8c1d15a9f..41c79a84cf 100644 --- a/resources/libraries/python/DpdkUtil.py +++ b/resources/libraries/python/DpdkUtil.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. +# Copyright (c) 2018 Cisco and/or its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: @@ -29,8 +29,8 @@ class DpdkUtil(object): :rtype: str """ # Set the hexadecimal bitmask of the cores to run on. - eal_coremask = '-c {} '.format(args['eal_coremask'])\ - if args.get('eal_coremask', '') else '' + eal_corelist = '-l {} '.format(args['eal_corelist'])\ + if args.get('eal_corelist', '') else '' # Set master core. eal_master_core = '--master-lcore 0 ' # Set the number of memory channels to use. @@ -42,7 +42,7 @@ class DpdkUtil(object): # Load an external driver. Multiple -d options are allowed. eal_driver = '-d /usr/lib/librte_pmd_virtio.so ' eal_options = '-v '\ - + eal_coremask\ + + eal_corelist\ + eal_master_core\ + eal_mem_channels\ + eal_socket_mem\ @@ -121,17 +121,17 @@ class DpdkUtil(object): return pmd_options @staticmethod - def dpdk_testpmd_start(node, **args): + def dpdk_testpmd_start(node, **kwargs): """Start DPDK testpmd app on VM node. :param node: VM Node to start testpmd on. - :param args: List of testpmd parameters. + :param args: Key-value testpmd parameters. :type node: dict :type args: dict - :return: nothing + :returns: nothing """ - eal_options = DpdkUtil.get_eal_options(**args) - pmd_options = DpdkUtil.get_pmd_options(**args) + eal_options = DpdkUtil.get_eal_options(**kwargs) + pmd_options = DpdkUtil.get_pmd_options(**kwargs) ssh = SSH() ssh.connect(node) @@ -145,7 +145,7 @@ class DpdkUtil(object): :param node: Node to stop testpmd on. :type node: dict - :return: nothing + :returns: nothing """ ssh = SSH() ssh.connect(node)