summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/include/ib_verbs.h
diff options
context:
space:
mode:
authorHal Rosenstock <halr@voltaire.com>2005-07-27 11:45:34 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-27 16:26:12 -0700
commit513789ed995fb2ba72ba2a5bee53ea11d1170580 (patch)
treefa9a4e73b9420a06af37290ba6ae405200dd0935 /drivers/infiniband/include/ib_verbs.h
parentcabe3cbcbb3b09637b9e706c49eadb180fca057e (diff)
downloadblackbird-op-linux-513789ed995fb2ba72ba2a5bee53ea11d1170580.tar.gz
blackbird-op-linux-513789ed995fb2ba72ba2a5bee53ea11d1170580.zip
[PATCH] IB: Add ib_create_ah_from_wc to IB verbs
Added new call: ib_create_ah_from_wc. Call will allocate an address handle given work completion information, including any received GRH. Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Hal Rosenstock <halr@voltaire.com> Cc: Roland Dreier <rolandd@cisco.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/infiniband/include/ib_verbs.h')
-rw-r--r--drivers/infiniband/include/ib_verbs.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/infiniband/include/ib_verbs.h b/drivers/infiniband/include/ib_verbs.h
index b6107c4b683a..5d24edaa66e6 100644
--- a/drivers/infiniband/include/ib_verbs.h
+++ b/drivers/infiniband/include/ib_verbs.h
@@ -289,6 +289,15 @@ struct ib_global_route {
u8 traffic_class;
};
+struct ib_grh {
+ u32 version_tclass_flow;
+ u16 paylen;
+ u8 next_hdr;
+ u8 hop_limit;
+ union ib_gid sgid;
+ union ib_gid dgid;
+};
+
enum {
IB_MULTICAST_QPN = 0xffffff
};
@@ -991,6 +1000,21 @@ int ib_dealloc_pd(struct ib_pd *pd);
struct ib_ah *ib_create_ah(struct ib_pd *pd, struct ib_ah_attr *ah_attr);
/**
+ * ib_create_ah_from_wc - Creates an address handle associated with the
+ * sender of the specified work completion.
+ * @pd: The protection domain associated with the address handle.
+ * @wc: Work completion information associated with a received message.
+ * @grh: References the received global route header. This parameter is
+ * ignored unless the work completion indicates that the GRH is valid.
+ * @port_num: The outbound port number to associate with the address.
+ *
+ * The address handle is used to reference a local or global destination
+ * in all UD QP post sends.
+ */
+struct ib_ah *ib_create_ah_from_wc(struct ib_pd *pd, struct ib_wc *wc,
+ struct ib_grh *grh, u8 port_num);
+
+/**
* ib_modify_ah - Modifies the address vector associated with an address
* handle.
* @ah: The address handle to modify.
OpenPOWER on IntegriCloud