From b859be62b56f1e4cf1eaa534106311ff6ca60b1d Mon Sep 17 00:00:00 2001 From: bmichalo Date: Thu, 21 Jul 2016 11:33:02 -0400 Subject: 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 --- tools/pkt_gen/moongen/moongen.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tools') 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") -- cgit 1.2.3-korg