diff options
author | Damjan Marion <damarion@cisco.com> | 2022-01-05 01:52:38 +0100 |
---|---|---|
committer | Damjan Marion <damarion@cisco.com> | 2022-01-05 19:04:07 +0100 |
commit | d4f88cc0967ea1de66396ac07b20cf6e33a3fa1a (patch) | |
tree | 1f316431b414ac3adf693eb876132dd675c73a2a /src/plugins/rdma/device.c | |
parent | 7c11bd7a87b901106bb14d40572fddc703b74e5b (diff) |
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 <damarion@cisco.com>
Diffstat (limited to 'src/plugins/rdma/device.c')
-rw-r--r-- | src/plugins/rdma/device.c | 5 |
1 files changed, 2 insertions, 3 deletions
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); |