* [PATCH] opensm: Add infrastructure support for PortInfo IsMulticastPkeyTrapSuppressionSupported
@ 2009-10-09 14:46 Hal Rosenstock
[not found] ` <20091009144659.GA17861-Wuw85uim5zDR7s880joybQ@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Hal Rosenstock @ 2009-10-09 14:46 UTC (permalink / raw)
To: sashak-smomgflXvOZWk0Htik3J/w; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
Per published MgtWG errata RefID 4576
Signed-off-by: Hal Rosenstock <hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
diff --git a/opensm/include/iba/ib_types.h b/opensm/include/iba/ib_types.h
index 25ed35f..c820372 100644
--- a/opensm/include/iba/ib_types.h
+++ b/opensm/include/iba/ib_types.h
@@ -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
diff --git a/opensm/opensm/osm_helper.c b/opensm/opensm/osm_helper.c
index 2b3dced..417c256 100644
--- a/opensm/opensm/osm_helper.c
+++ b/opensm/opensm/osm_helper.c
@@ -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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] opensm: Add infrastructure support for PortInfo IsMulticastPkeyTrapSuppressionSupported
[not found] ` <20091009144659.GA17861-Wuw85uim5zDR7s880joybQ@public.gmane.org>
@ 2009-10-12 18:45 ` Sasha Khapyorsky
2009-10-13 13:15 ` Hal Rosenstock
0 siblings, 1 reply; 5+ messages in thread
From: Sasha Khapyorsky @ 2009-10-12 18:45 UTC (permalink / raw)
To: Hal Rosenstock; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
On 10:46 Fri 09 Oct , Hal Rosenstock wrote:
>
> Per published MgtWG errata RefID 4576
>
> Signed-off-by: Hal Rosenstock <hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> diff --git a/opensm/include/iba/ib_types.h b/opensm/include/iba/ib_types.h
> index 25ed35f..c820372 100644
> --- a/opensm/include/iba/ib_types.h
> +++ b/opensm/include/iba/ib_types.h
> @@ -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));
Why not 'p_pi->subnet_timeout & 0xe0' then (IOW why to bother with
reserved bits reset)?
> }
>
> /*
> @@ -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.
> }
>
> /*
> @@ -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));
Ditto.
And whoudn't this:
p_pi->subnet_timeout = (p_pi->subnet_timeout & 0xbf) |
(trap_suppress << 6)
just work?
Sasha
> +}
> +
> +/*
> +* 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
> diff --git a/opensm/opensm/osm_helper.c b/opensm/opensm/osm_helper.c
> index 2b3dced..417c256 100644
> --- a/opensm/opensm/osm_helper.c
> +++ b/opensm/opensm/osm_helper.c
> @@ -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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] opensm: Add infrastructure support for PortInfo IsMulticastPkeyTrapSuppressionSupported
2009-10-12 18:45 ` Sasha Khapyorsky
@ 2009-10-13 13:15 ` Hal Rosenstock
[not found] ` <f0e08f230910130615of844fc4lb02265e5eaf25717-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Hal Rosenstock @ 2009-10-13 13:15 UTC (permalink / raw)
To: Sasha Khapyorsky; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
On Mon, Oct 12, 2009 at 2:45 PM, Sasha Khapyorsky <sashak-smomgflXvOZWk0Htik3J/w@public.gmane.org> wrote:
> On 10:46 Fri 09 Oct , Hal Rosenstock wrote:
>>
>> Per published MgtWG errata RefID 4576
>>
>> Signed-off-by: Hal Rosenstock <hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>> ---
>> diff --git a/opensm/include/iba/ib_types.h b/opensm/include/iba/ib_types.h
>> index 25ed35f..c820372 100644
>> --- a/opensm/include/iba/ib_types.h
>> +++ b/opensm/include/iba/ib_types.h
>> @@ -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));
>
> 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.
>
>> }
>>
>> /*
>> @@ -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.
>> }
>>
>> /*
>> @@ -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));
>
> Ditto.
See above.
> 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
> Sasha
>
>> +}
>> +
>> +/*
>> +* 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
>> diff --git a/opensm/opensm/osm_helper.c b/opensm/opensm/osm_helper.c
>> index 2b3dced..417c256 100644
>> --- a/opensm/opensm/osm_helper.c
>> +++ b/opensm/opensm/osm_helper.c
>> @@ -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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> 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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] opensm: Add infrastructure support for PortInfo IsMulticastPkeyTrapSuppressionSupported
[not found] ` <f0e08f230910130615of844fc4lb02265e5eaf25717-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2009-10-13 15:56 ` Sasha Khapyorsky
2009-10-13 17:37 ` Hal Rosenstock
0 siblings, 1 reply; 5+ messages in thread
From: Sasha Khapyorsky @ 2009-10-13 15:56 UTC (permalink / raw)
To: Hal Rosenstock; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
On 09:15 Tue 13 Oct , Hal Rosenstock wrote:
> On Mon, Oct 12, 2009 at 2:45 PM, Sasha Khapyorsky <sashak-smomgflXvObQFizaE/u3fw@public.gmane.orgm> wrote:
> > On 10:46 Fri 09 Oct , Hal Rosenstock wrote:
> >>
> >> Per published MgtWG errata RefID 4576
> >>
> >> Signed-off-by: Hal Rosenstock <hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> >> ---
> >> diff --git a/opensm/include/iba/ib_types.h b/opensm/include/iba/ib_types.h
> >> index 25ed35f..c820372 100644
> >> --- a/opensm/include/iba/ib_types.h
> >> +++ b/opensm/include/iba/ib_types.h
> >> @@ -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));
> >
> > 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.
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);
>
> >
> >> }
> >>
> >> /*
> >> @@ -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.
>
> >> }
> >>
> >> /*
> >> @@ -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));
> >
> > Ditto.
>
> See above.
>
> > 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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] opensm: Add infrastructure support for PortInfo IsMulticastPkeyTrapSuppressionSupported
2009-10-13 15:56 ` Sasha Khapyorsky
@ 2009-10-13 17:37 ` Hal Rosenstock
0 siblings, 0 replies; 5+ messages in thread
From: Hal Rosenstock @ 2009-10-13 17:37 UTC (permalink / raw)
To: Sasha Khapyorsky; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
On Tue, Oct 13, 2009 at 11:56 AM, Sasha Khapyorsky <sashak-smomgflXvOZWk0Htik3J/w@public.gmane.org> wrote:
> On 09:15 Tue 13 Oct , Hal Rosenstock wrote:
>> On Mon, Oct 12, 2009 at 2:45 PM, Sasha Khapyorsky <sashak@voltaire.com> wrote:
>> > On 10:46 Fri 09 Oct , Hal Rosenstock wrote:
>> >>
>> >> Per published MgtWG errata RefID 4576
>> >>
>> >> Signed-off-by: Hal Rosenstock <hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>> >> ---
>> >> diff --git a/opensm/include/iba/ib_types.h b/opensm/include/iba/ib_types.h
>> >> index 25ed35f..c820372 100644
>> >> --- a/opensm/include/iba/ib_types.h
>> >> +++ b/opensm/include/iba/ib_types.h
>> >> @@ -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));
>> >
>> > 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.
>
> 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
>>
>> >
>> >> }
>> >>
>> >> /*
>> >> @@ -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.
>>
>> >> }
>> >>
>> >> /*
>> >> @@ -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));
>> >
>> > Ditto.
>>
>> See above.
>>
>> > 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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-10-13 17:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-09 14:46 [PATCH] opensm: Add infrastructure support for PortInfo IsMulticastPkeyTrapSuppressionSupported Hal Rosenstock
[not found] ` <20091009144659.GA17861-Wuw85uim5zDR7s880joybQ@public.gmane.org>
2009-10-12 18:45 ` Sasha Khapyorsky
2009-10-13 13:15 ` Hal Rosenstock
[not found] ` <f0e08f230910130615of844fc4lb02265e5eaf25717-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-10-13 15:56 ` Sasha Khapyorsky
2009-10-13 17:37 ` Hal Rosenstock
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox