Skip to content

Commit 1f7ff9d

Browse files
matanb10jgunthorpe
authored andcommitted
IB/uverbs: Move to new headers and make naming consistent
Use macros to make names consistent in ioctl() uAPI: The ioctl() uAPI works with object-method hierarchy. The method part also states which handler should be executed when this method is called from user-space. Therefore, we need to tie method, method's id, method's handler and the object owning this method together. Previously, this was done through explicit developer chosen names. This makes grepping the code harder. Changing the method's name, method's handler and object's name to be automatically generated based on the ids. The headers are split in a way so they be included and used by user-space. One header strictly contains structures that are used directly by user-space applications, where another header is used for internal library (i.e. libibverbs) to form the ioctl() commands. Other header simply contains the required general command structure. Reviewed-by: Yishai Hadas <[email protected]> Signed-off-by: Matan Barak <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent b470c15 commit 1f7ff9d

File tree

10 files changed

+396
-247
lines changed

10 files changed

+396
-247
lines changed

drivers/infiniband/core/uverbs.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@
4747
#include <rdma/ib_umem.h>
4848
#include <rdma/ib_user_verbs.h>
4949

50+
#define UVERBS_MODULE_NAME ib_uverbs
51+
#include <rdma/uverbs_named_ioctl.h>
52+
5053
static inline void
5154
ib_uverbs_init_udata(struct ib_udata *udata,
5255
const void __user *ibuf,

0 commit comments

Comments
 (0)