Skip to content

Commit

Permalink
net/iavf: fix queue pairs configuration
Browse files Browse the repository at this point in the history
[ upstream commit 403aebc ]

Check if there are enough queue pairs currently allocated, and if not,
request PF to allocate them.

Fixes: e436cd4 ("net/iavf: negotiate large VF and request more queues")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Tested-by: Zhimin Huang <zhiminx.huang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
  • Loading branch information
Alvin Zhang authored and bluca committed Feb 2, 2021
1 parent c225546 commit f8779d9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/iavf/iavf_ethdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,10 @@ iavf_dev_configure(struct rte_eth_dev *dev)
} 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;
Expand Down

0 comments on commit f8779d9

Please sign in to comment.