From f50bac1bb25b02d7f086627c4c0a0709ee0f61d5 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Fri, 6 Dec 2019 05:53:17 +0000 Subject: vppinfra: bihash walk cb typedef and continue/stop controls Type: feature Change-Id: I28f7a658be3f3beec9ea32635b60d1d3a10d9b06 Signed-off-by: Neale Ranns --- src/vnet/ip/ip6_ll_table.c | 8 +++++--- src/vnet/ip/reass/ip4_full_reass.c | 3 ++- src/vnet/ip/reass/ip4_sv_reass.c | 3 ++- src/vnet/ip/reass/ip6_full_reass.c | 3 ++- src/vnet/ip/reass/ip6_sv_reass.c | 3 ++- 5 files changed, 13 insertions(+), 7 deletions(-) (limited to 'src/vnet/ip') diff --git a/src/vnet/ip/ip6_ll_table.c b/src/vnet/ip/ip6_ll_table.c index 3672b635c87..243b94a6c0e 100644 --- a/src/vnet/ip/ip6_ll_table.c +++ b/src/vnet/ip/ip6_ll_table.c @@ -210,18 +210,20 @@ typedef struct u64 count_by_prefix_length[129]; } count_routes_in_fib_at_prefix_length_arg_t; -static void -count_routes_in_fib_at_prefix_length (BVT (clib_bihash_kv) * kvp, void *arg) +static int +count_routes_in_fib_at_prefix_length (clib_bihash_kv_24_8_t * kvp, void *arg) { count_routes_in_fib_at_prefix_length_arg_t *ap = arg; int mask_width; if ((kvp->key[2] >> 32) != ap->fib_index) - return; + return (BIHASH_WALK_CONTINUE); mask_width = kvp->key[2] & 0xFF; ap->count_by_prefix_length[mask_width]++; + + return (BIHASH_WALK_CONTINUE); } static clib_error_t * diff --git a/src/vnet/ip/reass/ip4_full_reass.c b/src/vnet/ip/reass/ip4_full_reass.c index f6c05466e19..d492e5e4541 100644 --- a/src/vnet/ip/reass/ip4_full_reass.c +++ b/src/vnet/ip/reass/ip4_full_reass.c @@ -1365,7 +1365,7 @@ typedef struct } ip4_rehash_cb_ctx; #ifndef CLIB_MARCH_VARIANT -static void +static int ip4_rehash_cb (clib_bihash_kv_16_8_t * kv, void *_ctx) { ip4_rehash_cb_ctx *ctx = _ctx; @@ -1373,6 +1373,7 @@ ip4_rehash_cb (clib_bihash_kv_16_8_t * kv, void *_ctx) { ctx->failure = 1; } + return (BIHASH_WALK_CONTINUE); } static void diff --git a/src/vnet/ip/reass/ip4_sv_reass.c b/src/vnet/ip/reass/ip4_sv_reass.c index a926f2adf10..d7130629219 100644 --- a/src/vnet/ip/reass/ip4_sv_reass.c +++ b/src/vnet/ip/reass/ip4_sv_reass.c @@ -711,7 +711,7 @@ typedef struct } ip4_rehash_cb_ctx; #ifndef CLIB_MARCH_VARIANT -static void +static int ip4_rehash_cb (clib_bihash_kv_16_8_t * kv, void *_ctx) { ip4_rehash_cb_ctx *ctx = _ctx; @@ -719,6 +719,7 @@ ip4_rehash_cb (clib_bihash_kv_16_8_t * kv, void *_ctx) { ctx->failure = 1; } + return (BIHASH_WALK_CONTINUE); } static void diff --git a/src/vnet/ip/reass/ip6_full_reass.c b/src/vnet/ip/reass/ip6_full_reass.c index 7f56d2cc2d6..7bcfdfc9f00 100644 --- a/src/vnet/ip/reass/ip6_full_reass.c +++ b/src/vnet/ip/reass/ip6_full_reass.c @@ -1349,7 +1349,7 @@ typedef struct clib_bihash_48_8_t *new_hash; } ip6_rehash_cb_ctx; -static void +static int ip6_rehash_cb (clib_bihash_kv_48_8_t * kv, void *_ctx) { ip6_rehash_cb_ctx *ctx = _ctx; @@ -1357,6 +1357,7 @@ ip6_rehash_cb (clib_bihash_kv_48_8_t * kv, void *_ctx) { ctx->failure = 1; } + return (BIHASH_WALK_CONTINUE); } static void diff --git a/src/vnet/ip/reass/ip6_sv_reass.c b/src/vnet/ip/reass/ip6_sv_reass.c index 5531d0b3dc4..0837f0606ec 100644 --- a/src/vnet/ip/reass/ip6_sv_reass.c +++ b/src/vnet/ip/reass/ip6_sv_reass.c @@ -818,7 +818,7 @@ typedef struct clib_bihash_48_8_t *new_hash; } ip6_rehash_cb_ctx; -static void +static int ip6_rehash_cb (clib_bihash_kv_48_8_t * kv, void *_ctx) { ip6_rehash_cb_ctx *ctx = _ctx; @@ -826,6 +826,7 @@ ip6_rehash_cb (clib_bihash_kv_48_8_t * kv, void *_ctx) { ctx->failure = 1; } + return (BIHASH_WALK_CONTINUE); } static void -- cgit 1.2.3-korg