[ofa-general] Re: [openib-general] [RFC] [PATCH v2] IB/ipoib: Add bonding support to IPoIB

Michael S. Tsirkin mst at mellanox.co.il
Tue Mar 6 10:53:07 PST 2007


> Quoting Moni Shoua <monisonlists at gmail.com>:
> Subject: Re: [openib-general] [RFC] [PATCH v2] IB/ipoib: Add bonding support to IPoIB
> 
> Michael S. Tsirkin wrote:
> >>>> +			if (ipoib_at_exit)
> >>>> +				nn->neighbour->parms->neigh_destructor = NULL;
> >>> Is it safe to do this without locking?
> >>> Could the destructor be in progress when we do this?
> >> I think you're right. Maybe I need to attack the issue in a different way.
> >> I need to do some rethinking.
> > 
> > The basic problem seems to be that bonding code is taking a pointer
> > into the module (neighbour setup) without taking reference on
> > the module.
> > 
> I tend to agree but what is the way to do that? 
> How can I prevent ib_ipoib from unloading if bonding is loaded?
> 
> I still have to be able to unregister net_devices (for hotplug)
> and I don't want to do something that will force other network devices (e.g. Ethernet)to change.
> 
> Is there a way to take reference count of a module in 2.6 kernels?

Look in linux/module.h
But taking out device reference might be better.

-- 
MST




More information about the general mailing list