OpenSM/ib_types.h: Fix some SA ClassPortInfo issues
In SA ClassPortInfo, change resp_time_val to a byte with 3 reserved
bytes rather than an unsigned 32 bit quantity
Fix osmtest display of SA ClassPortInfo capability mask
(Note: subsequent patch to follow on setting ClassPortInfo resp_time_val
on OpenSM side)
Also, fix some other typos in ib_types.h
Most of patch from: Sasha Khapyorsky <[EMAIL PROTECTED]>
Signed-off-by: Hal Rosenstock <[EMAIL PROTECTED]>
Index: include/iba/ib_types.h
===================================================================
--- include/iba/ib_types.h (revision 5723)
+++ include/iba/ib_types.h (working copy)
@@ -2800,9 +2800,9 @@ ib_path_rec_hop_limit(
*/
#define IB_CLASS_CAP_GETSET 0x0002
/*********/
-/****s* IBA Base: Constants/IB_CLASS_CAP_GETSET
+/****s* IBA Base: Constants/IB_CLASS_RESP_TIME_MASK
* NAME
-* IB_CLASS_CAP_GETSET
+* IB_CLASS_CAP_RESP_TIME_MASK
*
* DESCRIPTION
* Mask bits to extract the reponse time value from the
@@ -2831,7 +2831,8 @@ typedef struct _ib_class_port_info
uint8_t base_ver;
uint8_t class_ver;
ib_net16_t cap_mask;
- ib_net32_t resp_time_val;
+ uint8_t reserved[3];
+ uint8_t resp_time_val;
ib_gid_t redir_gid;
ib_net32_t redir_tc_sl_fl;
ib_net16_t redir_lid;
@@ -5486,7 +5487,7 @@ typedef struct _ib_pkey_table_record
{
ib_net16_t lid; // for CA: lid of port, for switch
lid of port 0
uint16_t block_num;
- uint8_t port_num; // for swithc: port number,
for CA: reserved
+ uint8_t port_num; // for switch: port number,
for CA: reserved
uint8_t reserved1;
uint16_t reserved2;
ib_pkey_table_t pkey_tbl;
@@ -5526,8 +5527,8 @@ typedef struct _ib_slvl_table
typedef struct _ib_slvl_table_record
{
ib_net16_t lid; // for CA: lid of port, for switch lid of
port 0
- uint8_t in_port_num; // reserved for CA's
- uint8_t out_port_num; // reserved for CA's
+ uint8_t in_port_num; // reserved for CAs
+ uint8_t out_port_num; // reserved for CAs
uint32_t resv;
ib_slvl_table_t slvl_tbl;
Index: osmtest/osmtest.c
===================================================================
--- osmtest/osmtest.c (revision 5723)
+++ osmtest/osmtest.c (working copy)
@@ -749,7 +749,7 @@ osmtest_validate_sa_class_port_info( IN
osm_log( &p_osmt->log, OSM_LOG_INFO,
"osmtest_validate_sa_class_port_info:\n-----------------------------\nSA Class
Port Info:\n"
" base_ver:%u\n class_ver:%u\n cap_mask:0x%X\n
resp_time_val:0x%X\n-----------------------------\n",
- p_cpi->base_ver, p_cpi->class_ver, p_cpi->cap_mask,
p_cpi->resp_time_val
+ p_cpi->base_ver, p_cpi->class_ver, cl_ntoh16(p_cpi->cap_mask),
p_cpi->resp_time_val
);
Exit:
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general