[openib-general] Proposed device enumeration & async event APIs
Roland Dreier
roland at topspin.com
Mon Sep 13 12:38:53 PDT 2004
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.
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).
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?
- R.
More information about the general
mailing list