Skip to content

Commit

Permalink
ice: Set vsi->vf_id as ICE_INVAL_VFID for non VF VSI types
Browse files Browse the repository at this point in the history
Currently the vsi->vf_id is set only for ICE_VSI_VF and it's left as 0
for all other VSI types. This is confusing and could be problematic
since 0 is a valid vf_id. Fix this by always setting non VF VSI types to
ICE_INVAL_VFID.

Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
  • Loading branch information
Brett Creeley authored and Tony Nguyen committed Apr 15, 2021
1 parent 1cdea9a commit c931c78
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/intel/ice/ice_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ static void ice_vsi_set_num_qs(struct ice_vsi *vsi, u16 vf_id)

if (vsi->type == ICE_VSI_VF)
vsi->vf_id = vf_id;
else
vsi->vf_id = ICE_INVAL_VFID;

switch (vsi->type) {
case ICE_VSI_PF:
Expand Down

0 comments on commit c931c78

Please sign in to comment.