Article View: linux.kernel.netdev
Article #15667Re: [PATCH net v2] net: hsr: clean up synced addresses and allmulti in hsr_del_port()
From: Hangbin Liu
Date: Fri, 13 Nov 2026 08:02
Date: Fri, 13 Nov 2026 08:02
35 lines
10480 bytes
10480 bytes
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
Technical Details
Message-ID:
<avbEKc__kU8IKdfN@fedora>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362486-linux-kernel-netdev=dewy.ruReferences:
<20261111060143.183670-1-sunwenbo@cmss.chinamobile.com> <avULIJLRzOEoefJI@fedora> <avUQ5dAMMRlUTNzq@fedora> <avWJrwDyT8HJHWSN@fedora> <20261112064716.85381-1-sunwenbo@cmss.chinamobile.com> <avWLZTnYPQJ2-z7_@fedora> <20261113060623.79812-1-sunwenbo@cmss.chinamobile.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362486-linux-kernel-netdev=dewy.ru From: hangbin.liu@linux.dev (Hangbin Liu) Newsgroups: linux.kernel.netdev 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 Organization: Usenet Network Message-ID: <avbEKc__kU8IKdfN@fedora> References: <20261111060143.183670-1-sunwenbo@cmss.chinamobile.com> <avULIJLRzOEoefJI@fedora> <avUQ5dAMMRlUTNzq@fedora> <avWJrwDyT8HJHWSN@fedora> <20261112064716.85381-1-sunwenbo@cmss.chinamobile.com> <avWLZTnYPQJ2-z7_@fedora> <20261113060623.79812-1-sunwenbo@cmss.chinamobile.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="1319938"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:n/RfXGE4E1B6QKiBLWJ2j4xKbwM= sha256:9/whytbmP5m7y0BoXO2O6T0W/CRjSmEBi7v78eflG2A= sha1:85iCOWf+8pB370FnPNBtkJkZ/Pg= sha256:TzRvM7+pPoVC3BK8oRnBHATvJmJUc48bgM3LWQKZybc= Content-Disposition: inline List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 522891144E9; Fri, 13 Nov 2026 13:48:56 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.05 X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key) header.d=linux.dev X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hNGFErJ4c3ei; Fri, 13 Nov 2026 13:48:53 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-362486-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linux.dev X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 898481144E0; Fri, 13 Nov 2026 13:48:43 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 33BB31A6426; Fri, 13 Nov 2026 08:03:10 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1794556988; b=k3RIHbuYnsEjOH599FAtEQ4qNEz8a8ydqeAPsOmRzdZGcX5PHWae3yKJRMIqxESJcXbW ke2iWRUyEZMOeuFsx2J+678T6OvMRTIX/wiKqR0CIgpwwTolpnADwQHEW4UFVRlVtd5Vn m/sWT8waYAff36yIZolvjBtfn6yPVrmtwWN60MACupZAV1nPnD0/tx7q/OElMBHx63HFb Rs1P3HuKk57voHQObw5Zriyed0fUqfP7JriZGTZhCsuMAW/PHj4Leud9Cpxi6nce5GL2B PS3ai/RrzbaG8Zy28y/Mx4jhpG2Y7lt+iGovyjh2QlF4nJUicP2KRKpOudDYBMD5IFg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794556988; h=X-Original-To:Received:DMARC-Filter:X-Envelope-To:DKIM-Signature: X-Envelope-To:Received:X-Mizu-Trace-ID:X-Migadu-Flow:Date:From:To:Cc: Subject:Message-ID:References:X-Mailing-List:List-Id:List-Post: List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence: MIME-Version:Content-Type:Content-Disposition: Content-Transfer-Encoding:In-Reply-To; bh=C2OxTrMjSPzr0cpLSbudodgM1xckNX9oUGx/lPpXiXc=; b=i8t7uWj+tHxV3DdMtaBSaXNIwn5267eVMZ7vcoFv8Dgl794prYKVsj8dR1se0ELsE5ox 4tocghC6B1mz4fMauxbr/ba7HBLEIyCOuliq/i47tX4Euu8/tzeAn6dLIZ4FIUAVZXV/o P8DvX3VjuA1J1xhO9Zmu65fpan1fawtAzjxMzfgY42pwU2xqOtmMuxWaSWDskGRO+mePD 9JTNzDcqWxN3ySM8FjlW5LezXGyKRfByiDAHkmnTMbhihKsWMOFtU4tTjJVlXMIF71kpP evsc10FrndKqKd/x4a9IQsIEpT8oPgr8WeyPitR5+gA/KospUNIv6NB1rV/AbbdjzHA== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=DJoVBbRA; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 77166606A332; Fri, 13 Nov 2026 08:03:08 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=DJoVBbRA X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.119 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794556987; b=mrFD8K6vhxbYTLva2+8IKVkBbjNqPuWI1JwrXi8dq5M9JQYJKkFoCNUn2N1c3kXAYLOS /vqzxnf/sE08JnbunfHX9LT8Ndo/Z4cOwFiuPOxkbXtmalPNRGYiFPFIdcewkeJqmiyRW C7Ulgjnb9DvNWvcvnWygADZbdtunejUjUclbNz/zqsWB3f+V5rXa6F7gs0KxcqrRxoM5S rm+RaR++WVER1BurHsfELn6bcJHy+nKDpwjq26H/U9xvtxKHZtCYlp6DYImLN2iZWb1gr 03RdLWEy9hiGzvh2nUReExBjcURAUZkscprlehv5d3we/F+J5SAds7r2s6R86BX9Fdg== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794556987; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition: Content-Transfer-Encoding:In-Reply-To; bh=C2OxTrMjSPzr0cpLSbudodgM1xckNX9oUGx/lPpXiXc=; b=SH781oGJl9io0AIjmKzetZfotYgQ2Yh/ssneO1PiV9SnDcpsKo4CLyRvt7pQb8qtMmY7 kMquttZi+sSOnaIfwaZEH9TL6zCurVW7m1KvloT3ViDFpjSQkoJMHrZ5vFA02BPM7YAUn K5wgrSUA1Mj4puDZTI0S0Fh5g6BUDAtq+RrjmbuDrYzB6tqoF7bocdRHgTmk7DZLvUzS7 RQH1rScal7Y8sgLujBMjTiwr1OkNtjSxYmVQ4uavn/tvWnxC44gsV93u3nkx/82OlDZsF Wzt/h7iazLsgr4mWPqI1i3mv0vIioh0W76S1rtgct4+8YHvr2ALLiHzBtVNQEFWioxw== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=DJoVBbRA; arc=none smtp.remote-ip=91.218.175.119 X-Received: from mta0.migadu.com (out-119.mta0.migadu.com [91.218.175.119]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 00D23606A31C for <netdev@vger.kernel.org>; Fri, 13 Nov 2026 08:03:05 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 00D23606A31C X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Envelope-To: netdev@vger.kernel.org X-DKIM-Signature: a=rsa-sha256; bh=w1zAUgXu1ewHnoMcf4RK7QPabu5UkWi+j/aizWEQQo4=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1794556984; v=1; x=1795161784; b=DJoVBbRAMjBrxoPrfMVqhIiWZ0n8JWtlpK0MmaKA7fxq/ul1YaSln6DyVGnL5iJ52cFgtVZe VJSrcour2ZgZRrIVyzoZMJpLkPFk05CX3+BiluS2Zl3jXd7a2jOPJPjLLgH0iKiHEt+/MhpZOCh Xi9WzRfZHjjEs2VlcR6u3ygc= X-Envelope-To: netdev@vger.kernel.org X-Received: by mta11.migadu.com with ESMTPS id 545262577151813d; Fri, 13 Nov 2026 08:03:03 +0000 X-Mizu-Trace-ID: 545262577151813d X-Migadu-Flow: FLOW_OUT X-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 X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-In-Reply-To: <20261113060623.79812-1-sunwenbo@cmss.chinamobile.com>