[openib-general] Proposed device enumeration & async event APIs

Grant Grundler iod00d at hp.com
Mon Sep 13 13:10:03 PDT 2004


On Mon, Sep 13, 2004 at 12:38:53PM -0700, Roland Dreier wrote:
>     Grant> This sounds no different than say tulip driver which might
>     Grant> claim multiple 100BT cards below different PCI Busses.
> 
> The difference is that not only can only a client have multiple
> devices, but also a device can have multiple clients.  So PCI devices
> can get away with a single slot to track driver context.

I'm suggesting there should be an equivalent 1:1 for each IPoIB instance.
ie each IPoIB client is dealing with a virtual NIC.

>     Grant> I expect each client to have some data structure to track
>     Grant> state info and each "parent" device must know something
>     Grant> about it. Ie when the parent device goes away, each related
>     Grant> client instance must be notified.  Or is that not true
>     Grant> either?
> 
> There's a list of devices and a list of clients.  When a device is
> added or removed, every client on the list gets a callback (ib_device
> is sort of like class_device and ib_client is sort of like
> class_interface in the driver model).

We don't know which client instances are bound to a particular device?

> 
>     Grant> I agree we can't avoid the dynamic allocation.  But we can
>     Grant> choose when it happens.  I'm just questioning if it really
>     Grant> needs to happen in get/set private data.  I'm thinking it
>     Grant> should happen during some part of the initialization and
>     Grant> removal of specific instances of a client.
> 
> Sure, we could allocate client context before we call the client back
> for a device add (and just not even call the client back if the
> allocation failed).  Does that seem better?

Yeah - I think so. It would match the analogy to PCI support alot better.
And the IB support interfaces would in turn behave like those for PCI
as well - and not just look like them.

But I don't want to turn the IB world upside down to make that work.
If if doesn't make sense, do it the way you proposed originally.

thanks,
grant



More information about the general mailing list