aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/CpuUtils.py
diff options
context:
space:
mode:
Diffstat (limited to 'resources/libraries/python/CpuUtils.py')
-rw-r--r--resources/libraries/python/CpuUtils.py12
1 files changed, 5 insertions, 7 deletions
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(