Commit aff6e32c authored by Michal Swiatkowski's avatar Michal Swiatkowski Committed by Tony Nguyen
Browse files

ice: remove eswitch rebuild



Since the port representors are added one by one there is no need to do
eswitch rebuild. Each port representor is detached and attached in VF
reset path.

Reviewed-by: default avatarWojciech Drewek <wojciech.drewek@intel.com>
Signed-off-by: default avatarMichal Swiatkowski <michal.swiatkowski@linux.intel.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Tested-by: default avatarSujai Buvaneswaran <sujai.buvaneswaran@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent a59618b9
Loading
Loading
Loading
Loading
+0 −16
Original line number Diff line number Diff line
@@ -536,22 +536,6 @@ void ice_eswitch_detach(struct ice_pf *pf, struct ice_vf *vf)
	devl_unlock(devlink);
}

/**
 * ice_eswitch_rebuild - rebuild eswitch
 * @pf: pointer to PF structure
 */
void ice_eswitch_rebuild(struct ice_pf *pf)
{
	struct ice_repr *repr;
	unsigned long id;

	if (!ice_is_switchdev_running(pf))
		return;

	xa_for_each(&pf->eswitch.reprs, id, repr)
		ice_eswitch_detach(pf, repr->vf);
}

/**
 * ice_eswitch_get_target - get netdev based on src_vsi from descriptor
 * @rx_ring: ring used to receive the packet
+0 −6
Original line number Diff line number Diff line
@@ -10,7 +10,6 @@
void ice_eswitch_detach(struct ice_pf *pf, struct ice_vf *vf);
int
ice_eswitch_attach(struct ice_pf *pf, struct ice_vf *vf);
void ice_eswitch_rebuild(struct ice_pf *pf);

int ice_eswitch_mode_get(struct devlink *devlink, u16 *mode);
int
@@ -54,11 +53,6 @@ static inline int ice_eswitch_configure(struct ice_pf *pf)
	return 0;
}

static inline int ice_eswitch_rebuild(struct ice_pf *pf)
{
	return -EOPNOTSUPP;
}

static inline int ice_eswitch_mode_get(struct devlink *devlink, u16 *mode)
{
	return DEVLINK_ESWITCH_MODE_LEGACY;
+0 −2
Original line number Diff line number Diff line
@@ -7702,8 +7702,6 @@ static void ice_rebuild(struct ice_pf *pf, enum ice_reset_req reset_type)
		goto err_vsi_rebuild;
	}

	ice_eswitch_rebuild(pf);

	if (reset_type == ICE_RESET_PFR) {
		err = ice_rebuild_channels(pf);
		if (err) {