Lines Matching refs:vf_idx
592 u16 fm10k_vf_queue_index(struct fm10k_hw *hw, u16 vf_idx) in fm10k_vf_queue_index() argument
597 vf_q_idx -= fm10k_queues_per_pool(hw) * (num_vfs - vf_idx); in fm10k_vf_queue_index()
610 static u16 fm10k_vf_vector_index(struct fm10k_hw *hw, u16 vf_idx) in fm10k_vf_vector_index() argument
614 vf_v_idx += fm10k_vectors_per_pool(hw) * vf_idx; in fm10k_vf_vector_index()
743 static s32 fm10k_iov_configure_tc_pf(struct fm10k_hw *hw, u16 vf_idx, int rate) in fm10k_iov_configure_tc_pf() argument
750 if (vf_idx >= hw->iov.num_vfs) in fm10k_iov_configure_tc_pf()
788 fm10k_write_reg(hw, FM10K_TC_RATE(vf_idx), tc_rate | interval); in fm10k_iov_configure_tc_pf()
789 fm10k_write_reg(hw, FM10K_TC_MAXCREDIT(vf_idx), FM10K_TC_MAXCREDIT_64K); in fm10k_iov_configure_tc_pf()
790 fm10k_write_reg(hw, FM10K_TC_CREDIT(vf_idx), FM10K_TC_MAXCREDIT_64K); in fm10k_iov_configure_tc_pf()
803 static s32 fm10k_iov_assign_int_moderator_pf(struct fm10k_hw *hw, u16 vf_idx) in fm10k_iov_assign_int_moderator_pf() argument
808 if (vf_idx >= hw->iov.num_vfs) in fm10k_iov_assign_int_moderator_pf()
812 vf_v_idx = fm10k_vf_vector_index(hw, vf_idx); in fm10k_iov_assign_int_moderator_pf()
822 if (vf_idx == (hw->iov.num_vfs - 1)) in fm10k_iov_assign_int_moderator_pf()
843 u16 vf_idx, vf_vid; in fm10k_iov_assign_default_mac_vlan_pf() local
846 if (!vf_info || vf_info->vf_idx >= hw->iov.num_vfs) in fm10k_iov_assign_default_mac_vlan_pf()
854 vf_idx = vf_info->vf_idx; in fm10k_iov_assign_default_mac_vlan_pf()
855 vf_q_idx = fm10k_vf_queue_index(hw, vf_idx); in fm10k_iov_assign_default_mac_vlan_pf()
856 qmap_idx = qmap_stride * vf_idx; in fm10k_iov_assign_default_mac_vlan_pf()
910 txqctl |= (vf_idx << FM10K_TXQCTL_TC_SHIFT) | in fm10k_iov_assign_default_mac_vlan_pf()
911 FM10K_TXQCTL_VF | vf_idx; in fm10k_iov_assign_default_mac_vlan_pf()
935 u8 vf_idx = vf_info->vf_idx; in fm10k_iov_reset_resources_pf() local
939 if (vf_idx >= hw->iov.num_vfs) in fm10k_iov_reset_resources_pf()
943 fm10k_write_reg(hw, FM10K_PFVFLREC(vf_idx / 32), 1 << (vf_idx % 32)); in fm10k_iov_reset_resources_pf()
951 vf_v_idx = fm10k_vf_vector_index(hw, vf_idx); in fm10k_iov_reset_resources_pf()
957 qmap_idx = qmap_stride * vf_idx; in fm10k_iov_reset_resources_pf()
966 vf_q_idx = fm10k_vf_queue_index(hw, vf_idx); in fm10k_iov_reset_resources_pf()
976 (vf_idx << FM10K_TXQCTL_TC_SHIFT) | in fm10k_iov_reset_resources_pf()
977 FM10K_TXQCTL_VF | vf_idx; in fm10k_iov_reset_resources_pf()
978 rxqctl = FM10K_RXQCTL_VF | (vf_idx << FM10K_RXQCTL_VF_SHIFT); in fm10k_iov_reset_resources_pf()
991 fm10k_write_reg(hw, FM10K_TC_MAXCREDIT(vf_idx), 0); in fm10k_iov_reset_resources_pf()
992 fm10k_write_reg(hw, FM10K_TC_RATE(vf_idx), 0); in fm10k_iov_reset_resources_pf()
993 fm10k_write_reg(hw, FM10K_TC_CREDIT(vf_idx), in fm10k_iov_reset_resources_pf()
997 if (!vf_idx) in fm10k_iov_reset_resources_pf()
1000 hw->iov.ops.assign_int_moderator(hw, vf_idx - 1); in fm10k_iov_reset_resources_pf()
1003 if (vf_idx == (hw->iov.num_vfs - 1)) in fm10k_iov_reset_resources_pf()
1014 fm10k_write_reg(hw, FM10K_MBMEM_VF(vf_idx, i), 0); in fm10k_iov_reset_resources_pf()
1115 u16 vf_idx) in fm10k_iov_update_stats_pf() argument
1121 idx = fm10k_vf_queue_index(hw, vf_idx); in fm10k_iov_update_stats_pf()
1152 u8 vf_idx = vf_info->vf_idx; in fm10k_iov_msg_msix_pf() local
1154 return hw->iov.ops.assign_int_moderator(hw, vf_idx); in fm10k_iov_msg_msix_pf()
1375 hw->iov.ops.configure_tc(hw, vf_info->vf_idx, vf_info->rate); in fm10k_iov_msg_lport_state_pf()