DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH dpdk] iavf: fix reported max TX and RX queues in ethdev info
@ 2026-01-09 14:21 Robin Jarry
  2026-01-09 14:25 ` Bruce Richardson
  0 siblings, 1 reply; 2+ messages in thread
From: Robin Jarry @ 2026-01-09 14:21 UTC (permalink / raw)
  To: dev, Vladimir Medvedkin, Beilei Xing, Ting Xu; +Cc: stable

With a regular iavf device, rte_eth_dev_info_get reports 256 maximum TX
and RX queues. Trying to configure a port with 20 queues returns an
error:

  ERR: IAVF_DRIVER: iavf_dev_configure(): large VF is not supported

When the large VF feature isn't supported by the PF kernel driver,
ethdev info must not report 256 supported queues but 16.

Fixes: e436cd43835b ("net/iavf: negotiate large VF and request more queues")
Cc: stable@dpdk.org

Signed-off-by: Robin Jarry <rjarry@redhat.com>
---
 drivers/net/intel/iavf/iavf_ethdev.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/net/intel/iavf/iavf_ethdev.c b/drivers/net/intel/iavf/iavf_ethdev.c
index 15e49fe24814..59328ebc5ad2 100644
--- a/drivers/net/intel/iavf/iavf_ethdev.c
+++ b/drivers/net/intel/iavf/iavf_ethdev.c
@@ -1126,12 +1126,18 @@ 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;
+	uint16_t max_queue_pairs;
 
 	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)
+		max_queue_pairs = IAVF_MAX_NUM_QUEUES_LV;
+	else
+		max_queue_pairs = IAVF_MAX_NUM_QUEUES_DFLT;
+
+	dev_info->max_rx_queues = max_queue_pairs;
+	dev_info->max_tx_queues = max_queue_pairs;
 	dev_info->min_rx_bufsize = IAVF_BUF_SIZE_MIN;
 	dev_info->max_rx_pktlen = IAVF_FRAME_SIZE_MAX;
 	dev_info->max_mtu = dev_info->max_rx_pktlen - IAVF_ETH_OVERHEAD;
-- 
2.52.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH dpdk] iavf: fix reported max TX and RX queues in ethdev info
  2026-01-09 14:21 [PATCH dpdk] iavf: fix reported max TX and RX queues in ethdev info Robin Jarry
@ 2026-01-09 14:25 ` Bruce Richardson
  0 siblings, 0 replies; 2+ messages in thread
From: Bruce Richardson @ 2026-01-09 14:25 UTC (permalink / raw)
  To: Robin Jarry; +Cc: dev, Vladimir Medvedkin, Beilei Xing, Ting Xu, stable

On Fri, Jan 09, 2026 at 03:21:30PM +0100, Robin Jarry wrote:
> With a regular iavf device, rte_eth_dev_info_get reports 256 maximum TX
> and RX queues. Trying to configure a port with 20 queues returns an
> error:
> 
>   ERR: IAVF_DRIVER: iavf_dev_configure(): large VF is not supported
> 
> When the large VF feature isn't supported by the PF kernel driver,
> ethdev info must not report 256 supported queues but 16.
> 
> Fixes: e436cd43835b ("net/iavf: negotiate large VF and request more queues")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Robin Jarry <rjarry@redhat.com>
> ---
>  drivers/net/intel/iavf/iavf_ethdev.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/intel/iavf/iavf_ethdev.c b/drivers/net/intel/iavf/iavf_ethdev.c
> index 15e49fe24814..59328ebc5ad2 100644
> --- a/drivers/net/intel/iavf/iavf_ethdev.c
> +++ b/drivers/net/intel/iavf/iavf_ethdev.c
> @@ -1126,12 +1126,18 @@ 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;
> +	uint16_t max_queue_pairs;
>  
>  	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)
> +		max_queue_pairs = IAVF_MAX_NUM_QUEUES_LV;
> +	else
> +		max_queue_pairs = IAVF_MAX_NUM_QUEUES_DFLT;
> +
> +	dev_info->max_rx_queues = max_queue_pairs;
> +	dev_info->max_tx_queues = max_queue_pairs;
>  	dev_info->min_rx_bufsize = IAVF_BUF_SIZE_MIN;
>  	dev_info->max_rx_pktlen = IAVF_FRAME_SIZE_MAX;
>  	dev_info->max_mtu = dev_info->max_rx_pktlen - IAVF_ETH_OVERHEAD;
> -- 
Makes sense.

Acked-by: Bruce Richardson <bruce.richardson@intel.com>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-01-09 14:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-09 14:21 [PATCH dpdk] iavf: fix reported max TX and RX queues in ethdev info Robin Jarry
2026-01-09 14:25 ` Bruce Richardson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).