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.
558 u16 next_vsi; /* Next unallocated VSI - 0-based! */
573 /* sr-iov config info */
694 * __i40e_pf_next_vsi - get next valid VSI
698 * Find and return next non-NULL VSI pointer in pf->vsi array and
704 while (*idx < pf->num_alloc_vsi) { in __i40e_pf_next_vsi()
705 if (pf->vsi[*idx]) in __i40e_pf_next_vsi()
706 return pf->vsi[*idx]; in __i40e_pf_next_vsi()
718 * __i40e_pf_next_veb - get next valid VEB
722 * Find and return next non-NULL VEB pointer in pf->veb array and
729 if (pf->veb[*idx]) in __i40e_pf_next_veb()
730 return pf->veb[*idx]; in __i40e_pf_next_veb()
742 * i40e_addr_to_hkey - Convert a 6-byte MAC Address to a u64 hash key
767 #define I40E_VLAN_ANY -1
846 /* These are containers of ring pointers, allocated at run-time */
849 struct i40e_ring **xdp_rings; /* XDP Tx rings */
858 u16 rss_size; /* Allocated RSS queues */
879 u16 alloc_queue_pairs; /* Allocated Tx/Rx queues */
881 u16 num_queue_pairs; /* Used tx and rx pairs */
903 u16 idx; /* index in pf->vsi[] */
910 u16 cnt_q_avail; /* num of queues available for channel usage */
921 #define I40E_MAX_MACVLANS 128 /* Max HW vectors - 1 on FVL */
945 u16 v_idx; /* index in the vsi->q_vector array. */
952 struct i40e_ring_container tx; member
973 * i40e_info_nvm_ver - format the NVM version string
984 struct i40e_nvm_info *nvm = &hw->nvm; in i40e_info_nvm_ver()
986 if (nvm->eetrack == I40E_OEM_EETRACK_ID) { in i40e_info_nvm_ver()
987 u32 full_ver = nvm->oem_ver; in i40e_info_nvm_ver()
998 major = FIELD_GET(I40E_NVM_VERSION_HI_MASK, nvm->version); in i40e_info_nvm_ver()
999 minor = FIELD_GET(I40E_NVM_VERSION_LO_MASK, nvm->version); in i40e_info_nvm_ver()
1005 * i40e_info_eetrack - format the EETrackID string
1015 struct i40e_nvm_info *nvm = &hw->nvm; in i40e_info_eetrack()
1018 if (nvm->eetrack != I40E_OEM_EETRACK_ID) in i40e_info_eetrack()
1019 snprintf(buf, len, "0x%08x", nvm->eetrack); in i40e_info_eetrack()
1023 * i40e_info_civd_ver - format the NVM version strings
1033 struct i40e_nvm_info *nvm = &hw->nvm; in i40e_info_civd_ver()
1036 if (nvm->eetrack != I40E_OEM_EETRACK_ID) { in i40e_info_civd_ver()
1037 u32 full_ver = nvm->oem_ver; in i40e_info_civd_ver()
1049 * i40e_nvm_version_str - format the NVM version strings
1063 i40e_info_eetrack(hw, &ver[1], sizeof(ver) - 1); in i40e_nvm_version_str()
1068 i40e_info_civd_ver(hw, &ver[1], sizeof(ver) - 1); in i40e_nvm_version_str()
1084 struct i40e_vsi *vsi = np->vsi; in i40e_netdev_to_pf()
1086 return vsi->back; in i40e_netdev_to_pf()
1092 vsi->irq_handler = irq_handler; in i40e_vsi_setup_irqhandler()
1096 * i40e_get_fd_cnt_all - get the total FD filter space available
1101 return pf->hw.fdir_shared_filter_count + pf->fdir_pf_filter_count; in i40e_get_fd_cnt_all()
1105 * i40e_read_fd_input_set - reads value of flow director input set register
1110 * specified by 'addr' (which is specific to flow-type)
1116 val = i40e_read_rx_ctl(&pf->hw, I40E_PRTQF_FD_INSET(addr, 1)); in i40e_read_fd_input_set()
1118 val += i40e_read_rx_ctl(&pf->hw, I40E_PRTQF_FD_INSET(addr, 0)); in i40e_read_fd_input_set()
1124 * i40e_write_fd_input_set - writes value into flow director input set register
1130 * This register is input set register based on flow-type.
1135 i40e_write_rx_ctl(&pf->hw, I40E_PRTQF_FD_INSET(addr, 1), in i40e_write_fd_input_set()
1137 i40e_write_rx_ctl(&pf->hw, I40E_PRTQF_FD_INSET(addr, 0), in i40e_write_fd_input_set()
1142 * i40e_get_pf_count - get PCI PF count.
1168 * i40e_find_vsi_by_type - Find and return Flow Director VSI
1179 if (vsi->type == type) in i40e_find_vsi_by_type()
1249 * i40e_irq_dynamic_enable - Enable default interrupt generation settings
1255 struct i40e_pf *pf = vsi->back; in i40e_irq_dynamic_enable()
1256 struct i40e_hw *hw = &pf->hw; in i40e_irq_dynamic_enable()
1262 wr32(hw, I40E_PFINT_DYN_CTLN(vector + vsi->base_vector - 1), val); in i40e_irq_dynamic_enable()
1287 return test_bit(I40E_FLAG_FW_LLDP_DIS, pf->flags); in i40e_is_sw_dcb()
1327 return !!READ_ONCE(vsi->xdp_prog); in i40e_enabled_xdp_vsi()
1340 * i40e_is_tc_mqprio_enabled - check if TC MQPRIO is enabled on PF
1349 return test_bit(I40E_FLAG_TC_MQPRIO_ENA, pf->flags); in i40e_is_tc_mqprio_enabled()
1353 * i40e_hw_to_pf - get pf pointer from the hardware structure
1364 * i40e_pf_get_vsi_by_seid - find VSI by SEID
1375 if (vsi->seid == seid) in i40e_pf_get_vsi_by_seid()
1382 * i40e_pf_get_main_vsi - get pointer to main VSI
1389 return (pf->lan_vsi != I40E_NO_VSI) ? pf->vsi[pf->lan_vsi] : NULL; in i40e_pf_get_main_vsi()
1393 * i40e_pf_get_veb_by_seid - find VEB by SEID
1404 if (veb->seid == seid) in i40e_pf_get_veb_by_seid()
1411 * i40e_pf_get_main_veb - get pointer to main VEB
1418 return (pf->lan_veb != I40E_NO_VEB) ? pf->veb[pf->lan_veb] : NULL; in i40e_pf_get_main_veb()