opensm: Add infrastructure support for PortInfo IsMulticastPkeyTrapSuppressionSupported
PATCH 1/1 opensm: Add infrastructure support for PortInfo IsMulticastPkeyTrapSuppressionSupported
Per published MgtWG errata RefID 4576
---
opensm/include/iba/ib_types.h +69 -3
@@ -4432,7 +4432,7 @@ typedef struct _ib_port_info {ib_net16_t p_key_violations;ib_net16_t q_key_violations;uint8_t guid_cap; -uint8_t subnet_timeout;/* cli_rereg(1b), resrv(2b), timeout(5b) */ +uint8_t subnet_timeout;/* cli_rereg(1b), mcast_pkey_trap_suppr(1b), resrv(1b), timeout(5b) */ uint8_t resp_time_value;uint8_t error_threshold;/* local phy errors(4b), overrun errors(4b) */ ib_net16_t max_credit_hint;
@@ -5282,7 +5282,7 @@ ib_port_info_set_timeout(IN ib_port_info_t * const p_pi, {CL_ASSERT (timeout <=0x1F ); p_pi->subnet_timeout = - (uint8_t ) ((p_pi->subnet_timeout &0x80 ) | (timeout &0x1F )); + (uint8_t ) ((p_pi->subnet_timeout &0xC0 ) | (timeout &0x1F )); }/*
@@ -5317,7 +5317,7 @@ ib_port_info_set_client_rereg(IN ib_port_info_t * const p_pi,CL_ASSERT (client_rereg <=0x1 ); p_pi->subnet_timeout = (uint8_t ) ((p_pi-> - subnet_timeout &0x1F ) | ((client_rereg <<7 ) &0x80 )); + subnet_timeout &0x5F ) | ((client_rereg <<7 ) &0x80 )); }/*
@@ -5336,6 +5336,43 @@ ib_port_info_set_client_rereg(IN ib_port_info_t * const p_pi,* SEE ALSO *********/ +/****f* IBA Base: Types/ib_port_info_set_mcast_pkey_trap_suppress +* NAME +* ib_port_info_set_mcast_pkey_trap_suppress +* +* DESCRIPTION +* Sets the encoded multicast pkey trap suppresion enabled bit value +* in the PortInfo attribute. +* +* SYNOPSIS +*/ +static inline void OSM_API +ib_port_info_set_mcast_pkey_trap_suppress(IN ib_port_info_t * const p_pi, + IN const uint8_t trap_suppress) +{ +CL_ASSERT (trap_suppress <=0x1 ); + p_pi->subnet_timeout = + (uint8_t ) ((p_pi-> + subnet_timeout &0x9F ) | ((trap_suppress <<6 ) &0x40 )); +} + +/* +* PARAMETERS +* p_pi +* [in] Pointer to a PortInfo attribute. +* +* trap_suppress +* [in] Multicast pkey trap suppresion enabled value to set +* (either 1 or 0). +* +* RETURN VALUES +* None. +* +* NOTES +* +* SEE ALSO +*********/ +/****f* IBA Base: Types/ib_port_info_get_timeout * NAME * ib_port_info_get_timeout
@@ -5392,6 +5429,35 @@ ib_port_info_get_client_rereg(IN ib_port_info_t const *p_pi)* SEE ALSO *********/ +/****f* IBA Base: Types/ib_port_info_get_mcast_pkey_trap_suppress +* NAME +* ib_port_info_get_mcast_pkey_trap_suppress +* +* DESCRIPTION +* Gets the encoded multicast pkey trap suppresion enabled bit value +* in the PortInfo attribute. +* +* SYNOPSIS +*/ +static inline uint8_t OSM_API +ib_port_info_get_mcast_pkey_trap_suppress(IN ib_port_info_t const *p_pi) +{ +return ((p_pi->subnet_timeout &0x40 ) >>6 ); +} + +/* +* PARAMETERS +* p_pi +* [in] Pointer to a PortInfo attribute. +* +* RETURN VALUES +* Multicast PKey trap suppression enabled value (either 1 or 0). +* +* NOTES +* +* SEE ALSO +*********/ +/****f* IBA Base: Types/ib_port_info_set_hoq_lifetime * NAME * ib_port_info_set_hoq_lifetime
opensm/opensm/osm_helper.c +2 -0
@@ -823,6 +823,7 @@ void osm_dump_port_info(IN osm_log_t * p_log, IN ib_net64_t node_guid,"\t\t\t\tq_key_violations........0x%X\n" "\t\t\t\tguid_cap................0x%X\n" "\t\t\t\tclient_reregister.......0x%X\n" +"\t\t\t\tmcast_pkey_trap_suppr...0x%X\n" "\t\t\t\tsubnet_timeout..........0x%X\n" "\t\t\t\tresp_time_value.........0x%X\n" "\t\t\t\terror_threshold.........0x%X\n"
@@ -854,6 +855,7 @@ void osm_dump_port_info(IN osm_log_t * p_log, IN ib_net64_t node_guid,cl_ntoh16 (p_pi->p_key_violations),cl_ntoh16 (p_pi->q_key_violations), p_pi->guid_cap,ib_port_info_get_client_rereg (p_pi), +ib_port_info_get_mcast_pkey_trap_suppress (p_pi),ib_port_info_get_timeout (p_pi), p_pi->resp_time_value, p_pi->error_threshold,cl_ntoh16 (p_pi->max_credit_hint), cl_ntoh32(p_pi->link_rt_latency));
--
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
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 19 lines · Hal Rosenstock
Per published MgtWG errata RefID 4576
Signed-off-by Hal Rosenstock <[email protected]>---
opensm/include/iba/ib_types.h +1
-1@@ -4432,7 +4432,7 @@ typedef struct _ib_port_info {ib_net16_t p_key_violations;ib_net16_t q_key_violations;uint8_t guid_cap; -uint8_t subnet_timeout;/* cli_rereg(1b), resrv(2b), timeout(5b) */ +uint8_t subnet_timeout;/* cli_rereg(1b), mcast_pkey_trap_suppr(1b), resrv(1b), timeout(5b) */ uint8_t resp_time_value;uint8_t error_threshold;/* local phy errors(4b), overrun errors(4b) */ ib_net16_t max_credit_hint;
opensm/include/iba/ib_types.h ib_port_info_set_timeout(IN ib_port_info_t * const p_pi, · line 5285
Quoted 5 lines
opensm/include/iba/ib_types.h +1
-1@@ -5282,7 +5282,7 @@ ib_port_info_set_timeout(IN ib_port_info_t * const p_pi, {CL_ASSERT (timeout <=0x1F ); p_pi->subnet_timeout = - (uint8_t ) ((p_pi->subnet_timeout &0x80 ) | (timeout &0x1F )); + (uint8_t ) ((p_pi->subnet_timeout &0xC0 ) | (timeout &0x1F ));
Why not 'p_pi->subnet_timeout & 0xe0' then (IOW why to bother with reserved bits reset)?
opensm/include/iba/ib_types.h ib_port_info_set_client_rereg(IN ib_port_info_t * const p_pi, · line 5320
Quoted 9 lines
opensm/include/iba/ib_types.h +1
-1}/* @@ -5317,7 +5317,7 @@ ib_port_info_set_client_rereg(IN ib_port_info_t * const p_pi,CL_ASSERT (client_rereg <=0x1 ); p_pi->subnet_timeout = (uint8_t ) ((p_pi-> - subnet_timeout &0x1F ) | ((client_rereg <<7 ) &0x80 )); + subnet_timeout &0x5F ) | ((client_rereg <<7 ) &0x80 ));
Ditto.
Quoted 15 lines
opensm/include/iba/ib_types.h +8
-0}/* @@ -5336,6 +5336,43 @@ ib_port_info_set_client_rereg(IN ib_port_info_t * const p_pi,* SEE ALSO *********/ +/****f* IBA Base: Types/ib_port_info_set_mcast_pkey_trap_suppress +* NAME +* ib_port_info_set_mcast_pkey_trap_suppress +* +* DESCRIPTION +* Sets the encoded multicast pkey trap suppresion enabled bit value +* in the PortInfo attribute. +*
opensm/include/iba/ib_types.h ib_port_info_set_client_rereg(IN ib_port_info_t * const p_pi, · line 5356
Quoted 10 lines
opensm/include/iba/ib_types.h +10
-0+* SYNOPSIS +*/ +static inline void OSM_API +ib_port_info_set_mcast_pkey_trap_suppress(IN ib_port_info_t * const p_pi, + IN const uint8_t trap_suppress) +{ +CL_ASSERT (trap_suppress <=0x1 ); + p_pi->subnet_timeout = + (uint8_t ) ((p_pi-> + subnet_timeout &0x9F ) | ((trap_suppress <<6 ) &0x40 ));
Ditto.
And whoudn't this:
p_pi->subnet_timeout = (p_pi->subnet_timeout & 0xbf) | (trap_suppress << 6)
just work?
Sasha
Quoted 72 lines
opensm/include/iba/ib_types.h +48
-0+} + +/* +* PARAMETERS +* p_pi +* [in] Pointer to a PortInfo attribute. +* +* trap_suppress +* [in] Multicast pkey trap suppresion enabled value to set +* (either 1 or 0). +* +* RETURN VALUES +* None. +* +* NOTES +* +* SEE ALSO +*********/ +/****f* IBA Base: Types/ib_port_info_get_timeout * NAME * ib_port_info_get_timeout @@ -5392,6 +5429,35 @@ ib_port_info_get_client_rereg(IN ib_port_info_t const *p_pi)* SEE ALSO *********/ +/****f* IBA Base: Types/ib_port_info_get_mcast_pkey_trap_suppress +* NAME +* ib_port_info_get_mcast_pkey_trap_suppress +* +* DESCRIPTION +* Gets the encoded multicast pkey trap suppresion enabled bit value +* in the PortInfo attribute. +* +* SYNOPSIS +*/ +static inline uint8_t OSM_API +ib_port_info_get_mcast_pkey_trap_suppress(IN ib_port_info_t const *p_pi) +{ +return ((p_pi->subnet_timeout &0x40 ) >>6 ); +} + +/* +* PARAMETERS +* p_pi +* [in] Pointer to a PortInfo attribute. +* +* RETURN VALUES +* Multicast PKey trap suppression enabled value (either 1 or 0). +* +* NOTES +* +* SEE ALSO +*********/ +/****f* IBA Base: Types/ib_port_info_set_hoq_lifetime * NAME * ib_port_info_set_hoq_lifetime opensm/opensm/osm_helper.c +1
-0@@ -823,6 +823,7 @@ void osm_dump_port_info(IN osm_log_t * p_log, IN ib_net64_t node_guid,"\t\t\t\tq_key_violations........0x%X\n" "\t\t\t\tguid_cap................0x%X\n" "\t\t\t\tclient_reregister.......0x%X\n" +"\t\t\t\tmcast_pkey_trap_suppr...0x%X\n" "\t\t\t\tsubnet_timeout..........0x%X\n" "\t\t\t\tresp_time_value.........0x%X\n" "\t\t\t\terror_threshold.........0x%X\n"
opensm/opensm/osm_helper.c void osm_dump_port_info(IN osm_log_t * p_log, IN ib_net64_t node_guid, · line 861
Quoted 7 lines
opensm/opensm/osm_helper.c +1
-0@@ -854,6 +855,7 @@ void osm_dump_port_info(IN osm_log_t * p_log, IN ib_net64_t node_guid,cl_ntoh16 (p_pi->p_key_violations),cl_ntoh16 (p_pi->q_key_violations), p_pi->guid_cap,ib_port_info_get_client_rereg (p_pi), +ib_port_info_get_mcast_pkey_trap_suppress (p_pi),ib_port_info_get_timeout (p_pi), p_pi->resp_time_value, p_pi->error_threshold,cl_ntoh16 (p_pi->max_credit_hint), cl_ntoh32(p_pi->link_rt_latency));
--
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 20 lines · Sasha Khapyorsky
Quoted 19 lines · Hal Rosenstock
Per published MgtWG errata RefID 4576
Signed-off-by Hal Rosenstock <[email protected]>---
opensm/include/iba/ib_types.h +1
-1@@ -4432,7 +4432,7 @@ typedef struct _ib_port_info { ib_net16_t p_key_violations; ib_net16_t q_key_violations; uint8_t guid_cap; - uint8_t subnet_timeout; /* cli_rereg(1b), resrv(2b), timeout(5b) */ + uint8_t subnet_timeout; /* cli_rereg(1b), mcast_pkey_trap_suppr(1b), resrv(1b), timeout(5b) */ uint8_t resp_time_value;
uint8_terror_threshold; /* local phy errors(4b), overrun errors(4b) */ib_net16_tmax_credit_hint;opensm/include/iba/ib_types.h +0
-0@@ -5282,7 +5282,7 @@ ib_port_info_set_timeout(IN ib_port_info_t * const p_pi,
Quoted 8 lines
Quoted 5 lines
opensm/include/iba/ib_types.h +0
-0{ CL_ASSERT(timeout <= 0x1F);
p_pi->subnet_timeout=
- (uint8_t) ((p_pi->subnet_timeout&0x80) | (timeout &0x1F));
+ (uint8_t) ((p_pi->subnet_timeout&0xC0) | (timeout &0x1F));Why not '
p_pi->subnet_timeout&0xe0' then (IOW why to bother with reserved bits reset)?
Per this erratum (RefID 4576), this bit is no longer reserved. It is now used for MulticastPKeyTrapSuppressionEnabled.
Quoted 12 lines
Quoted 10 lines
}
/*
opensm/include/iba/ib_types.h +0
-0@@ -5317,7 +5317,7 @@ ib_port_info_set_client_rereg(IN ib_port_info_t * const p_pi, CL_ASSERT(client_rereg <= 0x1);
p_pi->subnet_timeout=
(uint8_t) ((p_pi->
-subnet_timeout&0x1F) | ((client_rereg<< 7) &0x80));
+subnet_timeout&0x5F) | ((client_rereg<< 7) &0x80));Ditto.
See above.
Quoted 19 lines
Quoted 19 lines
}
/*
opensm/include/iba/ib_types.h +12
-0@@ -5336,6 +5336,43 @@ ib_port_info_set_client_rereg(IN ib_port_info_t * const p_pi,* SEE ALSO *********/ +/****f* IBA Base: Types/ib_port_info_set_mcast_pkey_trap_suppress +* NAME +* ib_port_info_set_mcast_pkey_trap_suppress +* +* DESCRIPTION +* Sets the encoded multicast pkey trap suppresion enabled bit value +* in the PortInfo attribute. +* +* SYNOPSIS +*/ +static inline void OSM_API +ib_port_info_set_mcast_pkey_trap_suppress(IN ib_port_info_t * const p_pi,
Quoted 8 lines
opensm/include/iba/ib_types.h ib_port_info_set_client_rereg(IN ib_port_info_t * const p_pi, · line 5356
Quoted 6 lines
opensm/include/iba/ib_types.h +6
-0+ IN const uint8_t trap_suppress) +{ + CL_ASSERT(trap_suppress <= 0x1); + p_pi->subnet_timeout = + (uint8_t) ((p_pi-> + subnet_timeout & 0x9F) | ((trap_suppress << 6) & 0x40));Ditto.
See above.
Quoted 6 lines
And whoudn't this:
p_pi->subnet_timeout = (
p_pi->subnet_timeout&0xbf) | (trap_suppress<< 6)just work?
Sure, Do you want an updated patch with this change ?
-- Hal
Quoted 77 lines
Sasha
Quoted 75 lines
opensm/include/iba/ib_types.h +48
-0+} + +/* +* PARAMETERS +* p_pi +* [in] Pointer to a PortInfo attribute. +* +* trap_suppress +* [in] Multicast pkey trap suppresion enabled value to set +* (either 1 or 0). +* +* RETURN VALUES +* None. +* +* NOTES +* +* SEE ALSO +*********/ + /****f* IBA Base: Types/ib_port_info_get_timeout* NAME * ib_port_info_get_timeout @@ -5392,6 +5429,35 @@ ib_port_info_get_client_rereg(IN ib_port_info_t const *p_pi)* SEE ALSO *********/ +/****f* IBA Base: Types/ib_port_info_get_mcast_pkey_trap_suppress +* NAME +* ib_port_info_get_mcast_pkey_trap_suppress +* +* DESCRIPTION +* Gets the encoded multicast pkey trap suppresion enabled bit value +* in the PortInfo attribute. +* +* SYNOPSIS +*/ +static inline uint8_t OSM_API +ib_port_info_get_mcast_pkey_trap_suppress(IN ib_port_info_t const *p_pi) +{ + return ((p_pi->subnet_timeout & 0x40) >> 6); +} + +/* +* PARAMETERS +* p_pi +* [in] Pointer to a PortInfo attribute. +* +* RETURN VALUES +* Multicast PKey trap suppression enabled value (either 1 or 0). +* +* NOTES +* +* SEE ALSO +*********/ + /****f* IBA Base: Types/ib_port_info_set_hoq_lifetime* NAME * ib_port_info_set_hoq_lifetime opensm/opensm/osm_helper.c +0
-0@@ -823,6 +823,7 @@ void osm_dump_port_info(IN osm_log_t * p_log, IN ib_net64_t node_guid,"\t\t\t\tq_key_violations........0x%X\n" "\t\t\t\tguid_cap................0x%X\n" "\t\t\t\tclient_reregister.......0x%X\n"
+ "\t\t\t\tmcast_pkey_trap_suppr...0x%X\n" "\t\t\t\tsubnet_timeout..........0x%X\n" "\t\t\t\tresp_time_value.........0x%X\n" "\t\t\t\terror_threshold.........0x%X\n"opensm/opensm/osm_helper.c +1
-0@@ -854,6 +855,7 @@ void osm_dump_port_info(IN osm_log_t * p_log, IN ib_net64_t node_guid, cl_ntoh16(p_pi->p_key_violations), cl_ntoh16(p_pi->q_key_violations), p_pi->guid_cap, ib_port_info_get_client_rereg(p_pi), + ib_port_info_get_mcast_pkey_trap_suppress(p_pi),
Quoted 9 lines
opensm/opensm/osm_helper.c void osm_dump_port_info(IN osm_log_t * p_log, IN ib_net64_t node_guid, · line 861
Quoted 4 lines
opensm/opensm/osm_helper.c +0
-0ib_port_info_get_timeout(p_pi), p_pi->resp_time_value, p_pi->error_threshold, cl_ntoh16(p_pi->max_credit_hint), cl_ntoh32(p_pi->link_rt_latency));--
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
--
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
A message that is not in the archive (sent off-list or not yet received): f0e08f230910130615of844fc4lb02265e5eaf25717-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 30 lines · Hal Rosenstock
Quoted 20 lines · Sasha Khapyorsky
Quoted 19 lines · Hal Rosenstock
Per published MgtWG errata RefID 4576
Signed-off-by Hal Rosenstock <[email protected]>---
opensm/include/iba/ib_types.h +1
-1@@ -4432,7 +4432,7 @@ typedef struct _ib_port_info { ib_net16_t p_key_violations; ib_net16_t q_key_violations; uint8_t guid_cap; - uint8_t subnet_timeout; /* cli_rereg(1b), resrv(2b), timeout(5b) */ + uint8_t subnet_timeout; /* cli_rereg(1b), mcast_pkey_trap_suppr(1b), resrv(1b), timeout(5b) */ uint8_t resp_time_value;
uint8_terror_threshold; /* local phy errors(4b), overrun errors(4b) */ib_net16_tmax_credit_hint;opensm/include/iba/ib_types.h +0
-0@@ -5282,7 +5282,7 @@ ib_port_info_set_timeout(IN ib_port_info_t * const p_pi,Quoted 8 lines
Quoted 5 lines
opensm/include/iba/ib_types.h +0
-0{ CL_ASSERT(timeout <= 0x1F);
p_pi->subnet_timeout=
- (uint8_t) ((p_pi->subnet_timeout&0x80) | (timeout &0x1F));
+ (uint8_t) ((p_pi->subnet_timeout&0xC0) | (timeout &0x1F));Why not '
p_pi->subnet_timeout&0xe0' then (IOW why to bother with reserved bits reset)?
Quoted 2 lines
Per this erratum (RefID 4576), this bit is no longer reserved. It is now used for MulticastPKeyTrapSuppressionEnabled.
It is bit 6 and I'm about bit 5 which still be reserved - We don't need to clear this. IOW I think that here (and in other similar places) should be:
p_pi->subnet_timeout = (p_pi->subnet_timeout & 0xe0) | (timeout & 0x1f);
Quoted 46 lines
Quoted 4 lines
Quoted 4 lines
}
Quoted 9 lines
Quoted 7 lines
/*
opensm/include/iba/ib_types.h +0
-0@@ -5317,7 +5317,7 @@ ib_port_info_set_client_rereg(IN ib_port_info_t * const p_pi, CL_ASSERT(client_rereg <= 0x1);
p_pi->subnet_timeout=
(uint8_t) ((p_pi->
-subnet_timeout&0x1F) | ((client_rereg<< 7) &0x80));
+subnet_timeout&0x5F) | ((client_rereg<< 7) &0x80));Ditto.
See above.
Quoted 19 lines
Quoted 19 lines
}
/*
opensm/include/iba/ib_types.h +12
-0@@ -5336,6 +5336,43 @@ ib_port_info_set_client_rereg(IN ib_port_info_t * const p_pi,* SEE ALSO *********/ +/****f* IBA Base: Types/ib_port_info_set_mcast_pkey_trap_suppress +* NAME +* ib_port_info_set_mcast_pkey_trap_suppress +* +* DESCRIPTION +* Sets the encoded multicast pkey trap suppresion enabled bit value +* in the PortInfo attribute. +* +* SYNOPSIS +*/ +static inline void OSM_API +ib_port_info_set_mcast_pkey_trap_suppress(IN ib_port_info_t * const p_pi,Quoted 8 lines
opensm/include/iba/ib_types.h ib_port_info_set_client_rereg(IN ib_port_info_t * const p_pi, · line 5356
Quoted 6 lines
opensm/include/iba/ib_types.h +6
-0+ IN const uint8_t trap_suppress) +{ + CL_ASSERT(trap_suppress <= 0x1); + p_pi->subnet_timeout = + (uint8_t) ((p_pi-> + subnet_timeout & 0x9F) | ((trap_suppress << 6) & 0x40));Ditto.
See above.
Quoted 8 lines
Quoted 6 lines
And whoudn't this:
p_pi->subnet_timeout = (
p_pi->subnet_timeout&0xbf) | (trap_suppress<< 6)just work?
Sure, Do you want an updated patch with this change ?
Yes, please.
Sasha
--
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 31 lines · Sasha Khapyorsky
Quoted 30 lines · Hal Rosenstock
Quoted 28 lines · Sasha Khapyorsky
Quoted 21 lines · Hal Rosenstock
Per published MgtWG errata RefID 4576
Signed-off-by Hal Rosenstock <[email protected]>---
opensm/include/iba/ib_types.h +1
-1@@ -4432,7 +4432,7 @@ typedef struct _ib_port_info { ib_net16_t p_key_violations; ib_net16_t q_key_violations; uint8_t guid_cap; - uint8_t subnet_timeout; /* cli_rereg(1b), resrv(2b), timeout(5b) */ + uint8_t subnet_timeout; /* cli_rereg(1b), mcast_pkey_trap_suppr(1b), resrv(1b), timeout(5b) */ uint8_t resp_time_value;
uint8_terror_threshold; /* local phy errors(4b), overrun errors(4b) */ib_net16_tmax_credit_hint;opensm/include/iba/ib_types.h +0
-0@@ -5282,7 +5282,7 @@ ib_port_info_set_timeout(IN ib_port_info_t * const p_pi, { CL_ASSERT(timeout <= 0x1F);Quoted 3 lines
p_pi->subnet_timeout=
- (uint8_t) ((p_pi->subnet_timeout&0x80) | (timeout &0x1F));
+ (uint8_t) ((p_pi->subnet_timeout&0xC0) | (timeout &0x1F));Why not '
p_pi->subnet_timeout&0xe0' then (IOW why to bother with reserved bits reset)?
Quoted 8 lines
Quoted 2 lines
Per this erratum (RefID 4576), this bit is no longer reserved. It is now used for MulticastPKeyTrapSuppressionEnabled.
It is bit 6 and I'm about bit 5 which still be reserved - We don't need to clear this. IOW I think that here (and in other similar places) should be:
p_pi->subnet_timeout = (
p_pi->subnet_timeout&0xe0) | (timeout &0x1f);
Yes, that's better for the future.
-- Hal
Quoted 51 lines
Quoted 51 lines
Quoted 4 lines
Quoted 4 lines
}
Quoted 9 lines
Quoted 7 lines
/*
opensm/include/iba/ib_types.h +0
-0@@ -5317,7 +5317,7 @@ ib_port_info_set_client_rereg(IN ib_port_info_t * const p_pi, CL_ASSERT(client_rereg <= 0x1);
p_pi->subnet_timeout=
(uint8_t) ((p_pi->
-subnet_timeout&0x1F) | ((client_rereg<< 7) &0x80));
+subnet_timeout&0x5F) | ((client_rereg<< 7) &0x80));Ditto.
See above.
Quoted 19 lines
Quoted 19 lines
}
/*
opensm/include/iba/ib_types.h +12
-0@@ -5336,6 +5336,43 @@ ib_port_info_set_client_rereg(IN ib_port_info_t * const p_pi,* SEE ALSO *********/ +/****f* IBA Base: Types/ib_port_info_set_mcast_pkey_trap_suppress +* NAME +* ib_port_info_set_mcast_pkey_trap_suppress +* +* DESCRIPTION +* Sets the encoded multicast pkey trap suppresion enabled bit value +* in the PortInfo attribute. +* +* SYNOPSIS +*/ +static inline void OSM_API +ib_port_info_set_mcast_pkey_trap_suppress(IN ib_port_info_t * const p_pi,Quoted 8 lines
opensm/include/iba/ib_types.h ib_port_info_set_client_rereg(IN ib_port_info_t * const p_pi, · line 5356
Quoted 6 lines
opensm/include/iba/ib_types.h +6
-0+ IN const uint8_t trap_suppress) +{ + CL_ASSERT(trap_suppress <= 0x1); + p_pi->subnet_timeout = + (uint8_t) ((p_pi-> + subnet_timeout & 0x9F) | ((trap_suppress << 6) & 0x40));Ditto.
See above.
Quoted 5 lines
And whoudn't this:
p_pi->subnet_timeout = (
p_pi->subnet_timeout&0xbf) | (trap_suppress<< 6)
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
just work?
Sure, Do you want an updated patch with this change ?
Yes, please.
Sasha
--
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