From fd2417b2a42e34062e3d07875e5c4e11922513d5 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Fri, 16 Jul 2021 14:00:16 +0000 Subject: 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 Change-Id: Icb1bf4f6f7e6ccc2f44b0008d4774b61cae96184 --- src/vnet/ip-neighbor/ip6_neighbor.h | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'src/vnet/ip-neighbor/ip6_neighbor.h') diff --git a/src/vnet/ip-neighbor/ip6_neighbor.h b/src/vnet/ip-neighbor/ip6_neighbor.h index ad2ace21948..c6e718dc2ff 100644 --- a/src/vnet/ip-neighbor/ip6_neighbor.h +++ b/src/vnet/ip-neighbor/ip6_neighbor.h @@ -25,23 +25,22 @@ #include #include #include +#include /* Template used to generate IP6 neighbor solicitation packets. */ extern vlib_packet_template_t ip6_neighbor_packet_template; -extern void ip6_neighbor_advertise (vlib_main_t * vm, - vnet_main_t * vnm, - u32 sw_if_index, - const ip6_address_t * addr); +extern void ip6_neighbor_advertise (vlib_main_t *vm, vnet_main_t *vnm, + u32 sw_if_index, u32 thread_index, + const ip6_address_t *addr); -extern void ip6_neighbor_probe_dst (u32 sw_if_index, - const ip6_address_t * dst); +extern void ip6_neighbor_probe_dst (u32 sw_if_index, u32 thread_index, + const ip6_address_t *dst); always_inline vlib_buffer_t * -ip6_neighbor_probe (vlib_main_t * vm, - vnet_main_t * vnm, - u32 sw_if_index, - const ip6_address_t * src, const ip6_address_t * dst) +ip6_neighbor_probe (vlib_main_t *vm, vnet_main_t *vnm, u32 sw_if_index, + u32 thread_index, const ip6_address_t *src, + const ip6_address_t *dst) { icmp6_neighbor_solicitation_header_t *h0; vnet_hw_interface_t *hw_if0; @@ -104,6 +103,10 @@ ip6_neighbor_probe (vlib_main_t * vm, vlib_put_frame_to_node (vm, adj->ia_node_index, f); } + vlib_increment_simple_counter ( + &ip_neighbor_counters[AF_IP6].ipnc[VLIB_TX][IP_NEIGHBOR_CTR_REQUEST], + thread_index, sw_if_index, 1); + return b0; } -- cgit 1.2.3-korg