summaryrefslogtreecommitdiffstats
path: root/src/vnet/l2/l2_api.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2020-09-29 15:38:51 +0000
committerDamjan Marion <dmarion@me.com>2020-10-08 08:51:59 +0000
commit47a3d9975fa3af7a7537b565d6511dadc0df61fb (patch)
treefa33e3360af84239615f48b164b239ee3b660ee6 /src/vnet/l2/l2_api.c
parent83143710e80c8df703fe1ebc0e513aa37971d295 (diff)
l2: input performance
Type: improvement - cache the values form the BD on the input config to avoid loading - avoid the short write long read on the sequence number - use vlib_buffer_enqueue_to_next Signed-off-by: Neale Ranns <nranns@cisco.com> Change-Id: I33442b9104b457e4c638d26e9ad3bc965687a0bc
Diffstat (limited to 'src/vnet/l2/l2_api.c')
-rw-r--r--src/vnet/l2/l2_api.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vnet/l2/l2_api.c b/src/vnet/l2/l2_api.c
index d9bc47ab2e8..c8690c6ccae 100644
--- a/src/vnet/l2/l2_api.c
+++ b/src/vnet/l2/l2_api.c
@@ -115,7 +115,7 @@ vl_api_l2_xconnect_dump_t_handler (vl_api_l2_xconnect_dump_t * mp)
pool_foreach (swif, im->sw_interfaces,
({
config = vec_elt_at_index (l2im->configs, swif->sw_if_index);
- if (config->xconnect)
+ if (l2_input_is_xconnect(config))
send_l2_xconnect_details (reg, mp->context, swif->sw_if_index,
config->output_sw_if_index);
}));
@@ -236,7 +236,7 @@ vl_api_l2fib_add_del_t_handler (vl_api_l2fib_add_del_t * mp)
{
l2_input_config_t *config;
config = vec_elt_at_index (l2im->configs, sw_if_index);
- if (config->bridge == 0)
+ if (!l2_input_is_bridge (config))
{
rv = VNET_API_ERROR_INVALID_SW_IF_INDEX;
goto bad_sw_if_index;