goto error_param;
        }
 
-       vsi = pf->vsi[vf->lan_vsi_idx];
-       if (!vsi) {
+       if (vrk->key_len != ICE_VSIQF_HKEY_ARRAY_SIZE) {
                v_ret = VIRTCHNL_STATUS_ERR_PARAM;
                goto error_param;
        }
 
-       if (vrk->key_len != ICE_VSIQF_HKEY_ARRAY_SIZE) {
+       if (!test_bit(ICE_FLAG_RSS_ENA, vf->pf->flags)) {
                v_ret = VIRTCHNL_STATUS_ERR_PARAM;
                goto error_param;
        }
 
-       if (!test_bit(ICE_FLAG_RSS_ENA, vf->pf->flags)) {
+       vsi = pf->vsi[vf->lan_vsi_idx];
+       if (!vsi) {
                v_ret = VIRTCHNL_STATUS_ERR_PARAM;
                goto error_param;
        }
                goto error_param;
        }
 
-       vsi = pf->vsi[vf->lan_vsi_idx];
-       if (!vsi) {
+       if (vrl->lut_entries != ICE_VSIQF_HLUT_ARRAY_SIZE) {
                v_ret = VIRTCHNL_STATUS_ERR_PARAM;
                goto error_param;
        }
 
-       if (vrl->lut_entries != ICE_VSIQF_HLUT_ARRAY_SIZE) {
+       if (!test_bit(ICE_FLAG_RSS_ENA, vf->pf->flags)) {
                v_ret = VIRTCHNL_STATUS_ERR_PARAM;
                goto error_param;
        }
 
-       if (!test_bit(ICE_FLAG_RSS_ENA, vf->pf->flags)) {
+       vsi = pf->vsi[vf->lan_vsi_idx];
+       if (!vsi) {
                v_ret = VIRTCHNL_STATUS_ERR_PARAM;
                goto error_param;
        }
                goto error_param;
        }
 
+       if (vqs->rx_queues > ICE_MAX_BASE_QS_PER_VF ||
+           vqs->tx_queues > ICE_MAX_BASE_QS_PER_VF) {
+               v_ret = VIRTCHNL_STATUS_ERR_PARAM;
+               goto error_param;
+       }
+
        vsi = pf->vsi[vf->lan_vsi_idx];
        if (!vsi) {
                v_ret = VIRTCHNL_STATUS_ERR_PARAM;
                goto error_param;
        }
 
+       if (vqs->rx_queues > ICE_MAX_BASE_QS_PER_VF ||
+           vqs->tx_queues > ICE_MAX_BASE_QS_PER_VF) {
+               v_ret = VIRTCHNL_STATUS_ERR_PARAM;
+               goto error_param;
+       }
+
        vsi = pf->vsi[vf->lan_vsi_idx];
        if (!vsi) {
                v_ret = VIRTCHNL_STATUS_ERR_PARAM;
        irqmap_info = (struct virtchnl_irq_map_info *)msg;
        num_q_vectors_mapped = irqmap_info->num_vectors;
 
-       vsi = pf->vsi[vf->lan_vsi_idx];
-       if (!vsi) {
-               v_ret = VIRTCHNL_STATUS_ERR_PARAM;
-               goto error_param;
-       }
-
        /* Check to make sure number of VF vectors mapped is not greater than
         * number of VF vectors originally allocated, and check that
         * there is actually at least a single VF queue vector mapped
                goto error_param;
        }
 
+       vsi = pf->vsi[vf->lan_vsi_idx];
+       if (!vsi) {
+               v_ret = VIRTCHNL_STATUS_ERR_PARAM;
+               goto error_param;
+       }
+
        for (i = 0; i < num_q_vectors_mapped; i++) {
                struct ice_q_vector *q_vector;
 
                goto error_param;
        }
 
-       vsi = pf->vsi[vf->lan_vsi_idx];
-       if (!vsi)
-               goto error_param;
-
        if (qci->num_queue_pairs > ICE_MAX_BASE_QS_PER_VF) {
                dev_err(&pf->pdev->dev,
                        "VF-%d requesting more than supported number of queues: %d\n",
                goto error_param;
        }
 
+       vsi = pf->vsi[vf->lan_vsi_idx];
+       if (!vsi) {
+               v_ret = VIRTCHNL_STATUS_ERR_PARAM;
+               goto error_param;
+       }
+
        for (i = 0; i < qci->num_queue_pairs; i++) {
                qpi = &qci->qpair[i];
                if (qpi->txq.vsi_id != qci->vsi_id ||
                        err = -EPERM;
                else
                        err = -EINVAL;
-               goto error_handler;
-       }
-
-       /* Perform additional checks specific to RSS and Virtchnl */
-       if (v_opcode == VIRTCHNL_OP_CONFIG_RSS_KEY) {
-               struct virtchnl_rss_key *vrk = (struct virtchnl_rss_key *)msg;
-
-               if (vrk->key_len != ICE_VSIQF_HKEY_ARRAY_SIZE)
-                       err = -EINVAL;
-       } else if (v_opcode == VIRTCHNL_OP_CONFIG_RSS_LUT) {
-               struct virtchnl_rss_lut *vrl = (struct virtchnl_rss_lut *)msg;
-
-               if (vrl->lut_entries != ICE_VSIQF_HLUT_ARRAY_SIZE)
-                       err = -EINVAL;
        }
 
 error_handler: