netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [ofa-general] [PATCH] IB/IPoIB: Fix change mtu when switching to UD mode
       [not found]     ` <486A1CB1.1020904@voltaire.com>
@ 2008-07-01 13:42       ` Eli Cohen
  2008-07-01 13:45         ` Eli Cohen
  0 siblings, 1 reply; 2+ messages in thread
From: Eli Cohen @ 2008-07-01 13:42 UTC (permalink / raw)
  To: Or Gerlitz; +Cc: netdev, Roland Dreier, general-list

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ofa-general] [PATCH] IB/IPoIB: Fix change mtu when switching to UD mode
  2008-07-01 13:42       ` [ofa-general] [PATCH] IB/IPoIB: Fix change mtu when switching to UD mode Eli Cohen
@ 2008-07-01 13:45         ` Eli Cohen
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Cohen @ 2008-07-01 13:45 UTC (permalink / raw)
  To: Or Gerlitz; +Cc: netdev, Roland Dreier, general-list

On Tue, Jul 01, 2008 at 04:42:29PM +0300, Eli Cohen wrote:
> 
> 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().

Or some other function registered for notifications.

> 
> 
> 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.
> _______________________________________________
> general mailing list
> general@lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
> 
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-07-01 13:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [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       ` [ofa-general] [PATCH] IB/IPoIB: Fix change mtu when switching to UD mode Eli Cohen
2008-07-01 13:45         ` Eli Cohen

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).