diff options
author | Alec Hothan <ahothan@cisco.com> | 2019-10-23 15:25:43 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2019-10-23 15:25:43 +0000 |
commit | 6d7174208a032de47495e3e687ba25aed8bedb6e (patch) | |
tree | b118979019ac294652d3b993c4a9fb4f586bdee7 | |
parent | 97e6de93dc4de1b7724d659c213b5c09a25287d8 (diff) | |
parent | 222ba1e3bc1a2701f15bf077ef63016f980e2b78 (diff) |
Merge "Add support for VXLAN latency"
-rwxr-xr-x | nfvbench/traffic_client.py | 7 | ||||
-rw-r--r-- | nfvbench/traffic_gen/trex_gen.py | 13 |
2 files changed, 10 insertions, 10 deletions
diff --git a/nfvbench/traffic_client.py b/nfvbench/traffic_client.py index 681fec9..8992d51 100755 --- a/nfvbench/traffic_client.py +++ b/nfvbench/traffic_client.py @@ -673,12 +673,7 @@ class TrafficClient(object): self.run_config['rates'][idx] = {'rate_pps': self.__convert_rates(rate)['rate_pps']} self.gen.clear_streamblock() - if not self.config.vxlan: - self.gen.create_traffic(frame_size, self.run_config['rates'], bidirectional, - latency=True) - else: - self.gen.create_traffic(frame_size, self.run_config['rates'], bidirectional, - latency=False) + self.gen.create_traffic(frame_size, self.run_config['rates'], bidirectional, latency=True) def _modify_load(self, load): self.current_total_rate = {'rate_percent': str(load)} diff --git a/nfvbench/traffic_gen/trex_gen.py b/nfvbench/traffic_gen/trex_gen.py index 2f00024..0f51188 100644 --- a/nfvbench/traffic_gen/trex_gen.py +++ b/nfvbench/traffic_gen/trex_gen.py @@ -483,10 +483,15 @@ class TRex(AbstractTrafficGenerator): pkt = self._create_pkt(stream_cfg, 68) if latency: - # TRex limitation: VXLAN skip is not supported for latency stream - streams.append(STLStream(packet=pkt, - flow_stats=STLFlowLatencyStats(pg_id=lat_pg_id), - mode=STLTXCont(pps=self.LATENCY_PPS))) + if stream_cfg['vxlan'] is True: + streams.append(STLStream(packet=pkt, + flow_stats=STLFlowLatencyStats(pg_id=lat_pg_id, + vxlan=True), + mode=STLTXCont(pps=self.LATENCY_PPS))) + else: + streams.append(STLStream(packet=pkt, + flow_stats=STLFlowLatencyStats(pg_id=lat_pg_id), + mode=STLTXCont(pps=self.LATENCY_PPS))) return streams @timeout(5) |