Added VIC tests + VIC small fix + fail tests if latency packets fail 94/4294/1
authorIdo Barnea <[email protected]>
Mon, 12 Dec 2016 16:11:49 +0000 (18:11 +0200)
committerIdo Barnea <[email protected]>
Mon, 12 Dec 2016 16:11:49 +0000 (18:11 +0200)
Signed-off-by: Ido Barnea <[email protected]>
scripts/automation/regression/setups/trex11/benchmark.yaml
scripts/automation/regression/stateful_tests/trex_general_test.py
src/main_dpdk.cpp

index a4969d2..5ebcdd5 100644 (file)
@@ -40,6 +40,19 @@ test_rx_check_http: &rx_http
     rx_sample_rate      : 128
     bw_per_core         : 49.464
 
+test_rx_check_http_ipv6:
+    <<                  : *rx_http
+    bw_per_core         : 49.237
+
+test_rx_check_sfr: &rx_sfr
+    multiplier          : 8
+    cores               : 1
+    rx_sample_rate      : 128
+    bw_per_core         : 20.9
+
+test_rx_check_sfr_ipv6:
+    <<                  : *rx_sfr
+    bw_per_core         : 23.9
 
 
 ### stateless ###
index 1843af0..5c1649e 100755 (executable)
@@ -257,7 +257,7 @@ class CTRexGeneral_Test(unittest.TestCase):
                     allowed_latency = 1000
                 if max(trex_res.get_max_latency().values()) > allowed_latency:
                     self.fail('LatencyError: Maximal latency exceeds %s (usec)' % allowed_latency)
-    
+
                 # check that avg latency does not exceed 1 msec
                 if self.is_VM:
                     allowed_latency = 9999999
@@ -266,6 +266,15 @@ class CTRexGeneral_Test(unittest.TestCase):
                 if max(trex_res.get_avg_latency().values()) > allowed_latency:
                     self.fail('LatencyError: Average latency exceeds %s (usec)' % allowed_latency)
 
+                ports_names = trex_res.get_last_value('trex-latecny-v2.data', 'port\-\d+')
+                if not ports_names:
+                    raise AbnormalResultError('Could not find ports info in TRex results, path: trex-latecny-v2.data.port-*')
+                for port_name in ports_names:
+                    path = 'trex-latecny-v2.data.%s.hist.cont' % port_name
+                    lat_count = trex_res.get_last_value(path)
+                    if lat_count == 0:
+                        self.fail('LatencyError: Number of latency packets received on %s is 0' % port_name)
+
             if not self.is_loopback:
                 # check router number of drops --> deliberately masked- need to be figured out!!!!!
                 pkt_drop_stats = self.router.get_drop_stats()
@@ -359,7 +368,7 @@ class CTRexGeneral_Test(unittest.TestCase):
                     print("Can't get TRex log:", e)
             if len(self.fail_reasons):
                 sys.stdout.flush()
-                raise Exception('The test is failed, reasons:\n%s' % '\n'.join(self.fail_reasons))
+                raise Exception('Test failed. Reasons:\n%s' % '\n'.join(self.fail_reasons))
         sys.stdout.flush()
 
     def check_for_trex_crash(self):
index 6421b5c..0086106 100644 (file)
@@ -6845,8 +6845,8 @@ void CTRexExtendedDriverBaseVIC::update_configuration(port_cfg_t * cfg){
     cfg->m_tx_conf.tx_thresh.hthresh = TX_HTHRESH;
     cfg->m_tx_conf.tx_thresh.wthresh = TX_WTHRESH;
     cfg->m_port_conf.rxmode.max_rx_pkt_len =9*1000-10;
-    cfg->m_port_conf.fdir_conf.mask.ipv4_mask.tos = 0x0f;
-    cfg->m_port_conf.fdir_conf.mask.ipv6_mask.tc  = 0x0f;
+    cfg->m_port_conf.fdir_conf.mask.ipv4_mask.tos = 0x01;
+    cfg->m_port_conf.fdir_conf.mask.ipv6_mask.tc  = 0x01;
 }
 
 void CTRexExtendedDriverBaseVIC::add_del_rules(enum rte_filter_op op, uint8_t port_id, uint16_t type