Skip to content

Commit ad0b1e9

Browse files
mmaloszeRezaT4795
authored andcommitted
i40e: Fix interface init with MSI interrupts (no MSI-X)
[ Upstream commit 5fcbb711024aac6d4db385623e6f2fdf019f7782 ] Fix the inability to bring an interface up on a setup with only MSI interrupts enabled (no MSI-X). Solution is to add a default number of QPs = 1. This is enough, since without MSI-X support driver enables only a basic feature set. Fixes: bc6d33c ("i40e: Fix the number of queues available to be mapped for use") Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com> Signed-off-by: Michal Maloszewski <michal.maloszewski@intel.com> Tested-by: Dave Switzer <david.switzer@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://lore.kernel.org/r/20220722175401.112572-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 17d7a9d commit ad0b1e9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/net/ethernet/intel/i40e/i40e_main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1908,11 +1908,15 @@ static void i40e_vsi_setup_queue_map(struct i40e_vsi *vsi,
19081908
* non-zero req_queue_pairs says that user requested a new
19091909
* queue count via ethtool's set_channels, so use this
19101910
* value for queues distribution across traffic classes
1911+
* We need at least one queue pair for the interface
1912+
* to be usable as we see in else statement.
19111913
*/
19121914
if (vsi->req_queue_pairs > 0)
19131915
vsi->num_queue_pairs = vsi->req_queue_pairs;
19141916
else if (pf->flags & I40E_FLAG_MSIX_ENABLED)
19151917
vsi->num_queue_pairs = pf->num_lan_msix;
1918+
else
1919+
vsi->num_queue_pairs = 1;
19161920
}
19171921

19181922
/* Number of queues per enabled TC */

0 commit comments

Comments
 (0)