Sean> I should also point out that the kernel CM returns a device Sean> pointer when reporting REQ and SIDR_REQ events, so it has Sean> similar issues supporting hotplug.
Hmm, good point. Perhaps we should make IB CM listens be per-device? Then the consumer is in control over which devices it might get called back on, and can clean up listens on device removal. Sean> One other solution that I can think of is to report devices Sean> using some sort of ID, which users would then need to match Sean> with a specific device structure. We could probably even Sean> provide a call similar to ib_get_client_data_by_id(id, Sean> client) to assist with lookups. That's one possibility. Another thing we could do is have the consumer pass a list of devices ("here are all the devices I know about") into the API. Then it would be clear in the client that the list of devices needs to be protected by a semaphore or whatever. We could also export an API to lock and unlock the list of registered devices, so clients could grab the semaphore across calls to the routing API. But exporting our locking to consumers is probably a bad idea -- how many people really grok the rtnl lock in the networking core? I have to admit none of these ideas thrill me. I hope someone has a bright idea for how to fix this. - R. _______________________________________________ openib-general mailing list openib-general@openib.org http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general