Bug 1310 - iavf : max_rtx_queues wrong when network adaptor not support large vf
Summary: iavf : max_rtx_queues wrong when network adaptor not support large vf
Status: UNCONFIRMED
Alias: None
Product: DPDK
Classification: Unclassified
Component: ethdev (show other bugs)
Version: 22.11
Hardware: x86 Linux
: Normal normal
Target Milestone: ---
Assignee: dev
URL:
Depends on:
Blocks:
 
Reported: 2023-11-09 08:43 CET by yue.ma@ericsson.com
Modified: 2023-11-09 09:06 CET (History)
1 user (show)



Attachments

Description yue.ma@ericsson.com 2023-11-09 08:43:38 CET
our app code use dev_info->max_tx_queues to check the max queue.
we get dev_info->max_rx_queues=265(IAVF_MAX_NUM_QUEUES_LV), but when we try to requet 30 tx queue, we got  iavf_dev_configure(): large VF is not supported.
by check code we find that :
max queue number of  nomal vf  is 16 (IAVF_MAX_NUM_QUEUES_DFLT).

may be the code need to change like this :
drivers/net/iavf/iavf_ethdev.c:		
static int
iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
{
	struct iavf_adapter *adapter =
		IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
	struct iavf_info *vf = &adapter->vf;

	if (adapter->closed)
		return -EIO;

	dev_info->max_rx_queues = IAVF_MAX_NUM_QUEUES_LV;
	dev_info->max_tx_queues = IAVF_MAX_NUM_QUEUES_LV;
+	if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_LARGE_NUM_QPAIRS){
+		dev_info->max_rx_queues = IAVF_MAX_NUM_QUEUES_DFLT;
+		dev_info->max_tx_queues = IAVF_MAX_NUM_QUEUES_DFLT;	
+	}

Note You need to log in before you can comment on or make changes to this bug.