mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]> Reviewed-by: Parav Pandit <[email protected]>
This commit is contained in:
parent
3b88afd38e
commit
e59178d895
2 changed files with 47 additions and 6 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue