diff options
author | Ido Barnea <ibarnea@cisco.com> | 2016-04-07 15:27:59 +0300 |
---|---|---|
committer | Ido Barnea <ibarnea@cisco.com> | 2016-04-07 15:27:59 +0300 |
commit | 106f14c2026638d9277e2dfc8649e5caa3164da1 (patch) | |
tree | a9e8fac119abd253222d485972c44c6fd328d172 | |
parent | a5e5afc962a05e171650688bf408e52556effcd0 (diff) |
Fix for issue of RX bytes per flow not 0 on xl710
-rw-r--r-- | src/main_dpdk.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main_dpdk.cpp b/src/main_dpdk.cpp index 1f415958..a70f4d31 100644 --- a/src/main_dpdk.cpp +++ b/src/main_dpdk.cpp @@ -5110,11 +5110,12 @@ int CTRexExtendedDriverBase40G::configure_rx_filter_rules(CPhyEthIF * _if) { int CTRexExtendedDriverBase40G::reset_rx_stats(CPhyEthIF * _if, uint32_t *stats) { uint32_t diff_stats[MAX_FLOW_STATS]; + uint32_t diff_bytes[MAX_FLOW_STATS]; // The HW counters start from some random values. The driver give us the diffs from previous, // each time we do get_rx_stats. We need to make one first call, at system startup, // and ignore the returned diffs - return get_rx_stats(_if, diff_stats, stats, NULL, NULL, 0, MAX_FLOW_STATS - 1); + return get_rx_stats(_if, diff_stats, stats, diff_bytes, NULL, 0, MAX_FLOW_STATS - 1); } // instead of adding this to rte_ethdev.h @@ -5141,6 +5142,7 @@ int CTRexExtendedDriverBase40G::get_rx_stats(CPhyEthIF * _if, uint32_t *pkts, ui pkts[i] = (uint64_t)((hw_stats[i - min] + ((uint64_t)1 << 32)) - prev_pkts[i]); } prev_pkts[i] = hw_stats[i - min]; + bytes[i] = 0; } return 0; |