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>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user