NFVBENCH-118 VxLAN fixed rate: Trex far end port Rx counters are incorrect
[nfvbench.git] / test / test_chains.py
index de18e92..ebc606e 100644 (file)
@@ -76,7 +76,6 @@ def test_chain_runner_ext_no_openstack():
     config = _get_chain_config(sc=ChainType.EXT)
     specs = Specs()
     config.vlans = [100, 200]
-    config.vnis = [5000, 6000]
     config['traffic_generator']['mac_addrs_left'] = ['00:00:00:00:00:00']
     config['traffic_generator']['mac_addrs_right'] = ['00:00:00:00:01:00']
 
@@ -173,7 +172,6 @@ def _check_nfvbench_openstack(sc=ChainType.PVP, l2_loopback=False):
         if l2_loopback:
             config.l2_loopback = True
             config.vlans = [[100], [200]]
-            config.vnis = [[5000], [6000]]
         factory = BasicFactory()
         config_plugin = factory.get_config_plugin_class()(config)
         config = config_plugin.get_config()
@@ -358,7 +356,11 @@ CHAIN_STATS = [{0: {'packets': [2000054, 1999996, 1999996]}},
                 'total': {'packets': [30000004, 30000004, 30000004, 30000004, 30000004, 30000004]}},
                {0: {'packets': [15000002, '', 14000002, 14000002, '', 13000002]},
                 1: {'packets': [15000002, '', 15000002, 15000002, '', 15000002]},
-                'total': {'packets': [30000004, 29000004, 29000004, 29000004, 29000004, 28000004]}}]
+                'total': {'packets': [30000004, 29000004, 29000004, 29000004, 29000004, 28000004]}},
+               # example with non-available rx count in last position
+               {0: {'packets': [2000054, 1999996, None]},
+                1: {'packets': [2000054, 2000054, None]},
+                'total': {'packets': [4000108, 4000050, 4000050]}}]
 XP_CHAIN_STATS = [{0: {'packets': [2000054, '-58 (-0.0029%)', 1999996]}},
                   {0: {'packets': [2000054, '-58 (-0.0029%)', 1999996]},
                    1: {'packets': [2000054, '=>', 2000054]},
@@ -373,7 +375,10 @@ XP_CHAIN_STATS = [{0: {'packets': [2000054, '-58 (-0.0029%)', 1999996]}},
                                    '-1,000,000 (-7.1429%)']},
                    1: {'packets': [15000002, '', '=>', '=>', '', 15000002]},
                    'total': {'packets': [30000004, '-1,000,000 (-3.3333%)', '=>', '=>', '=>',
-                                         '-1,000,000 (-3.4483%)']}}]
+                                         '-1,000,000 (-3.4483%)']}},
+                  {0: {'packets': [2000054, '-58 (-0.0029%)', 'n/a']},
+                   1: {'packets': [2000054, '=>', 'n/a']},
+                   'total': {'packets': [4000108, '-58 (-0.0014%)', 4000050]}}]
 
 
 def test_summarizer():
@@ -388,7 +393,6 @@ def test_fixed_rate_no_openstack():
     config = _get_chain_config(ChainType.EXT, 1, True, rate='100%')
     specs = Specs()
     config.vlans = [100, 200]
-    config.vnis = [5000, 6000]
     config['traffic_generator']['mac_addrs_left'] = ['00:00:00:00:00:00']
     config['traffic_generator']['mac_addrs_right'] = ['00:00:00:00:01:00']
     config.no_arp = True