The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Tariq Toukan <tariqt@nvidia.com>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>, <netdev@vger.kernel.org>,
	Paolo Abeni <pabeni@redhat.com>, Alexei Lazar <alazar@nvidia.com>,
	Carolina Jubran <cjubran@nvidia.com>,
	Leon Romanovsky <leon@kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-rdma@vger.kernel.org>, Mark Bloch <mbloch@nvidia.com>,
	Saeed Mahameed <saeedm@nvidia.com>, Gal Pressman <gal@nvidia.com>
Subject: Re: [PATCH net 2/3] net/mlx5e: Validate bandwidth for non-ETS traffic classes
Date: Wed, 24 Jun 2026 19:10:39 -0700	[thread overview]
Message-ID: <20260624191039.4724950c@kernel.org> (raw)
In-Reply-To: <20260622112925.624795-3-tariqt@nvidia.com>

On Mon, 22 Jun 2026 14:29:24 +0300 Tariq Toukan wrote:
> From: Alexei Lazar <alazar@nvidia.com>
> 
> The IEEE 802.1Qaz standard defines that bandwidth allocation percentages
> only apply to ETS traffic classes.
> 
> Reject ETS configurations that specify non-zero bandwidth for traffic
> classes.
> 
> Fixes: 08fb1dacdd76 ("net/mlx5e: Support DCBNL IEEE ETS")
> Signed-off-by: Alexei Lazar <alazar@nvidia.com>
> Reviewed-by: Carolina Jubran <cjubran@nvidia.com>
> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c b/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
> index 762f0a46c120..e4161603cdc0 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
> @@ -324,6 +324,17 @@ static int mlx5e_dbcnl_validate_ets(struct net_device *netdev,
>  		}
>  	}
>  
> +	/* Validate Non ETS BW */
> +	for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
> +		if (ets->tc_tsa[i] != IEEE_8021QAZ_TSA_ETS &&
> +		    ets->tc_tx_bw[i]) {
> +			netdev_err(netdev,
> +				   "Failed to validate ETS: tc=%d BW is not 0 for non-ETS TC (tsa=%u, bw=%u)\n",
> +				   i, ets->tc_tsa[i], ets->tc_tx_bw[i]);
> +			return -EINVAL;
> +		}
> +	}

Can we pull this check out into the shared dcbnl handling?
There seems to be zero mlx5 specific logic in this patch,
and the motivation.

>  	/* Validate Bandwidth Sum */
>  	for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
>  		if (ets->tc_tsa[i] == IEEE_8021QAZ_TSA_ETS) {


  parent reply	other threads:[~2026-06-25  2:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-22 11:29 [PATCH net 0/3] net/mlx5e: Report zero bandwidth for non-ETS traffic Tariq Toukan
2026-06-22 11:29 ` [PATCH net 1/3] net/mlx5e: Report zero bandwidth for non-ETS traffic classes Tariq Toukan
2026-06-22 13:48   ` Pavan Chebbi
2026-06-22 11:29 ` [PATCH net 2/3] net/mlx5e: Validate " Tariq Toukan
2026-06-22 13:49   ` Pavan Chebbi
2026-06-25  2:10   ` Jakub Kicinski [this message]
2026-06-22 11:29 ` [PATCH net 3/3] net/mlx5e: Reject unsupported CB Shaper TSA in ETS validation Tariq Toukan
2026-06-22 13:50   ` Pavan Chebbi

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=20260624191039.4724950c@kernel.org \
    --to=kuba@kernel.org \
    --cc=alazar@nvidia.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=cjubran@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gal@nvidia.com \
    --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 \
    --cc=tariqt@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