summaryrefslogtreecommitdiffstats
path: root/src/vnet/adj
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/adj')
-rw-r--r--src/vnet/adj/adj.c4
-rw-r--r--src/vnet/adj/adj_l2.c10
2 files changed, 9 insertions, 5 deletions
diff --git a/src/vnet/adj/adj.c b/src/vnet/adj/adj.c
index e740c4cb79b..d0be0f0eaff 100644
--- a/src/vnet/adj/adj.c
+++ b/src/vnet/adj/adj.c
@@ -122,6 +122,10 @@ format_ip_adjacency (u8 * s, va_list * args)
if (fiaf & FORMAT_IP_ADJACENCY_DETAIL)
{
+ vlib_counter_t counts;
+
+ vlib_get_combined_counter(&adjacency_counters, adj_index, &counts);
+ s = format (s, "\n counts:[%Ld:%Ld]", counts.packets, counts.bytes);
s = format (s, "\n locks:%d", adj->ia_node.fn_locks);
s = format (s, " node:[%d]:%U",
adj->rewrite_header.node_index,
diff --git a/src/vnet/adj/adj_l2.c b/src/vnet/adj/adj_l2.c
index 4d2dd7082f1..5a083643302 100644
--- a/src/vnet/adj/adj_l2.c
+++ b/src/vnet/adj/adj_l2.c
@@ -94,11 +94,11 @@ adj_l2_rewrite_inline (vlib_main_t * vm,
rw_len0 = adj0[0].rewrite_header.data_bytes;
vnet_buffer(p0)->ip.save_rewrite_length = rw_len0;
- vlib_increment_combined_counter
- (&adjacency_counters,
- cpu_index, adj_index0,
- /* packet increment */ 0,
- /* byte increment */ rw_len0-sizeof(ethernet_header_t));
+ vlib_increment_combined_counter(&adjacency_counters,
+ cpu_index,
+ adj_index0,
+ /* packet increment */ 0,
+ /* byte increment */ rw_len0);
/* Check MTU of outgoing interface. */
if (PREDICT_TRUE((vlib_buffer_length_in_chain (vm, p0) <=