Add support for VXLAN latency 62/68662/1
authorMichael Pedersen <michael.soelvkaer@gmail.com>
Mon, 21 Oct 2019 09:08:56 +0000 (11:08 +0200)
committerMichael Pedersen <michael.soelvkaer@gmail.com>
Mon, 21 Oct 2019 09:08:56 +0000 (11:08 +0200)
JIRA: NFVBENCH-150

Removes previous limitations added due to missing support for latency with VXLAN offloading in TRex

Signed-off-by: Michael Pedersen <michael.soelvkaer@gmail.com>
Change-Id: I7de5b4d1e338ca3c2f3f3bde456aae0dcabace4d

nfvbench/traffic_client.py
nfvbench/traffic_gen/trex_gen.py

index ec885f8..be50bd9 100755 (executable)
@@ -674,12 +674,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)}
index 036c899..a472774 100644 (file)
@@ -482,10 +482,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)