summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/interface_funcs.h8
-rw-r--r--src/vnet/l2/l2_input.h6
2 files changed, 12 insertions, 2 deletions
diff --git a/src/vnet/interface_funcs.h b/src/vnet/interface_funcs.h
index 120d92cb11d..dbb0549314a 100644
--- a/src/vnet/interface_funcs.h
+++ b/src/vnet/interface_funcs.h
@@ -342,6 +342,14 @@ vnet_sw_interface_is_up (vnet_main_t * vnm, u32 sw_if_index)
vnet_sw_interface_is_link_up (vnm, sw_if_index));
}
+always_inline uword
+vnet_sw_interface_is_sub (vnet_main_t *vnm, u32 sw_if_index)
+{
+ vnet_sw_interface_t *sw = vnet_get_sw_interface (vnm, sw_if_index);
+
+ return (sw->sw_if_index != sw->sup_sw_if_index);
+}
+
always_inline vlib_frame_t *
vnet_get_frame_to_sw_interface (vnet_main_t * vnm, u32 sw_if_index)
{
diff --git a/src/vnet/l2/l2_input.h b/src/vnet/l2/l2_input.h
index 96a0a1afa86..adc130e21fc 100644
--- a/src/vnet/l2/l2_input.h
+++ b/src/vnet/l2/l2_input.h
@@ -294,8 +294,8 @@ u32 set_int_l2_mode (vlib_main_t * vm,
u32 bd_index, l2_bd_port_type_t port_type,
u32 shg, u32 xc_sw_if_index);
-static inline void
-vnet_update_l2_len (vlib_buffer_t * b)
+static inline u16
+vnet_update_l2_len (vlib_buffer_t *b)
{
ethernet_header_t *eth;
u16 ethertype;
@@ -326,6 +326,8 @@ vnet_update_l2_len (vlib_buffer_t * b)
}
}
ethernet_buffer_set_vlan_count (b, vlan_count);
+
+ return (ethertype);
}
/*