i40e: Fix creation of first queue by omitting it if is not power of two
authorJedrzej Jagielski <jedrzej.jagielski@intel.com>
Mon, 21 Jun 2021 08:37:31 +0000 (08:37 +0000)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 18 Nov 2021 00:20:57 +0000 (16:20 -0800)
commit2e6d218c1ec6fb9cd70693b78134cbc35ae0b5a9
treec9e8b4255b278259dafc14b768d128c60ee123c1
parent3a3b311e3881172fc8e019b6508f04bc40c92d9d
i40e: Fix creation of first queue by omitting it if is not power of two

Reject TCs creation with proper message if the first queue
assignment is not equal to the power of two.
The first queue number was checked too late in the second queue
iteration, if second queue was configured at all. Now if first queue value
is not a power of two, then trying to create qdisc will be rejected.

Fixes: 8f88b3034db3 ("i40e: Add infrastructure for queue channel support")
Signed-off-by: Grzegorz Szczurek <grzegorzx.szczurek@intel.com>
Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
Tested-by: Tony Brelinski <tony.brelinski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/i40e/i40e_main.c