summaryrefslogtreecommitdiffstats
path: root/tools/pkt_gen/xena/xena.py
diff options
context:
space:
mode:
authorMartin Klozik <martinx.klozik@intel.com>2017-01-24 07:56:48 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-01-24 07:56:48 +0000
commit14c3ad198f680fb1477f59af79fccc72e1ad8389 (patch)
tree2d5835242d09a4d622328d0c44840c250c09d535 /tools/pkt_gen/xena/xena.py
parent76ac721519246949968b7b6fadcdd8642021e5b0 (diff)
parent3aa4a6fab319a1e532eb8bb963a4632bc37797ef (diff)
Merge "xena_cont_learning: Adds learning preemption to continuous traffic"
Diffstat (limited to 'tools/pkt_gen/xena/xena.py')
-rwxr-xr-xtools/pkt_gen/xena/xena.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/pkt_gen/xena/xena.py b/tools/pkt_gen/xena/xena.py
index 20577e8d..f5415d52 100755
--- a/tools/pkt_gen/xena/xena.py
+++ b/tools/pkt_gen/xena/xena.py
@@ -383,6 +383,15 @@ class Xena(ITrafficGenerator):
# Clear port configuration for a clean start
self.xmanager.ports[0].reset_port()
self.xmanager.ports[1].reset_port()
+ if settings.getValue('TRAFFICGEN_XENA_CONT_PORT_LEARNING_ENABLED'):
+ # turn on port learning
+ self.xmanager.ports[0].set_port_learning(1)
+ self.xmanager.ports[1].set_port_learning(1)
+ sleep(settings.getValue('TRAFFICGEN_XENA_CONT_PORT_LEARNING_DURATION'))
+ # turn off port learning
+ self.xmanager.ports[0].set_port_learning(0)
+ self.xmanager.ports[1].set_port_learning(0)
+ sleep(1)
self.xmanager.ports[0].clear_stats()
self.xmanager.ports[1].clear_stats()