X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FCpuUtils.py;h=1e306f025e5ed601eaf3851c369acac243db23f1;hb=0d1d2160a64eafee0acfbacc78ce4e00387e6352;hp=5805ba7787d5efc8953dd05518c04fa8a7f34a6a;hpb=b758131f3cca4047c31d74fe772168b59a56baf1;p=csit.git diff --git a/resources/libraries/python/CpuUtils.py b/resources/libraries/python/CpuUtils.py index 5805ba7787..1e306f025e 100644 --- a/resources/libraries/python/CpuUtils.py +++ b/resources/libraries/python/CpuUtils.py @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Cisco and/or its affiliates. +# Copyright (c) 2023 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: @@ -388,25 +388,23 @@ class CpuUtils: @staticmethod def get_affinity_trex( - node, if1_pci, if2_pci, tg_mtc=1, tg_dtc=1, tg_ltc=1): + node, if_key, tg_mtc=1, tg_dtc=1, tg_ltc=1): """Get affinity for T-Rex. Result will be used to pin T-Rex threads. :param node: TG node. - :param if1_pci: TG first interface. - :param if2_pci: TG second interface. + :param if_key: TG first interface. :param tg_mtc: TG main thread count. :param tg_dtc: TG dataplane thread count. :param tg_ltc: TG latency thread count. :type node: dict - :type if1_pci: str - :type if2_pci: str + :type if_key: str :type tg_mtc: int :type tg_dtc: int :type tg_ltc: int :returns: List of CPUs allocated to T-Rex including numa node. :rtype: int, int, int, list """ - interface_list = [if1_pci, if2_pci] + interface_list = [if_key] cpu_node = Topology.get_interfaces_numa_node(node, *interface_list) master_thread_id = CpuUtils.cpu_slice_of_list_per_node(