From: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Tom Gundersen <teg@jklm.no>, netdev <netdev@vger.kernel.org>,
bridge <bridge@lists.linux-foundation.org>,
"David S. Miller" <davem@davemloft.net>,
"C. R. Oldham" <cr@saltstack.com>
Subject: Re: [PATCH net] bridge: Handle IFLA_ADDRESS correctly when creating bridge device
Date: Fri, 25 Apr 2014 16:54:11 +0900 [thread overview]
Message-ID: <1398412451.3920.3.camel@ubuntu-vm-makita> (raw)
In-Reply-To: <20140424113827.6d27ec5b@nehalam.linuxnetplumber.net>
On Thu, 2014-04-24 at 11:38 -0700, Stephen Hemminger wrote:
> On Thu, 24 Apr 2014 21:16:27 +0900
> Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp> wrote:
>
> > +static int br_dev_newlink(struct net *src_net, struct net_device *dev,
> > + struct nlattr *tb[], struct nlattr *data[])
> > +{
> > + int err;
> > + struct net_bridge *br = netdev_priv(dev);
> > +
> > + if (tb[IFLA_ADDRESS]) {
> > + spin_lock_bh(&br->lock);
> > + br_stp_change_bridge_id(br, nla_data(tb[IFLA_ADDRESS]));
> > + spin_unlock_bh(&br->lock);
> > + }
> > +
> > + err = register_netdevice(dev);
> > + if (err)
> > + return err;
> > +
> > + return 0;
> > +}
>
> Looks good.
>
> Why not just do simpler tail call??
> return register_netdevice(dev);
Yes, It's simpler.
I mimicked team_newlink()'s style, so we can also make it simpler
later :)
I'll send v2.
Thanks,
Toshiaki Makita
next prev parent reply other threads:[~2014-04-25 7:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-21 19:33 [BUG?] bridge_id not getting set for bridges created with Tom Gundersen
2014-04-21 20:56 ` Tom Gundersen
2014-04-24 12:06 ` Toshiaki Makita
2014-04-24 12:16 ` [PATCH net] bridge: Handle IFLA_ADDRESS correctly when creating bridge device Toshiaki Makita
2014-04-24 16:04 ` Tom Gundersen
2014-04-25 8:18 ` Toshiaki Makita
2014-04-24 18:38 ` Stephen Hemminger
2014-04-25 7:54 ` Toshiaki Makita [this message]
2014-04-25 8:01 ` [PATCH net v2] " Toshiaki Makita
2014-04-27 23:54 ` David Miller
2014-04-24 12:30 ` Unsubscribe me in this Forum Amidu Sila
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=1398412451.3920.3.camel@ubuntu-vm-makita \
--to=makita.toshiaki@lab.ntt.co.jp \
--cc=bridge@lists.linux-foundation.org \
--cc=cr@saltstack.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
--cc=teg@jklm.no \
/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;
as well as URLs for NNTP newsgroup(s).