From c87fbb417a580bf8e93d0176dba6a90b3cd6a787 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Thu, 2 Apr 2020 17:08:28 +0000 Subject: ip-neighbor: Replace feature for the ip-neighbor data-base Type: feature DB replace is implemented with a mark and sweep algorithm (just the the FIB) Signed-off-by: Neale Ranns Change-Id: I54ab06e11552219e2a18e1b4a87d531321cf3829 --- src/vnet/ip-neighbor/ip_neighbor_types.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'src/vnet/ip-neighbor/ip_neighbor_types.c') diff --git a/src/vnet/ip-neighbor/ip_neighbor_types.c b/src/vnet/ip-neighbor/ip_neighbor_types.c index 27262a5d62c..32c674d2392 100644 --- a/src/vnet/ip-neighbor/ip_neighbor_types.c +++ b/src/vnet/ip-neighbor/ip_neighbor_types.c @@ -22,19 +22,14 @@ format_ip_neighbor_flags (u8 * s, va_list * args) { ip_neighbor_flags_t flags = va_arg (*args, int); - if (flags & IP_NEIGHBOR_FLAG_STATIC) - s = format (s, "S"); - - if (flags & IP_NEIGHBOR_FLAG_DYNAMIC) - s = format (s, "D"); - - if (flags & IP_NEIGHBOR_FLAG_NO_FIB_ENTRY) - s = format (s, "N"); - - return s; +#define _(a,b,c,d) \ + if (flags & IP_NEIGHBOR_FLAG_##a) \ + s = format (s, "%s", d); + foreach_ip_neighbor_flag +#undef _ + return s; } - u8 * format_ip_neighbor_key (u8 * s, va_list * va) { -- cgit 1.2.3-korg