*/
 int ice_calc_vf_reg_idx(struct ice_vf *vf, struct ice_q_vector *q_vector)
 {
-       struct ice_pf *pf;
-
        if (!vf || !q_vector)
                return -EINVAL;
 
-       pf = vf->pf;
-
        /* always add one to account for the OICR being the first MSIX */
-       return pf->sriov_base_vector + pf->vfs.num_msix_per * vf->vf_id +
-               q_vector->v_idx + 1;
+       return vf->first_vector_idx + q_vector->v_idx + 1;
 }
 
 /**
 
        u16 num_q_vectors_mapped, vsi_id, vector_id;
        struct virtchnl_irq_map_info *irqmap_info;
        struct virtchnl_vector_map *map;
-       struct ice_pf *pf = vf->pf;
        struct ice_vsi *vsi;
        int i;
 
         * there is actually at least a single VF queue vector mapped
         */
        if (!test_bit(ICE_VF_STATE_ACTIVE, vf->vf_states) ||
-           pf->vfs.num_msix_per < num_q_vectors_mapped ||
+           vf->num_msix < num_q_vectors_mapped ||
            !num_q_vectors_mapped) {
                v_ret = VIRTCHNL_STATUS_ERR_PARAM;
                goto error_param;
                /* vector_id is always 0-based for each VF, and can never be
                 * larger than or equal to the max allowed interrupts per VF
                 */
-               if (!(vector_id < pf->vfs.num_msix_per) ||
+               if (!(vector_id < vf->num_msix) ||
                    !ice_vc_isvalid_vsi_id(vf, vsi_id) ||
                    (!vector_id && (map->rxq_map || map->txq_map))) {
                        v_ret = VIRTCHNL_STATUS_ERR_PARAM;