Before this patch, VF must request a specific queues(1/2/4/8/16) with
DPDK PF. This patch align the number of requested queues to next power
of 2. So VF can request any number queues from 1 to 16.
Signed-off-by: Zhirun Yan <zhirun.yan@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
} else {
i40e_vc_notify_vf_reset(vf);
vf->vsi->nb_qps = req_pairs;
- pf->vf_nb_qps = req_pairs;
+ if (rte_is_power_of_2(req_pairs))
+ pf->vf_nb_qps = req_pairs;
+ else
+ pf->vf_nb_qps = i40e_align_floor(req_pairs) << 1;
i40e_pf_host_process_cmd_reset_vf(vf);
return 0;