From: Simon Horman <simon.horman@netronome•com>
To: Scott Feldman <sfeldma@gmail•com>
Cc: Jiri Pirko <jiri@resnulli•us>, Netdev <netdev@vger•kernel.org>,
john fastabend <john.fastabend@gmail•com>
Subject: Re: [PATCH/RFC net-next] rocker: forward packets to CPU when a port in promiscuous mode
Date: Wed, 15 Jul 2015 16:54:08 +0900 [thread overview]
Message-ID: <20150715075406.GA25954@vergenet.net> (raw)
In-Reply-To: <CAE4R7bAy4WKaScamnJJR-bQR4n+=sqKBoR7B=saXCY989+2+3A@mail.gmail.com>
On Wed, Jul 15, 2015 at 12:18:20AM -0700, Scott Feldman wrote:
> On Tue, Jul 14, 2015 at 11:34 PM, Simon Horman
> <simon.horman@netronome•com> wrote:
> > On Tue, Jul 14, 2015 at 10:32:54PM -0700, Scott Feldman wrote:
>
> >> > @@ -5263,11 +5301,16 @@ static int rocker_port_master_changed(struct net_device *dev)
> >> > * 3. Other, e.g. being added to or removed from a bond or openvswitch,
> >> > * in which case nothing is done
> >> > */
> >>
> >> Maybe comment above needs adjusting?
> >
> > Indeed, sorry for missing that.
> > How about this?
> >
> >
> > /* There are currently five cases handled here:
> > * 1. Joining a bridge
> > * 2. Joining a Open vSwitch datapath
> > * 3. Leaving a previously joined bridge
> > * 4. Leaving a previously joined Open vSwitch datapath
> > * 5. Other, e.g. being added to or removed from a bond,
> > * in which case nothing is done
> > */
>
> Seems like one of those comments that needs adjusting each time the
> code changes, which isn't good. Maybe just kill the comment or write
> in a generic way saying what code is doing. Code seems obvious enough
> to me to not require a comment.
My purpose in adding the comment in the first place was
to document the "other" case, as it wasn't handled and thus
didn't seem obvious.
Perhaps something like this would work.
/* N.B: Do nothing if the type of master is not supported */
next prev parent reply other threads:[~2015-07-15 7:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-09 4:25 [PATCH/RFC net-next] rocker: forward packets to CPU when a port in promiscuous mode Simon Horman
2015-07-09 5:38 ` John Fastabend
2015-07-14 6:37 ` Scott Feldman
2015-07-15 4:45 ` Simon Horman
2015-07-15 5:32 ` Scott Feldman
2015-07-15 6:34 ` Simon Horman
2015-07-15 7:18 ` Scott Feldman
2015-07-15 7:54 ` Simon Horman [this message]
2015-07-15 14:50 ` Scott Feldman
2015-07-16 1:41 ` Simon Horman
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=20150715075406.GA25954@vergenet.net \
--to=simon.horman@netronome$(echo .)com \
--cc=jiri@resnulli$(echo .)us \
--cc=john.fastabend@gmail$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=sfeldma@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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