Skip to content

Commit 9a6e9e4

Browse files
gszczurxanguy11
authored andcommitted
iavf: Fix for setting queues to 0
Now setting combine to 0 will be rejected with the appropriate error code. This has been implemented by adding a condition that checks the value of combine equal to zero. Without this patch, when the user requested it, no error was returned and combine was set to the default value for VF. Fixes: 5520deb ("iavf: Enable support for up to 16 queues") Signed-off-by: Grzegorz Szczurek <[email protected]> Tested-by: Tony Brelinski <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent 321421b commit 9a6e9e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/intel/iavf/iavf_ethtool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1787,7 +1787,7 @@ static int iavf_set_channels(struct net_device *netdev,
17871787
/* All of these should have already been checked by ethtool before this
17881788
* even gets to us, but just to be sure.
17891789
*/
1790-
if (num_req > adapter->vsi_res->num_queue_pairs)
1790+
if (num_req == 0 || num_req > adapter->vsi_res->num_queue_pairs)
17911791
return -EINVAL;
17921792

17931793
if (num_req == adapter->num_active_queues)

0 commit comments

Comments
 (0)