iavf: Fix limit of total number of queues to active queues of VF
Subsystems (2)
PATCH 1/1 iavf: Fix limit of total number of queues to active queues of VF
In the absence of this validation, if the user requests to configure queues more than the enabled queues, it results in sending the requested number of queues to the kernel stack (due to the asynchronous nature of VF response), in which case the stack might pick a queue to transmit that is not enabled and result in Tx hang. Fix this bug by limiting the total number of queues allocated for VF to active queues of VF.
--- drivers/net/ethernet/intel/iavf/iavf_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/iavf/iavf_main.c +4 -1
@@ -2647,8 +2647,11 @@ static int iavf_validate_ch_config(struct iavf_adapter *adapter, total_max_rate += tx_rate; num_qps += mqprio_qopt->qopt.count[i]; } -if (num_qps >IAVF_MAX_REQ_QUEUES ) +if (num_qps > adapter->num_active_queues) { +dev_err (&adapter->pdev->dev, +"Cannot support requested number of queues\n" );return -EINVAL ; + } ret =iavf_validate_tx_bandwidth (adapter, total_max_rate);return ret;
Signature · 1 line
2.27.0
Jankowski
PATCH 1/1 iavf: Fix limit of total number of queues to active queues of VF
drivers/net/ethernet/intel/iavf/iavf_main.c static int iavf_validate_ch_config(struct
Quoted 32 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Karen Sornek
Sent: ?roda, 1 wrze?nia 2021 09:22
To: intel-wired-lan at lists.osuosl.org
Cc: Ashwin Vijayavel <[email protected]>; Sornek, Karen <[email protected]>
Subject: [Intel-wired-lan] [PATCH net v1] iavf: Fix limit of total number of queues to active queues of VFIn the absence of this validation, if the user requests to configure queues more than the enabled queues, it results in sending the requested number of queues to the kernel stack (due to the asynchronous nature of VF response), in which case the stack might pick a queue to transmit that is not enabled and result in Tx hang. Fix this bug by limiting the total number of queues allocated for VF to active queues of VF.
Fixes d5b33d024496 ("i40evf: add ndo_setup_tc callback to i40evf")Signed-off-by Ashwin Vijayavel <[email protected]>Signed-off-by Karen Sornek <[email protected]>--- drivers/net/ethernet/intel/iavf/iavf_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/net/ethernet/intel/iavf/iavf_main.c +0
-0@@ -2647,8 +2647,11 @@ static int iavf_validate_ch_config(struct