Commit 5fcbb711 authored by Michal Maloszewski's avatar Michal Maloszewski Committed by Jakub Kicinski

i40e: Fix interface init with MSI interrupts (no MSI-X)

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: bc6d33c8 ("i40e: Fix the number of queues available to be mapped for use")
Signed-off-by: default avatarDawid Lukwinski <dawid.lukwinski@intel.com>
Signed-off-by: default avatarMichal Maloszewski <michal.maloszewski@intel.com>
Tested-by: default avatarDave Switzer <david.switzer@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
Link: https://lore.kernel.org/r/20220722175401.112572-1-anthony.l.nguyen@intel.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 9af0620d
...@@ -1925,11 +1925,15 @@ static void i40e_vsi_setup_queue_map(struct i40e_vsi *vsi, ...@@ -1925,11 +1925,15 @@ static void i40e_vsi_setup_queue_map(struct i40e_vsi *vsi,
* non-zero req_queue_pairs says that user requested a new * non-zero req_queue_pairs says that user requested a new
* queue count via ethtool's set_channels, so use this * queue count via ethtool's set_channels, so use this
* value for queues distribution across traffic classes * value for queues distribution across traffic classes
* We need at least one queue pair for the interface
* to be usable as we see in else statement.
*/ */
if (vsi->req_queue_pairs > 0) if (vsi->req_queue_pairs > 0)
vsi->num_queue_pairs = vsi->req_queue_pairs; vsi->num_queue_pairs = vsi->req_queue_pairs;
else if (pf->flags & I40E_FLAG_MSIX_ENABLED) else if (pf->flags & I40E_FLAG_MSIX_ENABLED)
vsi->num_queue_pairs = pf->num_lan_msix; vsi->num_queue_pairs = pf->num_lan_msix;
else
vsi->num_queue_pairs = 1;
} }
/* Number of queues per enabled TC */ /* Number of queues per enabled TC */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment