aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ip-neighbor/ip4_neighbor.h
diff options
context:
space:
mode:
authorNeale Ranns <neale@graphiant.com>2021-07-16 14:00:16 +0000
committerBeno�t Ganne <bganne@cisco.com>2022-08-09 14:17:46 +0000
commitfd2417b2a42e34062e3d07875e5c4e11922513d5 (patch)
treeeec1ea914c259f685e2bca897e5853faec9339c1 /src/vnet/ip-neighbor/ip4_neighbor.h
parent896b184b781a09ce5cefb94c471029c6a8d025aa (diff)
ip-neighbor: ARP and ND stats per-interface.
Type: feature stats of the like from: https://datatracker.ietf.org/doc/html/draft-ietf-rtgwg-arp-yang-model-03#section-4 Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: Icb1bf4f6f7e6ccc2f44b0008d4774b61cae96184
Diffstat (limited to 'src/vnet/ip-neighbor/ip4_neighbor.h')
-rw-r--r--src/vnet/ip-neighbor/ip4_neighbor.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/vnet/ip-neighbor/ip4_neighbor.h b/src/vnet/ip-neighbor/ip4_neighbor.h
index c330dfa59e7..8ace8d1a2d0 100644
--- a/src/vnet/ip-neighbor/ip4_neighbor.h
+++ b/src/vnet/ip-neighbor/ip4_neighbor.h
@@ -18,19 +18,18 @@
#include <vnet/ip/ip.h>
#include <vnet/ethernet/arp_packet.h>
+#include <vnet/ip-neighbor/ip_neighbor_types.h>
-extern void ip4_neighbor_probe_dst (u32 sw_if_index,
- const ip4_address_t * dst);
-extern void ip4_neighbor_advertise (vlib_main_t * vm,
- vnet_main_t * vnm,
- u32 sw_if_index,
- const ip4_address_t * addr);
+extern void ip4_neighbor_probe_dst (u32 sw_if_index, u32 thread_index,
+ const ip4_address_t *dst);
+extern void ip4_neighbor_advertise (vlib_main_t *vm, vnet_main_t *vnm,
+ u32 sw_if_index, u32 thread_index,
+ const ip4_address_t *addr);
always_inline vlib_buffer_t *
-ip4_neighbor_probe (vlib_main_t * vm,
- vnet_main_t * vnm,
- const ip_adjacency_t * adj0,
- const ip4_address_t * src, const ip4_address_t * dst)
+ip4_neighbor_probe (vlib_main_t *vm, vnet_main_t *vnm,
+ const ip_adjacency_t *adj0, const ip4_address_t *src,
+ const ip4_address_t *dst)
{
vnet_hw_interface_t *hw_if0;
ethernet_arp_header_t *h0;
@@ -73,6 +72,10 @@ ip4_neighbor_probe (vlib_main_t * vm,
vlib_put_frame_to_node (vm, hw_if0->output_node_index, f);
}
+ vlib_increment_simple_counter (
+ &ip_neighbor_counters[AF_IP4].ipnc[VLIB_TX][IP_NEIGHBOR_CTR_REQUEST],
+ vm->thread_index, adj0->rewrite_header.sw_if_index, 1);
+
return b0;
}