[ofa-general] [PATCH] IB/IPoIB: Fix change mtu when switching to UD mode

Or Gerlitz ogerlitz at voltaire.com
Tue Jul 1 05:01:53 PDT 2008


Eli Cohen wrote:
> I am not calling call_netdevice_notifiers() directly but through dev_set_mtu() and the only other place I see that makes use of dev_set_mtu() is bond_change_mtu() and it does not usertnl_lock()/rtnl_unlock().
Eli,

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

Again, other than the need to add rtnl locking, I think the patch is 
good and should be merged.


Or




More information about the general mailing list