diff options
author | imarom <imarom@cisco.com> | 2016-02-24 08:31:27 -0500 |
---|---|---|
committer | imarom <imarom@cisco.com> | 2016-02-24 08:31:27 -0500 |
commit | ecb526069c67cc7ee96ee6e7e263f3e556355011 (patch) | |
tree | 22179b9dd72d1a6de6f9276ae56c1b5a9f2b78f8 | |
parent | 3eb4f868ef5bc728a46c8012c914f6a9381f4cdb (diff) |
crash on non 40G (no rx support)
-rw-r--r-- | src/flow_stat.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/flow_stat.cpp b/src/flow_stat.cpp index 298bcb52..e97586f7 100644 --- a/src/flow_stat.cpp +++ b/src/flow_stat.cpp @@ -587,7 +587,11 @@ bool CFlowStatRuleMgr::dump_json(std::string & json) { // read hw counters, and update data_section["timestamp"] = Json::Value::UInt64(os_get_hr_tick_64()); for (uint8_t port = 0; port < m_num_ports; port++) { - m_api->get_rx_stats(port, stats, -1, false); + int rc = m_api->get_rx_stats(port, stats, -1, false); + if (rc == -1) { + continue; + } + for (int i = 0; i < TREX_FDIR_STAT_SIZE; i++) { if (stats[i] != 0) { m_user_id_map.find_user_id(m_hw_id_map.get_user_id(i))->set_rx_counter(port, stats[i]); |