All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hangbin Liu <hangbin.liu@linux.dev>
To: Wenbo Sun <sunwenbo@cmss.chinamobile.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	Hangbin Liu <liuhangbin@kylinos.cn>,
	Fernando Fernandez Mancera <fmancera@suse.de>,
	MD Danish Anwar <danishanwar@ti.com>,
	Murali Karicheri <m-karicheri2@ti.com>,
	Wojciech Drewek <wojciech.drewek@intel.com>,
	Ravi Gunasekaran <r-gunasekaran@ti.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	1342116488@qq.com
Subject: Re: [PATCH net v2] net: hsr: clean up synced addresses and allmulti in hsr_del_port()
Date: Fri, 13 Nov 2026 16:02:49 +0800	[thread overview]
Message-ID: <avbEKc__kU8IKdfN@fedora> (raw)
In-Reply-To: <20261113060623.79812-1-sunwenbo@cmss.chinamobile.com>

Hi Wenbo,
On Fri, Nov 13, 2026 at 02:06:23PM +0800, Wenbo Sun wrote:
> Hi Hangbin,
> 
> I sincerely apologize for sending out v2 too quickly yesterday before
> giving you enough time to review the previous discussion. I really appreciate
> your patience and thoughtful guidance.
> 
> Regarding your question on whether dev_uc_unsync()/dev_mc_unsync() could be
> called from hsr_dev_close(), and whether they should be removed:
> 
> I traced the function calls and verified the behavior in a User-Mode Linux
> (UML) environment across different lifecycle events:
> 
> 1. Can they be called from hsr_dev_close()?
>    Yes. When an administrator administratively brings down the HSR interface
>    without deleting it (e.g. running "ip link set hsr0 down"):
>    - hsr_dellink() is NOT called, and ports remain in hsr->ports.
>    - dev_close() triggers ndo_stop (hsr_dev_close()), where hsr_for_each_port_rtnl()
>      successfully iterates over SLAVE_A and SLAVE_B.
>    - Both dev_uc_unsync() and dev_mc_unsync() ARE actively called here to unsync
>      addresses, ensuring physical slaves stop filtering for HSR multicast while
>      hsr0 is DOWN (and re-synced by hsr_set_rx_mode() once brought back UP).
>    Therefore, they are NOT dead code in hsr_dev_close() and should NOT be removed.

Thanks, this looks good to me. We don’t need to clear the IFF_ALLMULTI flag
because the interface is only being brought down, we still need this flag
after it comes back up.

When the interface is brought up, `hsr_set_rx_mode` is also called to ensure
`dev_mc/uc_sync_multiple` runs. So the patch looks good to me.

Thanks
Hangbin

      reply	other threads:[~2026-11-13  8:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11  6:01 [PATCH net] net: hsr: clean up synced addresses and allmulti in hsr_del_port() Wenbo Sun
2026-11-12  0:41 ` Hangbin Liu
2026-11-12  1:05 ` Hangbin Liu
2026-11-12  6:44   ` Wenbo Sun
2026-11-12  9:41     ` Hangbin Liu
2026-11-12  6:47       ` [PATCH net v2] " Wenbo Sun
2026-11-12  9:48         ` Hangbin Liu
2026-11-13  6:06           ` Wenbo Sun
2026-11-13  8:02             ` Hangbin Liu [this message]

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=avbEKc__kU8IKdfN@fedora \
    --to=hangbin.liu@linux.dev \
    --cc=1342116488@qq.com \
    --cc=danishanwar@ti.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=fmancera@suse.de \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuhangbin@kylinos.cn \
    --cc=m-karicheri2@ti.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=r-gunasekaran@ti.com \
    --cc=sunwenbo@cmss.chinamobile.com \
    --cc=wojciech.drewek@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.