From d4f88cc0967ea1de66396ac07b20cf6e33a3fa1a Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Wed, 5 Jan 2022 01:52:38 +0100 Subject: interface: refactor interface capabilities code Make it shorter to type, easier to debug, make adding callbacks in future simpler. Type: improvement Change-Id: I6cdd6375e36da23bd452a7c7273ff42789e94433 Signed-off-by: Damjan Marion --- src/plugins/rdma/device.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/plugins/rdma') diff --git a/src/plugins/rdma/device.c b/src/plugins/rdma/device.c index 1198d99b14e..3ea8e44b3e7 100644 --- a/src/plugins/rdma/device.c +++ b/src/plugins/rdma/device.c @@ -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); -- cgit 1.2.3-korg