From d6953332db225d5355f50348ef3b09f0525d5282 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Tue, 10 Aug 2021 07:39:18 +0000 Subject: fib: A 16-8-8 and a 8-8-8-8 versions of an ip4_fib_t Type: feature The difference being the MTRIE type they contain. THE FIB continues to use the 16-8-8 version. Signed-off-by: Neale Ranns Change-Id: I5a54d4e6e6cc639f18a3fb65ef2925507a7ef1de --- src/vnet/ip/ip4.h | 3 --- src/vnet/ip/ip_container_proxy.c | 26 +++++++++++--------------- 2 files changed, 11 insertions(+), 18 deletions(-) (limited to 'src/vnet/ip') diff --git a/src/vnet/ip/ip4.h b/src/vnet/ip/ip4.h index bc971a2b7ca..dba27851c8f 100644 --- a/src/vnet/ip/ip4.h +++ b/src/vnet/ip/ip4.h @@ -111,9 +111,6 @@ typedef struct ip4_main_t /** Vector of FIBs. */ struct fib_table_t_ *fibs; - /** Vector of MTries. */ - struct ip4_fib_t_ *v4_fibs; - /** Vector of MFIBs. */ struct mfib_table_t_ *mfibs; diff --git a/src/vnet/ip/ip_container_proxy.c b/src/vnet/ip/ip_container_proxy.c index 2c94b70ec85..18d07ba6082 100644 --- a/src/vnet/ip/ip_container_proxy.c +++ b/src/vnet/ip/ip_container_proxy.c @@ -132,27 +132,23 @@ ip_container_proxy_fib_table_walk (fib_node_index_t fei, void *arg) void ip_container_proxy_walk (ip_container_proxy_cb_t cb, void *ctx) { - fib_table_t *fib_table; ip_container_proxy_walk_ctx_t wctx = { .cb = cb, .ctx = ctx, }; + u32 fib_index; /* *INDENT-OFF* */ - pool_foreach (fib_table, ip4_main.fibs) - { - fib_table_walk(fib_table->ft_index, - FIB_PROTOCOL_IP4, - ip_container_proxy_fib_table_walk, - &wctx); - } - pool_foreach (fib_table, ip6_main.fibs) - { - fib_table_walk(fib_table->ft_index, - FIB_PROTOCOL_IP6, - ip_container_proxy_fib_table_walk, - &wctx); - } + pool_foreach_index (fib_index, ip4_main.fibs) + { + fib_table_walk (fib_index, FIB_PROTOCOL_IP4, + ip_container_proxy_fib_table_walk, &wctx); + } + pool_foreach_index (fib_index, ip6_main.fibs) + { + fib_table_walk (fib_index, FIB_PROTOCOL_IP6, + ip_container_proxy_fib_table_walk, &wctx); + } /* *INDENT-ON* */ } -- cgit 1.2.3-korg