summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorSean Hefty <sean.hefty@intel.com>2013-05-29 19:09:26 +0200
committerRoland Dreier <roland@purestorage.com>2013-06-21 08:35:39 +0200
commit2e08b5879e9244fa893fe09f5b887f72f4e6c29b (patch)
tree4390a3f69fde121e64c876ee04bb3ce875fb7ed0 /drivers/infiniband
parentRDMA/ucma: Support querying for AF_IB addresses (diff)
downloadlinux-2e08b5879e9244fa893fe09f5b887f72f4e6c29b.tar.xz
linux-2e08b5879e9244fa893fe09f5b887f72f4e6c29b.zip
IB/sa: Export function to pack a path record into wire format
Allow converting from struct ib_sa_path_rec to the IB defined SA path record wire format. This will be used to report path data from the rdma cm into user space. Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/core/sa_query.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/infiniband/core/sa_query.c b/drivers/infiniband/core/sa_query.c
index 934f45e79e5e..9838ca484389 100644
--- a/drivers/infiniband/core/sa_query.c
+++ b/drivers/infiniband/core/sa_query.c
@@ -652,6 +652,12 @@ void ib_sa_unpack_path(void *attribute, struct ib_sa_path_rec *rec)
}
EXPORT_SYMBOL(ib_sa_unpack_path);
+void ib_sa_pack_path(struct ib_sa_path_rec *rec, void *attribute)
+{
+ ib_pack(path_rec_table, ARRAY_SIZE(path_rec_table), rec, attribute);
+}
+EXPORT_SYMBOL(ib_sa_pack_path);
+
static void ib_sa_path_rec_callback(struct ib_sa_query *sa_query,
int status,
struct ib_sa_mad *mad)