netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeed@kernel.org>
To: "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, Dmytro Linkin <dlinkin@nvidia.com>,
	Mark Bloch <mbloch@nvidia.com>, Parav Pandit <parav@nvidia.com>,
	Roi Dayan <roid@nvidia.com>, Saeed Mahameed <saeedm@nvidia.com>
Subject: [net 01/10] net/mlx5: E-switch, Respect BW share of the new group
Date: Fri, 19 Nov 2021 11:58:04 -0800	[thread overview]
Message-ID: <20211119195813.739586-2-saeed@kernel.org> (raw)
In-Reply-To: <20211119195813.739586-1-saeed@kernel.org>

From: Dmytro Linkin <dlinkin@nvidia.com>

To enable transmit schduler on vport FW require non-zero configuration
for vport's TSAR. If vport added to the group which has configured BW
share value and TX rate values of the vport are zero, then scheduler
wouldn't be enabled on this vport.
Fix that by calling BW normalization if BW share of the new group is
configured.

Fixes: 0fe132eac38c ("net/mlx5: E-switch, Allow to add vports to rate groups")
Signed-off-by: Dmytro Linkin <dlinkin@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Reviewed-by: Parav Pandit <parav@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c b/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c
index c6cc67cb4f6a..4501e3d737f8 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c
@@ -423,7 +423,7 @@ static int esw_qos_vport_update_group(struct mlx5_eswitch *esw,
 		return err;
 
 	/* Recalculate bw share weights of old and new groups */
-	if (vport->qos.bw_share) {
+	if (vport->qos.bw_share || new_group->bw_share) {
 		esw_qos_normalize_vports_min_rate(esw, curr_group, extack);
 		esw_qos_normalize_vports_min_rate(esw, new_group, extack);
 	}
-- 
2.31.1


  reply	other threads:[~2021-11-19 19:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-19 19:58 [pull request][net 00/10] mlx5 fixes 2021-11-19 Saeed Mahameed
2021-11-19 19:58 ` Saeed Mahameed [this message]
2021-11-19 19:58 ` [net 02/10] net/mlx5e: IPsec: Fix Software parser inner l3 type setting in case of encapsulation Saeed Mahameed
2021-11-19 19:58 ` [net 03/10] net/mlx5: Fix too early queueing of log timestamp work Saeed Mahameed
2021-11-19 19:58 ` [net 04/10] net/mlx5: Fix access to a non-supported register Saeed Mahameed
2021-11-19 19:58 ` [net 05/10] net/mlx5e: SHAMPO, Fix constant expression result Saeed Mahameed
2021-11-19 19:58 ` [net 06/10] net/mlx5: E-Switch, fix single FDB creation on BlueField Saeed Mahameed
2021-11-19 19:58 ` [net 07/10] net/mlx5e: Fix missing IPsec statistics on uplink representor Saeed Mahameed
2021-11-19 19:58 ` [net 08/10] net/mlx5e: Add activate/deactivate stage to XDPSQ Saeed Mahameed
2021-11-20  4:00   ` Jakub Kicinski
2021-11-19 19:58 ` [net 09/10] net/mlx5e: Call synchronize_net outside of deactivating a queue Saeed Mahameed
2021-11-19 19:58 ` [net 10/10] net/mlx5e: Do synchronize_net only once when deactivating channels Saeed Mahameed
2021-11-20  4:03   ` Jakub Kicinski

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=20211119195813.739586-2-saeed@kernel.org \
    --to=saeed@kernel.org \
    --cc=davem@davemloft.net \
    --cc=dlinkin@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=mbloch@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=parav@nvidia.com \
    --cc=roid@nvidia.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).