From b2fd6cb586fe69082cc12995910c65843fc5bb4a Mon Sep 17 00:00:00 2001 From: John Lo Date: Wed, 12 Jul 2017 19:56:45 -0400 Subject: Fix crash with worker threads on 4K VXLAN/BD setup (VPP-907) Cleanup mapping of interface output node for the l2-output node when interface is configured to L2 or L3 modes. The mapping is now always done in the main thread as part of API/CLI processing, instead of initiate mapping in the forwarding path which can be in the worker threads. Change-Id: Ia789493e7d9f5c76d68edfaf34db43f3e3f53506 Signed-off-by: John Lo (cherry picked from commit bea5ebf205e0bec922bf26c6c1a6a9392b4cad67) --- src/vnet/l2/l2_fib.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/vnet/l2/l2_fib.c') diff --git a/src/vnet/l2/l2_fib.c b/src/vnet/l2/l2_fib.c index 6f8f6e06330..4ed16987404 100644 --- a/src/vnet/l2/l2_fib.c +++ b/src/vnet/l2/l2_fib.c @@ -413,6 +413,13 @@ l2fib_add (vlib_main_t * vm, } } + if (vec_len (l2input_main.configs) <= sw_if_index) + { + error = clib_error_return (0, "Interface sw_if_index %d not in L2 mode", + sw_if_index); + goto done; + } + if (filter_mac) l2fib_add_filter_entry (mac, bd_index); else -- cgit 1.2.3-korg