From: Jakub Kicinski <kuba@kernel.org>
To: Maxime Chevallier <maxime.chevallier@bootlin.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
pabeni@redhat.com, andrew+netdev@lunn.ch, horms@kernel.org,
donald.hunter@gmail.com, sdf@fomichev.me, jdamato@fastly.com,
ecree.xilinx@gmail.com
Subject: Re: [PATCH net-next 5/9] net: ethtool: copy req_info from SET to NTF
Date: Mon, 23 Jun 2025 07:37:21 -0700 [thread overview]
Message-ID: <20250623073721.1315dd03@kernel.org> (raw)
In-Reply-To: <20250622140020.3dcc6814@fedora.home>
On Sun, 22 Jun 2025 14:00:20 +0200 Maxime Chevallier wrote:
> > @@ -979,6 +979,9 @@ static void ethnl_default_notify(struct net_device *dev, unsigned int cmd,
> >
> > req_info->dev = dev;
> > req_info->flags |= ETHTOOL_FLAG_COMPACT_BITSETS;
> > + if (orig_req_info)
> > + memcpy(&req_info[1], &orig_req_info[1],
> > + ops->req_info_size - sizeof(*req_info));
>
> Is there any chance we can also carry orig_req_info->phy_index into
> req_info ? That's a bit of sub-command context that is also useful for
> notifications, especially PLCA. As of today, the PLCA notif after a SET
> isn't generated at all as the phy_index isn't passed to the ethnl
> notification code.
Definitely a good idea, only question is whether it should be a
separate series. But the change is easy, I guess just:
diff --git a/net/ethtool/netlink.c b/net/ethtool/netlink.c
index 1a8589693d91..91974d8e74d8 100644
--- a/net/ethtool/netlink.c
+++ b/net/ethtool/netlink.c
@@ -981,9 +981,11 @@ static void ethnl_default_notify(struct net_device *dev, unsigned int cmd,
req_info->dev = dev;
req_info->flags |= ETHTOOL_FLAG_COMPACT_BITSETS;
- if (orig_req_info)
+ if (orig_req_info) {
+ req_info->phy_index = orig_req_info->phy_index;
memcpy(&req_info[1], &orig_req_info[1],
ops->req_info_size - sizeof(*req_info));
+ }
netdev_ops_assert_locked(dev);
If you'd like me to squash it in -- would you be able to test this?
next prev parent reply other threads:[~2025-06-23 14:37 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-21 17:19 [PATCH net-next 0/9] net: ethtool: rss: add notifications Jakub Kicinski
2025-06-21 17:19 ` [PATCH net-next 1/9] netlink: specs: add the multicast group name to spec Jakub Kicinski
2025-06-23 11:58 ` Donald Hunter
2025-06-21 17:19 ` [PATCH net-next 2/9] net: ethtool: dynamically allocate full req size req Jakub Kicinski
2025-06-23 12:01 ` Donald Hunter
2025-06-21 17:19 ` [PATCH net-next 3/9] net: ethtool: call .parse_request for SET handlers Jakub Kicinski
2025-06-21 17:19 ` [PATCH net-next 4/9] net: ethtool: remove the data argument from ethtool_notify() Jakub Kicinski
2025-06-21 17:19 ` [PATCH net-next 5/9] net: ethtool: copy req_info from SET to NTF Jakub Kicinski
2025-06-22 12:00 ` Maxime Chevallier
2025-06-23 14:37 ` Jakub Kicinski [this message]
2025-06-23 14:44 ` Maxime Chevallier
2025-06-21 17:19 ` [PATCH net-next 6/9] net: ethtool: rss: add notifications Jakub Kicinski
2025-06-21 21:06 ` kernel test robot
2025-06-21 17:19 ` [PATCH net-next 7/9] doc: ethtool: mark ETHTOOL_GRXFHINDIR as reimplemented Jakub Kicinski
2025-06-21 17:19 ` [PATCH net-next 8/9] selftests: drv-net: import things in lib one by one Jakub Kicinski
2025-06-21 17:19 ` [PATCH net-next 9/9] selftests: drv-net: test RSS Netlink notifications Jakub Kicinski
2025-06-23 17:24 ` [PATCH net-next 0/9] net: ethtool: rss: add notifications Jakub Kicinski
2025-06-23 20:10 ` patchwork-bot+netdevbpf
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=20250623073721.1315dd03@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=ecree.xilinx@gmail.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jdamato@fastly.com \
--cc=maxime.chevallier@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@fomichev.me \
/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).