interface: refactor interface capabilities code
[vpp.git] / src / plugins / rdma / device.c
index 1198d99..3ea8e44 100644 (file)
@@ -362,8 +362,7 @@ rdma_register_interface (vnet_main_t * vnm, rdma_device_t * rd)
 
   /* Indicate ability to support L3 DMAC filtering and
    * initialize interface to L3 non-promisc mode */
-  vnet_hw_interface_t *hi = vnet_get_hw_interface (vnm, rd->hw_if_index);
-  hi->caps |= VNET_HW_INTERFACE_CAP_SUPPORTS_MAC_FILTER;
+  vnet_hw_if_set_caps (vnm, rd->hw_if_index, VNET_HW_IF_CAP_MAC_FILTER);
   ethernet_set_flags (vnm, rd->hw_if_index,
                      ETHERNET_INTERFACE_FLAG_DEFAULT_L3);
   return err;
@@ -1022,7 +1021,7 @@ are explicitly disabled, and if the interface supports it.*/
   /*
    * FIXME: add support for interrupt mode
    * vnet_hw_interface_t *hw = vnet_get_hw_interface (vnm, rd->hw_if_index);
-   * hw->caps |= VNET_HW_INTERFACE_CAP_SUPPORTS_INT_MODE;
+   * hw->caps |= VNET_HW_IF_CAP_INT_MODE;
    */
   vnet_hw_if_set_input_node (vnm, rd->hw_if_index, rdma_input_node.index);