[ofa-general] Re: suggested patch for partition membership definitiion in osm-partitions.conf (fix)

Hal Rosenstock halr at voltaire.com
Mon May 14 08:51:22 PDT 2007


Hi Philippe,

On Mon, 2007-05-14 at 11:26, Philippe Gregoire wrote:
> This time , with the definitive patch (sorry)

Can you resubmit this with a S-O-B line ?

> Hi Hal,
> the way to define in osm-partitions.conf file  partition membership for
> port guids is quite very verbose,
> specially when you have a lot of (full member) ports.

or lots of limited members, either way. This is an improvement in the
allowed syntax.

> 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 changed also the opensm man page as some lines (arround limited/full
> membership) are not well formatted.

Can you break this piece into 2 parts: fix formatting, and then add
defmember ?

> This patch has been compiled and tested on our cluster with the
> following osm-partitions.conf :
> G1  = 0x0001 , defmember=full : 0x0005ad00000165f1, 0x0005ad0000016cb9,
> 0x0005ad00000168ad, 0x0005ad0000000cb7=limited, 0x0008f10403962eb1 ;
> G2  = 0x0002 , defmember=full : 0x0005ad00000165f1, 0x0008f10403962eb1 ;
> G3  = 0x0003 , defmember=full : 0x0005ad00000165f1, 0x0005ad0000016cb9,
> 0x0008f10403962eb1 ;
> G5  = 0x0005 , defmember=full : 0x0008f10403962eb1 ;
> G10 = 0x0010 , defmember=full : 0x0005ad00000165f1, 0x0008f10403962eb1 ;
> G70 = 0x0070 , defmember=full : 0x0005ad00000165f1 ;
> G80 = 0x0080 , defmember=full : 0x0005ad00000165f1;
> G80 = 0x0080 : 0x0005ad00000168ad;
> G80 = 0x0080 , defmember=full : 0x0005ad0000016cb9;
> G80 = 0x0080 , defmember=limited : 0x0005ad0000000cb7, 0x0008f10403962eb1;

Thanks.

-- Hal

> Philippe
> 
> 
> 
> ______________________________________________________________________
> 
> --- 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")))
> +			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: "
> @@ -177,12 +186,14 @@
>  {
>  	osm_prtn_t *p = conf->p_prtn;
>  	ib_net64_t guid;
> -	boolean_t full = FALSE;
> +	boolean_t full = conf->full;
>  
>  	if (!name || !*name || !strncmp(name, "NONE", strlen(name)))
>  		return 0;
>  
>  	if (flag) {
> +		/* reset default membership to limited */
> +		full = FALSE;
>  		if (!strncmp(flag, "full", strlen(flag)))
>  			full = TRUE;
>  		else if (strncmp(flag, "limited", strlen(flag))) {
> @@ -275,6 +286,7 @@
>  	conf->p_prtn = NULL;
>  	conf->is_ipoib = 0;
>  	conf->sl = OSM_DEFAULT_SL;
> +	conf->full = FALSE;
>  	return conf;
>  }
>  
> --- man/opensm.8.old	2007-04-18 11:54:29.000000000 +0200
> +++ man/opensm.8	2007-05-14 16:19:11.747555126 +0200
> @@ -291,13 +291,15 @@
>  
>  Partition Definition:
>  
> -[PartitionName][=PKey][,flag[=value]]
> +[PartitionName][=PKey][,flag[=value]][,defmember=full|limited]
>  
>   PartitionName - string, will be used with logging. When omitted
>                   empty string will be used.
>   PKey          - P_Key value for this partition. Only low 15 bits will
>                   be used. When omitted will be autogenerated.
>   flag          - used to indicate IPoIB capability of this partition.
> + defmember=full|limited - specifies default membership for port guid. 
> +                 Default is limited.
>  
>  Currently recognized flags are:
>  
> @@ -317,10 +319,10 @@
>  
>  PortGUIDs list:
>  
> -PortGUID     - GUID of partition member EndPort. Hexadecimal numbers
> -               should start from 0x, decimal numbers are accepted too.
> -full or      - indicates full or limited membership for this port. When
> -  limited      omitted (or unrecognized) limited membership is assumed.
> + PortGUID         - GUID of partition member EndPort. Hexadecimal numbers
> +                   should start from 0x, decimal numbers are accepted too.
> + full or limited  - indicates full or limited membership for this port.
> +                   When omitted (or unrecognized) default (defmember) membership is assumed.
>  
>  There are two useful keywords for PortGUID definition:
>  
> @@ -346,12 +348,20 @@
>  
>  Examples:
>  
> -Default=0x7fff : ALL, SELF=full ;
> + Default=0x7fff : ALL, SELF=full ;
>  
> -NewPartition , ipoib : 0x123456=full, 0x3456789034=limi, 0x2134af2306 ;
> + NewPartition , ipoib : 0x123456=full, 0x3456789034=limi, 0x2134af2306 ;
>  
> -YetAnotherOne = 0x300 : SELF=full ;
> -YetAnotherOne = 0x300 : ALL=limited ;
> + YetAnotherOne = 0x300 : SELF=full ;
> + YetAnotherOne = 0x300 : ALL=limited ;
> +
> + ShareIO = 0x80 , defmember=full : 0x123451, 0x123452;
> + # 0x123453, 0x123454 will be limited
> + ShareIO = 0x80 : 0x123453, 0x123454, 0x123455=full;
> + # 0x123456, 0x123457 will be limited
> + ShareIO = 0x80 : defmember=limited : 0x123456, 0x123457, 0x123458=full;
> + ShareIO = 0x80 , defmember=full : 0x123459, 0x12345a;
> + ShareIO = 0x80 , defmember=full : 0x12345b, 0x12345c=limited, 0x12345d;
>  
>  Note:
>  




More information about the general mailing list