]> www.infradead.org Git - users/hch/misc.git/commitdiff
ice: Remove deprecated ice_lag_move_new_vf_nodes() call
authorDave Ertman <david.m.ertman@intel.com>
Wed, 27 Aug 2025 08:34:23 +0000 (10:34 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Fri, 19 Sep 2025 15:42:08 +0000 (08:42 -0700)
Moving the code to handle the LAG part of a VF reset to helper
functions deprecated the function ice_lag_move_new_vf_nodes().
The cleanup missed a call to this function in the error path of
ice_vc_cfg_qs_msg().

In the case that would end in the error path, a NULL pointer would
be encountered due to the empty list of netdevs for members of the
aggregate.

Remove the unnecessary call to ice_lag_move_new_vf_nodes(), and since
this is the only call to this function, remove the function as well.

Fixes: 351d8d8ab6af ("ice: breakout common LAG code into helpers")
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
Tested-by: Priya Singh <priyax.singh@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_lag.c
drivers/net/ethernet/intel/ice/ice_lag.h
drivers/net/ethernet/intel/ice/virt/queues.c

index 80312e1dcf7f546ce3d50905be4273b437dada48..aebf8e08a297be3a43a255107a2f4bc67f3a6dc2 100644 (file)
@@ -789,61 +789,6 @@ ice_lag_move_single_vf_nodes(struct ice_lag *lag, u8 oldport, u8 newport,
                ice_lag_move_vf_node_tc(lag, oldport, newport, vsi_num, tc);
 }
 
-/**
- * ice_lag_move_new_vf_nodes - Move Tx scheduling nodes for a VF if required
- * @vf: the VF to move Tx nodes for
- *
- * Called just after configuring new VF queues. Check whether the VF Tx
- * scheduling nodes need to be updated to fail over to the active port. If so,
- * move them now.
- */
-void ice_lag_move_new_vf_nodes(struct ice_vf *vf)
-{
-       struct ice_lag_netdev_list ndlist;
-       u8 pri_port, act_port;
-       struct ice_lag *lag;
-       struct ice_vsi *vsi;
-       struct ice_pf *pf;
-
-       vsi = ice_get_vf_vsi(vf);
-
-       if (WARN_ON(!vsi))
-               return;
-
-       if (WARN_ON(vsi->type != ICE_VSI_VF))
-               return;
-
-       pf = vf->pf;
-       lag = pf->lag;
-
-       mutex_lock(&pf->lag_mutex);
-       if (!lag->bonded)
-               goto new_vf_unlock;
-
-       pri_port = pf->hw.port_info->lport;
-       act_port = lag->active_port;
-
-       if (lag->upper_netdev)
-               ice_lag_build_netdev_list(lag, &ndlist);
-
-       if (lag->bonded && lag->primary && !list_empty(lag->netdev_head)) {
-               if (lag->bond_aa &&
-                   ice_is_feature_supported(pf, ICE_F_SRIOV_AA_LAG))
-                       ice_lag_aa_failover(lag, ICE_LAGS_IDX, NULL);
-
-               if (!lag->bond_aa &&
-                   ice_is_feature_supported(pf, ICE_F_SRIOV_LAG) &&
-                   pri_port != act_port)
-                       ice_lag_move_single_vf_nodes(lag, pri_port, act_port,
-                                                    vsi->idx);
-       }
-
-       ice_lag_destroy_netdev_list(lag, &ndlist);
-
-new_vf_unlock:
-       mutex_unlock(&pf->lag_mutex);
-}
-
 /**
  * ice_lag_move_vf_nodes - move Tx scheduling nodes for all VFs to new port
  * @lag: lag info struct
index e2a0a782bdd7901732145610d7c7604ecab5cae8..f77ebcd61042365e9cc02bb4c9129f5210b39313 100644 (file)
@@ -82,7 +82,6 @@ struct ice_lag_work {
        } info;
 };
 
-void ice_lag_move_new_vf_nodes(struct ice_vf *vf);
 void ice_lag_aa_failover(struct ice_lag *lag, u8 dest, struct ice_pf *e_pf);
 int ice_init_lag(struct ice_pf *pf);
 void ice_deinit_lag(struct ice_pf *pf);
index aa2c5bf0d2a222e91fab693d3112af4ca1fbad6b..370f6ec2a374c96b56a2854572ec031020740994 100644 (file)
@@ -906,8 +906,6 @@ error_param:
        ice_lag_complete_vf_reset(pf->lag, act_prt);
        mutex_unlock(&pf->lag_mutex);
 
-       ice_lag_move_new_vf_nodes(vf);
-
        /* send the response to the VF */
        return ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_CONFIG_VSI_QUEUES,
                                     VIRTCHNL_STATUS_ERR_PARAM, NULL, 0);