[ofa-general] suggested patch for partition membership definitiion in osm-partitions.conf (fix)
Sasha Khapyorsky
sashak at voltaire.com
Mon May 14 14:36:24 PDT 2007
Hi Philippe,
On 17:26 Mon 14 May , Philippe Gregoire wrote:
>
> Here is a patch to allow a more compact partition membership definition.
> It allows definition of a default
> membership partition for the port guid list. The old syntax is still usable.
> old way
> G1 = 0x01 : 0x123=full, 0x124=full, 0x0x125=full, 0x126=full, 0x127=full ;
> G1 = 0x01 : 0x128=full, 0x129=full, 0x567, 0x569=full
>
> new way :
> G1 = 0x01 , defmember=full : 0x123, 0x124, 0x125, 0x126, 0x127 ;
> G1 = 0x01 , defmember=full : 0x128, 0x129, 0x567=limited, 0x569
I think this can be useful. Minor comment below.
> --- opensm/osm_prtn_config.old.c 2007-04-18 11:54:29.000000000 +0200
> +++ opensm/osm_prtn_config.c 2007-05-14 17:14:42.228813361 +0200
> @@ -70,6 +70,7 @@
> osm_subn_t *p_subn;
> osm_prtn_t *p_prtn;
> unsigned is_ipoib, mtu, rate, sl, scope;
> + boolean_t full;
> };
>
> extern osm_prtn_t *osm_prtn_make_new(osm_log_t *p_log, osm_subn_t *p_subn,
> @@ -163,6 +164,14 @@
> " - skipped\n", lineno);
> else
> conf->sl = sl;
> + } else if (!strncmp(flag, "defmember", len)) {
> + if (!val || (strcmp(val, "limited") && strcmp(val, "full")))
With strncmp(val, "limited"/"full", strlen(val)) user will be able to use
"limi" and "fu" (or shorter :)) substrings.
> + osm_log(conf->p_log, OSM_LOG_VERBOSE,
> + "PARSE WARN: line %d: "
> + "flag \'defmember\' requires valid value (limited or full)"
> + " - skipped\n", lineno);
> + else
> + conf->full = strcmp(val, "full") == 0;
> } else {
> osm_log(conf->p_log, OSM_LOG_VERBOSE,
> "PARSE WARN: line %d: "
Sasha
More information about the general
mailing list