net/iavf: initialize large VF setting at startup

lv_enabled is used to remember if large VF setting is configured, but
its value is not initialized at startup. This can lead to a different
configuration regarding the initial configuration of the PF.
For example, a first start is done with 8 rx and 8 tx queues. Large VF
is not needed and reta size is 64.
A second start is done with 20 rx and tx queues. Large VF is required
and reta size is 256.
A third start is done with 2 rx and tx queues. Large VF is not needed
but reta size is 256 as the PF has been configured during the second
start.

In order to have a consistent behavior regarding reta size whatever
the configuration of the PF (may be changed by a previous boot) the
lv_enabled must be set properly at the init phase.

Signed-off-by: Ghalem Boudour <ghalem.boudour@6wind.com>
Signed-off-by: Thibaut Collet <thibaut.collet@6wind.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Ting Xu <ting.xu@intel.com>
This commit is contained in:
Ghalem Boudour 2022-02-10 11:49:14 +01:00 committed by Qi Zhang
parent f6eee8bcac
commit 01263e11a2

View File

@ -2278,6 +2278,9 @@ iavf_init_vf(struct rte_eth_dev *dev)
}
}
if (vf->vsi_res->num_queue_pairs > IAVF_MAX_NUM_QUEUES_DFLT)
vf->lv_enabled = true;
if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC) {
if (iavf_get_supported_rxdid(adapter) != 0) {
PMD_INIT_LOG(ERR, "failed to do get supported rxdid");