- if (PREDICT_FALSE (xd->stats.rx_nombuf != xd->last_stats.rx_nombuf))
- {
- cm = vec_elt_at_index (vnm->interface_main.sw_if_counters,
- VNET_INTERFACE_COUNTER_RX_NO_BUF);
-
- vlib_increment_simple_counter (cm, thread_index, xd->sw_if_index,
- xd->stats.rx_nombuf -
- xd->last_stats.rx_nombuf);
- }
-
- /* missed pkt counter */
- if (PREDICT_FALSE (xd->stats.imissed != xd->last_stats.imissed))
- {
- cm = vec_elt_at_index (vnm->interface_main.sw_if_counters,
- VNET_INTERFACE_COUNTER_RX_MISS);
-
- vlib_increment_simple_counter (cm, thread_index, xd->sw_if_index,
- xd->stats.imissed -
- xd->last_stats.imissed);
- }
- rxerrors = xd->stats.ierrors;
- last_rxerrors = xd->last_stats.ierrors;
-
- if (PREDICT_FALSE (rxerrors != last_rxerrors))
- {
- cm = vec_elt_at_index (vnm->interface_main.sw_if_counters,
- VNET_INTERFACE_COUNTER_RX_ERROR);
-
- vlib_increment_simple_counter (cm, thread_index, xd->sw_if_index,
- rxerrors - last_rxerrors);
- }
+ DPDK_UPDATE_COUNTER (vnm, thread_index, xd, rx_nombuf,
+ VNET_INTERFACE_COUNTER_RX_NO_BUF);
+ DPDK_UPDATE_COUNTER (vnm, thread_index, xd, imissed,
+ VNET_INTERFACE_COUNTER_RX_MISS);
+ DPDK_UPDATE_COUNTER (vnm, thread_index, xd, ierrors,
+ VNET_INTERFACE_COUNTER_RX_ERROR);