Message ID | 1343403484-29347-5-git-send-email-amwang@redhat.com |
---|---|
State | Changes Requested, archived |
Delegated to: | David Miller |
Headers | show |
On Fri, 27 Jul 2012 23:38:01 +0800 Cong Wang <amwang@redhat.com> wrote: > When a bridge interface deletes its underlying ports, it should > notify netconsole too, like what bonding interface does. > > Cc: "David S. Miller" <davem@davemloft.net> > Signed-off-by: Cong Wang <amwang@redhat.com> > --- > net/bridge/br_if.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c > index e1144e1..d243914 100644 > --- a/net/bridge/br_if.c > +++ b/net/bridge/br_if.c > @@ -427,6 +427,7 @@ int br_del_if(struct net_bridge *br, struct net_device *dev) > if (!p || p->br != br) > return -EINVAL; > > + call_netdevice_notifiers(NETDEV_RELEASE, br->dev); > del_nbp(p); > > spin_lock_bh(&br->lock); Since you can have multiple ports attached to the bridge, this doesn't seem correct. Don't you want the netconsole to keep going on the other ports of the bridge? What exactly is the problem with having netconsole persist? -- 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
On Fri, 2012-07-27 at 08:50 -0700, Stephen Hemminger wrote: > On Fri, 27 Jul 2012 23:38:01 +0800 > Cong Wang <amwang@redhat.com> wrote: > > > When a bridge interface deletes its underlying ports, it should > > notify netconsole too, like what bonding interface does. > > > > Cc: "David S. Miller" <davem@davemloft.net> > > Signed-off-by: Cong Wang <amwang@redhat.com> > > --- > > net/bridge/br_if.c | 1 + > > 1 files changed, 1 insertions(+), 0 deletions(-) > > > > diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c > > index e1144e1..d243914 100644 > > --- a/net/bridge/br_if.c > > +++ b/net/bridge/br_if.c > > @@ -427,6 +427,7 @@ int br_del_if(struct net_bridge *br, struct net_device *dev) > > if (!p || p->br != br) > > return -EINVAL; > > > > + call_netdevice_notifiers(NETDEV_RELEASE, br->dev); > > del_nbp(p); > > > > spin_lock_bh(&br->lock); > > Since you can have multiple ports attached to the bridge, this > doesn't seem correct. Don't you want the netconsole to keep going > on the other ports of the bridge? > > What exactly is the problem with having netconsole persist? Hmm, I saw an incorrect log message when deleting the last port from the bridge when netconsole is setup on it. After rethinking it today, you are right we should not simply disable netconsole when one port is detached, as we have no way to know if that port is used to reach the netconsole server. So, please ignore this patch. Thanks. -- 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
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index e1144e1..d243914 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c @@ -427,6 +427,7 @@ int br_del_if(struct net_bridge *br, struct net_device *dev) if (!p || p->br != br) return -EINVAL; + call_netdevice_notifiers(NETDEV_RELEASE, br->dev); del_nbp(p); spin_lock_bh(&br->lock);
When a bridge interface deletes its underlying ports, it should notify netconsole too, like what bonding interface does. Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Cong Wang <amwang@redhat.com> --- net/bridge/br_if.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)