public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libibverbs: add path record definitions to sa.h
@ 2010-05-06 22:22 Sean Hefty
       [not found] ` <2420730B531C4665BD842A7F46007DA2-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
  0 siblings, 1 reply; 16+ messages in thread
From: Sean Hefty @ 2010-05-06 22:22 UTC (permalink / raw)
  To: Roland Dreier, linux-rdma

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-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
I went with the simpler definition, rather than defining bitfields.
Once a definition is accepted into the libibverbs git tree, I will
request that the same definition be pulled into the OFED 1.5.2 codebase.

 include/infiniband/sa.h |   37 +++++++++++++++++++++++++++++++++++++
 1 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/include/infiniband/sa.h b/include/infiniband/sa.h
index ec90f14..f475c66 100644
--- a/include/infiniband/sa.h
+++ b/include/infiniband/sa.h
@@ -97,4 +97,41 @@ struct ibv_sa_service_rec {
 	uint64_t      data64[2];
 };
 
+#define IB_PATH_RECORD_REVERSIBLE 0x80
+
+struct ib_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 IB_PATH_FLAG_GMP             (1<<0)
+#define IB_PATH_FLAG_PRIMARY         (1<<1)
+#define IB_PATH_FLAG_ALTERNATE       (1<<2)
+#define IB_PATH_FLAG_OUTBOUND        (1<<3)
+#define IB_PATH_FLAG_INBOUND         (1<<4)
+#define IB_PATH_FLAG_INBOUND_REVERSE (1<<5)
+#define IB_PATH_FLAG_BIDIRECTIONAL   (IB_PATH_FLAG_OUTBOUND |     \
+                                      IB_PATH_FLAG_INBOUND_REVERSE)
+
+struct ib_path_data
+{
+	uint32_t              flags;
+	uint32_t              reserved;
+	struct ib_path_record path;
+};
+
 #endif /* INFINIBAND_SA_H */



--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2010-05-21 15:03 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-06 22:22 [PATCH] libibverbs: add path record definitions to sa.h Sean Hefty
     [not found] ` <2420730B531C4665BD842A7F46007DA2-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2010-05-06 22:33   ` Roland Dreier
     [not found]     ` <adapr18zmmj.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
2010-05-06 23:20       ` [PATCH v2] " Sean Hefty
     [not found]         ` <63BD07796ED544AEAC6E41E669DC6EAC-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2010-05-12 23:07           ` Sean Hefty
     [not found]             ` <870D78B1ADDD407388ADBFF921BCFAC6-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2010-05-12 23:17               ` Roland Dreier
     [not found]                 ` <ada39xwu2v9.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
2010-05-12 23:21                   ` Sean Hefty
2010-05-16 22:16           ` Roland Dreier
     [not found]             ` <adavdano5lb.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
2010-05-17 13:38               ` Steve Wise
     [not found]                 ` <4BF146F2.5060909-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
2010-05-18  3:32                   ` Roland Dreier
     [not found]                     ` <adask5pnav3.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
2010-05-18 14:03                       ` Steve Wise
     [not found]                         ` <4BF29E3D.40704-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
2010-05-19 15:37                           ` Walukiewicz, Miroslaw
     [not found]                             ` <BE2BFE91933D1B4089447C64486040801D4D8232-IGOiFh9zz4wLt2AQoY/u9bfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2010-05-19 16:00                               ` Steve Wise
     [not found]                                 ` <4BF40B09.6070809-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
2010-05-19 21:21                                   ` Steve Wise
     [not found]                                     ` <4BF4565B.4040208-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
2010-05-19 21:31                                       ` Sean Hefty
2010-05-21 14:58                                   ` Walukiewicz, Miroslaw
     [not found]                                     ` <BE2BFE91933D1B4089447C64486040801D5370A4-IGOiFh9zz4wLt2AQoY/u9bfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2010-05-21 15:03                                       ` Steve Wise

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox