From: Roland Dreier <rdreier@cisco.com>
To: Moni Shoua <monisonlists@gmail.com>
Cc: netdev@vger.kernel.org, Jay Vosburgh <fubar@us.ibm.com>,
OpenFabrics General <general@lists.openfabrics.org>
Subject: Re: [ofa-general] Re: [PATCH V5 2/11] IB/ipoib: Notify the world before doing unregister
Date: Sun, 23 Sep 2007 09:34:46 -0700 [thread overview]
Message-ID: <adar6kpwdax.fsf@cisco.com> (raw)
In-Reply-To: <46F61BF6.3000203@gmail.com> (Moni Shoua's message of "Sun, 23 Sep 2007 09:55:34 +0200")
> The action in bonding to a detach of slave is to unregister the master (see patch 10).
> This can't be done from the context of unregister_netdevice itself (it is protected by rtnl_lock).
I'm confused. Your patch has:
> + ipoib_slave_detach(cpriv->dev);
> unregister_netdev(cpriv->dev);
And ipoib_slave_detach() is:
> +static inline void ipoib_slave_detach(struct net_device *dev)
> +{
> + rtnl_lock();
> + netdev_slave_detach(dev);
> + rtnl_unlock();
> +}
so you are calling netdev_slave_detach() with the rtnl lock held.
Why can't you make the same call from the start of unregister_netdevice()?
Anyway, if the rtnl lock is a problem, can you just add the call to
netdev_slave_detach() to unregister_netdev() before it takes the rtnl lock?
- R.
next prev parent reply other threads:[~2007-09-23 16:34 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-20 13:33 [PATCH V5 0/11] net/bonding: ADD IPoIB support for the bonding driver Moni Shoua
2007-09-20 13:39 ` [ofa-general] [PATCH V5 1/11] net/core: add a netdev notification for slave detach Moni Shoua
2007-09-20 13:40 ` [PATCH V5 2/11] IB/ipoib: Notify the world before doing unregister Moni Shoua
2007-09-20 16:20 ` [ofa-general] " Roland Dreier
2007-09-23 7:55 ` Moni Shoua
2007-09-23 16:34 ` Roland Dreier [this message]
2007-09-24 13:56 ` Moni Shoua
2007-09-20 13:41 ` [ofa-general] [PATCH V5 3/11] IB/ipoib: Bound the net device to the ipoib_neigh structue Moni Shoua
2007-09-20 13:42 ` [PATCH V5 4/11] IB/ipoib: Verify address handle validity on send Moni Shoua
2007-09-20 13:43 ` [ofa-general] [PATCH V5 5/11] net/bonding: Enable bonding to enslave non ARPHRD_ETHER Moni Shoua
2007-09-20 13:45 ` [PATCH V5 6/11] net/bonding: Enable bonding to enslave netdevices not supporting set_mac_address() Moni Shoua
2007-09-20 13:58 ` [ofa-general] [PATCH V5 7/11] net/bonding: Enable IP multicast for bonding IPoIB devices Moni Shoua
2007-09-20 14:00 ` [ofa-general] [PATCH V5 8/11] net/bonding: Handlle wrong assumptions that slave is always an Ethernet device Moni Shoua
2007-09-20 14:02 ` [ofa-general] PATCH V5 9/11] net/bonding: Delay sending of gratuitous ARP to avoid failure Moni Shoua
2007-09-20 14:04 ` [PATCH V5 10/11] net/bonding: Destroy bonding master when last slave is gone Moni Shoua
2007-09-20 14:06 ` [PATCH V5 5/11] net/bonding: Enable bonding to enslave non ARPHRD_ETHER Moni Shoua
2007-09-20 14:07 ` [PATCH 11/11] bonding: Optionally allow ethernet slaves to keep own MAC Moni Shoua
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=adar6kpwdax.fsf@cisco.com \
--to=rdreier@cisco.com \
--cc=fubar@us.ibm.com \
--cc=general@lists.openfabrics.org \
--cc=monisonlists@gmail.com \
--cc=netdev@vger.kernel.org \
/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).