Commit ddfda80f authored by Mitch Williams's avatar Mitch Williams Committed by Jeff Kirsher

i40e: not all VSIs have rings

Once more, with feeling: not all VSIs have rings. To assume so is to
invite null pointers to your party.

Change-ID: I576858824468d9712d119fa1015a1f28c27712c4
Signed-off-by: default avatarMitch Williams <mitch.a.williams@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent e78ac4bf
......@@ -657,7 +657,7 @@ static void i40e_update_link_xoff_rx(struct i40e_pf *pf)
for (v = 0; v < pf->hw.func_caps.num_vsis; v++) {
struct i40e_vsi *vsi = pf->vsi[v];
if (!vsi)
if (!vsi || !vsi->tx_rings[0])
continue;
for (i = 0; i < vsi->num_queue_pairs; i++) {
......@@ -711,7 +711,7 @@ static void i40e_update_prio_xoff_rx(struct i40e_pf *pf)
for (v = 0; v < pf->hw.func_caps.num_vsis; v++) {
struct i40e_vsi *vsi = pf->vsi[v];
if (!vsi)
if (!vsi || !vsi->tx_rings[0])
continue;
for (i = 0; i < vsi->num_queue_pairs; i++) {
......
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