Lines Matching +full:num +full:- +full:tx +full:- +full:queues
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]))
182 * - LINK_DOWN_ON_CLOSE_ENA is configurable at host OS run-time and
184 * - TOTAL_PORT_SHUTDOWN_ENA may be enabled only before OS loads
186 * - when LINK_DOWN_ON_CLOSE_ENABLED is used, the link is being brought
188 * - when TOTAL_PORT_SHUTDOWN_ENA is used, phy_type is not altered,
209 #define I40E_IWARP_IRQ_PILE_ID (I40E_PILE_VALID_BIT - 2)
236 /* The following structure contains the data parsed from the user-defined
250 /* TX packet view of src and dst */
335 u16 qcount; /* Total Queues */
456 return !!ch->fwd; in i40e_is_channel_macvlan()
462 return ch->fwd->netdev->dev_addr; in i40e_channel_mac()
475 u16 num_vmdq_vsis; /* num vmdq vsis this PF has set up */
476 u16 num_vmdq_qps; /* num queue pairs per vmdq pool */
477 u16 num_vmdq_msix; /* num queue vectors per vmdq pool */
478 u16 num_req_vfs; /* num VFs requested for this PF */
479 u16 num_vf_qps; /* num queue pairs per VF */
480 u16 num_lan_qps; /* num lan queues this PF has set up */
481 u16 num_lan_msix; /* num queue vectors for the base PF vsi */
482 u16 num_fdsb_msix; /* num queue vectors for sideband Fdir */
483 u16 num_iwarp_msix; /* num of iwarp vectors for this PF */
485 int queues_left; /* queues left unclaimed */
486 u16 alloc_rss_size; /* allocated RSS queues */
487 u16 rss_size_max; /* HW defined max RSS queues */
488 u16 fdir_pf_filter_count; /* num of guaranteed filters for this PF */
489 u16 num_alloc_vsi; /* num VSIs this driver supports */
499 /* Book-keeping of side-band filter count per flow-type.
501 * respective flow-type.
557 u16 next_vsi; /* Next unallocated VSI - 0-based! */
572 /* sr-iov config info */
693 * __i40e_pf_next_vsi - get next valid VSI
697 * Find and return next non-NULL VSI pointer in pf->vsi array and
703 while (*idx < pf->num_alloc_vsi) { in __i40e_pf_next_vsi()
704 if (pf->vsi[*idx]) in __i40e_pf_next_vsi()
705 return pf->vsi[*idx]; in __i40e_pf_next_vsi()
717 * __i40e_pf_next_veb - get next valid VEB
721 * Find and return next non-NULL VEB pointer in pf->veb array and
728 if (pf->veb[*idx]) in __i40e_pf_next_veb()
729 return pf->veb[*idx]; in __i40e_pf_next_veb()
741 * i40e_addr_to_hkey - Convert a 6-byte MAC Address to a u64 hash key
766 #define I40E_VLAN_ANY -1
845 /* These are containers of ring pointers, allocated at run-time */
848 struct i40e_ring **xdp_rings; /* XDP Tx rings */
857 u16 rss_size; /* Allocated RSS queues */
878 u16 alloc_queue_pairs; /* Allocated Tx/Rx queues */
880 u16 num_queue_pairs; /* Used tx and rx pairs */
902 u16 idx; /* index in pf->vsi[] */
909 u16 cnt_q_avail; /* num of queues available for channel usage */
920 #define I40E_MAX_MACVLANS 128 /* Max HW vectors - 1 on FVL */
944 u16 v_idx; /* index in the vsi->q_vector array. */
950 struct i40e_ring_container tx; member
972 * i40e_info_nvm_ver - format the NVM version string
983 struct i40e_nvm_info *nvm = &hw->nvm; in i40e_info_nvm_ver()
985 if (nvm->eetrack == I40E_OEM_EETRACK_ID) { in i40e_info_nvm_ver()
986 u32 full_ver = nvm->oem_ver; in i40e_info_nvm_ver()
997 major = FIELD_GET(I40E_NVM_VERSION_HI_MASK, nvm->version); in i40e_info_nvm_ver()
998 minor = FIELD_GET(I40E_NVM_VERSION_LO_MASK, nvm->version); in i40e_info_nvm_ver()
1004 * i40e_info_eetrack - format the EETrackID string
1014 struct i40e_nvm_info *nvm = &hw->nvm; in i40e_info_eetrack()
1017 if (nvm->eetrack != I40E_OEM_EETRACK_ID) in i40e_info_eetrack()
1018 snprintf(buf, len, "0x%08x", nvm->eetrack); in i40e_info_eetrack()
1022 * i40e_info_civd_ver - format the NVM version strings
1032 struct i40e_nvm_info *nvm = &hw->nvm; in i40e_info_civd_ver()
1035 if (nvm->eetrack != I40E_OEM_EETRACK_ID) { in i40e_info_civd_ver()
1036 u32 full_ver = nvm->oem_ver; in i40e_info_civd_ver()
1048 * i40e_nvm_version_str - format the NVM version strings
1062 i40e_info_eetrack(hw, &ver[1], sizeof(ver) - 1); in i40e_nvm_version_str()
1067 i40e_info_civd_ver(hw, &ver[1], sizeof(ver) - 1); in i40e_nvm_version_str()
1083 struct i40e_vsi *vsi = np->vsi; in i40e_netdev_to_pf()
1085 return vsi->back; in i40e_netdev_to_pf()
1091 vsi->irq_handler = irq_handler; in i40e_vsi_setup_irqhandler()
1095 * i40e_get_fd_cnt_all - get the total FD filter space available
1100 return pf->hw.fdir_shared_filter_count + pf->fdir_pf_filter_count; in i40e_get_fd_cnt_all()
1104 * i40e_read_fd_input_set - reads value of flow director input set register
1109 * specified by 'addr' (which is specific to flow-type)
1115 val = i40e_read_rx_ctl(&pf->hw, I40E_PRTQF_FD_INSET(addr, 1)); in i40e_read_fd_input_set()
1117 val += i40e_read_rx_ctl(&pf->hw, I40E_PRTQF_FD_INSET(addr, 0)); in i40e_read_fd_input_set()
1123 * i40e_write_fd_input_set - writes value into flow director input set register
1129 * This register is input set register based on flow-type.
1134 i40e_write_rx_ctl(&pf->hw, I40E_PRTQF_FD_INSET(addr, 1), in i40e_write_fd_input_set()
1136 i40e_write_rx_ctl(&pf->hw, I40E_PRTQF_FD_INSET(addr, 0), in i40e_write_fd_input_set()
1141 * i40e_get_pf_count - get PCI PF count.
1167 * i40e_find_vsi_by_type - Find and return Flow Director VSI
1178 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()
1322 return !!READ_ONCE(vsi->xdp_prog); in i40e_enabled_xdp_vsi()
1335 * i40e_is_tc_mqprio_enabled - check if TC MQPRIO is enabled on PF
1344 return test_bit(I40E_FLAG_TC_MQPRIO_ENA, pf->flags); in i40e_is_tc_mqprio_enabled()
1348 * i40e_hw_to_pf - get pf pointer from the hardware structure
1359 * i40e_pf_get_vsi_by_seid - find VSI by SEID
1370 if (vsi->seid == seid) in i40e_pf_get_vsi_by_seid()
1377 * i40e_pf_get_main_vsi - get pointer to main VSI
1384 return (pf->lan_vsi != I40E_NO_VSI) ? pf->vsi[pf->lan_vsi] : NULL; in i40e_pf_get_main_vsi()
1388 * i40e_pf_get_veb_by_seid - find VEB by SEID
1399 if (veb->seid == seid) in i40e_pf_get_veb_by_seid()
1406 * i40e_pf_get_main_veb - get pointer to main VEB
1413 return (pf->lan_veb != I40E_NO_VEB) ? pf->veb[pf->lan_veb] : NULL; in i40e_pf_get_main_veb()