netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tariq Toukan <tariqt@nvidia.com>
To: Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>
Cc: Saeed Mahameed <saeedm@nvidia.com>,
	Leon Romanovsky <leon@kernel.org>,
	Tariq Toukan <tariqt@nvidia.com>, Mark Bloch <mbloch@nvidia.com>,
	<netdev@vger.kernel.org>, <linux-rdma@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, Gal Pressman <gal@nvidia.com>,
	"Carolina Jubran" <cjubran@nvidia.com>,
	Simon Horman <horms@kernel.org>
Subject: [PATCH net-next V2 7/7] net/mlx5e: Defer channels closure to reduce interface down time
Date: Thu, 30 Oct 2025 15:32:39 +0200	[thread overview]
Message-ID: <1761831159-1013140-8-git-send-email-tariqt@nvidia.com> (raw)
In-Reply-To: <1761831159-1013140-1-git-send-email-tariqt@nvidia.com>

Cap bit tis_tir_td_order=1 indicates that an old firmware requirement /
limitation no longer exists. When unset, the latency of several firmware
commands significantly increases with the presence of high number of
co-existing channels (both old and new sets). Hence, we used to close
unneeded old channels before invoking those firmware commands.

Today, on capable devices, this is no longer the case. Minimize the
interface down time by deferring the old channels closure, after the
activation of the new ones.

Perf numbers:
Measured the number of dropped packets in a simple ping flood test,
during a configuration change operation, that switches the number of
channels from 247 to 248.

Before: 71 packets lost
After:  15 packets lost, ~80% saving.

Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Carolina Jubran <cjubran@nvidia.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index 4edf64e1572a..9650fa6c6a63 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -3384,7 +3384,8 @@ static int mlx5e_switch_priv_channels(struct mlx5e_priv *priv,
 		}
 	}
 
-	mlx5e_close_channels(old_chs);
+	if (!MLX5_CAP_GEN(priv->mdev, tis_tir_td_order))
+		mlx5e_close_channels(old_chs);
 	priv->profile->update_rx(priv);
 
 	mlx5e_selq_apply(&priv->selq);
@@ -3432,6 +3433,9 @@ int mlx5e_safe_switch_params(struct mlx5e_priv *priv,
 	if (err)
 		goto err_close;
 
+	if (MLX5_CAP_GEN(priv->mdev, tis_tir_td_order))
+		mlx5e_close_channels(old_chs);
+
 	kfree(new_chs);
 	kfree(old_chs);
 	return 0;
-- 
2.31.1


  parent reply	other threads:[~2025-10-30 13:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-30 13:32 [PATCH net-next V2 0/7] net/mlx5e: Reduce interface downtime on configuration change Tariq Toukan
2025-10-30 13:32 ` [PATCH net-next V2 1/7] net/mlx5e: Enhance function structures for self loopback prevention application Tariq Toukan
2025-11-03 13:57   ` Simon Horman
2025-10-30 13:32 ` [PATCH net-next V2 2/7] net/mlx5e: Use TIR API in mlx5e_modify_tirs_lb() Tariq Toukan
2025-11-03 13:57   ` Simon Horman
2025-10-30 13:32 ` [PATCH net-next V2 3/7] net/mlx5e: Allow setting self loopback prevention bits on TIR init Tariq Toukan
2025-11-03 13:57   ` Simon Horman
2025-10-30 13:32 ` [PATCH net-next V2 4/7] net/mlx5: IPoIB, set self loopback prevention in " Tariq Toukan
2025-11-03 13:58   ` Simon Horman
2025-10-30 13:32 ` [PATCH net-next V2 5/7] net/mlx5e: Do not re-apply TIR loopback configuration if not necessary Tariq Toukan
2025-11-03 13:58   ` Simon Horman
2025-10-30 13:32 ` [PATCH net-next V2 6/7] net/mlx5e: Pass old channels as argument to mlx5e_switch_priv_channels Tariq Toukan
2025-11-03 13:59   ` Simon Horman
2025-10-30 13:32 ` Tariq Toukan [this message]
2025-11-03 13:59   ` [PATCH net-next V2 7/7] net/mlx5e: Defer channels closure to reduce interface down time Simon Horman
2025-11-05  1:20 ` [PATCH net-next V2 0/7] net/mlx5e: Reduce interface downtime on configuration change 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=1761831159-1013140-8-git-send-email-tariqt@nvidia.com \
    --to=tariqt@nvidia.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=cjubran@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gal@nvidia.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mbloch@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=saeedm@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;
as well as URLs for NNTP newsgroup(s).