diff options
author | 2016-03-09 14:05:47 +0200 | |
---|---|---|
committer | 2016-03-09 14:05:47 +0200 | |
commit | 30237fb4d1eccb2e2adb35408c4882d9750fbfef (patch) | |
tree | c5c89c28f597bac2ca7d8839f56b1bc4960db4da /src/main_dpdk.cpp | |
parent | 2258ea303c6c3573998dea7b9d347d46873018db (diff) | |
parent | 22bed39abcdf20c31d685794004ca232308dd6a8 (diff) |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src/main_dpdk.cpp')
-rw-r--r-- | src/main_dpdk.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main_dpdk.cpp b/src/main_dpdk.cpp index 12670969..3f53f83c 100644 --- a/src/main_dpdk.cpp +++ b/src/main_dpdk.cpp @@ -4947,13 +4947,13 @@ int CTRexExtendedDriverBase40G::get_rx_stats(CPhyEthIF * _if, uint32_t *stats, u rte_eth_fdir_stats_get(port_id, hw_stats, start, len); for (int i = loop_start; i < loop_start + len; i++) { - if (hw_stats[i] >= prev_stats[i]) { - stats[i] = (uint64_t)(hw_stats[i] - prev_stats[i]); + if (hw_stats[i - min] >= prev_stats[i]) { + stats[i] = (uint64_t)(hw_stats[i - min] - prev_stats[i]); } else { // Wrap around - stats[i] = (uint64_t)((hw_stats[i] + ((uint64_t)1 << 32)) - prev_stats[i]); + stats[i] = (uint64_t)((hw_stats[i - min] + ((uint64_t)1 << 32)) - prev_stats[i]); } - prev_stats[i] = hw_stats[i]; + prev_stats[i] = hw_stats[i - min]; } return 0; |