[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aS08d1dOC2EOvz-U@fedora>
Date: Mon, 1 Dec 2025 06:57:59 +0000
From: Hangbin Liu <liuhangbin@...il.com>
To: Tonghao Zhang <tonghao@...aicloud.com>
Cc: netdev@...r.kernel.org, Jay Vosburgh <jv@...sburgh.net>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Simon Horman <horms@...nel.org>, Jonathan Corbet <corbet@....net>,
Andrew Lunn <andrew+netdev@...n.ch>,
Nikolay Aleksandrov <razor@...ckwall.org>,
Jason Xing <kerneljasonxing@...il.com>
Subject: Re: [PATCH net-next v3 1/4] net: bonding: use workqueue to make sure
peer notify updated in lacp mode
Hi Tonghao,
On Sun, Nov 30, 2025 at 03:48:43PM +0800, Tonghao Zhang wrote:
> ---
> v1:
> - This patch is actually version v3, https://patchwork.kernel.org/project/netdevbpf/patch/20251118090305.35558-1-tonghao@bamaicloud.com/
> - add a comment why we use the trylock.
> - add this patch to series
> ---
I think you can move the change logs to cover letter.
> /**
> * bond_change_active_slave - change the active slave into the specified one
> * @bond: our bonding struct
> @@ -1270,8 +1299,6 @@ void bond_change_active_slave(struct bonding *bond, struct slave *new_active)
> BOND_SLAVE_NOTIFY_NOW);
>
> if (new_active) {
> - bool should_notify_peers = false;
> -
> bond_set_slave_active_flags(new_active,
> BOND_SLAVE_NOTIFY_NOW);
>
> @@ -1280,19 +1307,17 @@ void bond_change_active_slave(struct bonding *bond, struct slave *new_active)
> old_active);
>
> if (netif_running(bond->dev)) {
> - bond->send_peer_notif =
> - bond->params.num_peer_notif *
> - max(1, bond->params.peer_notif_delay);
> - should_notify_peers =
> - bond_should_notify_peers(bond);
> + bond_peer_notify_reset(bond);
> +
> + if (bond_should_notify_peers(bond)) {
> + bond->send_peer_notif--;
> + call_netdevice_notifiers(
> + NETDEV_NOTIFY_PEERS,
> + bond->dev);
> + }
> }
>
> call_netdevice_notifiers(NETDEV_BONDING_FAILOVER, bond->dev);
> - if (should_notify_peers) {
> - bond->send_peer_notif--;
> - call_netdevice_notifiers(NETDEV_NOTIFY_PEERS,
> - bond->dev);
> - }
> }
> }
I don’t see the benefit of moving NETDEV_NOTIFY_PEERS before NETDEV_BONDING_FAILOVER.
Is there a specific reason or scenario where this ordering change is required?
Thanks
Hangbin
Powered by blists - more mailing lists