Lines Matching refs:vf_idx

583 u16 fm10k_vf_queue_index(struct fm10k_hw *hw, u16 vf_idx)  in fm10k_vf_queue_index()  argument
588 vf_q_idx -= fm10k_queues_per_pool(hw) * (num_vfs - vf_idx); in fm10k_vf_queue_index()
601 static u16 fm10k_vf_vector_index(struct fm10k_hw *hw, u16 vf_idx) in fm10k_vf_vector_index() argument
605 vf_v_idx += fm10k_vectors_per_pool(hw) * vf_idx; in fm10k_vf_vector_index()
734 static s32 fm10k_iov_configure_tc_pf(struct fm10k_hw *hw, u16 vf_idx, int rate) in fm10k_iov_configure_tc_pf() argument
741 if (vf_idx >= hw->iov.num_vfs) in fm10k_iov_configure_tc_pf()
779 fm10k_write_reg(hw, FM10K_TC_RATE(vf_idx), tc_rate | interval); in fm10k_iov_configure_tc_pf()
780 fm10k_write_reg(hw, FM10K_TC_MAXCREDIT(vf_idx), FM10K_TC_MAXCREDIT_64K); in fm10k_iov_configure_tc_pf()
781 fm10k_write_reg(hw, FM10K_TC_CREDIT(vf_idx), FM10K_TC_MAXCREDIT_64K); in fm10k_iov_configure_tc_pf()
794 static s32 fm10k_iov_assign_int_moderator_pf(struct fm10k_hw *hw, u16 vf_idx) in fm10k_iov_assign_int_moderator_pf() argument
799 if (vf_idx >= hw->iov.num_vfs) in fm10k_iov_assign_int_moderator_pf()
803 vf_v_idx = fm10k_vf_vector_index(hw, vf_idx); in fm10k_iov_assign_int_moderator_pf()
813 if (vf_idx == (hw->iov.num_vfs - 1)) in fm10k_iov_assign_int_moderator_pf()
834 u16 vf_idx, vf_vid; in fm10k_iov_assign_default_mac_vlan_pf() local
837 if (!vf_info || vf_info->vf_idx >= hw->iov.num_vfs) in fm10k_iov_assign_default_mac_vlan_pf()
845 vf_idx = vf_info->vf_idx; in fm10k_iov_assign_default_mac_vlan_pf()
846 vf_q_idx = fm10k_vf_queue_index(hw, vf_idx); in fm10k_iov_assign_default_mac_vlan_pf()
847 qmap_idx = qmap_stride * vf_idx; in fm10k_iov_assign_default_mac_vlan_pf()
870 txqctl |= (vf_idx << FM10K_TXQCTL_TC_SHIFT) | in fm10k_iov_assign_default_mac_vlan_pf()
871 FM10K_TXQCTL_VF | vf_idx; in fm10k_iov_assign_default_mac_vlan_pf()
949 u8 vf_idx = vf_info->vf_idx; in fm10k_iov_reset_resources_pf() local
953 if (vf_idx >= hw->iov.num_vfs) in fm10k_iov_reset_resources_pf()
957 fm10k_write_reg(hw, FM10K_PFVFLREC(vf_idx / 32), BIT(vf_idx % 32)); in fm10k_iov_reset_resources_pf()
965 vf_v_idx = fm10k_vf_vector_index(hw, vf_idx); in fm10k_iov_reset_resources_pf()
971 qmap_idx = qmap_stride * vf_idx; in fm10k_iov_reset_resources_pf()
980 vf_q_idx = fm10k_vf_queue_index(hw, vf_idx); in fm10k_iov_reset_resources_pf()
990 (vf_idx << FM10K_TXQCTL_TC_SHIFT) | in fm10k_iov_reset_resources_pf()
991 FM10K_TXQCTL_VF | vf_idx; in fm10k_iov_reset_resources_pf()
992 rxqctl = (vf_idx << FM10K_RXQCTL_VF_SHIFT) | FM10K_RXQCTL_VF; in fm10k_iov_reset_resources_pf()
1005 fm10k_write_reg(hw, FM10K_TC_MAXCREDIT(vf_idx), 0); in fm10k_iov_reset_resources_pf()
1006 fm10k_write_reg(hw, FM10K_TC_RATE(vf_idx), 0); in fm10k_iov_reset_resources_pf()
1007 fm10k_write_reg(hw, FM10K_TC_CREDIT(vf_idx), in fm10k_iov_reset_resources_pf()
1011 if (!vf_idx) in fm10k_iov_reset_resources_pf()
1014 hw->iov.ops.assign_int_moderator(hw, vf_idx - 1); in fm10k_iov_reset_resources_pf()
1017 if (vf_idx == (hw->iov.num_vfs - 1)) in fm10k_iov_reset_resources_pf()
1028 fm10k_write_reg(hw, FM10K_MBMEM_VF(vf_idx, i), 0); in fm10k_iov_reset_resources_pf()
1135 u16 vf_idx) in fm10k_iov_update_stats_pf() argument
1141 idx = fm10k_vf_queue_index(hw, vf_idx); in fm10k_iov_update_stats_pf()
1159 u8 vf_idx = vf_info->vf_idx; in fm10k_iov_msg_msix_pf() local
1161 return hw->iov.ops.assign_int_moderator(hw, vf_idx); in fm10k_iov_msg_msix_pf()
1395 hw->iov.ops.configure_tc(hw, vf_info->vf_idx, vf_info->rate); in fm10k_iov_msg_lport_state_pf()