iavf: Fix limit of total number of queues to active queues of VF
authorKaren Sornek <karen.sornek@intel.com>
Wed, 1 Sep 2021 07:21:46 +0000 (09:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Jan 2022 14:24:59 +0000 (15:24 +0100)
commit3ca132e6b06505e554ccf05282975c71a3768834
tree0e26e8e6bde78fd01ce34f9fbcacc9644c2e8b2b
parent396e3016905de566de42af304b2d97b76138b08b
iavf: Fix limit of total number of queues to active queues of VF

commit b712941c8085e638bb92456e866ed3de4404e3d5 upstream.

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.

Fixes: d5b33d024496 ("i40evf: add ndo_setup_tc callback to i40evf")
Signed-off-by: Ashwin Vijayavel <ashwin.vijayavel@intel.com>
Signed-off-by: Karen Sornek <karen.sornek@intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/intel/iavf/iavf_main.c