X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Finterface.c;h=b2166dcebaee4f9492d93bb6097428768c5bb6f5;hb=5f8f6173328f8d77feea5fd100e150c3094c11f0;hp=51c5d825812bc17fd09990acbb36b94faa699d16;hpb=79619c10142e15754e2f0b2ba26c20d415e7c36f;p=vpp.git diff --git a/src/vnet/interface.c b/src/vnet/interface.c index 51c5d825812..b2166dcebae 100644 --- a/src/vnet/interface.c +++ b/src/vnet/interface.c @@ -1235,6 +1235,16 @@ vnet_sw_interface_is_p2p (vnet_main_t * vnm, u32 sw_if_index) return (hc->flags & VNET_HW_INTERFACE_CLASS_FLAG_P2P); } +int +vnet_sw_interface_is_nbma (vnet_main_t * vnm, u32 sw_if_index) +{ + vnet_hw_interface_t *hw = vnet_get_sup_hw_interface (vnm, sw_if_index); + vnet_hw_interface_class_t *hc = + vnet_get_hw_interface_class (vnm, hw->hw_class_index); + + return (hc->flags & VNET_HW_INTERFACE_CLASS_FLAG_NBMA); +} + clib_error_t * vnet_interface_init (vlib_main_t * vm) {