Re: [PATCH net] ipvlan: call dev_change_flags when reset ipvlan mode

2018-06-20 Thread Hangbin Liu
On Wed, Jun 20, 2018 at 10:45:39AM -0700, Cong Wang wrote: > On Tue, Jun 19, 2018 at 10:31 PM, David Miller wrote: > > From: Hangbin Liu > > Date: Wed, 20 Jun 2018 11:22:54 +0800 > > > >> The only case dev_change_flags() return an err is when we change IFF_UP > >> flag. > >> Since we only set/re

Re: [PATCH net] ipvlan: call dev_change_flags when reset ipvlan mode

2018-06-20 Thread Cong Wang
On Tue, Jun 19, 2018 at 10:31 PM, David Miller wrote: > From: Hangbin Liu > Date: Wed, 20 Jun 2018 11:22:54 +0800 > >> 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? > > I

Re: [PATCH net] ipvlan: call dev_change_flags when reset ipvlan mode

2018-06-19 Thread David Miller
From: Hangbin Liu Date: Wed, 20 Jun 2018 11:22:54 +0800 > 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? It is bad to try and take shortcuts on error handling using assumpt

Re: [PATCH net] ipvlan: call dev_change_flags when reset ipvlan mode

2018-06-19 Thread Hangbin Liu
On Tue, Jun 19, 2018 at 02:10:18PM -0700, Cong Wang wrote: > On Mon, Jun 18, 2018 at 7:04 AM, Hangbin Liu wrote: > > @@ -94,10 +95,13 @@ static int ipvlan_set_port_mode(struct ipvl_port *port, > > u16 nval) > > mdev->l3mdev_ops = NULL; > > } > >

Re: [PATCH net] ipvlan: call dev_change_flags when reset ipvlan mode

2018-06-19 Thread Cong Wang
On Mon, Jun 18, 2018 at 7:04 AM, Hangbin Liu 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) { > +