Tested-by: Huang, ZhiminX <[email protected]>

Regards,
HuangZhiMin


> -----Original Message-----
> From: dev <[email protected]> On Behalf Of Zhang,Alvin
> Sent: Wednesday, December 23, 2020 1:30 PM
> To: Xing, Beilei <[email protected]>; Xu, Ting <[email protected]>
> Cc: [email protected]; Zhang, AlvinX <[email protected]>; [email protected]
> Subject: [dpdk-dev] [PATCH] net/iavf: fix queue pairs configuration
> 
> From: Alvin Zhang <[email protected]>
> 
> Check if there are enough queue pairs currently allocated, and if not, request
> PF to allocate them.
> 
> Fixes: e436cd43835b ("net/iavf: negotiate large VF and request more queues")
> Cc: [email protected]
> 
> Signed-off-by: Alvin Zhang <[email protected]>
> ---
>  drivers/net/iavf/iavf_ethdev.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c 
> index
> 7e3c26a..f015121 100644
> --- a/drivers/net/iavf/iavf_ethdev.c
> +++ b/drivers/net/iavf/iavf_ethdev.c
> @@ -372,8 +372,10 @@ struct rte_iavf_xstats_name_off {
>       } else {
>               /* Check if large VF is already enabled. If so, disable and
>                * release redundant queue resource.
> +              * Or check if enough queue pairs. If not, request them from PF.
>                */
> -             if (vf->lv_enabled) {
> +             if (vf->lv_enabled ||
> +                 num_queue_pairs > vf->vsi_res->num_queue_pairs) {
>                       ret = iavf_queues_req_reset(dev, num_queue_pairs);
>                       if (ret)
>                               return ret;
> --
> 1.8.3.1

Reply via email to