summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSteven Luong <sluong@cisco.com>2020-08-06 12:22:53 -0700
committerDave Wallace <dwallacelf@gmail.com>2020-08-19 15:05:14 +0000
commitcfd710d2fc19ccb9f0c7a341e453e73a89cc8f64 (patch)
tree85d2970329e2fd1a28c2adb37110bf6a4dcd75c5 /src
parent1fa4b3a4bc98e39373e11994051cd75e7d3e96a5 (diff)
memif: wrong interface counter is incremented
vlib_increment_combined_counter takes sw_if_index, not hw_if_index. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: Iecde2697ed490940f0eff796d28d15381405b895 (cherry picked from commit 35050289e6b5f6e2939b1d08ed058ab952468943)
Diffstat (limited to 'src')
-rw-r--r--src/plugins/memif/node.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/memif/node.c b/src/plugins/memif/node.c
index dd8f9ba597e..82a7cbc142c 100644
--- a/src/plugins/memif/node.c
+++ b/src/plugins/memif/node.c
@@ -509,7 +509,7 @@ memif_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,
- mif->hw_if_index, n_rx_packets,
+ mif->sw_if_index, n_rx_packets,
n_rx_bytes);
/* refill ring with empty buffers */
@@ -772,7 +772,7 @@ memif_device_input_zc_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,
- mif->hw_if_index, n_rx_packets,
+ mif->sw_if_index, n_rx_packets,
n_rx_bytes);
/* refill ring with empty buffers */