netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hangbin Liu <liuhangbin@gmail.com>
To: Jay Vosburgh <jv@jvosburgh.net>, Tonghao Zhang <tonghao@bamaicloud.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>, Jonathan Corbet <corbet@lwn.net>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	Nikolay Aleksandrov <razor@blackwall.org>,
	Jason Xing <kerneljasonxing@gmail.com>
Subject: Re: [PATCH net-next v3 1/4] net: bonding: use workqueue to make sure peer notify updated in lacp mode
Date: Mon, 1 Dec 2025 13:56:02 +0000	[thread overview]
Message-ID: <aS2ecn0U6rlNHP0r@fedora> (raw)
In-Reply-To: <7FEDE75E-551D-4B29-86A2-526AA3556CDC@bamaicloud.com>

On Mon, Dec 01, 2025 at 07:01:23PM +0800, Tonghao Zhang wrote:
> >>> 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.
> > 
> > bond_change_active_slave() is called under RTNL lock. We can use
> > bond_peer_notify_reset() here. But I don't think there is a need to move
> > NETDEV_NOTIFY_PEERS before NETDEV_BONDING_FAILOVER.
> Is there a dependency relationship between NETDEV_NOTIFY_PEERS and NETDEV_BONDING_FAILOVER?
> In vlan, macvlan, ipvlan netdev, NETDEV_NOTIFY_PEERS and NETDEV_BONDING_FAILOVER use the same action.
> net/8021q/vlan.c
> drivers/net/macvlan.c
> drivers/net/ipvlan/ipvlan_main.c

Quote from ad246c992bea ("ipv4, ipv6, bonding: Restore control over number of peer notifications")

"""
    For backward compatibility, we should retain the module parameters and
    sysfs attributes to control the number of peer notifications
    (gratuitous ARPs and unsolicited NAs) sent after bonding failover.
"""

In theory we should send notify after failover. The infiniband driver also
has specific functions to handle NETDEV_BONDING_FAILOVER. I'm not sure if the
miss-order affect it. Maybe Jay knows more.

Thanks
Hangbin

  reply	other threads:[~2025-12-01 13:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-30  7:48 [PATCH net-next v3 0/4] A series of minor optimizations of the bonding module Tonghao Zhang
2025-11-30  7:48 ` [PATCH net-next v3 1/4] net: bonding: use workqueue to make sure peer notify updated in lacp mode Tonghao Zhang
2025-12-01  6:57   ` Hangbin Liu
2025-12-01  9:45     ` Tonghao Zhang
2025-12-01 10:05       ` Hangbin Liu
2025-12-01 11:01         ` Tonghao Zhang
2025-12-01 13:56           ` Hangbin Liu [this message]
2025-12-22 13:53             ` Tonghao Zhang
2025-11-30  7:48 ` [PATCH net-next v3 2/4] net: bonding: move bond_should_notify_peers, e.g. into rtnl lock block Tonghao Zhang
2025-12-01  7:23   ` Hangbin Liu
2025-12-02  1:54   ` Jason Xing
2025-12-22 14:24     ` Tonghao Zhang
2025-11-30  7:48 ` [PATCH net-next v3 3/4] net: bonding: skip the 2nd trylock when first one fail Tonghao Zhang
2025-12-01  7:35   ` Hangbin Liu
2025-12-22 14:15     ` Tonghao Zhang
2025-12-24  6:00       ` Hangbin Liu
2025-11-30  7:48 ` [PATCH net-next v3 4/4] net: bonding: add the READ_ONCE/WRITE_ONCE for outside lock accessing Tonghao Zhang
2025-12-01  7:43   ` Hangbin Liu
2025-12-01  7:24 ` [PATCH net-next v3 0/4] A series of minor optimizations of the bonding module Hangbin Liu

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=aS2ecn0U6rlNHP0r@fedora \
    --to=liuhangbin@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jv@jvosburgh.net \
    --cc=kerneljasonxing@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=razor@blackwall.org \
    --cc=tonghao@bamaicloud.com \
    /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).