Code Review
/
csit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
chore(mtu): delete some unused keywords related to mtu
[csit.git]
/
resources
/
libraries
/
python
/
DPDK
/
L3fwdTest.py
diff --git
a/resources/libraries/python/DPDK/L3fwdTest.py
b/resources/libraries/python/DPDK/L3fwdTest.py
index
c338103
..
1c6e618
100644
(file)
--- a/
resources/libraries/python/DPDK/L3fwdTest.py
+++ b/
resources/libraries/python/DPDK/L3fwdTest.py
@@
-1,4
+1,4
@@
-# Copyright (c) 202
0
Cisco and/or its affiliates.
+# Copyright (c) 202
1
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:
# 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:
@@
-21,6
+21,8
@@
from resources.libraries.python.ssh import exec_cmd_no_error, exec_cmd
from resources.libraries.python.topology import NodeType, Topology
from resources.libraries.python.topology import NodeType, Topology
+NB_PORTS = 2
+
class L3fwdTest:
"""Test the DPDK l3fwd performance."""
class L3fwdTest:
"""Test the DPDK l3fwd performance."""
@@
-54,16
+56,17
@@
class L3fwdTest:
nodes, node, if1, if2
)
nodes, node, if1, if2
)
- l
ist_
cores = [int(item) for item in lcores_list.split(u",")]
+ lcores = [int(item) for item in lcores_list.split(u",")]
# prepare the port config param
nb_cores = int(nb_cores)
index = 0
port_config = ''
# prepare the port config param
nb_cores = int(nb_cores)
index = 0
port_config = ''
- for port in range(0,
2
):
+ for port in range(0,
NB_PORTS
):
for queue in range(0, int(queue_nums)):
index = 0 if nb_cores == 1 else index
for queue in range(0, int(queue_nums)):
index = 0 if nb_cores == 1 else index
- port_config += f"({port}, {queue}, {list_cores[index]}),"
+ port_config += \
+ f"({port}, {queue}, {lcores[index % NB_PORTS]}),"
index += 1
if jumbo_frames:
index += 1
if jumbo_frames:
@@
-77,7
+80,6
@@
class L3fwdTest:
pmd_eth_dest_0=f"\\\"0,{adj_mac0}\\\"",
pmd_eth_dest_1=f"\\\"1,{adj_mac1}\\\"",
pmd_parse_ptype=True,
pmd_eth_dest_0=f"\\\"0,{adj_mac0}\\\"",
pmd_eth_dest_1=f"\\\"1,{adj_mac1}\\\"",
pmd_parse_ptype=True,
- pmd_enable_jumbo=jumbo_frames,
pmd_max_pkt_len=jumbo_frames
)
else:
pmd_max_pkt_len=jumbo_frames
)
else: