From 5b3f523918932793254b6313f78659fe0ed6320e Mon Sep 17 00:00:00 2001 From: Mohsin Kazmi Date: Wed, 10 Feb 2021 12:03:53 +0100 Subject: interface: add capabilities flags Type: improvement This patch adds flags to represent the modern NICs capabilities. Change-Id: I96d38d9ab7eac55974d72795cd100d8337168e1e Signed-off-by: Mohsin Kazmi --- src/plugins/avf/device.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/plugins/avf') diff --git a/src/plugins/avf/device.c b/src/plugins/avf/device.c index fd173980ba1..aec7efaee6f 100644 --- a/src/plugins/avf/device.c +++ b/src/plugins/avf/device.c @@ -1649,10 +1649,9 @@ avf_create_if (vlib_main_t * vm, avf_create_if_args_t * args) /* 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, ad->hw_if_index); - hi->flags |= - VNET_HW_INTERFACE_FLAG_SUPPORTS_MAC_FILTER | - VNET_HW_INTERFACE_FLAG_SUPPORTS_TX_L4_CKSUM_OFFLOAD | - VNET_HW_INTERFACE_FLAG_SUPPORTS_GSO; + hi->caps |= VNET_HW_INTERFACE_CAP_SUPPORTS_MAC_FILTER | + VNET_HW_INTERFACE_CAP_SUPPORTS_L4_TX_CKSUM | + VNET_HW_INTERFACE_CAP_SUPPORTS_TCP_GSO; ethernet_set_flags (vnm, ad->hw_if_index, ETHERNET_INTERFACE_FLAG_DEFAULT_L3); @@ -1660,7 +1659,7 @@ avf_create_if (vlib_main_t * vm, avf_create_if_args_t * args) args->sw_if_index = ad->sw_if_index = sw->sw_if_index; vnet_hw_interface_t *hw = vnet_get_hw_interface (vnm, ad->hw_if_index); - hw->flags |= VNET_HW_INTERFACE_FLAG_SUPPORTS_INT_MODE; + hw->caps |= VNET_HW_INTERFACE_CAP_SUPPORTS_INT_MODE; vnet_hw_if_set_input_node (vnm, ad->hw_if_index, avf_input_node.index); for (i = 0; i < ad->n_rx_queues; i++) -- cgit 1.2.3-korg