diff options
author | Steve Wise <swise@opengridcomputing.com> | 2018-05-03 17:41:42 +0200 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2018-05-03 21:51:27 +0200 |
commit | 73937e8a030b046c6b0fa73868bee25647a29be4 (patch) | |
tree | 64a5ed23127f046432fc64eef2453beaf5e0f3d7 /include/rdma | |
parent | RDMA/nldev: add driver-specific resource tracking (diff) | |
download | linux-73937e8a030b046c6b0fa73868bee25647a29be4.tar.xz linux-73937e8a030b046c6b0fa73868bee25647a29be4.zip |
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')
-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_ */ |