Skip to content

Commit a4fa59c

Browse files
mawilli1Jeff Kirsher
authored andcommitted
i40e: don't configure zero-size RSS table
In some rare cases, we might get a VSI with no queues. In this case, we cannot configure RSS on this VSI as it will try to divide by zero when configuring the lookup table. Change-ID: I6ae173a7dd3481a081e079eb10eb80275de2adb0 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
1 parent 1eb846a commit a4fa59c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8282,6 +8282,8 @@ static int i40e_pf_config_rss(struct i40e_pf *pf)
82828282
if (!vsi->rss_size)
82838283
vsi->rss_size = min_t(int, pf->alloc_rss_size,
82848284
vsi->num_queue_pairs);
8285+
if (!vsi->rss_size)
8286+
return -EINVAL;
82858287

82868288
lut = kzalloc(vsi->rss_table_size, GFP_KERNEL);
82878289
if (!lut)

0 commit comments

Comments
 (0)