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 --- extras/deprecated/plugins/gbp/gbp_endpoint.c | 14 ++++++-------- extras/deprecated/plugins/gbp/test_gbp.py | 25 +++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 8 deletions(-) (limited to 'extras/deprecated/plugins/gbp') diff --git a/extras/deprecated/plugins/gbp/gbp_endpoint.c b/extras/deprecated/plugins/gbp/gbp_endpoint.c index b0cf64ced2d..2909b79772e 100644 --- a/extras/deprecated/plugins/gbp/gbp_endpoint.c +++ b/extras/deprecated/plugins/gbp/gbp_endpoint.c @@ -771,15 +771,13 @@ gbb_endpoint_fwd_recalc (gbp_endpoint_t * ge) gbp_endpoint_add_itf (gbp_itf_get_sw_if_index (gef->gef_itf), gei); if (FIB_PROTOCOL_IP4 == pfx->fp_proto) - ip4_neighbor_advertise (vlib_get_main (), - vnet_get_main (), - gg->gg_uplink_sw_if_index, - &pfx->fp_addr.ip4); + ip4_neighbor_advertise ( + vlib_get_main (), vnet_get_main (), gg->gg_uplink_sw_if_index, + vlib_get_thread_index (), &pfx->fp_addr.ip4); else - ip6_neighbor_advertise (vlib_get_main (), - vnet_get_main (), - gg->gg_uplink_sw_if_index, - &pfx->fp_addr.ip6); + ip6_neighbor_advertise ( + vlib_get_main (), vnet_get_main (), gg->gg_uplink_sw_if_index, + vlib_get_thread_index (), &pfx->fp_addr.ip6); } } } diff --git a/extras/deprecated/plugins/gbp/test_gbp.py b/extras/deprecated/plugins/gbp/test_gbp.py index 8c53b393f92..1c12abe008d 100644 --- a/extras/deprecated/plugins/gbp/test_gbp.py +++ b/extras/deprecated/plugins/gbp/test_gbp.py @@ -1162,6 +1162,31 @@ class TestGBP(VppTestCase): lf = VppL2FibEntry(self, epg_nat.bd.bd, ep.mac, ep.recirc.recirc, bvi_mac=0) lf.add_vpp_config() + self.assert_equal( + self.statistics["/net/arp/tx/gratuitous"][ + :, epgs[0].uplink.sw_if_index + ].sum(), + 2, + ) + self.assert_equal( + self.statistics["/net/arp/tx/gratuitous"][ + :, epgs[1].uplink.sw_if_index + ].sum(), + 1, + ) + self.assert_equal( + self.statistics["/net/ip6-nd/tx/gratuitous"][ + :, epgs[0].uplink.sw_if_index + ].sum(), + 2, + ) + self.assert_equal( + self.statistics["/net/ip6-nd/tx/gratuitous"][ + :, epgs[1].uplink.sw_if_index + ].sum(), + 1, + ) + # # ARP packets for unknown IP are sent to the EPG uplink # -- cgit 1.2.3-korg