ice: Calculate guaranteed VSIs per function and use it
authorAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Fri, 26 Oct 2018 17:41:03 +0000 (10:41 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 13 Nov 2018 17:09:26 +0000 (09:09 -0800)
commit995c90f2de819b020bdb0758ea4d486b0851e11a
tree63737fbea90b96273348a9508d8d3ef81c3cc36f
parent10e03a22de45699b6208592b85437d87a4741b9b
ice: Calculate guaranteed VSIs per function and use it

Currently we are setting the guar_num_vsi to equal to ICE_MAX_VSI
which is the device limit of 768. This is incorrect and could have
unintended consequences. To fix this use the valid_function's 8-bit
bitmap returned from discovering device capabilities to determine the
guar_num_vsi per function. guar_num_vsi value is then passed on to
pf->num_alloc_vsi.

Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ice/ice.h
drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
drivers/net/ethernet/intel/ice/ice_common.c
drivers/net/ethernet/intel/ice/ice_main.c
drivers/net/ethernet/intel/ice/ice_type.h