public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libibumad: add ClassPortInfo struct
@ 2013-06-22 21:47 Ira Weiny
       [not found] ` <20130622144713.806a3988582a9d1156fbad43-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Ira Weiny @ 2013-06-22 21:47 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Hal Rosenstock




Signed-off-by: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 include/infiniband/umad_types.h |   33 +++++++++++++++++++++++++++++++++
 1 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/include/infiniband/umad_types.h b/include/infiniband/umad_types.h
index 32c747a..2d7c8cd 100644
--- a/include/infiniband/umad_types.h
+++ b/include/infiniband/umad_types.h
@@ -167,5 +167,38 @@ enum {
 	UMAD_OPENIB_OUI		= 0x001405
 };
 
+enum {
+	UMAD_CLASS_RESP_TIME_MASK = 0x1F
+};
+struct umad_class_port_info {
+	uint8_t base_ver;
+	uint8_t class_ver;
+	be16_t  cap_mask;
+	be32_t  cap_mask2_resp_time;
+	uint8_t redir_gid[16]; /* network byte order */
+	be32_t  redir_tc_sl_fl;
+	be16_t  redir_lid;
+	be16_t  redir_pkey;
+	be32_t  redir_qp;
+	be32_t  redir_qkey;
+	uint8_t trap_gid[16]; /* network byte order */
+	be32_t  trap_tc_sl_fl;
+	be16_t  trap_lid;
+	be16_t  trap_pkey;
+	be32_t  trap_hop_qp;
+	be32_t  trap_qkey;
+};
+static inline uint32_t
+umad_class_cap_mask2(struct umad_class_port_info *cpi)
+{
+	return (ntohl(cpi->cap_mask2_resp_time) >> 5);
+}
+static inline uint8_t
+umad_class_resp_time(struct umad_class_port_info *cpi)
+{
+	return (uint8_t)(ntohl(cpi->cap_mask2_resp_time)
+			 & UMAD_CLASS_RESP_TIME_MASK);
+}
+
 END_C_DECLS
 #endif				/* _UMAD_TYPES_H */
-- 
1.7.1

--
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] 2+ messages in thread

end of thread, other threads:[~2013-06-29 13:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-22 21:47 [PATCH] libibumad: add ClassPortInfo struct Ira Weiny
     [not found] ` <20130622144713.806a3988582a9d1156fbad43-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2013-06-29 13:54   ` Hal Rosenstock

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