[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <AACE3A98-C0C0-4B24-BC29-B8EC3A758D90@bamaicloud.com>
Date: Mon, 1 Dec 2025 17:45:49 +0800
From: Tonghao Zhang <tonghao@...aicloud.com>
To: Hangbin Liu <liuhangbin@...il.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
> On Dec 1, 2025, at 14:57, Hangbin Liu <liuhangbin@...il.com> wrote:
>
> 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?
No, to simplify the code, and use common peer notify reset function.
>
> Thanks
> Hangbin
>
>
Powered by blists - more mailing lists