[openib-general] Re: RDMA Generic Connection Management

Michael S. Tsirkin mst at mellanox.co.il
Mon Aug 29 13:08:16 PDT 2005


Quoting r. Guy German <guyg at voltaire.com>:
> 1. get_device returns device and port, according the local routing
> tables, synchronously. ib_cma_connect calls the at module for address
> resolving (cache handled) before calling the cm_connect.

How does one cancel address resolution request?

> 2. get_device registers an upcall and return in the upcall the data path
> to the consumer. In this case caching is done by the consumer.
> 
> I prefer option 1, because it makes the consumer code simpler, without
> having to handle upcalls for address translations (which are not
> asynchronous in iWARP) or hold the transport's data information. Also it
> saves the consumer the trouble of caching routes to destinations.
> 
> I would like to hear what other people in the list think of it ...

In the case of callback (option 2) I really hope functions will work
with some kind of object pointer, avoiding another layer of
hash lookups and stuff.

Something like

struct ib_cma_path {
  struct ib_device *device;
  struct list_head arp_list;
  struct ib_sa_query *query;
  int id;
  .....
  void (*comp_handler)(struct ib_cma_path *, int status);
};

Users should simply pass this object back to the cancel request.

I am also in favor of making this structure public, making it possible
for users to add arbitrary amount of private data by simply inheriting
the structure and using container_of in comp_handler, but this is a
separate issue.

-- 
MST



More information about the general mailing list