[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250623073721.1315dd03@kernel.org>
Date: Mon, 23 Jun 2025 07:37:21 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Maxime Chevallier <maxime.chevallier@...tlin.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com, andrew+netdev@...n.ch, horms@...nel.org,
donald.hunter@...il.com, sdf@...ichev.me, jdamato@...tly.com,
ecree.xilinx@...il.com
Subject: Re: [PATCH net-next 5/9] net: ethtool: copy req_info from SET to
NTF
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?
Powered by blists - more mailing lists