From: Ido Schimmel <idosch@idosch.org>
To: Yael Chemla <ychemla@nvidia.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
Tariq Toukan <tariqt@nvidia.com>,
"David S. Miller" <davem@davemloft.net>,
Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
Saeed Mahameed <saeedm@nvidia.com>,
Leon Romanovsky <leon@kernel.org>,
netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
linux-kernel@vger.kernel.org, Moshe Shemesh <moshe@nvidia.com>,
Mark Bloch <mbloch@nvidia.com>, Gal Pressman <gal@nvidia.com>
Subject: Re: [PATCH net-next 2/2] net/mlx5e: Log error messages when extack is not present
Date: Wed, 4 Jun 2025 13:23:41 +0300 [thread overview]
Message-ID: <aEAerYw-5p8S4bHq@shredder> (raw)
In-Reply-To: <2c0f4a69-dd90-4822-9981-faa90f7a58a6@nvidia.com>
On Wed, Jun 04, 2025 at 12:01:05AM +0300, Yael Chemla wrote:
> Ethtool APIs: While Netlink support was introduced around versions
> 5.6–5.8, many LTS distributions (e.g., Ubuntu 20.04, CentOS 7) still
> ship with older userspace ethtool utilities that rely on ioctl for
> certain operations. In these ioctl-based paths, the extack pointer
> passed down to the driver may legitimately be NULL.
[...]
> If a narrower scope is preferred, I can revise the patch to include only
> the ethtool-related changes, which were the primary motivation behind
> this work.
FWIW, there is a netlink extack tracepoint that is always triggered from
NL_SET_ERR_MSG(). Example:
ethtool$ ./configure --disable-netlink &> /dev/null
ethtool$ make -j14 &> /dev/null
# echo "10 1" > /sys/bus/netdevsim/new_device
# echo 1 > /sys/kernel/tracing/events/netlink/netlink_extack/enable
# cat /sys/kernel/tracing/trace_pipe &
[1] 390
# ./ethtool --set-ring eni10np1 rx 1
ethtool-413 [008] ..... 80.588053: netlink_extack: msg=netdevsim: testing123
Used this dummy patch:
diff --git a/drivers/net/netdevsim/ethtool.c b/drivers/net/netdevsim/ethtool.c
index 4d191a3293c7..38022e8e1f37 100644
--- a/drivers/net/netdevsim/ethtool.c
+++ b/drivers/net/netdevsim/ethtool.c
@@ -85,6 +85,7 @@ static int nsim_set_ringparam(struct net_device *dev,
{
struct netdevsim *ns = netdev_priv(dev);
+ NL_SET_ERR_MSG_MOD(extack, "testing123");
ns->ethtool.ring.rx_pending = ring->rx_pending;
ns->ethtool.ring.rx_jumbo_pending = ring->rx_jumbo_pending;
ns->ethtool.ring.rx_mini_pending = ring->rx_mini_pending;
prev parent reply other threads:[~2025-06-04 10:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-25 11:47 [PATCH net-next 0/2] net/mlx5: misc changes 2025-05-25 Tariq Toukan
2025-05-25 11:47 ` [PATCH net-next 1/2] net/mlx5: Warn when write combining is not supported Tariq Toukan
2025-05-25 11:47 ` [PATCH net-next 2/2] net/mlx5e: Log error messages when extack is not present Tariq Toukan
2025-05-28 0:49 ` Jakub Kicinski
2025-06-03 21:01 ` Yael Chemla
2025-06-04 2:50 ` Jakub Kicinski
2025-06-04 10:23 ` Ido Schimmel [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=aEAerYw-5p8S4bHq@shredder \
--to=idosch@idosch.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 \
--cc=ychemla@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