Netdev List
 help / color / mirror / Atom feed
From: Xia Yan <yanxia@cmss.chinamobile.com>
To: hangbin.liu@linux.dev
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
Subject: Re: [PATCH net] macvlan: fix passthru promiscuity accounting while down
Date: Fri, 23 Oct 2026 14:16:30 +0800	[thread overview]
Message-ID: <20261023061630.350083-1-yanxia@cmss.chinamobile.com> (raw)
In-Reply-To: <atrKdb1atGzCYka4@fedora>

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.

Thanks,
Xia Yan



  reply	other threads:[~2026-10-23  6:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-22  9:08 [PATCH net] macvlan: fix passthru promiscuity accounting while down Xia Yan
2026-10-23  2:05 ` Xia Yan
2026-10-23  3:06 ` Hangbin Liu
2026-10-23  6:16   ` Xia Yan [this message]
2026-10-23  7:56     ` Hangbin Liu
2026-10-27 23:00 ` patchwork-bot+netdevbpf

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=20261023061630.350083-1-yanxia@cmss.chinamobile.com \
    --to=yanxia@cmss.chinamobile.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=hangbin.liu@linux.dev \
    --cc=horms@kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stable@vger.kernel.org \
    --cc=yana06070@163.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