Lines Matching refs:vf_idx
599 u16 fm10k_vf_queue_index(struct fm10k_hw *hw, u16 vf_idx) in fm10k_vf_queue_index() argument
604 vf_q_idx -= fm10k_queues_per_pool(hw) * (num_vfs - vf_idx); in fm10k_vf_queue_index()
617 static u16 fm10k_vf_vector_index(struct fm10k_hw *hw, u16 vf_idx) in fm10k_vf_vector_index() argument
621 vf_v_idx += fm10k_vectors_per_pool(hw) * vf_idx; in fm10k_vf_vector_index()
750 static s32 fm10k_iov_configure_tc_pf(struct fm10k_hw *hw, u16 vf_idx, int rate) in fm10k_iov_configure_tc_pf() argument
757 if (vf_idx >= hw->iov.num_vfs) in fm10k_iov_configure_tc_pf()
795 fm10k_write_reg(hw, FM10K_TC_RATE(vf_idx), tc_rate | interval); in fm10k_iov_configure_tc_pf()
796 fm10k_write_reg(hw, FM10K_TC_MAXCREDIT(vf_idx), FM10K_TC_MAXCREDIT_64K); in fm10k_iov_configure_tc_pf()
797 fm10k_write_reg(hw, FM10K_TC_CREDIT(vf_idx), FM10K_TC_MAXCREDIT_64K); in fm10k_iov_configure_tc_pf()
810 static s32 fm10k_iov_assign_int_moderator_pf(struct fm10k_hw *hw, u16 vf_idx) in fm10k_iov_assign_int_moderator_pf() argument
815 if (vf_idx >= hw->iov.num_vfs) in fm10k_iov_assign_int_moderator_pf()
819 vf_v_idx = fm10k_vf_vector_index(hw, vf_idx); in fm10k_iov_assign_int_moderator_pf()
829 if (vf_idx == (hw->iov.num_vfs - 1)) in fm10k_iov_assign_int_moderator_pf()
850 u16 vf_idx, vf_vid; in fm10k_iov_assign_default_mac_vlan_pf() local
853 if (!vf_info || vf_info->vf_idx >= hw->iov.num_vfs) in fm10k_iov_assign_default_mac_vlan_pf()
861 vf_idx = vf_info->vf_idx; in fm10k_iov_assign_default_mac_vlan_pf()
862 vf_q_idx = fm10k_vf_queue_index(hw, vf_idx); in fm10k_iov_assign_default_mac_vlan_pf()
863 qmap_idx = qmap_stride * vf_idx; in fm10k_iov_assign_default_mac_vlan_pf()
917 txqctl |= (vf_idx << FM10K_TXQCTL_TC_SHIFT) | in fm10k_iov_assign_default_mac_vlan_pf()
918 FM10K_TXQCTL_VF | vf_idx; in fm10k_iov_assign_default_mac_vlan_pf()
942 u8 vf_idx = vf_info->vf_idx; in fm10k_iov_reset_resources_pf() local
946 if (vf_idx >= hw->iov.num_vfs) in fm10k_iov_reset_resources_pf()
950 fm10k_write_reg(hw, FM10K_PFVFLREC(vf_idx / 32), 1 << (vf_idx % 32)); in fm10k_iov_reset_resources_pf()
958 vf_v_idx = fm10k_vf_vector_index(hw, vf_idx); in fm10k_iov_reset_resources_pf()
964 qmap_idx = qmap_stride * vf_idx; in fm10k_iov_reset_resources_pf()
973 vf_q_idx = fm10k_vf_queue_index(hw, vf_idx); in fm10k_iov_reset_resources_pf()
983 (vf_idx << FM10K_TXQCTL_TC_SHIFT) | in fm10k_iov_reset_resources_pf()
984 FM10K_TXQCTL_VF | vf_idx; in fm10k_iov_reset_resources_pf()
985 rxqctl = FM10K_RXQCTL_VF | (vf_idx << FM10K_RXQCTL_VF_SHIFT); in fm10k_iov_reset_resources_pf()
998 fm10k_write_reg(hw, FM10K_TC_MAXCREDIT(vf_idx), 0); in fm10k_iov_reset_resources_pf()
999 fm10k_write_reg(hw, FM10K_TC_RATE(vf_idx), 0); in fm10k_iov_reset_resources_pf()
1000 fm10k_write_reg(hw, FM10K_TC_CREDIT(vf_idx), in fm10k_iov_reset_resources_pf()
1004 if (!vf_idx) in fm10k_iov_reset_resources_pf()
1007 hw->iov.ops.assign_int_moderator(hw, vf_idx - 1); in fm10k_iov_reset_resources_pf()
1010 if (vf_idx == (hw->iov.num_vfs - 1)) in fm10k_iov_reset_resources_pf()
1021 fm10k_write_reg(hw, FM10K_MBMEM_VF(vf_idx, i), 0); in fm10k_iov_reset_resources_pf()
1116 u16 vf_idx) in fm10k_iov_update_stats_pf() argument
1122 idx = fm10k_vf_queue_index(hw, vf_idx); in fm10k_iov_update_stats_pf()
1153 u8 vf_idx = vf_info->vf_idx; in fm10k_iov_msg_msix_pf() local
1155 return hw->iov.ops.assign_int_moderator(hw, vf_idx); in fm10k_iov_msg_msix_pf()
1349 hw->iov.ops.configure_tc(hw, vf_info->vf_idx, vf_info->rate); in fm10k_iov_msg_lport_state_pf()