]> www.infradead.org Git - nvme.git/commitdiff
ice: remove eswitch rebuild
authorMichal Swiatkowski <michal.swiatkowski@linux.intel.com>
Mon, 24 Jun 2024 08:05:10 +0000 (10:05 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 11 Jul 2024 17:58:00 +0000 (10:58 -0700)
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 <wojciech.drewek@intel.com>
Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Sujai Buvaneswaran <sujai.buvaneswaran@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_eswitch.c
drivers/net/ethernet/intel/ice/ice_eswitch.h
drivers/net/ethernet/intel/ice/ice_main.c

index 4f539b1c77810e8dfb7ce6328ba67a326f4e4c6c..3cfa071e371858cba9b2e44d39927b9e2c708c58 100644 (file)
@@ -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
index 09194d514f9b1de3d3493ab90c22f8012c3ebcaa..78fd39a6935d35f175d96822e94b0be4e1cfceed 100644 (file)
@@ -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;
index bd3a60dd779f43855f8c29914e751d4ce27c76a3..ec636be4d17d1e9b896380ba0223e4b12298b789 100644 (file)
@@ -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) {