Re: [PATCH net-next v2 01/12] net: ethtool: serialize broadcast notification sequence allocation
From: Eric Dumazet <edumazet@google.com>
Date: 2026-06-09 15:32:44
From: Eric Dumazet <edumazet@google.com>
Date: 2026-06-09 15:32:44
On Thu, Jun 4, 2026 at 5:29 PM Jakub Kicinski [off-list ref] wrote:
ethnl_bcast_seq is a global counter stamped into the nlmsg_seq field of every multicast notification, allowing userspace to detect dropped messages. Today the ordering is achieved by using rtnl_lock(). Moving forward we will want ethtool ops to run under just the netdev instance lock so to establish ordering we need a separate lock for notifications. With the netdev instance locks operations on different devices may bypass each other but the expectation is that it should not matter. What we need to prevent is: - notification IDs getting out of order - operations on one device getting out of order For simplicity defer allocating the ID of the notification right before the notification is delivered. This removes the need for special handling in ethnl_rss_create_send_ntf(). Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>