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>
This commit is contained in:
@@ -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_ */
|
||||
|
Reference in New Issue
Block a user