From 1447c569d309218960a8630dcafd1a657023f281 Mon Sep 17 00:00:00 2001
From: Yichen Wang <yicwang@cisco.com>
Date: Fri, 16 Feb 2018 15:09:00 -0800
Subject: [NFVBENCH-67] NFVbench should have same TX rate for different rate
 formats

Change-Id: I55e03319efba353dd3067b8b946815b631a87896
Signed-off-by: Yichen Wang <yicwang@cisco.com>
---
 nfvbench/traffic_client.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/nfvbench/traffic_client.py b/nfvbench/traffic_client.py
index 57141be..bdcc027 100755
--- a/nfvbench/traffic_client.py
+++ b/nfvbench/traffic_client.py
@@ -518,6 +518,10 @@ class TrafficClient(object):
             unidir_reverse_pps = int(self.config.unidir_reverse_traffic_pps)
             if unidir_reverse_pps > 0:
                 self.run_config['rates'].append({'rate_pps': str(unidir_reverse_pps)})
+        # Fix for [NFVBENCH-67], convert the rate string to PPS
+        for idx, rate in enumerate(self.run_config['rates']):
+            if 'rate_pps' not in rate:
+                self.run_config['rates'][idx] = {'rate_pps': self.__convert_rates(rate)['rate_pps']}
 
         self.gen.clear_streamblock()
         self.gen.create_traffic(frame_size, self.run_config['rates'], bidirectional, latency=True)
-- 
cgit