From dbff547f4d9360d3c48c7b269255234cd31271df Mon Sep 17 00:00:00 2001 From: Yaroslav Brustinov Date: Mon, 13 Mar 2017 11:01:55 +0200 Subject: i40e fix of workaround of stuck counters + regression test Change-Id: I251cb8d346461ccfa4eee8abfda113410160a602 Signed-off-by: Yaroslav Brustinov --- src/bp_sim.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/bp_sim.h') diff --git a/src/bp_sim.h b/src/bp_sim.h index 7346615a..24681d4b 100755 --- a/src/bp_sim.h +++ b/src/bp_sim.h @@ -775,6 +775,9 @@ public: out_file = ""; prefix = ""; set_tw_bucket_time_in_usec(20.0); + // we read every 0.5 second. We want to catch the counter when it approach the maximum (where it will stuck, + // and we will start losing packets). + x710_fdir_reset_threshold = 0xffffffff - 1000000000/8/64*40; } CParserOption(){ @@ -819,6 +822,7 @@ public: CMacAddrCfg m_mac_addr[TREX_MAX_PORTS]; double m_tw_bucket_time_sec; double m_tw_bucket_time_sec_level1; + uint32_t x710_fdir_reset_threshold; public: uint8_t * get_src_mac_addr(int if_index){ @@ -857,6 +861,12 @@ public: void set_rx_enabled() { m_rx_thread_enabled = true; } + uint32_t get_x710_fdir_reset_threshold() { + return (x710_fdir_reset_threshold); + } + void set_x710_fdir_reset_threshold(uint32_t val) { + x710_fdir_reset_threshold = val; + } inline double get_tw_bucket_time_in_sec(void){ return (m_tw_bucket_time_sec); -- cgit 1.2.3-korg