[ofa-general] [opensm patch][1/2] fix qos config parsing bugs

Al Chu chu11 at llnl.gov
Mon Nov 10 13:16:15 PST 2008


Hey Sasha,

New patch w/ proper "signed off by" line.

Al

On Thu, 2008-10-30 at 15:01 -0700, Al Chu wrote:
> Hey Sasha,
> 
> I found a bunch of qos config parsing issues, listed below:
> 
> 1)
> 
> If the user sets the qos default fields (i.e. qos_high_limit,
> qos_vlarb_high. etc.), but do not have the qos_ca, qos_swe, qos_rtr,
> etc. equivalent fields listed (i.e. qos_ca_high_limit,
> qos_sw0_vlarb_high), the values set in teh qos default fields are not
> loaded into the CAs, switches, etc.  The reason is in qos_build_config()
> we load defaults like this:
> 
> p = opt->vlarb_high ? opt->vlarb_high : dflt->vlarb_high;
> 
> but we always set the fields to something non-NULL.
> 
> static void subn_set_default_qos_options(IN osm_qos_options_t * opt)
> {
>         opt->max_vls = OSM_DEFAULT_QOS_MAX_VLS;
>         opt->high_limit = OSM_DEFAULT_QOS_HIGH_LIMIT;
>         opt->vlarb_high = OSM_DEFAULT_QOS_VLARB_HIGH;
>         opt->vlarb_low = OSM_DEFAULT_QOS_VLARB_LOW;
>         opt->sl2vl = OSM_DEFAULT_QOS_SL2VL;
> }
> 
> 2)
> 
> In qos_build_config() we load the high_limit like this:
> 
> cfg->vl_high_limit = (uint8_t) opt->high_limit;
> 
> So there is no way to tell the qos_ca, qos_swe, qos_rtr, etc. high_limit
> options to "go back to" the default high_limit.  It just assumes that
> whatever is input (or was set by default) is what you should use.
> 
> 3)
> 
> Some fields like qos_vlarb_high are assumed to be correctly set and can
> segfault opensm.
> 
> The attached patch fixes these up.  Obviously there's tons of ways to
> do this.  I decided to ...
> 
> A) only initialization qos_options to the real defaults
> 
> B) init all qos_*_options to sentinel values (-1, NULL, etc.) to
> indicate it should use the configured defaults if they aren't set by the
> user.  The high_limit was changed from an unsigned to an int b/c 0 is a
> valid high_limit value.
> 
> C) verify that the default qos inputs are definitely correct (i.e. can't
> be NULL).  Reset to hard coded defaults if need be.
> 
> D) load the default vs. non-default appropriately in QoS.
> 
> Al
> 
> P.S.  This patch does not rely on my previous "remove qos_max_vls
> config" patch.  I assume we're keeping the max_vls fields in this patch.
> 
> _______________________________________________
> general mailing list
> general at lists.openfabrics.org
> http:// lists.openfabrics.org/cgi-bin/mailman/listinfo/general
> 
> To unsubscribe, please visit http:// openib.org/mailman/listinfo/openib-general
-- 
Albert Chu
chu11 at llnl.gov
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fix-qos-config-parsing-bugs.patch
Type: text/x-patch
Size: 21153 bytes
Desc: not available
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20081110/9196f015/attachment.bin>


More information about the general mailing list