[openib-general] Proposed device enumeration & async event APIs
Roland Dreier
roland at topspin.com
Fri Sep 10 14:28:43 PDT 2004
Fab> This sounds sane. Are existing device notifications invoked
Fab> from the thread context of the ib_register_client function?
Fab> In other words, does the ib_register_client function return
Fab> before or after the client has receive notifications of
Fab> existing events? Does ib_unregister_client synchronize with
Fab> callback delivery? Does ib_unregister_client send "pretend"
Fab> removal events?
Yes to all of these questions. Basically register does:
lock device list
add client to client list
generate add callbacks for existing devices
unlock device list
and unregister does
lock device list
remove client from client list
generate remove callbacks for existing
unlock device list
Adding a device does
lock device list
add device to device list
generate add callbacks for existing clients
unlock device list
and removing a device does
lock device list
remove device from device list
generate add callbacks for existing clients
unlock device list
So everything is synchronized by the lock and all fake events are generated.
Fab> Why does ib_register_event_handler take a device as input?
Fab> Is this device the same as event_handler.device? Why not
Fab> just use the event handler's device instead?
No good reason -- in fact I'll get rid of the parameter.
Thanks for the comments.
- Roland
More information about the general
mailing list