when VSI is enabled with smaller number of queues, for example 1 or 6,
it will cause error.
64 is the max number of queues that can be used for RSS, but VSI might
be created with only few queues.
Fixes:
7cbecc2f742 ("net/i40e: support queue region set and flush")
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
{
int32_t ret = -EINVAL;
struct i40e_queue_regions *info = &pf->queue_region;
+ struct i40e_vsi *main_vsi = pf->main_vsi;
if (on) {
i40e_queue_region_pf_flowtype_conf(hw, pf);
}
info->queue_region_number = 1;
- info->region[0].queue_num = 64;
+ info->region[0].queue_num = main_vsi->nb_used_qps;
info->region[0].queue_start_index = 0;
ret = i40e_vsi_update_queue_region_mapping(hw, pf);