diff options
author | Steve Wise <swise@opengridcomputing.com> | 2018-05-03 08:41:42 -0700 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2018-05-03 15:51:27 -0400 |
commit | 73937e8a030b046c6b0fa73868bee25647a29be4 (patch) | |
tree | 64a5ed23127f046432fc64eef2453beaf5e0f3d7 /include/rdma/restrack.h | |
parent | da5c8507821573b8ed6e3f47e009f273493ffaf7 (diff) |
RDMA/nldev: helper functions to add driver attributes
These help rdma drivers to fill out the driver entries.
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'include/rdma/restrack.h')
-rw-r--r-- | include/rdma/restrack.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/rdma/restrack.h b/include/rdma/restrack.h index 14304e249685..637968589922 100644 --- a/include/rdma/restrack.h +++ b/include/rdma/restrack.h @@ -12,6 +12,7 @@ #include <linux/kref.h> #include <linux/completion.h> #include <linux/sched/task.h> +#include <uapi/rdma/rdma_netlink.h> /** * enum rdma_restrack_type - HW objects to track @@ -183,4 +184,14 @@ static inline void rdma_restrack_set_task(struct rdma_restrack_entry *res, res->task = task; } +/* + * Helper functions for rdma drivers when filling out + * nldev driver attributes. + */ +int rdma_nl_put_driver_u32(struct sk_buff *msg, const char *name, u32 value); +int rdma_nl_put_driver_u32_hex(struct sk_buff *msg, const char *name, + u32 value); +int rdma_nl_put_driver_u64(struct sk_buff *msg, const char *name, u64 value); +int rdma_nl_put_driver_u64_hex(struct sk_buff *msg, const char *name, + u64 value); #endif /* _RDMA_RESTRACK_H_ */ |