All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Tariq Toukan <tariqt@nvidia.com>
Cc: 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>,
	Saeed Mahameed <saeedm@nvidia.com>,
	Leon Romanovsky <leon@kernel.org>, Mark Bloch <mbloch@nvidia.com>,
	netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
	linux-kernel@vger.kernel.org, Gal Pressman <gal@nvidia.com>,
	Moshe Shemesh <moshe@nvidia.com>
Subject: Re: [PATCH net-next 7/7] net/mlx5e: Use extack in set rxfh callback
Date: Wed, 24 Sep 2025 17:21:48 +0100	[thread overview]
Message-ID: <20250924162148.GN836419@horms.kernel.org> (raw)
In-Reply-To: <1758531671-819655-8-git-send-email-tariqt@nvidia.com>

On Mon, Sep 22, 2025 at 12:01:11PM +0300, Tariq Toukan wrote:
> From: Gal Pressman <gal@nvidia.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@nvidia.com>
> Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com>
> Signed-off-by: Tariq Toukan <tariqt@nvidia.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"

...

      parent reply	other threads:[~2025-09-24 16:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-22  9:01 [PATCH net-next 0/7] net/mlx5: misc changes 2025-09-22 Tariq Toukan
2025-09-22  9:01 ` [PATCH net-next 1/7] net/mlx5: HWS, Generalize complex matchers Tariq Toukan
2025-09-24 16:17   ` Simon Horman
2025-09-24 18:07     ` Vlad Dogaru
2025-09-22  9:01 ` [PATCH net-next 2/7] net/mlx5e: Prevent entering switchdev mode with inconsistent netns Tariq Toukan
2025-09-22  9:01 ` [PATCH net-next 3/7] net/mlx5: Improve QoS error messages with actual depth values Tariq Toukan
2025-09-23  0:06   ` Jakub Kicinski
2025-09-23  1:58   ` kernel test robot
2025-09-22  9:01 ` [PATCH net-next 4/7] net/mlx5e: Remove unused mdev param from RSS indir init Tariq Toukan
2025-09-22  9:01 ` [PATCH net-next 5/7] net/mlx5e: Introduce mlx5e_rss_init_params Tariq Toukan
2025-09-22  9:01 ` [PATCH net-next 6/7] net/mlx5e: Introduce mlx5e_rss_params for RSS configuration Tariq Toukan
2025-09-22  9:01 ` [PATCH net-next 7/7] net/mlx5e: Use extack in set rxfh callback Tariq Toukan
2025-09-23  4:06   ` kernel test robot
2025-09-24 16:21   ` Simon Horman [this message]

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=20250924162148.GN836419@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gal@nvidia.com \
    --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=moshe@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.