* @vf: pointer to VF to which this VSI connects. This field is used primarily
* for the ICE_VSI_VF type. Other VSI types should pass NULL.
* @ch: ptr to channel
+ * @init_vsi: is this an initialization or a reconfigure of the VSI
*/
static int
-ice_vsi_cfg_def(struct ice_vsi *vsi, struct ice_vf *vf, struct ice_channel *ch)
+ice_vsi_cfg_def(struct ice_vsi *vsi, struct ice_vf *vf, struct ice_channel *ch,
+ int init_vsi)
{
struct device *dev = ice_pf_to_dev(vsi->back);
struct ice_pf *pf = vsi->back;
ice_vsi_set_tc_cfg(vsi);
/* create the VSI */
- ret = ice_vsi_init(vsi, true);
+ ret = ice_vsi_init(vsi, init_vsi);
if (ret)
goto unroll_get_qs;
* @vf: pointer to VF to which this VSI connects. This field is used primarily
* for the ICE_VSI_VF type. Other VSI types should pass NULL.
* @ch: ptr to channel
+ * @init_vsi: is this an initialization or a reconfigure of the VSI
*/
-int ice_vsi_cfg(struct ice_vsi *vsi, struct ice_vf *vf, struct ice_channel *ch)
+int ice_vsi_cfg(struct ice_vsi *vsi, struct ice_vf *vf, struct ice_channel *ch,
+ int init_vsi)
{
int ret;
- ret = ice_vsi_cfg_def(vsi, vf, ch);
+ ret = ice_vsi_cfg_def(vsi, vf, ch, init_vsi);
if (ret)
return ret;
return NULL;
}
- ret = ice_vsi_cfg(vsi, vf, ch);
+ ret = ice_vsi_cfg(vsi, vf, ch, ICE_VSI_FLAG_INIT);
if (ret)
goto err_vsi_cfg;
prev_rxq = vsi->num_rxq;
ice_vsi_decfg(vsi);
- ret = ice_vsi_cfg_def(vsi, vsi->vf, vsi->ch);
+ ret = ice_vsi_cfg_def(vsi, vsi->vf, vsi->ch, init_vsi);
if (ret)
goto err_vsi_cfg;
void ice_vsi_close(struct ice_vsi *vsi);
-int ice_vsi_cfg(struct ice_vsi *vsi, struct ice_vf *vf,
- struct ice_channel *ch);
int ice_ena_vsi(struct ice_vsi *vsi, bool locked);
void ice_vsi_decfg(struct ice_vsi *vsi);
#define ICE_VSI_FLAG_INIT BIT(0)
#define ICE_VSI_FLAG_NO_INIT 0
int ice_vsi_rebuild(struct ice_vsi *vsi, int init_vsi);
+int ice_vsi_cfg(struct ice_vsi *vsi, struct ice_vf *vf,
+ struct ice_channel *ch, int init_vsi);
bool ice_is_reset_in_progress(unsigned long *state);
int ice_wait_for_reset(struct ice_pf *pf, unsigned long timeout);