diff options
| author | Brett Creeley <[email protected]> | 2021-03-31 21:17:04 +0000 |
|---|---|---|
| committer | Tony Nguyen <[email protected]> | 2021-04-15 00:12:05 +0000 |
| commit | c931c782d8465c0408e14bf031e951134c30b059 (patch) | |
| tree | bef438f7d7458f23d780b826babfc5aa64d78f65 /drivers/net/ethernet/intel/ice/ice_lib.c | |
| parent | ice: remove unused struct member (diff) | |
| download | kernel-c931c782d8465c0408e14bf031e951134c30b059.tar.gz kernel-c931c782d8465c0408e14bf031e951134c30b059.zip | |
ice: Set vsi->vf_id as ICE_INVAL_VFID for non VF VSI types
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 <[email protected]>
Tested-by: Tony Brelinski <[email protected]>
Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_lib.c')
| -rw-r--r-- | drivers/net/ethernet/intel/ice/ice_lib.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c index 0443338f9eaf..eb6e352d3387 100644 --- a/drivers/net/ethernet/intel/ice/ice_lib.c +++ b/drivers/net/ethernet/intel/ice/ice_lib.c @@ -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: |
