diff options
author | Neale Ranns <neale.ranns@cisco.com> | 2018-09-28 05:00:57 -0700 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-10-01 17:02:18 +0000 |
commit | 14260393c096b270ef318d74b481911c7def0496 (patch) | |
tree | 29bbd213ea550254b15131684e34032b4b8ab9e7 /src/vnet/ip/ip_api.c | |
parent | 5df628bb8a30b69f223a7c8b017dcba770c87e43 (diff) |
Add adjacency counters to the stats segment
Change-Id: I6b59df939c9daf40e261d73d19f500bd90abe6ff
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Diffstat (limited to 'src/vnet/ip/ip_api.c')
-rw-r--r-- | src/vnet/ip/ip_api.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/vnet/ip/ip_api.c b/src/vnet/ip/ip_api.c index 5dbc02d5c59..b0a7e82949b 100644 --- a/src/vnet/ip/ip_api.c +++ b/src/vnet/ip/ip_api.c @@ -659,6 +659,7 @@ vl_api_ip_neighbor_add_del_t_handler (vl_api_ip_neighbor_add_del_t * mp, ip46_address_t ip = ip46_address_initializer; vl_api_ip_neighbor_add_del_reply_t *rmp; ip_neighbor_flags_t flags; + u32 stats_index = ~0; int rv = 0; VALIDATE_SW_IF_INDEX (mp); @@ -678,14 +679,20 @@ vl_api_ip_neighbor_add_del_t_handler (vl_api_ip_neighbor_add_del_t * mp, if (mp->is_add) rv = ip_neighbor_add (&ip, mp->is_ipv6, mp->mac_address, - ntohl (mp->sw_if_index), flags); + ntohl (mp->sw_if_index), flags, &stats_index); else rv = ip_neighbor_del (&ip, mp->is_ipv6, ntohl (mp->sw_if_index)); stats_dsunlock (); BAD_SW_IF_INDEX_LABEL; - REPLY_MACRO (VL_API_IP_NEIGHBOR_ADD_DEL_REPLY); + + /* *INDENT-OFF* */ + REPLY_MACRO2 (VL_API_IP_NEIGHBOR_ADD_DEL_REPLY, + ({ + rmp->stats_index = htonl (stats_index); + })); + /* *INDENT-ON* */ } void |