diff options
author | Neale Ranns <nranns@cisco.com> | 2019-12-06 05:53:17 +0000 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2019-12-16 23:29:21 +0000 |
commit | f50bac1bb25b02d7f086627c4c0a0709ee0f61d5 (patch) | |
tree | 26408a8b3d80f0e2eae7900aa8e49f37ac6de3b8 /src/vnet/lisp-cp/gid_dictionary.c | |
parent | 77cfc0171da0fa2b305378731a5fefd659d8947d (diff) |
vppinfra: bihash walk cb typedef and continue/stop controls
Type: feature
Change-Id: I28f7a658be3f3beec9ea32635b60d1d3a10d9b06
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/lisp-cp/gid_dictionary.c')
-rw-r--r-- | src/vnet/lisp-cp/gid_dictionary.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/vnet/lisp-cp/gid_dictionary.c b/src/vnet/lisp-cp/gid_dictionary.c index 3fd98c737c8..c1b4adacf22 100644 --- a/src/vnet/lisp-cp/gid_dictionary.c +++ b/src/vnet/lisp-cp/gid_dictionary.c @@ -31,7 +31,7 @@ static u32 ip4_lookup (gid_ip4_table_t * db, u32 vni, ip_prefix_t * key); static u32 ip6_lookup (gid_ip6_table_t * db, u32 vni, ip_prefix_t * key); -static void +static int foreach_sfib4_subprefix (BVT (clib_bihash_kv) * kvp, void *arg) { sfib_entry_arg_t *a = arg; @@ -51,6 +51,7 @@ foreach_sfib4_subprefix (BVT (clib_bihash_kv) * kvp, void *arg) /* found sub-prefix of src prefix */ (a->cb) (kvp->value, a->arg); } + return (BIHASH_WALK_CONTINUE); } static void @@ -77,7 +78,7 @@ gid_dict_foreach_ip4_subprefix (gid_dictionary_t * db, u32 vni, foreach_sfib4_subprefix, &a); } -static void +static int foreach_sfib6_subprefix (BVT (clib_bihash_kv) * kvp, void *arg) { sfib_entry_arg_t *a = arg; @@ -94,6 +95,7 @@ foreach_sfib6_subprefix (BVT (clib_bihash_kv) * kvp, void *arg) /* found sub-prefix of src prefix */ (a->cb) (kvp->value, a->arg); } + return (BIHASH_WALK_CONTINUE); } static void @@ -139,9 +141,9 @@ gid_dict_foreach_subprefix (gid_dictionary_t * db, gid_address_t * eid, } void -gid_dict_foreach_l2_arp_ndp_entry (gid_dictionary_t * db, void (*cb) - (BVT (clib_bihash_kv) * kvp, void *arg), - void *ht) +gid_dict_foreach_l2_arp_ndp_entry (gid_dictionary_t * db, + BV (clib_bihash_foreach_key_value_pair_cb) + cb, void *ht) { gid_l2_arp_ndp_table_t *tab = &db->arp_ndp_table; BV (clib_bihash_foreach_key_value_pair) (&tab->arp_ndp_lookup_table, cb, |