aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbmichalo <bmichalo@redhat.com>2016-07-21 11:33:02 -0400
committerbmichalo <bmichalo@redhat.com>2016-07-27 10:24:53 -0400
commitb859be62b56f1e4cf1eaa534106311ff6ca60b1d (patch)
tree3df53d357e9518e4ff9beff850a3701f883d842b
parent5109fb49432be5bb0075b6b55e8b5304fa6172be (diff)
pkt_gen: MoonGen incorrectly inserting VLAN tag
MoonGen needs to take into account the VLAN tag 'enable' control knob defined within the VSPERF traffic profile and therefore only insert the VLAN tag when its 'True'. JIRA: VSPERF-329 Change-Id: Idbeed2f7e6411f0c28aa56a2d3e71bd7a79d975a Signed-off-by: bmichalo <bmichalo@redhat.com>
-rw-r--r--tools/pkt_gen/moongen/moongen.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/pkt_gen/moongen/moongen.py b/tools/pkt_gen/moongen/moongen.py
index 7af83f26..21dec9cc 100644
--- a/tools/pkt_gen/moongen/moongen.py
+++ b/tools/pkt_gen/moongen/moongen.py
@@ -138,8 +138,9 @@ class Moongen(ITrafficGenerator):
out_file.write("dstIp = \"" + \
str(traffic['l3']['dstip']) + "\",\n")
- out_file.write("vlanId = " + \
- str(traffic['vlan']['id']) + ",\n")
+ if traffic['vlan']['enabled']:
+ out_file.write("vlanId = " + \
+ str(traffic['vlan']['id']) + ",\n")
out_file.write("searchRunTime = " + \
str(duration) + ",\n")