libibumad: add ClassPortInfo struct
PATCH 1/1 libibumad: add ClassPortInfo struct
Signed-off-by Ira Weiny <[email protected]>
--- include/infiniband/umad_types.h | 33 +++++++++++++++++++++++++++++++++ 1 files changed, 33 insertions(+), 0 deletions(-)
include/infiniband/umad_types.h +33 -0
@@ -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 */
Signature · 6 lines
1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 5 lines · Ira Weiny
Signed-off-by Ira Weiny <[email protected]>---
Thanks. Applied with one minor name change. See below.
Quoted 20 lines
include/infiniband/umad_types.h | 33 +++++++++++++++++++++++++++++++++ 1 files changed, 33 insertions(+), 0 deletions(-)include/infiniband/umad_types.h +9
-0@@ -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 */
include/infiniband/umad_types.h enum { · line 188
Quoted 10 lines
include/infiniband/umad_types.h +10
-0+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;
I changed this to trap_hl_qp to be more consistent with field name in spec.
-- Hal
Quoted 6 lines
include/infiniband/umad_types.h +6
-0+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 );
include/infiniband/umad_types.h enum { · line 204
Quoted 10 lines
include/infiniband/umad_types.h +8
-0+} +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 */
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html