summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIdo Barnea <ibarnea@cisco.com>2016-12-12 18:11:49 +0200
committerIdo Barnea <ibarnea@cisco.com>2016-12-12 18:11:49 +0200
commit6c31c0534acf57fc3e0e26fe964bbc67d9d7d63c (patch)
treef10ef26c46ed924db11dc18e0d4780a9e1766873
parent91cccaebfee5d9bcb8d33a52522a28307748482f (diff)
Added VIC tests + VIC small fix + fail tests if latency packets fail
Signed-off-by: Ido Barnea <ibarnea@cisco.com>
-rw-r--r--scripts/automation/regression/setups/trex11/benchmark.yaml13
-rwxr-xr-xscripts/automation/regression/stateful_tests/trex_general_test.py13
-rw-r--r--src/main_dpdk.cpp4
3 files changed, 26 insertions, 4 deletions
diff --git a/scripts/automation/regression/setups/trex11/benchmark.yaml b/scripts/automation/regression/setups/trex11/benchmark.yaml
index a4969d2d..5ebcdd55 100644
--- a/scripts/automation/regression/setups/trex11/benchmark.yaml
+++ b/scripts/automation/regression/setups/trex11/benchmark.yaml
@@ -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 ###
diff --git a/scripts/automation/regression/stateful_tests/trex_general_test.py b/scripts/automation/regression/stateful_tests/trex_general_test.py
index 1843af00..5c1649e7 100755
--- a/scripts/automation/regression/stateful_tests/trex_general_test.py
+++ b/scripts/automation/regression/stateful_tests/trex_general_test.py
@@ -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):
diff --git a/src/main_dpdk.cpp b/src/main_dpdk.cpp
index 6421b5c2..0086106a 100644
--- a/src/main_dpdk.cpp
+++ b/src/main_dpdk.cpp
@@ -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