* [patch net-next] net: call notifiers for mtu change even if iface is not up @ 2012-12-03 11:16 Jiri Pirko 2012-12-03 14:18 ` Neil Horman 0 siblings, 1 reply; 7+ messages in thread From: Jiri Pirko @ 2012-12-03 11:16 UTC (permalink / raw) To: netdev; +Cc: davem, edumazet, bhutchings, psimerda Do the same thing as in set mac. Call notifiers every time. Signed-off-by: Jiri Pirko <jiri@resnulli.us> --- net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/dev.c b/net/core/dev.c index 2f94df2..0685a72 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -4971,7 +4971,7 @@ int dev_set_mtu(struct net_device *dev, int new_mtu) else dev->mtu = new_mtu; - if (!err && dev->flags & IFF_UP) + if (!err) call_netdevice_notifiers(NETDEV_CHANGEMTU, dev); return err; } -- 1.8.0 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [patch net-next] net: call notifiers for mtu change even if iface is not up 2012-12-03 11:16 [patch net-next] net: call notifiers for mtu change even if iface is not up Jiri Pirko @ 2012-12-03 14:18 ` Neil Horman 2012-12-03 14:22 ` Jiri Pirko 0 siblings, 1 reply; 7+ messages in thread From: Neil Horman @ 2012-12-03 14:18 UTC (permalink / raw) To: Jiri Pirko; +Cc: netdev, davem, edumazet, bhutchings, psimerda On Mon, Dec 03, 2012 at 12:16:32PM +0100, Jiri Pirko wrote: > Do the same thing as in set mac. Call notifiers every time. > > Signed-off-by: Jiri Pirko <jiri@resnulli.us> > --- > net/core/dev.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/core/dev.c b/net/core/dev.c > index 2f94df2..0685a72 100644 > --- a/net/core/dev.c > +++ b/net/core/dev.c > @@ -4971,7 +4971,7 @@ int dev_set_mtu(struct net_device *dev, int new_mtu) > else > dev->mtu = new_mtu; > > - if (!err && dev->flags & IFF_UP) > + if (!err) > call_netdevice_notifiers(NETDEV_CHANGEMTU, dev); > return err; > } I'm not opposed to this change, but is there something that it expressly fixes? While it doesn't hurt to send around mtu change events, one would presume that listeners would pick up mtu changes when the NETDEV_UP event went' around. Neil ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch net-next] net: call notifiers for mtu change even if iface is not up 2012-12-03 14:18 ` Neil Horman @ 2012-12-03 14:22 ` Jiri Pirko 2012-12-03 15:22 ` Neil Horman 0 siblings, 1 reply; 7+ messages in thread From: Jiri Pirko @ 2012-12-03 14:22 UTC (permalink / raw) To: Neil Horman; +Cc: netdev, davem, edumazet, bhutchings, psimerda Mon, Dec 03, 2012 at 03:18:23PM CET, nhorman@tuxdriver.com wrote: >On Mon, Dec 03, 2012 at 12:16:32PM +0100, Jiri Pirko wrote: >> Do the same thing as in set mac. Call notifiers every time. >> >> Signed-off-by: Jiri Pirko <jiri@resnulli.us> >> --- >> net/core/dev.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/net/core/dev.c b/net/core/dev.c >> index 2f94df2..0685a72 100644 >> --- a/net/core/dev.c >> +++ b/net/core/dev.c >> @@ -4971,7 +4971,7 @@ int dev_set_mtu(struct net_device *dev, int new_mtu) >> else >> dev->mtu = new_mtu; >> >> - if (!err && dev->flags & IFF_UP) >> + if (!err) >> call_netdevice_notifiers(NETDEV_CHANGEMTU, dev); >> return err; >> } > >I'm not opposed to this change, but is there something that it expressly fixes? This is about a consistency. To have the same behaviour as set_mac for example. >While it doesn't hurt to send around mtu change events, one would presume that >listeners would pick up mtu changes when the NETDEV_UP event went' around. > >Neil > >-- >To unsubscribe from this list: send the line "unsubscribe netdev" in >the body of a message to majordomo@vger.kernel.org >More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch net-next] net: call notifiers for mtu change even if iface is not up 2012-12-03 14:22 ` Jiri Pirko @ 2012-12-03 15:22 ` Neil Horman 2012-12-07 12:29 ` Jiri Pirko 0 siblings, 1 reply; 7+ messages in thread From: Neil Horman @ 2012-12-03 15:22 UTC (permalink / raw) To: Jiri Pirko; +Cc: netdev, davem, edumazet, bhutchings, psimerda On Mon, Dec 03, 2012 at 03:22:29PM +0100, Jiri Pirko wrote: > Mon, Dec 03, 2012 at 03:18:23PM CET, nhorman@tuxdriver.com wrote: > >On Mon, Dec 03, 2012 at 12:16:32PM +0100, Jiri Pirko wrote: > >> Do the same thing as in set mac. Call notifiers every time. > >> > >> Signed-off-by: Jiri Pirko <jiri@resnulli.us> > >> --- > >> net/core/dev.c | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/net/core/dev.c b/net/core/dev.c > >> index 2f94df2..0685a72 100644 > >> --- a/net/core/dev.c > >> +++ b/net/core/dev.c > >> @@ -4971,7 +4971,7 @@ int dev_set_mtu(struct net_device *dev, int new_mtu) > >> else > >> dev->mtu = new_mtu; > >> > >> - if (!err && dev->flags & IFF_UP) > >> + if (!err) > >> call_netdevice_notifiers(NETDEV_CHANGEMTU, dev); > >> return err; > >> } > > > >I'm not opposed to this change, but is there something that it expressly fixes? > > This is about a consistency. To have the same behaviour as set_mac > for example. > > >While it doesn't hurt to send around mtu change events, one would presume that > >listeners would pick up mtu changes when the NETDEV_UP event went' around. > > > >Neil > > I figured, I just wanted to be sure that there wasn't a bug fix that needed documenting in the changelog, or that listeners for this event didn't expect the interface to already be up. It looks pretty clean, with the exception of the TIPC protocol. It appears that it might require enable_bearer to be called prior to any netdevice CHANGEMTU events, so that the eth_bearers array gets filled out, and it looks like that has to get triggered either by user space, or the receipt of a message over the network. Let me know what you think Neil > >-- > >To unsubscribe from this list: send the line "unsubscribe netdev" in > >the body of a message to majordomo@vger.kernel.org > >More majordomo info at http://vger.kernel.org/majordomo-info.html > -- > To unsubscribe from this list: send the line "unsubscribe netdev" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch net-next] net: call notifiers for mtu change even if iface is not up 2012-12-03 15:22 ` Neil Horman @ 2012-12-07 12:29 ` Jiri Pirko 2012-12-07 15:07 ` Neil Horman 0 siblings, 1 reply; 7+ messages in thread From: Jiri Pirko @ 2012-12-07 12:29 UTC (permalink / raw) To: Neil Horman; +Cc: netdev, davem, edumazet, bhutchings, psimerda Mon, Dec 03, 2012 at 04:22:50PM CET, nhorman@tuxdriver.com wrote: >On Mon, Dec 03, 2012 at 03:22:29PM +0100, Jiri Pirko wrote: >> Mon, Dec 03, 2012 at 03:18:23PM CET, nhorman@tuxdriver.com wrote: >> >On Mon, Dec 03, 2012 at 12:16:32PM +0100, Jiri Pirko wrote: >> >> Do the same thing as in set mac. Call notifiers every time. >> >> >> >> Signed-off-by: Jiri Pirko <jiri@resnulli.us> >> >> --- >> >> net/core/dev.c | 2 +- >> >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> >> >> diff --git a/net/core/dev.c b/net/core/dev.c >> >> index 2f94df2..0685a72 100644 >> >> --- a/net/core/dev.c >> >> +++ b/net/core/dev.c >> >> @@ -4971,7 +4971,7 @@ int dev_set_mtu(struct net_device *dev, int new_mtu) >> >> else >> >> dev->mtu = new_mtu; >> >> >> >> - if (!err && dev->flags & IFF_UP) >> >> + if (!err) >> >> call_netdevice_notifiers(NETDEV_CHANGEMTU, dev); >> >> return err; >> >> } >> > >> >I'm not opposed to this change, but is there something that it expressly fixes? >> >> This is about a consistency. To have the same behaviour as set_mac >> for example. >> >> >While it doesn't hurt to send around mtu change events, one would presume that >> >listeners would pick up mtu changes when the NETDEV_UP event went' around. >> > >> >Neil >> > >I figured, I just wanted to be sure that there wasn't a bug fix that needed >documenting in the changelog, or that listeners for this event didn't expect the >interface to already be up. It looks pretty clean, with the exception of the >TIPC protocol. It appears that it might require enable_bearer to be called >prior to any netdevice CHANGEMTU events, so that the eth_bearers array gets >filled out, and it looks like that has to get triggered either by user space, or >the receipt of a message over the network. Let me know what you think I'm looking at the code. What is the difference between CHANGEMTU and CHANGEADDR here? It looks to me that it should work for both in the same way. > >Neil > >> >-- >> >To unsubscribe from this list: send the line "unsubscribe netdev" in >> >the body of a message to majordomo@vger.kernel.org >> >More majordomo info at http://vger.kernel.org/majordomo-info.html >> -- >> To unsubscribe from this list: send the line "unsubscribe netdev" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html >> ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch net-next] net: call notifiers for mtu change even if iface is not up 2012-12-07 12:29 ` Jiri Pirko @ 2012-12-07 15:07 ` Neil Horman 2012-12-07 17:23 ` David Miller 0 siblings, 1 reply; 7+ messages in thread From: Neil Horman @ 2012-12-07 15:07 UTC (permalink / raw) To: Jiri Pirko; +Cc: netdev, davem, edumazet, bhutchings, psimerda On Fri, Dec 07, 2012 at 01:29:20PM +0100, Jiri Pirko wrote: > Mon, Dec 03, 2012 at 04:22:50PM CET, nhorman@tuxdriver.com wrote: > >On Mon, Dec 03, 2012 at 03:22:29PM +0100, Jiri Pirko wrote: > >> Mon, Dec 03, 2012 at 03:18:23PM CET, nhorman@tuxdriver.com wrote: > >> >On Mon, Dec 03, 2012 at 12:16:32PM +0100, Jiri Pirko wrote: > >> >> Do the same thing as in set mac. Call notifiers every time. > >> >> > >> >> Signed-off-by: Jiri Pirko <jiri@resnulli.us> > >> >> --- > >> >> net/core/dev.c | 2 +- > >> >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> >> > >> >> diff --git a/net/core/dev.c b/net/core/dev.c > >> >> index 2f94df2..0685a72 100644 > >> >> --- a/net/core/dev.c > >> >> +++ b/net/core/dev.c > >> >> @@ -4971,7 +4971,7 @@ int dev_set_mtu(struct net_device *dev, int new_mtu) > >> >> else > >> >> dev->mtu = new_mtu; > >> >> > >> >> - if (!err && dev->flags & IFF_UP) > >> >> + if (!err) > >> >> call_netdevice_notifiers(NETDEV_CHANGEMTU, dev); > >> >> return err; > >> >> } > >> > > >> >I'm not opposed to this change, but is there something that it expressly fixes? > >> > >> This is about a consistency. To have the same behaviour as set_mac > >> for example. > >> > >> >While it doesn't hurt to send around mtu change events, one would presume that > >> >listeners would pick up mtu changes when the NETDEV_UP event went' around. > >> > > >> >Neil > >> > > >I figured, I just wanted to be sure that there wasn't a bug fix that needed > >documenting in the changelog, or that listeners for this event didn't expect the > >interface to already be up. It looks pretty clean, with the exception of the > >TIPC protocol. It appears that it might require enable_bearer to be called > >prior to any netdevice CHANGEMTU events, so that the eth_bearers array gets > >filled out, and it looks like that has to get triggered either by user space, or > >the receipt of a message over the network. Let me know what you think > > I'm looking at the code. What is the difference between CHANGEMTU and > CHANGEADDR here? It looks to me that it should work for both in the same > way. > Hmm, they do work in the same way, which likely means that tipc is probably begging to oops there regardless of having your patch or not :) I'll get around to fixing that shortly. Since your patch then isn't going to break anything that isn't already broken Acked-by: Neil Horman <nhorman@tuxdriver.com> > > > > >Neil > > > >> >-- > >> >To unsubscribe from this list: send the line "unsubscribe netdev" in > >> >the body of a message to majordomo@vger.kernel.org > >> >More majordomo info at http://vger.kernel.org/majordomo-info.html > >> -- > >> To unsubscribe from this list: send the line "unsubscribe netdev" in > >> the body of a message to majordomo@vger.kernel.org > >> More majordomo info at http://vger.kernel.org/majordomo-info.html > >> > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch net-next] net: call notifiers for mtu change even if iface is not up 2012-12-07 15:07 ` Neil Horman @ 2012-12-07 17:23 ` David Miller 0 siblings, 0 replies; 7+ messages in thread From: David Miller @ 2012-12-07 17:23 UTC (permalink / raw) To: nhorman; +Cc: jiri, netdev, edumazet, bhutchings, psimerda From: Neil Horman <nhorman@tuxdriver.com> Date: Fri, 7 Dec 2012 10:07:08 -0500 > On Fri, Dec 07, 2012 at 01:29:20PM +0100, Jiri Pirko wrote: >> Mon, Dec 03, 2012 at 04:22:50PM CET, nhorman@tuxdriver.com wrote: >> >On Mon, Dec 03, 2012 at 03:22:29PM +0100, Jiri Pirko wrote: >> >> Mon, Dec 03, 2012 at 03:18:23PM CET, nhorman@tuxdriver.com wrote: >> >> >On Mon, Dec 03, 2012 at 12:16:32PM +0100, Jiri Pirko wrote: >> >> >> Do the same thing as in set mac. Call notifiers every time. >> >> >> >> >> >> Signed-off-by: Jiri Pirko <jiri@resnulli.us> ... > Acked-by: Neil Horman <nhorman@tuxdriver.com> Applied. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-12-07 17:23 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-12-03 11:16 [patch net-next] net: call notifiers for mtu change even if iface is not up Jiri Pirko 2012-12-03 14:18 ` Neil Horman 2012-12-03 14:22 ` Jiri Pirko 2012-12-03 15:22 ` Neil Horman 2012-12-07 12:29 ` Jiri Pirko 2012-12-07 15:07 ` Neil Horman 2012-12-07 17:23 ` David Miller
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).