[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250924162148.GN836419@horms.kernel.org>
Date: Wed, 24 Sep 2025 17:21:48 +0100
From: Simon Horman <horms@...nel.org>
To: Tariq Toukan <tariqt@...dia.com>
Cc: Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Saeed Mahameed <saeedm@...dia.com>,
Leon Romanovsky <leon@...nel.org>, Mark Bloch <mbloch@...dia.com>,
netdev@...r.kernel.org, linux-rdma@...r.kernel.org,
linux-kernel@...r.kernel.org, Gal Pressman <gal@...dia.com>,
Moshe Shemesh <moshe@...dia.com>
Subject: Re: [PATCH net-next 7/7] net/mlx5e: Use extack in set rxfh callback
On Mon, Sep 22, 2025 at 12:01:11PM +0300, Tariq Toukan wrote:
> From: Gal Pressman <gal@...dia.com>
>
> The ->set_rxfh() callback now passes a valid extack instead of NULL
> through netlink [1]. In case of an error, reflect it through extack instead
> of a dmesg print.
>
> [1]
> commit c0ae03588bbb ("ethtool: rss: initial RSS_SET (indirection table handling)")
>
> Signed-off-by: Gal Pressman <gal@...dia.com>
> Reviewed-by: Dragos Tatulea <dtatulea@...dia.com>
> Signed-off-by: Tariq Toukan <tariqt@...dia.com>
> ---
> .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 15 +++++++++------
> 1 file changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> index d507366d773e..eb25b19b4a4a 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> @@ -1494,7 +1494,8 @@ static int mlx5e_get_rxfh(struct net_device *netdev, struct ethtool_rxfh_param *
> }
>
> static int mlx5e_rxfh_hfunc_check(struct mlx5e_priv *priv,
> - const struct ethtool_rxfh_param *rxfh)
> + const struct ethtool_rxfh_param *rxfh,
> + struct netlink_ext_ack *extack)
> {
> unsigned int count;
>
> @@ -1504,8 +1505,10 @@ static int mlx5e_rxfh_hfunc_check(struct mlx5e_priv *priv,
> unsigned int xor8_max_channels = mlx5e_rqt_max_num_channels_allowed_for_xor8();
>
> if (count > xor8_max_channels) {
> - netdev_err(priv->netdev, "%s: Cannot set RSS hash function to XOR, current number of channels (%d) exceeds the maximum allowed for XOR8 RSS hfunc (%d)\n",
> - __func__, count, xor8_max_channels);
> + NL_SET_ERR_MSG_FMT_MOD(
> + extack,
> + "Cannot set RSS hash function to XOR, current number of channels (%d) exceeds the maximum allowed for XOR8 RSS hfunc (%d)\n",
> + count, xor8_max_channels);
> return -EINVAL;
> }
> }
Hi Tariq and Gal,
Coccinelle says: "WARNING avoid newline at end of message in NL_SET_ERR_MSG_FMT_MOD"
...
Powered by blists - more mailing lists