* [Bridge] [Patch] bridge: call NETDEV_ENSLAVE notifiers when adding a slave [not found] <1305794393-20775-1-git-send-email-amwang@redhat.com> @ 2011-05-19 10:24 ` Amerigo Wang 2011-05-19 15:12 ` Stephen Hemminger 0 siblings, 1 reply; 4+ messages in thread From: Amerigo Wang @ 2011-05-19 10:24 UTC (permalink / raw) To: linux-kernel Cc: Neil Horman, bridge, WANG Cong, netdev, Jay Vosburgh, akpm, David S. Miller In the previous patch I added NETDEV_ENSLAVE, now we can notify netconsole when adding a device to a bridge too. By the way, s/netdev_bonding_change/call_netdevice_notifiers/ in bond_main.c, since this is not bonding specific. Signed-off-by: WANG Cong <amwang@redhat.com> Cc: Neil Horman <nhorman@redhat.com> --- drivers/net/bonding/bond_main.c | 2 +- net/bridge/br_if.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index b9c70c5..765fdcf 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -1640,7 +1640,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev) } } - netdev_bonding_change(slave_dev, NETDEV_ENSLAVE); + call_netdevice_notifiers(NETDEV_ENSLAVE, slave_dev); /* If this is the first slave, then we need to set the master's hardware * address to be the same as the slave's. */ diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index 5dbdfdf..b44fae5 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c @@ -338,6 +338,8 @@ int br_add_if(struct net_bridge *br, struct net_device *dev) if (IS_ERR(p)) return PTR_ERR(p); + call_netdevice_notifiers(NETDEV_ENSLAVE, dev); + err = dev_set_promiscuity(dev, 1); if (err) goto put_back; ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Bridge] [Patch] bridge: call NETDEV_ENSLAVE notifiers when adding a slave 2011-05-19 10:24 ` [Bridge] [Patch] bridge: call NETDEV_ENSLAVE notifiers when adding a slave Amerigo Wang @ 2011-05-19 15:12 ` Stephen Hemminger 2011-05-19 16:04 ` Stephen Hemminger 0 siblings, 1 reply; 4+ messages in thread From: Stephen Hemminger @ 2011-05-19 15:12 UTC (permalink / raw) To: Amerigo Wang Cc: Neil Horman, bridge, netdev, Jay Vosburgh, linux-kernel, akpm, David S. Miller On Thu, 19 May 2011 18:24:17 +0800 Amerigo Wang <amwang@redhat.com> wrote: > In the previous patch I added NETDEV_ENSLAVE, now > we can notify netconsole when adding a device to a bridge too. > > By the way, s/netdev_bonding_change/call_netdevice_notifiers/ in > bond_main.c, since this is not bonding specific. > > Signed-off-by: WANG Cong <amwang@redhat.com> > Cc: Neil Horman <nhorman@redhat.com> > Is there a usage for this? What listens for this notification? ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Bridge] [Patch] bridge: call NETDEV_ENSLAVE notifiers when adding a slave 2011-05-19 15:12 ` Stephen Hemminger @ 2011-05-19 16:04 ` Stephen Hemminger 2011-05-20 3:06 ` Cong Wang 0 siblings, 1 reply; 4+ messages in thread From: Stephen Hemminger @ 2011-05-19 16:04 UTC (permalink / raw) To: Stephen Hemminger Cc: Neil Horman, Jay Vosburgh, Amerigo Wang, netdev, bridge, linux-kernel, akpm, David S. Miller On Thu, 19 May 2011 08:12:13 -0700 Stephen Hemminger <shemminger@linux-foundation.org> wrote: > On Thu, 19 May 2011 18:24:17 +0800 > Amerigo Wang <amwang@redhat.com> wrote: > > > In the previous patch I added NETDEV_ENSLAVE, now > > we can notify netconsole when adding a device to a bridge too. > > > > By the way, s/netdev_bonding_change/call_netdevice_notifiers/ in > > bond_main.c, since this is not bonding specific. > > > > Signed-off-by: WANG Cong <amwang@redhat.com> > > Cc: Neil Horman <nhorman@redhat.com> > > > > Is there a usage for this? What listens for this notification? Never mind it was in the first patch which you did not send. You should always put a number on group of patches and send to all parties. Also, sending networking patches to LKML is a waste of bandwidth please don't bother. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Bridge] [Patch] bridge: call NETDEV_ENSLAVE notifiers when adding a slave 2011-05-19 16:04 ` Stephen Hemminger @ 2011-05-20 3:06 ` Cong Wang 0 siblings, 0 replies; 4+ messages in thread From: Cong Wang @ 2011-05-20 3:06 UTC (permalink / raw) To: Stephen Hemminger Cc: Neil Horman, Jay Vosburgh, netdev, bridge, linux-kernel, akpm, David S. Miller 于 2011年05月20日 00:04, Stephen Hemminger 写道: > On Thu, 19 May 2011 08:12:13 -0700 > Stephen Hemminger<shemminger@linux-foundation.org> wrote: > >> On Thu, 19 May 2011 18:24:17 +0800 >> Amerigo Wang<amwang@redhat.com> wrote: >> >>> In the previous patch I added NETDEV_ENSLAVE, now >>> we can notify netconsole when adding a device to a bridge too. >>> >>> By the way, s/netdev_bonding_change/call_netdevice_notifiers/ in >>> bond_main.c, since this is not bonding specific. >>> >>> Signed-off-by: WANG Cong<amwang@redhat.com> >>> Cc: Neil Horman<nhorman@redhat.com> >>> >> >> Is there a usage for this? What listens for this notification? > > Never mind it was in the first patch which you did not send. > You should always put a number on group of patches and send > to all parties. Ah, sorry, my script simply run get_maintainers.pl to get the Cc list, so bridge list was not in included in the first patch. > > Also, sending networking patches to LKML is a waste of bandwidth > please don't bother. Ok, will fix my script. Thanks. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-05-20 3:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1305794393-20775-1-git-send-email-amwang@redhat.com>
2011-05-19 10:24 ` [Bridge] [Patch] bridge: call NETDEV_ENSLAVE notifiers when adding a slave Amerigo Wang
2011-05-19 15:12 ` Stephen Hemminger
2011-05-19 16:04 ` Stephen Hemminger
2011-05-20 3:06 ` Cong Wang
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).