All of lore.kernel.org
 help / color / mirror / Atom feed
From: 戈润栋 <rdong.ge@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	vivien.didelot@gmail.com, davem@davemloft.net,
	netdev@vger.kernel.org
Subject: Re: [PATCH] net: dsa: slave: Don't propagate flag changes on down slave interfaces
Date: Sun, 3 Feb 2019 13:34:01 +0800	[thread overview]
Message-ID: <CAN1Lvyp0LvwdkQCSuY1ULweaZ-FHTMiXn9VB-XRgC-aqj8Vx7w@mail.gmail.com> (raw)
In-Reply-To: <20190202171636.GB3398@lunn.ch>

Hi Andrew

Sorry for the previous mails due to my error mail format setting on browser.

I have reproduced the tcpdump issue in my env, but not sure if it is the
same issue as you mentioned.
Ifdown a slave interface which is under tcpdump capturing will also decrease
the master's promiscuous twice.

So when I do:
a) tcpdump -i ethx
b) ifdown ethx
c) ifup ethx
d) goto a
for several times the promiscuous count of master will go negative.

Raydon


Andrew Lunn <andrew@lunn.ch> 于2019年2月3日周日 上午1:16写道:
>
> On Sat, Feb 02, 2019 at 09:05:11AM -0800, Florian Fainelli wrote:
> > Le 2/2/19 à 6:29 AM, Rundong Ge a écrit :
> > > The unbalance of master's promiscuity or allmulti will happen after ifdown
> > > and ifup a slave interface which is in a bridge.
> > >
> > > When we ifdown a slave interface , both the 'dsa_slave_close' and
> > > 'dsa_slave_change_rx_flags' will clear the master's flags. The flags
> > > of master will be decrease twice.
> > > In the other hand, if we ifup the slave interface again, since the
> > > slave's flags were cleared the 'dsa_slave_open' won't set the master's
> > > flag, only 'dsa_slave_change_rx_flags' that triggered by 'br_add_if'
> > > will set the master's flags. The flags of master is increase once.
> > >
> > > Only propagating flag changes when a slave interface is up makes
> > > sure this does not happen. The 'vlan_dev_change_rx_flags' had the
> > > same problem and was fixed, and changes here follows that fix.
> >
> > VLAN code under net/8021q/vlan_dev.c::vlan_dev_change_rx_flags() appears
> > to do the same thing that you are proposing, so this looks fine to me.
> > Since that is a bugfix, we should probably add:
>
> Hi Rundong, Florian
>
> I've seen issues with tcpdump causing the promiscuous count to go
> negative. I wounder if this will fix that at well?
>
>           Andrew

  reply	other threads:[~2019-02-03  5:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-02 14:29 [PATCH] net: dsa: slave: Don't propagate flag changes on down slave interfaces Rundong Ge
2019-02-02 17:05 ` Florian Fainelli
2019-02-02 17:16   ` Andrew Lunn
2019-02-03  5:34     ` 戈润栋 [this message]
2019-02-05  2:29   ` David Miller

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=CAN1Lvyp0LvwdkQCSuY1ULweaZ-FHTMiXn9VB-XRgC-aqj8Vx7w@mail.gmail.com \
    --to=rdong.ge@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@gmail.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.