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/vnet/devices/af_packet | |
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/vnet/devices/af_packet')
-rw-r--r-- | src/vnet/devices/af_packet/af_packet.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/vnet/devices/af_packet/af_packet.c b/src/vnet/devices/af_packet/af_packet.c index bfa28031c1c..2e044472736 100644 --- a/src/vnet/devices/af_packet/af_packet.c +++ b/src/vnet/devices/af_packet/af_packet.c @@ -430,7 +430,7 @@ af_packet_create_if (af_packet_create_if_arg_t *arg) apif->queue_index = vnet_hw_if_register_rx_queue (vnm, apif->hw_if_index, 0, VNET_HW_IF_RXQ_THREAD_ANY); - hw->caps |= VNET_HW_INTERFACE_CAP_SUPPORTS_INT_MODE; + hw->caps |= VNET_HW_IF_CAP_INT_MODE; vnet_hw_interface_set_flags (vnm, apif->hw_if_index, VNET_HW_INTERFACE_FLAG_LINK_UP); @@ -544,13 +544,11 @@ af_packet_set_l4_cksum_offload (u32 sw_if_index, u8 set) if (set) { - hw->caps &= ~(VNET_HW_INTERFACE_CAP_SUPPORTS_TX_TCP_CKSUM | - VNET_HW_INTERFACE_CAP_SUPPORTS_TX_UDP_CKSUM); + hw->caps &= ~(VNET_HW_IF_CAP_TX_TCP_CKSUM | VNET_HW_IF_CAP_TX_UDP_CKSUM); } else { - hw->caps |= (VNET_HW_INTERFACE_CAP_SUPPORTS_TX_TCP_CKSUM | - VNET_HW_INTERFACE_CAP_SUPPORTS_TX_UDP_CKSUM); + hw->caps |= (VNET_HW_IF_CAP_TX_TCP_CKSUM | VNET_HW_IF_CAP_TX_UDP_CKSUM); } return 0; } |