aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/TrafficGenerator.py
diff options
context:
space:
mode:
authorTomas Alexy <tomas.alexy@pantheon.tech>2021-03-25 15:15:17 +0100
committerVratko Polak <vrpolak@cisco.com>2021-03-26 13:31:11 +0000
commit6bba7b0bef31a8993848f0dcf5e661e8ccf02ddd (patch)
tree72d2211a65b0620112a669ce506ea9588dc1f943 /resources/libraries/python/TrafficGenerator.py
parentcae574e901b04006d5c8060b747516503d0fdf0a (diff)
Parametrize T-Rex rx/tx descriptors count
Additional configuration can provide performance boosts when running in virtual environments If set to 0, uses default DPDK value By tuning this value it's also possible to run T-Rex 2.88 with ENA NICs on AWS Signed-off-by: Tomas Alexy <tomas.alexy@pantheon.tech> Change-Id: I43c86ea1d9aa854a1087f07fe544ac77a5b80397
Diffstat (limited to 'resources/libraries/python/TrafficGenerator.py')
-rw-r--r--resources/libraries/python/TrafficGenerator.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/resources/libraries/python/TrafficGenerator.py b/resources/libraries/python/TrafficGenerator.py
index 9a9519e248..c0d1b4ec63 100644
--- a/resources/libraries/python/TrafficGenerator.py
+++ b/resources/libraries/python/TrafficGenerator.py
@@ -343,6 +343,24 @@ class TrafficGenerator(AbstractMeasurer):
f"EOF'",
sudo=True, message=u"T-Rex config generation!"
)
+
+ if Constants.TREX_RX_DESCRIPTORS_COUNT != 0:
+ exec_cmd_no_error(
+ self._node,
+ f"sh -c 'cat << EOF >> /etc/trex_cfg.yaml\n"
+ f" rx_desc: {Constants.TREX_RX_DESCRIPTORS_COUNT}\n"
+ f"EOF'",
+ sudo=True, message=u"T-Rex rx_desc modification!"
+ )
+
+ if Constants.TREX_TX_DESCRIPTORS_COUNT != 0:
+ exec_cmd_no_error(
+ self._node,
+ f"sh -c 'cat << EOF >> /etc/trex_cfg.yaml\n"
+ f" tx_desc: {Constants.TREX_TX_DESCRIPTORS_COUNT}\n"
+ f"EOF'",
+ sudo=True, message=u"T-Rex tx_desc modification!"
+ )
else:
raise ValueError(u"Unknown OSI layer!")