aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Hefty <sean.hefty@intel.com>2010-05-06 16:20:48 -0700
committerRoland Dreier <rolandd@cisco.com>2010-05-16 15:15:34 -0700
commit6fa6bb3f28b3c08146718898a8a2ab8ae759b2b4 (patch)
tree17bd3a3952f1a977dccf03eea1dbc9d1298a4fb4
parent69c9d02748975807593615934f632e48b4e6f70c (diff)
downloadlibibverbs-6fa6bb3f28b3c08146718898a8a2ab8ae759b2b4.tar.gz
Add path record definitions to sa.h
Add definitions for path record wire definition. This will be used by the librdmacm and ib_acm service, and is exchanged with the kernel using the newer set and query route functionality. Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r--include/infiniband/sa.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/include/infiniband/sa.h b/include/infiniband/sa.h
index ec90f14..1153e94 100644
--- a/include/infiniband/sa.h
+++ b/include/infiniband/sa.h
@@ -97,4 +97,39 @@ struct ibv_sa_service_rec {
uint64_t data64[2];
};
+#define IBV_PATH_RECORD_REVERSIBLE 0x80
+
+struct ibv_path_record {
+ uint64_t service_id;
+ union ibv_gid dgid;
+ union ibv_gid sgid;
+ uint16_t dlid;
+ uint16_t slid;
+ uint32_t flowlabel_hoplimit; /* resv-31:28 flow label-27:8 hop limit-7:0*/
+ uint8_t tclass;
+ uint8_t reversible_numpath; /* reversible-7:7 num path-6:0 */
+ uint16_t pkey;
+ uint16_t qosclass_sl; /* qos class-15:4 sl-3:0 */
+ uint8_t mtu; /* mtu selector-7:6 mtu-5:0 */
+ uint8_t rate; /* rate selector-7:6 rate-5:0 */
+ uint8_t packetlifetime; /* lifetime selector-7:6 lifetime-5:0 */
+ uint8_t preference;
+ uint8_t reserved[6];
+};
+
+#define IBV_PATH_FLAG_GMP (1<<0)
+#define IBV_PATH_FLAG_PRIMARY (1<<1)
+#define IBV_PATH_FLAG_ALTERNATE (1<<2)
+#define IBV_PATH_FLAG_OUTBOUND (1<<3)
+#define IBV_PATH_FLAG_INBOUND (1<<4)
+#define IBV_PATH_FLAG_INBOUND_REVERSE (1<<5)
+#define IBV_PATH_FLAG_BIDIRECTIONAL (IBV_PATH_FLAG_OUTBOUND | \
+ IBV_PATH_FLAG_INBOUND_REVERSE)
+
+struct ibv_path_data {
+ uint32_t flags;
+ uint32_t reserved;
+ struct ibv_path_record path;
+};
+
#endif /* INFINIBAND_SA_H */