Netdev List
 help / color / mirror / Atom feed
From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
	edumazet@kernel.org, andrew+netdev@lunn.ch,
	netdev@vger.kernel.org
Cc: Przemek Kitszel <przemyslaw.kitszel@intel.com>,
	anthony.l.nguyen@intel.com, grzegorz.nitka@intel.com,
	aleksandr.loktionov@intel.com, marcin.szycik@intel.com,
	jacob.e.keller@intel.com, przemyslaw.korba@intel.com,
	xiongwm2026@163.com, ynorov@nvidia.com, horms@kernel.org
Subject: [PATCH net-next 10/10] ice: simplify ice_vc_dis_qs_msg() a little
Date: Tue, 29 Sep 2026 15:41:50 -0700	[thread overview]
Message-ID: <20260929224153.1455466-11-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20260929224153.1455466-1-anthony.l.nguyen@intel.com>

From: Przemek Kitszel <przemyslaw.kitszel@intel.com>

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.

Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/ice/virt/queues.c | 17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)

diff --git a/drivers/net/ethernet/intel/ice/virt/queues.c b/drivers/net/ethernet/intel/ice/virt/queues.c
index 431c9c546b04..ac7f98479b13 100644
--- a/drivers/net/ethernet/intel/ice/virt/queues.c
+++ b/drivers/net/ethernet/intel/ice/virt/queues.c
@@ -375,6 +375,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)
 {
@@ -424,20 +426,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;
-		}
-
-		for_each_set_bit(vf_q_id, &q_map, ICE_MAX_RSS_QS_PER_VF)
-			ice_vf_dis_rxq_interrupt(vsi, vf_q_id);
-		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.47.1


  parent reply	other threads:[~2026-09-29 22:42 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-29 22:41 [PATCH net-next 00/10][pull request] Intel Wired LAN Driver Updates 2026-09-29 (ice) Tony Nguyen
2026-09-29 22:41 ` [PATCH net-next 01/10] ice: reduce loglevel to debug for 'Can't delete DSCP' message Tony Nguyen
2026-10-02 20:03   ` netdev-bot+sashiko
2026-09-29 22:41 ` [PATCH net-next 02/10] ice: use ice_fill_eth_hdr() in ice_fill_sw_rule() Tony Nguyen
2026-09-29 22:41 ` [PATCH net-next 03/10] ice: reorder ice_flash_info fields to eliminate padding Tony Nguyen
2026-09-29 22:41 ` [PATCH net-next 04/10] ice: increase OICR interrupt moderation rate to 20K interrupts/sec Tony Nguyen
2026-10-02 20:03   ` netdev-bot+sashiko
2026-09-29 22:41 ` [PATCH net-next 05/10] ice: use inline helpers instead of memcmp() for IPv6 mask checks in ice_ethtool_fdir Tony Nguyen
2026-10-02 20:03   ` netdev-bot+sashiko
2026-09-29 22:41 ` [PATCH net-next 06/10] ice: add rx timestamp tracepoint for debugging Tony Nguyen
2026-09-29 22:41 ` [PATCH net-next 07/10] ice: parser: use kcalloc for table allocation Tony Nguyen
2026-10-02 20:03   ` netdev-bot+sashiko
2026-09-29 22:41 ` [PATCH net-next 08/10] ice: simplify ice_pf_state_is_nominal() Tony Nguyen
2026-10-02 20:03   ` netdev-bot+sashiko
2026-09-29 22:41 ` [PATCH net-next 09/10] ice: drop pf == NULL check in ice_pf_state_is_nominal() Tony Nguyen
2026-09-29 22:41 ` Tony Nguyen [this message]
2026-10-02 20:03   ` [PATCH net-next 10/10] ice: simplify ice_vc_dis_qs_msg() a little netdev-bot+sashiko
2026-10-06  1:00 ` [PATCH net-next 00/10][pull request] Intel Wired LAN Driver Updates 2026-09-29 (ice) patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260929224153.1455466-11-anthony.l.nguyen@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=aleksandr.loktionov@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=grzegorz.nitka@intel.com \
    --cc=horms@kernel.org \
    --cc=jacob.e.keller@intel.com \
    --cc=kuba@kernel.org \
    --cc=marcin.szycik@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=przemyslaw.korba@intel.com \
    --cc=xiongwm2026@163.com \
    --cc=ynorov@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox