From: Eli Cohen <eli@dev.mellanox.co.il>
To: Or Gerlitz <ogerlitz@voltaire.com>
Cc: netdev@vger.kernel.org, Roland Dreier <rdreier@cisco.com>,
general-list <general@lists.openfabrics.org>
Subject: Re: [ofa-general] [PATCH] IB/IPoIB: Fix change mtu when switching to UD mode
Date: Tue, 1 Jul 2008 16:42:29 +0300 [thread overview]
Message-ID: <20080701134229.GC14384@mtls03> (raw)
In-Reply-To: <486A1CB1.1020904@voltaire.com>
On Tue, Jul 01, 2008 at 03:01:53PM +0300, Or Gerlitz wrote:
> The calls to dev_set_mtu from the bonding driver are from the device
> .set_mtu function and this means that the caller have taken the appropriate
> locking needed (set mtu is done on the master which in turn does it on the
> slaves). Recently, I worked on some change to bonding and throughout this
> work I learned on the need (must) to call the rtnl locking when invoking a
> dev_set_x function who further does call_netdevice_notifiers(), see
>
> "the correct locking context for the notifier calls (which is RTNL and
> nothing else)"
>
> comment from the bonding maintainer in
> http://marc.info/?l=linux-netdev&m=121201324611292&w=2
>
I see, though I would expect to see a comment stating this requirement
both at the documentation of call_netdevice_notifiers() and that of
dev_set_mtu() and any other exported functions that requires this kind
of locking.
Moreover, in this specific case, it appears that it is not required to
take the rtlnl lock -- if it would be a must, I would have experienced
a dump_stack() due to
ASSERT_RTNL();
in bond_alb_handle_active_change().
The fact that I did not hit such an assert does not mean I may avoid
taking the rtnl lock but it appears to me that the issue is not well
undrestood.
next parent reply other threads:[~2008-07-01 13:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080630160651.GA6024@mtls03>
[not found] ` <4869CE9C.2050408@voltaire.com>
[not found] ` <20080701071559.GE6024@mtls03>
[not found] ` <486A1CB1.1020904@voltaire.com>
2008-07-01 13:42 ` Eli Cohen [this message]
2008-07-01 13:45 ` [ofa-general] [PATCH] IB/IPoIB: Fix change mtu when switching to UD mode Eli Cohen
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=20080701134229.GC14384@mtls03 \
--to=eli@dev.mellanox.co.il \
--cc=general@lists.openfabrics.org \
--cc=netdev@vger.kernel.org \
--cc=ogerlitz@voltaire.com \
--cc=rdreier@cisco.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.