summaryrefslogtreecommitdiffstats
path: root/src/vnet/l2/l2_fib.h
diff options
context:
space:
mode:
authorEyal Bari <ebari@cisco.com>2017-07-18 13:25:19 +0300
committerJohn Lo <loj@cisco.com>2017-07-20 00:24:21 +0000
commitb12ac56c44f4f6d4d5e3bc37bba39b19bc6b2551 (patch)
tree482e2d8487804a78022b7cf6d7d6678e957ebbca /src/vnet/l2/l2_fib.h
parent908a5ea6e247b4a15f0ec7e8ee8ebff799abdc4f (diff)
L2FWD:move vec_validate out of access function
Change-Id: Id9737b6aa2b6fe3032f4627dfdbd2ea728cc3fb1 Signed-off-by: Eyal Bari <ebari@cisco.com>
Diffstat (limited to 'src/vnet/l2/l2_fib.h')
-rw-r--r--src/vnet/l2/l2_fib.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/vnet/l2/l2_fib.h b/src/vnet/l2/l2_fib.h
index 21dcc4513e0..ee6f0dc56a4 100644
--- a/src/vnet/l2/l2_fib.h
+++ b/src/vnet/l2/l2_fib.h
@@ -383,10 +383,17 @@ static_always_inline u8 *
l2fib_swif_seq_num (u32 sw_if_index)
{
l2fib_main_t *mp = &l2fib_main;
- vec_validate (mp->swif_seq_num, sw_if_index);
return vec_elt_at_index (mp->swif_seq_num, sw_if_index);
}
+static_always_inline u8 *
+l2fib_valid_swif_seq_num (u32 sw_if_index)
+{
+ l2fib_main_t *mp = &l2fib_main;
+ vec_validate (mp->swif_seq_num, sw_if_index);
+ return l2fib_swif_seq_num (sw_if_index);
+}
+
BVT (clib_bihash) * get_mac_table (void);
#endif