From b254e4d6c35f4af4f08ba278051d3ac006d3e2cc Mon Sep 17 00:00:00 2001 From: Steven Luong Date: Fri, 30 Aug 2019 10:49:44 -0700 Subject: tap: interface rx counter not increment correct vlib_increment_combined_counter takes sw_if_index, not hw_if_index. Using hw_if_index may work as long as there is no subinterface created to cause hw_if_index and sw_if_index to differ. Type: fix Ticket: VPP-1759 Signed-off-by: Steven Luong Change-Id: I6db042186eeeacf32250f7ef261af8cd6f5ce56e (cherry picked from commit efa119db3910e77f79eb005c67f8c01b473b40a1) --- src/vnet/devices/virtio/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vnet/devices/virtio/node.c b/src/vnet/devices/virtio/node.c index 686d90c3d00..6ce18e53743 100644 --- a/src/vnet/devices/virtio/node.c +++ b/src/vnet/devices/virtio/node.c @@ -344,7 +344,7 @@ virtio_device_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_increment_combined_counter (vnm->interface_main.combined_sw_if_counters + VNET_INTERFACE_COUNTER_RX, thread_index, - vif->hw_if_index, n_rx_packets, + vif->sw_if_index, n_rx_packets, n_rx_bytes); refill: -- cgit 1.2.3-korg