Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/ixl/if_ixl.c
Show First 20 Lines • Show All 1,169 Lines • ▼ Show 20 Lines | ixl_init_locked(struct ixl_pf *pf) | ||||
/* Set up the device filtering */ | /* Set up the device filtering */ | ||||
bzero(&filter, sizeof(filter)); | bzero(&filter, sizeof(filter)); | ||||
filter.enable_ethtype = TRUE; | filter.enable_ethtype = TRUE; | ||||
filter.enable_macvlan = TRUE; | filter.enable_macvlan = TRUE; | ||||
#ifdef IXL_FDIR | #ifdef IXL_FDIR | ||||
filter.enable_fdir = TRUE; | filter.enable_fdir = TRUE; | ||||
#endif | #endif | ||||
filter.hash_lut_size = I40E_HASH_LUT_SIZE_512; | |||||
if (i40e_set_filter_control(hw, &filter)) | if (i40e_set_filter_control(hw, &filter)) | ||||
device_printf(dev, "set_filter_control() failed\n"); | device_printf(dev, "set_filter_control() failed\n"); | ||||
/* Set up RSS */ | /* Set up RSS */ | ||||
ixl_config_rss(vsi); | ixl_config_rss(vsi); | ||||
/* | /* | ||||
** Prepare the VSI: rings, hmc contexts, etc... | ** Prepare the VSI: rings, hmc contexts, etc... | ||||
▲ Show 20 Lines • Show All 1,567 Lines • ▼ Show 20 Lines | |||||
#endif | #endif | ||||
/* | /* | ||||
** Set the queue and traffic class bits | ** Set the queue and traffic class bits | ||||
** - when multiple traffic classes are supported | ** - when multiple traffic classes are supported | ||||
** this will need to be more robust. | ** this will need to be more robust. | ||||
*/ | */ | ||||
ctxt.info.valid_sections = I40E_AQ_VSI_PROP_QUEUE_MAP_VALID; | ctxt.info.valid_sections = I40E_AQ_VSI_PROP_QUEUE_MAP_VALID; | ||||
ctxt.info.mapping_flags |= I40E_AQ_VSI_QUE_MAP_CONTIG; | ctxt.info.mapping_flags |= I40E_AQ_VSI_QUE_MAP_CONTIG; | ||||
/* In contig mode, que_mapping[0] is first queue index used by this VSI */ | |||||
ctxt.info.queue_mapping[0] = 0; | ctxt.info.queue_mapping[0] = 0; | ||||
ctxt.info.tc_mapping[0] = 0x0800; | /* | ||||
* This VSI will only use traffic class 0; start traffic class 0's | |||||
* queue allocation at queue 0, and assign it 64 (2^6) queues (though | |||||
* the driver may not use all of them). | |||||
*/ | |||||
ctxt.info.tc_mapping[0] = ((0 << I40E_AQ_VSI_TC_QUE_OFFSET_SHIFT) | |||||
& I40E_AQ_VSI_TC_QUE_OFFSET_MASK) | | |||||
((6 << I40E_AQ_VSI_TC_QUE_NUMBER_SHIFT) | |||||
& I40E_AQ_VSI_TC_QUE_NUMBER_MASK); | |||||
/* Set VLAN receive stripping mode */ | /* Set VLAN receive stripping mode */ | ||||
ctxt.info.valid_sections |= I40E_AQ_VSI_PROP_VLAN_VALID; | ctxt.info.valid_sections |= I40E_AQ_VSI_PROP_VLAN_VALID; | ||||
ctxt.info.port_vlan_flags = I40E_AQ_VSI_PVLAN_MODE_ALL; | ctxt.info.port_vlan_flags = I40E_AQ_VSI_PVLAN_MODE_ALL; | ||||
if (vsi->ifp->if_capenable & IFCAP_VLAN_HWTAGGING) | if (vsi->ifp->if_capenable & IFCAP_VLAN_HWTAGGING) | ||||
ctxt.info.port_vlan_flags |= I40E_AQ_VSI_PVLAN_EMOD_STR_BOTH; | ctxt.info.port_vlan_flags |= I40E_AQ_VSI_PVLAN_EMOD_STR_BOTH; | ||||
else | else | ||||
ctxt.info.port_vlan_flags |= I40E_AQ_VSI_PVLAN_EMOD_NOTHING; | ctxt.info.port_vlan_flags |= I40E_AQ_VSI_PVLAN_EMOD_NOTHING; | ||||
▲ Show 20 Lines • Show All 3,914 Lines • Show Last 20 Lines |