Lines Matching +full:num +full:- +full:vectors
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright(c) 2013 - 2021 Intel Corporation. */
29 #define I40E_MAX_CSR_SPACE (4 * 1024 * 1024 - 64 * 1024)
38 (test_bit(I40E_HW_CAP_RSS_AQ, (pf)->hw.caps) ? 4 : 1)
42 (test_bit(I40E_HW_CAP_128_QP_RSS, (pf)->hw.caps) ? 128 : 64)
69 (&(((union i40e_rx_desc *)((R)->desc))[i]))
71 (&(((struct i40e_tx_desc *)((R)->desc))[i]))
73 (&(((struct i40e_tx_context_desc *)((R)->desc))[i]))
75 (&(((struct i40e_filter_program_desc *)((R)->desc))[i]))
181 * - LINK_DOWN_ON_CLOSE_ENA is configurable at host OS run-time and
183 * - TOTAL_PORT_SHUTDOWN_ENA may be enabled only before OS loads
185 * - when LINK_DOWN_ON_CLOSE_ENABLED is used, the link is being brought
187 * - when TOTAL_PORT_SHUTDOWN_ENA is used, phy_type is not altered,
207 #define I40E_IWARP_IRQ_PILE_ID (I40E_PILE_VALID_BIT - 2)
234 /* The following structure contains the data parsed from the user-defined
454 return !!ch->fwd; in i40e_is_channel_macvlan()
460 return ch->fwd->netdev->dev_addr; in i40e_channel_mac()
473 u16 num_vmdq_vsis; /* num vmdq vsis this PF has set up */
474 u16 num_vmdq_qps; /* num queue pairs per vmdq pool */
475 u16 num_vmdq_msix; /* num queue vectors per vmdq pool */
476 u16 num_req_vfs; /* num VFs requested for this PF */
477 u16 num_vf_qps; /* num queue pairs per VF */
478 u16 num_lan_qps; /* num lan queues this PF has set up */
479 u16 num_lan_msix; /* num queue vectors for the base PF vsi */
480 u16 num_fdsb_msix; /* num queue vectors for sideband Fdir */
481 u16 num_iwarp_msix; /* num of iwarp vectors for this PF */
486 u16 fdir_pf_filter_count; /* num of guaranteed filters for this PF */
487 u16 num_alloc_vsi; /* num VSIs this driver supports */
497 /* Book-keeping of side-band filter count per flow-type.
499 * respective flow-type.
555 u16 next_vsi; /* Next unallocated VSI - 0-based! */
570 /* sr-iov config info */
691 * __i40e_pf_next_vsi - get next valid VSI
695 * Find and return next non-NULL VSI pointer in pf->vsi array and
701 while (*idx < pf->num_alloc_vsi) { in __i40e_pf_next_vsi()
702 if (pf->vsi[*idx]) in __i40e_pf_next_vsi()
703 return pf->vsi[*idx]; in __i40e_pf_next_vsi()
715 * __i40e_pf_next_veb - get next valid VEB
719 * Find and return next non-NULL VEB pointer in pf->veb array and
726 if (pf->veb[*idx]) in __i40e_pf_next_veb()
727 return pf->veb[*idx]; in __i40e_pf_next_veb()
739 * i40e_addr_to_hkey - Convert a 6-byte MAC Address to a u64 hash key
764 #define I40E_VLAN_ANY -1
843 /* These are containers of ring pointers, allocated at run-time */
900 u16 idx; /* index in pf->vsi[] */
907 u16 cnt_q_avail; /* num of queues available for channel usage */
918 #define I40E_MAX_MACVLANS 128 /* Max HW vectors - 1 on FVL */
919 #define I40E_MIN_MACVLAN_VECTORS 2 /* Min vectors to enable macvlans */
942 u16 v_idx; /* index in the vsi->q_vector array. */
970 * i40e_info_nvm_ver - format the NVM version string
981 struct i40e_nvm_info *nvm = &hw->nvm; in i40e_info_nvm_ver()
983 if (nvm->eetrack == I40E_OEM_EETRACK_ID) { in i40e_info_nvm_ver()
984 u32 full_ver = nvm->oem_ver; in i40e_info_nvm_ver()
995 major = FIELD_GET(I40E_NVM_VERSION_HI_MASK, nvm->version); in i40e_info_nvm_ver()
996 minor = FIELD_GET(I40E_NVM_VERSION_LO_MASK, nvm->version); in i40e_info_nvm_ver()
1002 * i40e_info_eetrack - format the EETrackID string
1012 struct i40e_nvm_info *nvm = &hw->nvm; in i40e_info_eetrack()
1015 if (nvm->eetrack != I40E_OEM_EETRACK_ID) in i40e_info_eetrack()
1016 snprintf(buf, len, "0x%08x", nvm->eetrack); in i40e_info_eetrack()
1020 * i40e_info_civd_ver - format the NVM version strings
1030 struct i40e_nvm_info *nvm = &hw->nvm; in i40e_info_civd_ver()
1033 if (nvm->eetrack != I40E_OEM_EETRACK_ID) { in i40e_info_civd_ver()
1034 u32 full_ver = nvm->oem_ver; in i40e_info_civd_ver()
1046 * i40e_nvm_version_str - format the NVM version strings
1060 i40e_info_eetrack(hw, &ver[1], sizeof(ver) - 1); in i40e_nvm_version_str()
1065 i40e_info_civd_ver(hw, &ver[1], sizeof(ver) - 1); in i40e_nvm_version_str()
1081 struct i40e_vsi *vsi = np->vsi; in i40e_netdev_to_pf()
1083 return vsi->back; in i40e_netdev_to_pf()
1089 vsi->irq_handler = irq_handler; in i40e_vsi_setup_irqhandler()
1093 * i40e_get_fd_cnt_all - get the total FD filter space available
1098 return pf->hw.fdir_shared_filter_count + pf->fdir_pf_filter_count; in i40e_get_fd_cnt_all()
1102 * i40e_read_fd_input_set - reads value of flow director input set register
1107 * specified by 'addr' (which is specific to flow-type)
1113 val = i40e_read_rx_ctl(&pf->hw, I40E_PRTQF_FD_INSET(addr, 1)); in i40e_read_fd_input_set()
1115 val += i40e_read_rx_ctl(&pf->hw, I40E_PRTQF_FD_INSET(addr, 0)); in i40e_read_fd_input_set()
1121 * i40e_write_fd_input_set - writes value into flow director input set register
1127 * This register is input set register based on flow-type.
1132 i40e_write_rx_ctl(&pf->hw, I40E_PRTQF_FD_INSET(addr, 1), in i40e_write_fd_input_set()
1134 i40e_write_rx_ctl(&pf->hw, I40E_PRTQF_FD_INSET(addr, 0), in i40e_write_fd_input_set()
1139 * i40e_get_pf_count - get PCI PF count.
1165 * i40e_find_vsi_by_type - Find and return Flow Director VSI
1176 if (vsi->type == type) in i40e_find_vsi_by_type()
1248 * i40e_irq_dynamic_enable - Enable default interrupt generation settings
1254 struct i40e_pf *pf = vsi->back; in i40e_irq_dynamic_enable()
1255 struct i40e_hw *hw = &pf->hw; in i40e_irq_dynamic_enable()
1261 wr32(hw, I40E_PFINT_DYN_CTLN(vector + vsi->base_vector - 1), val); in i40e_irq_dynamic_enable()
1285 return test_bit(I40E_FLAG_FW_LLDP_DIS, pf->flags); in i40e_is_sw_dcb()
1323 return !!READ_ONCE(vsi->xdp_prog); in i40e_enabled_xdp_vsi()
1336 * i40e_is_tc_mqprio_enabled - check if TC MQPRIO is enabled on PF
1345 return test_bit(I40E_FLAG_TC_MQPRIO_ENA, pf->flags); in i40e_is_tc_mqprio_enabled()
1349 * i40e_hw_to_pf - get pf pointer from the hardware structure
1360 * i40e_pf_get_vsi_by_seid - find VSI by SEID
1371 if (vsi->seid == seid) in i40e_pf_get_vsi_by_seid()
1378 * i40e_pf_get_main_vsi - get pointer to main VSI
1385 return (pf->lan_vsi != I40E_NO_VSI) ? pf->vsi[pf->lan_vsi] : NULL; in i40e_pf_get_main_vsi()
1389 * i40e_pf_get_veb_by_seid - find VEB by SEID
1400 if (veb->seid == seid) in i40e_pf_get_veb_by_seid()
1407 * i40e_pf_get_main_veb - get pointer to main VEB
1414 return (pf->lan_veb != I40E_NO_VEB) ? pf->veb[pf->lan_veb] : NULL; in i40e_pf_get_main_veb()