> -----Original Message-----
> From: Kitszel, Przemyslaw <[email protected]>
> Sent: Friday, May 8, 2026 2:42 PM
> To: [email protected]; Schmidt, Michal
> <[email protected]>; Jakub Kicinski <[email protected]>; Jiri Pirko
> <[email protected]>
> Cc: [email protected]; Simon Horman <[email protected]>; Nguyen,
> Anthony L <[email protected]>; Michal Swiatkowski
> <[email protected]>; Richardson, Bruce
> <[email protected]>; Medvedkin, Vladimir
> <[email protected]>; Connolly, Padraig J
> <[email protected]>; S, Ananth <[email protected]>;
> Miskell, Timothy <[email protected]>; Keller, Jacob E
> <[email protected]>; Czapnik, Lukasz
> <[email protected]>; Loktionov, Aleksandr
> <[email protected]>; Andrew Lunn <[email protected]>;
> David S. Miller <[email protected]>; Eric Dumazet
> <[email protected]>; Paolo Abeni <[email protected]>; Saeed Mahameed
> <[email protected]>; Leon Romanovsky <[email protected]>; Tariq Toukan
> <[email protected]>; Mark Bloch <[email protected]>; Kitszel,
> Przemyslaw <[email protected]>
> Subject: [PATCH iwl-next v1 03/15] ice: simplify ice_vc_dis_qs_msg() a
> little
> 
> Remove special case logic for disabling all queues in
> ice_vc_dis_qs_msg().
> There were no actual speedup from it, the only difference was in saved
> bitmap checks, but the HW operations take the majority of time anyway.
> ice_vsi_stop_all_rx_rings() used (in the removed code) loops over
> rings anyway.
> 
> With a message added just before removed code, in the "remove VF"
> scenario there were no noticeable difference with the "speedup" and
> without, and it takes ~0.06s on my machine from this point to the
> whole iavf removed, so really no big deal anyway.
> 
> Next commit would otherwise need to complicate the "speedup possible"
> check, so it's another reason to simplify here.
> 
> Signed-off-by: Przemek Kitszel <[email protected]>
> ---
>  drivers/net/ethernet/intel/ice/virt/queues.c | 15 +++------------
>  1 file changed, 3 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ice/virt/queues.c
> b/drivers/net/ethernet/intel/ice/virt/queues.c
> index 31be2f76181c..6e4ec681fd07 100644
> --- a/drivers/net/ethernet/intel/ice/virt/queues.c
> +++ b/drivers/net/ethernet/intel/ice/virt/queues.c
> @@ -357,6 +357,8 @@ int ice_vf_vsi_dis_single_txq(struct ice_vf *vf,
> struct ice_vsi *vsi, u16 q_id)
>   * @msg: pointer to the msg buffer
>   *
>   * called from the VF to disable all or specific queue(s)
> + *
> + * Return: exit code of sending the virtchnl response.
>   */
>  int ice_vc_dis_qs_msg(struct ice_vf *vf, u8 *msg)  { @@ -406,18
> +408,7 @@ int ice_vc_dis_qs_msg(struct ice_vf *vf, u8 *msg)
>       }
> 
>       q_map = vqs->rx_queues;
> -     /* speed up Rx queue disable by batching them if possible */
> -     if (q_map &&
> -         bitmap_equal(&q_map, vf->rxq_ena, ICE_MAX_RSS_QS_PER_VF)) {
> -             if (ice_vsi_stop_all_rx_rings(vsi)) {
> -                     dev_err(ice_pf_to_dev(vsi->back), "Failed to stop
> all Rx rings on VSI %d\n",
> -                             vsi->vsi_num);
> -                     v_ret = VIRTCHNL_STATUS_ERR_PARAM;
> -                     goto error_param;
> -             }
> -
> -             bitmap_zero(vf->rxq_ena, ICE_MAX_RSS_QS_PER_VF);
> -     } else if (q_map) {
> +     if (q_map) {
>               for_each_set_bit(vf_q_id, &q_map, ICE_MAX_RSS_QS_PER_VF)
> {
>                       if (!ice_vc_isvalid_q_id(vsi, vf_q_id)) {
>                               v_ret = VIRTCHNL_STATUS_ERR_PARAM;
> --
> 2.39.3

Reviewed-by: Aleksandr Loktionov <[email protected]>

Reply via email to