+static void
+vmxnet3_clear_hw_interface_counters (u32 instance)
+{
+ vmxnet3_main_t *vmxm = &vmxnet3_main;
+ vmxnet3_device_t *vd = pool_elt_at_index (vmxm->devices, instance);
+ vmxnet3_queues *q = &vd->dma->queues;
+
+ /*
+ * Set the "last_cleared_stats" to the current stats, so that
+ * things appear to clear from a display perspective.
+ */
+ vmxnet3_reg_write (vd, 1, VMXNET3_REG_CMD, VMXNET3_CMD_GET_STATS);
+
+ clib_memcpy (&vd->tx_stats, &q->tx.stats, sizeof (vd->tx_stats));
+ clib_memcpy (&vd->rx_stats, &q->rx.stats, sizeof (vd->rx_stats));
+}
+