summaryrefslogtreecommitdiffstats
path: root/src/vnet/interface_funcs.h
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2020-12-24 09:16:09 +0000
committerOle Tr�an <otroan@employees.org>2021-02-04 14:16:34 +0000
commit44db1caefbf5067b0cf0073299c9f21265331412 (patch)
tree4981dc028db66398cf6dc2ca9d309aa5a7bf7a1d /src/vnet/interface_funcs.h
parent1a52d37fc50acd479274c29c2e92b05cf32c3a6d (diff)
linux-cp: Linux Interface Mirroring for Control Plane Integration
Type: feature please see FEATURE.yaml for details. Signed-off-by: Neale Ranns <nranns@cisco.com> Signed-off-by: Matthew Smith <mgsmith@netgate.com> Signed-off-by: Jon Loeliger <jdl@netgate.com> Signed-off-by: Pim van Pelt <pim@ipng.nl> Change-Id: I04a45c15c0838906aa787e06660fa29f39f755fa
Diffstat (limited to 'src/vnet/interface_funcs.h')
-rw-r--r--src/vnet/interface_funcs.h8
1 files changed, 8 insertions, 0 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)
{