Michael S. Tsirkin wrote:
+       INIT_WORK(work, loopback_addr_handler, id_priv);
+       queue_work(wq, work);
+       return 0;
+err:
+       kfree(work);
+       return ret;
+}

I'm not following this: why are we deferring the work?
Cant it be done directly?

To keep rdma_resolve_addr() generic, it is an asynchronous call. The work queue is used to callback the user from a separate thread other than the one that they called down with. The ib_addr module does something similar when the destination address is actually a local address, deferring the callback to another thread.

The alternative is to have the API behave one way for destination addresses that are local, versus those that are remote, but this complicates applications that are not aware if an address belongs to the local or a remote system.

- Sean
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to