Article View: linux.kernel.netdev
Article #6722Re: [PATCH net] macvlan: fix passthru promiscuity accounting while down
From: Hangbin Liu
Date: Fri, 23 Oct 2026 07:56
Date: Fri, 23 Oct 2026 07:56
21 lines
9104 bytes
9104 bytes
On Fri, Oct 23, 2026 at 02:16:30PM +0800, Xia Yan wrote: > Hi Hangbin, > > > If we discard the MACVLAN_FLAG_NOPROMISC change, should we remove the bit > > before calling WRITE_ONCE(vlan->flags, flags)? > > WRITE_ONCE() still saves the new flags. The patch only skips the > lower device's promiscuity count update while the macvlan is down. > > If NOPROMISC is cleared while down, macvlan_open() takes the > reference on the next open and macvlan_stop() releases it. If it is > set while down, the next open leaves the lower device's count alone. > > I'd keep saving the requested flags. Clearing the bit would lose > the user's setting. Rejecting the update would require bringing the > interface up before changing this option. Ah, I see. Thanks. Reviewed-by: Hangbin Liu <liuhangbin@kylinos.cn>
Technical Details
Message-ID:
<atsTIt31dw6DPENI@fedora>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-350964-linux-kernel-netdev=dewy.ruReferences:
<20261022090809.12019-1-yanxia@cmss.chinamobile.com> <atrKdb1atGzCYka4@fedora> <20261023061630.350083-1-yanxia@cmss.chinamobile.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-350964-linux-kernel-netdev=dewy.ru From: hangbin.liu@linux.dev (Hangbin Liu) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net] macvlan: fix passthru promiscuity accounting while down Date: Fri, 23 Oct 2026 15:56:18 +0800 Organization: Usenet Network Message-ID: <atsTIt31dw6DPENI@fedora> References: <20261022090809.12019-1-yanxia@cmss.chinamobile.com> <atrKdb1atGzCYka4@fedora> <20261023061630.350083-1-yanxia@cmss.chinamobile.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: usenet.network; logging-data="444005"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:/UtArw61odP40oms+dHZK71ml54= sha256:/hpOXC11R5rcsAZxGaIliuRIllkirdLj3UWGYlDwjVM= sha1:kpZ2bBppTF9BVywqRcb4wh+1yew= sha256:EGeD9lE4rMNPZyJJzo2NphaliheFi9vWsES8rbSeFL0= 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 574CE111434; Fri, 23 Oct 2026 11:00:05 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.049 X-Spam-Status: No, score=-3.049 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.25, 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 LZjikPwBWx59; Fri, 23 Oct 2026 11:00:02 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-350964-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 B24AC11142C; Fri, 23 Oct 2026 10:59:52 +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 5CCDD3D589; Fri, 23 Oct 2026 07:56:44 +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=1792742204; b=McFCOuMyz7YxuLo5gZRfXcyWL/S5W5N0TA4vXmei9yp+lAM9z96qxiBHGE5dNKpom4qx EI2/3AV7zfBgI6bmxsLlwH66pchU+79CrrbirSjhGx1KyKxamh1p3ac+h7x/7L0u+mF/G J01FmcixkIXadjF999hOwptFYtvFdijqFMrP8H3xz3cz4H1gh7UY0cr/tUFZnPAhOQ7To qk57FjUo2z9ph7jpDkJlariaklWPCzm8/aucEa9SmS4TNNpZkGd3pCyj9yQhJJWAFvXAQ MHA8ASK4coRprWiSr/dWE+aQ3v9EFcQv2xv28OA9IMsNE+py3a7T4uELonrBGv6qxqg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792742204; 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:In-Reply-To; bh=a1fLNTNQuElQrkhiWKcrIu52BrjXQYMDASDkpVEAwms=; b=xD1AI+x3FrcNBofeL0W+yuemj4jjNf3CCdmCvtTmZLmplWGS014FdpxGWawSR4C+hIK3 RTU9895DScBZIuGcOph7AXS4ob6j3GQvpBr4gv9QWL04ETeP6w+2J41KtsODq8HVGSLeT a71BUhLIQuRe+gKceXpv+FIQhGR7XClF8gMVS9wRBDFX8IZnds8eUNjcuQQWZ31piHSGq GLSmtRt+Fr7X7Il47LawUvD4GjZuMktiejHihyovLlaz4IlfueYt8CxCTSWlA3REj8AKz 5+c5xHCAYUPxStWBLTwo9lD6arI1UQjek/K/ZkV3I8TP/pO/hkT0pcDOi+i7hpXJuZQ== 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=wW2D8xx+; 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 33806606A31F; Fri, 23 Oct 2026 07:56:44 +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=wW2D8xx+ X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.90 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792742195; b=c/6G7RiLyz+ZugDLQWW93jeS2wnIr7Cb5Q612/3B7UhcTRX2ZH7REi44tBIaDM9d2pkj 0cP0uCcKW4xdRjLGVbfauERuN1w1lhdo3YXvkQ9tI0NQGNa6yPTc66+dpwB4dsQLFzuLJ NLlID5Wrc7dHAbZxvKx+GmfkkXIUdkJWVz+Xnf4Vk5iVw/yRRtLcg/HaYdxbQeKc1+T8E 6K0CVkeN1MBB/61fr46p/tqgYlyn2IPzjeADXlw7RUfOk7uwpgRXNZx3ZxIl5AjN9ftKo mKDhWsJOLNTNOTVN35EYUM1lmgaaPvckXcuLQt8whcweFpHSYqvuzno3YTsmqc0Uspg== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792742195; 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:In-Reply-To; bh=a1fLNTNQuElQrkhiWKcrIu52BrjXQYMDASDkpVEAwms=; b=Qf35Q29Ms0bNTWxJPaFxUBgwnRpfQNuweEqjqnlji2fFebqIEQ/BYm0AM3Fq9pzJiUw/ Iz9zRJUGCKQFuygn4ndVC1lYn61B0SCj3WXouOgzGYXQdZnb+h6N/1IvE++/2mU1Criao LXbasy4Y3tnPVnkpcd55P2oQ4yOeB9u9ebP9Ec8nEj1RuocyQZs8kGvKp9nl4gOwONlRE B6/a0ZMc+C7EPndmtSKneEwVqyY6YBvvETCoYb+IHxn6atJti+NSIp473MmOVA9KInh+k 7upnUsaY9H0BYHj7n+EjCt82Y/OOL94lBrBpsjrO+gm2rmUw/j1xwew1Gg1Z+5O8OOg== 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=wW2D8xx+; arc=none smtp.remote-ip=95.215.58.90 X-Received: from mta1.migadu.com (out-90.mta1.migadu.com [95.215.58.90]) (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 07D3A606A31A for <netdev@vger.kernel.org>; Fri, 23 Oct 2026 07:56:32 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 07D3A606A31A 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=AxDTtbQpe1Pw1Gld4FexP/rem2OpjOhFrzr3t8rvVIc=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1792742191; v=1; x=1793346991; b=wW2D8xx+DdbRIC4AHcSsoWygNrMVamSR+kr6fATyTg+RyS24w+tgSGJSJea4RaHGc1sJGUTR uzy2bS5hJ0SH08Tstg8AwLygSAn1nXcr4+uSM40DDuBP9W6GwrgQjgb2jM1Wt50KldLURcH1v9y xNof3we7jE5136Rq/sttJ0m0= X-Envelope-To: netdev@vger.kernel.org X-Received: by mta11.migadu.com with ESMTPS id 4835e8e05efbd0ae; Fri, 23 Oct 2026 07:56:30 +0000 X-Mizu-Trace-ID: 4835e8e05efbd0ae X-Migadu-Flow: FLOW_OUT X-Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, horms@kernel.org, john.fastabend@gmail.com, kuba@kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, pabeni@redhat.com, stable@vger.kernel.org, yana06070@163.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: <20261023061630.350083-1-yanxia@cmss.chinamobile.com>