aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/DPDK/TestpmdTest.py
diff options
context:
space:
mode:
authorpmikus <peter.mikus@protonmail.ch>2023-07-25 10:47:12 +0000
committerPeter Mikus <peter.mikus@protonmail.ch>2023-07-27 08:25:02 +0000
commit9c926fdd75cc1d65faa1ee50ce9133e754fdd498 (patch)
tree2d14680dc9a7dc43b935559bb176de2f1503613f /resources/libraries/python/DPDK/TestpmdTest.py
parentf58649004a975b8e02dd3935669fd5e15c525817 (diff)
feat(core): Core allocation
Signed-off-by: pmikus <peter.mikus@protonmail.ch> Change-Id: I782b87190dbee6e0a12c97f616b80539cd6614bd
Diffstat (limited to 'resources/libraries/python/DPDK/TestpmdTest.py')
-rw-r--r--resources/libraries/python/DPDK/TestpmdTest.py21
1 files changed, 10 insertions, 11 deletions
diff --git a/resources/libraries/python/DPDK/TestpmdTest.py b/resources/libraries/python/DPDK/TestpmdTest.py
index ca98da2f86..3baba30715 100644
--- a/resources/libraries/python/DPDK/TestpmdTest.py
+++ b/resources/libraries/python/DPDK/TestpmdTest.py
@@ -60,12 +60,11 @@ class TestpmdTest:
cpu_count_int = dp_count_int = int(phy_cores)
dp_cores = cpu_count_int+1
- for node in nodes:
- if u"DUT" in node:
- compute_resource_info = CpuUtils.get_affinity_vswitch(
- nodes, node, phy_cores, rx_queues=rx_queues,
- rxd=rxd, txd=txd
- )
+ compute_resource_info = CpuUtils.get_affinity_vswitch(
+ nodes, phy_cores, rx_queues=rx_queues, rxd=rxd, txd=txd
+ )
+ for node_name, node in nodes.items():
+ if node["type"] == NodeType.DUT:
if dp_count_int > 1:
BuiltIn().set_tags('MTHREAD')
else:
@@ -74,12 +73,12 @@ class TestpmdTest:
f"{dp_count_int}T{cpu_count_int}C"
)
- cpu_dp = compute_resource_info[u"cpu_dp"]
- rxq_count_int = compute_resource_info[u"rxq_count_int"]
- if1 = topology_info[f"{node}_pf1"][0]
- if2 = topology_info[f"{node}_pf2"][0]
+ cpu_dp = compute_resource_info[f"{node_name}_cpu_dp"]
+ rxq_count_int = compute_resource_info["rxq_count_int"]
+ if1 = topology_info[f"{node_name}_pf1"][0]
+ if2 = topology_info[f"{node_name}_pf2"][0]
TestpmdTest.start_testpmd(
- nodes[node], if1=if1, if2=if2, lcores_list=cpu_dp,
+ node, if1=if1, if2=if2, lcores_list=cpu_dp,
nb_cores=dp_count_int, queue_nums=rxq_count_int,
jumbo_frames=jumbo_frames, rxq_size=nic_rxq_size,
txq_size=nic_txq_size