From: Hangbin Liu <liuhangbin@gmail.com>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Linux Kernel Network Developers <netdev@vger.kernel.org>,
Stefano Brivio <sbrivio@redhat.com>,
Paolo Abeni <pabeni@redhat.com>,
David Miller <davem@davemloft.net>,
Mahesh Bandewar <maheshb@google.com>
Subject: Re: [PATCH net] ipvlan: call dev_change_flags when reset ipvlan mode
Date: Wed, 20 Jun 2018 11:22:54 +0800 [thread overview]
Message-ID: <20180620032254.GW8958@leo.usersys.redhat.com> (raw)
In-Reply-To: <CAM_iQpXeuU=Cxons5=centGNJzm0OaNU3Jj5hE91hvJH0o2-Eg@mail.gmail.com>
On Tue, Jun 19, 2018 at 02:10:18PM -0700, Cong Wang wrote:
> On Mon, Jun 18, 2018 at 7:04 AM, Hangbin Liu <liuhangbin@gmail.com> wrote:
> > @@ -94,10 +95,13 @@ static int ipvlan_set_port_mode(struct ipvl_port *port, u16 nval)
> > mdev->l3mdev_ops = NULL;
> > }
> > list_for_each_entry(ipvlan, &port->ipvlans, pnode) {
> > + flags = ipvlan->dev->flags;
> > if (nval == IPVLAN_MODE_L3 || nval == IPVLAN_MODE_L3S)
> > - ipvlan->dev->flags |= IFF_NOARP;
> > + dev_change_flags(ipvlan->dev,
> > + flags | IFF_NOARP);
> > else
> > - ipvlan->dev->flags &= ~IFF_NOARP;
> > + dev_change_flags(ipvlan->dev,
> > + flags & ~IFF_NOARP);
>
> You need to check the return value of dev_change_flags().
Hi Wang Cong,
The only case dev_change_flags() return an err is when we change IFF_UP flag.
Since we only set/reset IFF_NOARP, do you think we still need to check the
return value?
Thanks
Hangbin
next prev parent reply other threads:[~2018-06-20 3:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-18 14:04 [PATCH net] ipvlan: call dev_change_flags when reset ipvlan mode Hangbin Liu
2018-06-19 21:10 ` Cong Wang
2018-06-20 3:22 ` Hangbin Liu [this message]
2018-06-20 5:31 ` David Miller
2018-06-20 17:45 ` Cong Wang
2018-06-21 1:18 ` Hangbin Liu
2018-07-01 8:21 ` [PATCHv2 net] ipvlan: call dev_change_flags when ipvlan mode is reset Hangbin Liu
2018-07-02 11:38 ` 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=20180620032254.GW8958@leo.usersys.redhat.com \
--to=liuhangbin@gmail.com \
--cc=davem@davemloft.net \
--cc=maheshb@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sbrivio@redhat.com \
--cc=xiyou.wangcong@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 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).