summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nfvbench/traffic_gen/trex_gen.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/nfvbench/traffic_gen/trex_gen.py b/nfvbench/traffic_gen/trex_gen.py
index 189c3e5..0ecad1e 100644
--- a/nfvbench/traffic_gen/trex_gen.py
+++ b/nfvbench/traffic_gen/trex_gen.py
@@ -470,10 +470,11 @@ class TRex(AbstractTrafficGenerator):
STLVmWrFlowVar(fv_name="ip_dst", pkt_offset="IP:{}.dst".format(encap_level)),
dst_fv_port,
STLVmWrFlowVar(fv_name="p_dst", pkt_offset="UDP:{}.dport".format(encap_level)),
- STLVmFixChecksumHw(l3_offset="IP:{}".format(encap_level),
- l4_offset="UDP:{}".format(encap_level),
- l4_type=CTRexVmInsFixHwCs.L4_TYPE_UDP)
]
+ for encap in range(int(encap_level), -1, -1):
+ vm_param.append(STLVmFixChecksumHw(l3_offset="IP:{}".format(encap),
+ l4_offset="UDP:{}".format(encap),
+ l4_type=CTRexVmInsFixHwCs.L4_TYPE_UDP))
pad = max(0, frame_size - len(pkt_base)) * 'x'
return STLPktBuilder(pkt=pkt_base / pad,