Skip to content

Commit 057aec0

Browse files
yishaihdledford
authored andcommitted
IB/uverbs: Explicitly pass ib_dev to uverbs commands
Done in preparation for deploying RCU for the device removal flow. Allows isolating the RCU handling to the uverb_main layer and keeping the uverbs_cmd code as is. Signed-off-by: Yishai Hadas <yishaih@mellanox.com> Signed-off-by: Shachar Raindel <raindel@mellanox.com> Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
1 parent 35d4a0b commit 057aec0

File tree

3 files changed

+88
-39
lines changed

3 files changed

+88
-39
lines changed

drivers/infiniband/core/uverbs.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ extern struct idr ib_uverbs_rule_idr;
178178
void idr_remove_uobj(struct idr *idp, struct ib_uobject *uobj);
179179

180180
struct file *ib_uverbs_alloc_event_file(struct ib_uverbs_file *uverbs_file,
181+
struct ib_device *ib_dev,
181182
int is_async);
182183
void ib_uverbs_free_async_event_file(struct ib_uverbs_file *uverbs_file);
183184
struct ib_uverbs_event_file *ib_uverbs_lookup_comp_file(int fd);
@@ -214,6 +215,7 @@ struct ib_uverbs_flow_spec {
214215

215216
#define IB_UVERBS_DECLARE_CMD(name) \
216217
ssize_t ib_uverbs_##name(struct ib_uverbs_file *file, \
218+
struct ib_device *ib_dev, \
217219
const char __user *buf, int in_len, \
218220
int out_len)
219221

@@ -255,6 +257,7 @@ IB_UVERBS_DECLARE_CMD(close_xrcd);
255257

256258
#define IB_UVERBS_DECLARE_EX_CMD(name) \
257259
int ib_uverbs_ex_##name(struct ib_uverbs_file *file, \
260+
struct ib_device *ib_dev, \
258261
struct ib_udata *ucore, \
259262
struct ib_udata *uhw)
260263

0 commit comments

Comments
 (0)