[ofw] [PATCH] ib_types.h - be 'more' compatible with Linux OpenSM 3.3.9
Hal Rosenstock
hal.rosenstock at gmail.com
Tue Apr 26 10:21:11 PDT 2011
On Tue, Apr 26, 2011 at 11:15 AM, Alex Naslednikov <xalex at mellanox.co.il> wrote:
> Hi Stan,
> I already asked the community about this ASSERT.
> Why can't we change the function to be like this:
> if( attr_size & 0x07 )
> return( cl_hton16( (uint16_t)(attr_size >> 3) + 1 ) );
> else
> return( cl_hton16( (uint16_t)(attr_size >> 3) ) );
> instead of removing the assert ?
That shouldn't be needed. InformInfo is the only one which is not a
multiple of 8 bytes but it is never used in an RMPP operation so this
should never be called for this attribute.
Anyhow, this should mirror what's done in the main/Linux OpenSM rather
than be different for Windows unless this is indeed something
different about Windows.
-- Hal
>
> -----Original Message-----
> From: ofw-bounces at lists.openfabrics.org [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Smith, Stan
> Sent: Tuesday, April 26, 2011 3:08 AM
> To: ofw at lists.openfabrics.org
> Subject: [ofw] [PATCH] ib_types.h - be 'more' compatible with Linux OpenSM 3.3.9
>
> Patch to update ib_types.h to be 'more' compatible with Linux opensm/ib_types.h such that Windows Opensm 3.3.9 (checked) will run.
>
> Whitespace and spelling updates.
>
> Removal of CL_ASSERT() is required by the 3.3.9 opensm code base (Linux or Windows).
> In the OpenSM 3.3.6 timeframe the CL_ASSERT() was introduced into the Linux OpenSM ib_types.h.
> Unfortunately the CL_ASSERT() produced an assert() halt when running a Linux OpenSM debug version.
> The non-debug Linux version was deemed to be working correctly without the CL_ASSERT().
> The Linux OpenSM maintainer at that time decided to remove the CL_ASSERT() claiming it was unnecessary.
> Curious in that the windows OpenSM at the 3.3.6 code base time did not fire the assert().
>
> Now that the Windows code base has been updated to OpenSM 3.3.9, the CL_ASSERT() now fires.
> Remove the CL_ASSERT() to be compatible with Linux OpenSM 3.3.9 ib_types.h.
>
> signed-off-by: stan smith <stan.smith at intel.com>
>
> Index: ib_types.h
> ===================================================================
> --- ib_types.h (revision 3111)
> +++ ib_types.h (working copy)
> @@ -2013,6 +2013,7 @@
> *
> * DESCRIPTION
> * Returns a string for the specified node type.
> +* 14.2.5.3 NodeInfo
> *
> * SYNOPSIS
> */
> @@ -2246,7 +2247,7 @@
> *
> * SYNOPSIS
> */
> -static inline boolean_t
> +static inline boolean_t
> ib_pkey_is_invalid(
> IN const ib_net16_t pkey )
> {
> @@ -4549,7 +4550,6 @@
> ib_get_attr_offset(
> IN const uint32_t attr_size )
> {
> - CL_ASSERT((attr_size & 0x07) == 0);
> return( cl_hton16( (uint16_t)(attr_size >> 3) ) ); }
>
> @@ -5869,7 +5869,7 @@
> * ib_port_info_set_vl_stall_count
> *
> * DESCRIPTION
> -* Sets the VL Stall Count which define the number of contiguous
> +* Sets the VL Stall Count which define the number of contiguous
> * HLL (hoq) drops that will put the VL into stalled mode.
> *
> * SYNOPSIS
> @@ -10268,7 +10268,7 @@
> * Indicates the requested maximum number of work requests that may be
> * outstanding on the queue pair's receive queue. This value must be less
> * than or equal to the maximum reported by the channel adapter associated
> -* with the queue pair.
> +* with the queue pair; Must be zero if h_srq is non-NULL.
> *
> * sq_sge
> * Indicates the maximum number scatter-gather elements that may be
>
> _______________________________________________
> ofw mailing list
> ofw at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw
>
More information about the ofw
mailing list