diff options
author | Jason Gunthorpe <jgg@mellanox.com> | 2019-02-06 22:41:52 -0700 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-02-08 16:56:45 -0700 |
commit | e59178d895afa29b671323f8265a1e50afe989e5 (patch) | |
tree | 65e3c56bd4f7bc1780434ae50aa8fda0147d915d /include/rdma/ib_verbs.h | |
parent | 3b88afd38e88d1bb2e900204ff0af7301a379a09 (diff) | |
download | lwn-e59178d895afa29b671323f8265a1e50afe989e5.tar.gz lwn-e59178d895afa29b671323f8265a1e50afe989e5.zip |
RDMA/devices: Use xarray to store the clients
This gives each client a unique ID and will let us move client_data to use
xarray, and revise the locking scheme.
clients have to be add/removed in strict FIFO/LIFO order as they
interdepend. To support this the client_ids are assigned to increase in
FIFO order. The existing linked list is kept to support reverse iteration
until xarray can get a reverse iteration API.
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Reviewed-by: Parav Pandit <parav@mellanox.com>
Diffstat (limited to 'include/rdma/ib_verbs.h')
-rw-r--r-- | include/rdma/ib_verbs.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index d8ba987e8b29..cc15820513cd 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -2610,7 +2610,7 @@ struct ib_device { }; struct ib_client { - char *name; + const char *name; void (*add) (struct ib_device *); void (*remove)(struct ib_device *, void *client_data); @@ -2637,6 +2637,7 @@ struct ib_client { const struct sockaddr *addr, void *client_data); struct list_head list; + u32 client_id; /* kverbs are not required by the client */ u8 no_kverbs_req:1; |