opensm: Add infrastructure support for PortInfo IsMulticastPkeyTrapSuppressionSupported
PATCH v3 1/1 opensm: Add infrastructure support for PortInfo IsMulticastPkeyTrapSuppressionSupported
Per published MgtWG errata RefID 4576
---
Changes since v2:
Changed ib_port_info_set_client_rereg similarly to ib_port_info_set_mcast_pkey_trap_suppress
Changes since v1:
Don't reset reserved bits packed with subnet timeout
opensm/include/iba/ib_types.h +68 -4
@@ -4431,7 +4431,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;
@@ -5281,7 +5281,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 &0xE0 ) | (timeout &0x1F )); }/*
@@ -5315,8 +5315,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 )); + (uint8_t ) ((p_pi->subnet_timeout &0x9F ) | (client_rereg <<7 )); }/*
@@ -5335,6 +5334,42 @@ 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 &0xBF ) | (trap_suppress <<6 )); +} + +/* +* 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
@@ -5391,6 +5426,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"
@@ -849,6 +850,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 34 lines · Hal Rosenstock
Per published MgtWG errata RefID 4576
Signed-off-by Hal Rosenstock <[email protected]>---
Changes since v2:
Changedib_port_info_set_client_reregsimilarly toib_port_info_set_mcast_pkey_trap_suppressChanges since v1:
Don't reset reserved bits packed with subnet timeoutopensm/include/iba/ib_types.h +2
-2@@ -4431,7 +4431,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;@@ -5281,7 +5281,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 &0xE0 ) | (timeout &0x1F )); }/*
opensm/include/iba/ib_types.h ib_port_info_set_client_rereg(IN ib_port_info_t * const p_pi, · line 5318
Quoted 6 lines
opensm/include/iba/ib_types.h +1
-2@@ -5315,8 +5315,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 )); + (uint8_t ) ((p_pi->subnet_timeout &0x9F ) | (client_rereg <<7 ));
I don't think that you wanted this - 0x9f will reset newly assigned bit. Guess it should be:
+ (uint8_t) (p_pi->subnet_timeout | (client_rereg << 7));
Reapplying...
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 33 lines · Sasha Khapyorsky
Quoted 32 lines · Hal Rosenstock
Per published MgtWG errata RefID 4576
Signed-off-by Hal Rosenstock <[email protected]>---
Changes since v2:
Changedib_port_info_set_client_reregsimilarly toib_port_info_set_mcast_pkey_trap_suppressChanges since v1:
Don't reset reserved bits packed with subnet timeoutopensm/include/iba/ib_types.h +1
-1@@ -4431,7 +4431,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@@ -5281,7 +5281,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&0xE0) | (timeout &0x1F)); }
Quoted 10 lines
Quoted 8 lines
/*
opensm/include/iba/ib_types.h +0
-0@@ -5315,8 +5315,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));
+ (uint8_t) ((p_pi->subnet_timeout&0x9F) | (client_rereg<< 7));I don't think that you wanted this -
0x9fwill reset newly assigned bit.
You're right...
Quoted 3 lines
Guess it should be:
+ (
uint8_t) (p_pi->subnet_timeout| (client_rereg<< 7));
Shouldn't this be:
(uint8_t) ((p_pi->subnet_timeout & 0xBF) | (client_rereg << 7));
-- Hal
Quoted 9 lines
Reapplying...
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
--
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): f0e08f230910131220g49462559u8070ebb43832e682-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 45 lines · Hal Rosenstock
Quoted 33 lines · Sasha Khapyorsky
Quoted 32 lines · Hal Rosenstock
Per published MgtWG errata RefID 4576
Signed-off-by Hal Rosenstock <[email protected]>---
Changes since v2:
Changedib_port_info_set_client_reregsimilarly toib_port_info_set_mcast_pkey_trap_suppressChanges since v1:
Don't reset reserved bits packed with subnet timeoutopensm/include/iba/ib_types.h +1
-1@@ -4431,7 +4431,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@@ -5281,7 +5281,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&0xE0) | (timeout &0x1F)); }Quoted 10 lines
Quoted 8 lines
/*
opensm/include/iba/ib_types.h +0
-0@@ -5315,8 +5315,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));
+ (uint8_t) ((p_pi->subnet_timeout&0x9F) | (client_rereg<< 7));I don't think that you wanted this -
0x9fwill reset newly assigned bit.
Quoted 8 lines
You're right...
Quoted 3 lines
Guess it should be:
+ (
uint8_t) (p_pi->subnet_timeout| (client_rereg<< 7));Shouldn't this be:
(uint8_t) ((p_pi->subnet_timeout&0xBF) | (client_rereg<< 7));
Doh! 0x7F rather than 0xBF
Quoted 13 lines
-- Hal
Quoted 9 lines
Reapplying...
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
--
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): f0e08f230910131221o6107e55cg2a0e934f90bafa89-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 2 lines · Hal Rosenstock
Doh!
0x7Frather than0xBF
Yes, I forgot that it is used for bit clear too.
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