aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/dpdk/device')
-rw-r--r--src/plugins/dpdk/device/device.c1
-rw-r--r--src/plugins/dpdk/device/dpdk.h1
-rw-r--r--src/plugins/dpdk/device/format.c4
3 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/dpdk/device/device.c b/src/plugins/dpdk/device/device.c
index 836357f1c9e..270abe19190 100644
--- a/src/plugins/dpdk/device/device.c
+++ b/src/plugins/dpdk/device/device.c
@@ -397,6 +397,7 @@ dpdk_clear_hw_interface_counters (u32 instance)
dpdk_main_t *dm = &dpdk_main;
dpdk_device_t *xd = vec_elt_at_index (dm->devices, instance);
+ rte_eth_stats_reset (xd->port_id);
rte_eth_xstats_reset (xd->port_id);
}
diff --git a/src/plugins/dpdk/device/dpdk.h b/src/plugins/dpdk/device/dpdk.h
index a1c522490ab..0ec4ec3f28b 100644
--- a/src/plugins/dpdk/device/dpdk.h
+++ b/src/plugins/dpdk/device/dpdk.h
@@ -246,7 +246,6 @@ typedef struct
struct rte_eth_stats stats;
struct rte_eth_stats last_stats;
- struct rte_eth_stats last_cleared_stats;
struct rte_eth_xstat *xstats;
f64 time_last_stats_update;
dpdk_port_type_t port_type;
diff --git a/src/plugins/dpdk/device/format.c b/src/plugins/dpdk/device/format.c
index be2349d9e9d..7bba3eb4b6e 100644
--- a/src/plugins/dpdk/device/format.c
+++ b/src/plugins/dpdk/device/format.c
@@ -646,11 +646,11 @@ format_dpdk_device (u8 * s, va_list * args)
/* $$$ MIB counters */
{
#define _(N, V) \
- if ((xd->stats.V - xd->last_cleared_stats.V) != 0) { \
+ if (xd->stats.V != 0) { \
s = format (s, "\n%U%-40U%16Lu", \
format_white_space, indent + 2, \
format_c_identifier, #N, \
- xd->stats.V - xd->last_cleared_stats.V); \
+ xd->stats.V); \
} \
foreach_dpdk_counter