Skip to content

Commit aff6e32

Browse files
Michal Swiatkowskianguy11
authored andcommitted
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: Wojciech Drewek <[email protected]> Signed-off-by: Michal Swiatkowski <[email protected]> Reviewed-by: Simon Horman <[email protected]> Tested-by: Sujai Buvaneswaran <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent a59618b commit aff6e32

File tree

3 files changed

+0
-24
lines changed

3 files changed

+0
-24
lines changed

drivers/net/ethernet/intel/ice/ice_eswitch.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -536,22 +536,6 @@ void ice_eswitch_detach(struct ice_pf *pf, struct ice_vf *vf)
536536
devl_unlock(devlink);
537537
}
538538

539-
/**
540-
* ice_eswitch_rebuild - rebuild eswitch
541-
* @pf: pointer to PF structure
542-
*/
543-
void ice_eswitch_rebuild(struct ice_pf *pf)
544-
{
545-
struct ice_repr *repr;
546-
unsigned long id;
547-
548-
if (!ice_is_switchdev_running(pf))
549-
return;
550-
551-
xa_for_each(&pf->eswitch.reprs, id, repr)
552-
ice_eswitch_detach(pf, repr->vf);
553-
}
554-
555539
/**
556540
* ice_eswitch_get_target - get netdev based on src_vsi from descriptor
557541
* @rx_ring: ring used to receive the packet

drivers/net/ethernet/intel/ice/ice_eswitch.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
void ice_eswitch_detach(struct ice_pf *pf, struct ice_vf *vf);
1111
int
1212
ice_eswitch_attach(struct ice_pf *pf, struct ice_vf *vf);
13-
void ice_eswitch_rebuild(struct ice_pf *pf);
1413

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

57-
static inline int ice_eswitch_rebuild(struct ice_pf *pf)
58-
{
59-
return -EOPNOTSUPP;
60-
}
61-
6256
static inline int ice_eswitch_mode_get(struct devlink *devlink, u16 *mode)
6357
{
6458
return DEVLINK_ESWITCH_MODE_LEGACY;

drivers/net/ethernet/intel/ice/ice_main.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7702,8 +7702,6 @@ static void ice_rebuild(struct ice_pf *pf, enum ice_reset_req reset_type)
77027702
goto err_vsi_rebuild;
77037703
}
77047704

7705-
ice_eswitch_rebuild(pf);
7706-
77077705
if (reset_type == ICE_RESET_PFR) {
77087706
err = ice_rebuild_channels(pf);
77097707
if (err) {

0 commit comments

Comments
 (0)