Skip to contentSkip to conversation

opensm: Add the precreation of multicast groups

PATCH In review Ira Weiny 3 participants 4 messages Nov 3, 2011 – Nov 8, 2011 3 messages not in the archive InfiniBand

lore
Share & tools
lore

Ira Weiny

author
#0 lore raw

PATCH v2 1/1 opensm: Add the precreation of multicast groups

Allow for the pre-creation of these groups on a partition by partition basis.

P_Key is taken from Partition Definition. Q_Key, TClass, rate, FlowRate and mtu can be specified.

For IP groups, rate and mtu are verified to match the broadcast groups parameters. The P_Key bits in the mgid itself is verified to match the P_Key in the Partition Definition. If the P_Key bits in the mgid are 0x0000 then the P_Key is taken from the Partition Definition.

The syntax extends the existing syntax by allowing MC groups to be specified one per line, intermixed with the port specifications.

Changes from V1:

Incorporate Hal's comments:
Add FlowLabel
copy documentation from man page to doc/partition-config.txt code format cleanup
Remove "ERR:" from messages

Move group flag parsing to common function for broadcast and generic groups. Update documentation for the support of the other flags in the broadcast group.
Error message clean up
Update commit message

---
 doc/partition-config.txt       |  179 +++++++++++++--------
 include/opensm/osm_base.h      |    5 +
 include/opensm/osm_partition.h |   12 +-
 man/opensm.8.in                |  125 ++++++++++-----
 opensm/osm_prtn.c              |  113 ++++++++++----
 opensm/osm_prtn_config.c       |  345 +++++++++++++++++++++++++++++++++++-----
 opensm/osm_qos_policy.c        |   48 +++---
 opensm/osm_subnet.c            |    2 +-
 8 files changed, 619 insertions(+), 210 deletions(-)
doc/partition-config.txt +112 -67
index 537f6a7..cb5d66f 100644
@@ -2,8 +2,9 @@ OpenSM Partition configuration
 ===============================
 
 The default name of OpenSM partitions configuration file is
-'/etc/opensm/partitions.conf'. The default may be changed by
-using the --Pconfig (-P) option with OpenSM.
+'$(OPENSM_CONFIG_DIR)/partitions.conf' (where $(OPENSM_CONFIG_DIR) is set at
+configure time and defaults to ${sysconfdir}/opensm). The default may be
+changed at run time by using the --Pconfig (-P) option with OpenSM.
 
 The default partition will be created by OpenSM unconditionally even
 when partition configuration file does not exist or cannot be accessed.
@@ -26,73 +27,105 @@ File Format
 ===========
 
 Comments:
---------
 
-Line content followed after '#' character is comment and ignored by
+Line content followed after \'#\' character is comment and ignored by
 parser.
 
-
 General file format:
--------------------
-
-<Partition Definition>:<PortGUIDs list> ;
-
-
-Partition Definition:
---------------------
-
-[PartitionName][=PKey][,flag[=value]][,defmember=full|limited]
-
-PartitionName - string, to 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
-                list. Default is limited.
-
-Currently recognized flags are:
-
-ipoib       - indicates that this partition may be used for IPoIB, as
-              result IPoIB capable MC group will be created.
-rate=<val>  - specifies rate for this IPoIB MC group (default is 3 (10GBps))
-mtu=<val>   - specifies MTU for this IPoIB MC group (default is 4 (2048))
-sl=<val>    - specifies SL for this IPoIB MC group (default is 0)
-scope=<val> - specifies scope for this IPoIB MC group (default is 2 (link
-local))
-
-Note that values for 'rate', 'mtu'. and 'scope' should be specified as defined
-in the IBTA specification (for example mtu=4 for 2048).
 
-
-PortGUIDs list:
---------------
-
-[PortGUID[=full|=limited]] [,PortGUID[=full|=limited]] [,PortGUID] ...
-
-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.
+<Partition Definition>:[<newline>]<Partition Properties>;
+
+     Partition Definition:
+       [PartitionName][=PKey][,ipoib_bc_flags][,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.
+        ipoib_bc_flags - used to indicate/specify IPoIB capability of this partition.
+
+        defmember=full|limited - specifies default membership for port guid
+                        list. Default is limited.
+
+     ipoib_bc_flags:
+        ipoib_flag|[mgroup_flag]*
+
+        ipoib_flag - indicates that this partition may be used for IPoIB, as
+		     a result the IPoIB broadcast group will be created with
+		     the flags given, if any.
+
+     Partition Properties:
+       [<Port list>|<MCast Group>]* | <Port list>
+
+     Port list:
+        <Port Specifier>[,<Port Specifier>]
+
+     Port Specifier:
+        <PortGUID>[=[full|limited]]
+
+        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) limited
+                           membership is assumed.
+
+     MCast Group:
+        mgid=gid[,mgroup_flag]*<newline>
+
+	            - gid specified is verified to be a Multicast address
+		      IP groups are verified to match the rate and mtu of the
+		      broadcast group.  The P_Key bits of the mgid for IP
+		      groups are verified to either match the P_Key specified
+		      in by "Partition Definition" or if they are 0x0000 the
+		      P_Key will be copied into those bits.
+
+     mgroup_flag:
+        rate=<val>  - specifies rate for this MC group
+                      (default is 3 (10GBps))
+        mtu=<val>   - specifies MTU for this MC group
+                      (default is 4 (2048))
+        sl=<val>    - specifies SL for this MC group
+                      (default is 0)
+        scope=<val> - specifies scope for this MC group
+                      (default is 2 (link local)).  Multiple scope settings
+                      are permitted for a partition.
+		      NOTE: This overwrites the scope nibble of the specified
+			    mgid.  Furthermore specifying multiple scope
+			    settings will result in multiple MC groups
+			    being created.
+        qkey=<val>      - specifies the Q_Key for this MC group
+                          (default: 0x0b1b for IP groups, 0 for other groups)
+                          WARNING: changing this for the broadcast group may
+			           break IPoIB on client nodes!!!
+        tclass=<val>    - specifies tclass for this MC group
+                          (default is 0)
+        FlowLabel=<val> - specifies FlowLabel for this MC group
+                          (default is 0)
+
+     newline: '\n'
+
+
+Note that values for rate, mtu, and scope, for both partitions and multicast
+groups, should be specified as defined in the IBTA specification (for example,
+mtu=4 for 2048).
 
 There are several useful keywords for PortGUID definition:
 
-- 'ALL' means all end ports in this subnet.
-- 'ALL_CAS' means all Channel Adapter end ports in this subnet.
-- 'ALL_SWITCHES' means all Switch end ports in this subnet.
-- 'ALL_ROUTERS' means all Router end ports in this subnet.
-- 'SELF' means subnet manager's port.
+ - 'ALL' means all end ports in this subnet.
+ - 'ALL_CAS' means all Channel Adapter end ports in this subnet.
+ - 'ALL_SWITCHES' means all Switch end ports in this subnet.
+ - 'ALL_ROUTERS' means all Router end ports in this subnet.
+ - 'SELF' means subnet manager's port.
 
 Empty list means no ports in this partition.
 
 
+
 Notes:
 -----
 
-White spaces are permitted between delimiters ('=', ',',':',';').
-
-The Line can be wrapped after ':' followed after Partition Definition and
-between.
+White space is permitted between delimiters ('=', ',',':',';').
 
 PartitionName does not need to be unique, PKey does need to be unique.
 If PKey is repeated then those partition configurations will be merged
@@ -103,22 +136,34 @@ definition, but then PKey should be explicitly specified (otherwise
 different PKey values will be generated for those definitions).
 
 
+
 Examples:
 --------
 
-Default=0x7fff : ALL, SELF=full ;
-Default=0x7fff : ALL, ALL_SWITCHES=full, SELF=full ;
-
-NewPartition , ipoib : 0x123456=full, 0x3456789034=limi, 0x2134af2306 ;
-
-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;
+ Default=0x7fff : ALL, SELF=full ;
+ Default=0x7fff : ALL, ALL_SWITCHES=full, SELF=full ;
+
+ NewPartition , ipoib : 0x123456=full, 0x3456789034=limi, 0x2134af2306 ;
+
+ 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;
+
+ # multicast groups added to default
+ Default=0x7fff,ipoib:
+        mgid=ff12:401b::0707,sl=1 # random IPv4 group
+        mgid=ff12:601b::16    # MLDv2-capable routers
+        mgid=ff12:401b::16    # IGMP
+        mgid=ff12:601b::2     # All routers
+        mgid=ff12::1,sl=1,Q_Key=0xDEADBEEF,rate=3,mtu=2 # random group
+        ALL=full;
 
 
 Note:
include/opensm/osm_base.h +5 -0
index e558c55..869ba9c 100644
@@ -53,6 +53,7 @@
 #endif
 
 #include <complib/cl_types.h>
+#include <iba/ib_types.h>
 
 #ifdef __cplusplus
 #  define BEGIN_C_DECLS extern "C" {
@@ -954,6 +955,10 @@ typedef enum _osm_sm_signal {
 #define OSM_VENDOR_ID_HP4           0x00237D
 #define OSM_VENDOR_ID_OPENIB        0x001405
 
+/* IPoIB Broadcast Defaults */
+#define OSM_IPOIB_BROADCAST_MGRP_QKEY 0x0b1b
+extern const ib_gid_t osm_ipoib_broadcast_mgid;
+
 /**********/
 
 END_C_DECLS
include/opensm/osm_partition.h +7 -5
index fdb34b9..629bad2 100644
@@ -94,10 +94,11 @@ typedef struct osm_prtn {
 	cl_map_item_t map_item;
 	ib_net16_t pkey;
 	uint8_t sl;
-	osm_mgrp_t *mgrp;
 	cl_map_t full_guid_tbl;
 	cl_map_t part_guid_tbl;
 	char name[32];
+	osm_mgrp_t **mgrps;
+	int nmgrps;
 } osm_prtn_t;
 /*
 * FIELDS
@@ -110,9 +111,10 @@ typedef struct osm_prtn {
 *	sl
 *		The Service Level (SL) associated with this Partiton.
 *
-*	mgrp
-*		The pointer to the well known Multicast Group
-*		that was created for this partition (when configured).
+*       mgrps
+*		List of well known Multicast Groups
+*		that were created for this partition (when configured).
+*		This includes the IPoIB broadcast group.
 *
 *	full_guid_tbl
 *		Container of pointers to all Port objects in the Partition
@@ -139,7 +141,7 @@ typedef struct osm_prtn {
 *
 * SYNOPSIS
 */
-void osm_prtn_delete(IN OUT osm_prtn_t ** pp_prtn);
+void osm_prtn_delete(IN osm_subn_t * p_subn, IN OUT osm_prtn_t ** pp_prtn);
 /*
 * PARAMETERS
 *	pp_prtn
man/opensm.8.in +83 -42

143 lines not on this page · raw message

opensm/osm_prtn.c +85 -28

193 lines not on this page · raw message

opensm/osm_prtn_config.c +301 -44

439 lines not on this page · raw message

opensm/osm_qos_policy.c +25 -23

60 lines not on this page · raw message

opensm/osm_subnet.c +1 -1
index 8d636bc..810160c 100644
@@ -492,7 +492,7 @@ void osm_subn_destroy(IN osm_subn_t * p_subn)
 	       (osm_prtn_t *) cl_qmap_end(&p_subn->prtn_pkey_tbl)) {
 		p_prtn = p_next_prtn;
 		p_next_prtn = (osm_prtn_t *) cl_qmap_next(&p_prtn->map_item);
-		osm_prtn_delete(&p_prtn);
+		osm_prtn_delete(p_subn, &p_prtn);
 	}
 
 	cl_fmap_remove_all(&p_subn->mgrp_mgid_tbl);
Signature · 6 lines
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

Ira,

Looks good to me; just one nit in the commit message:

Quoted 2 lines · Ira Weiny

P_Key is taken from Partition Definition. Q_Key, TClass, rate, FlowRate and mtu can be specified

FlowRate -> FlowLabel

-- Hal

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 4EB4274A.8010006-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org

author
#4 lore raw
Quoted 10 lines · On Fri, 4 Nov 2011 10:56:26 -0700 Hal Rosenstock…

Ira,

Looks good to me; just one nit in the commit message:

Quoted 2 lines · Ira Weiny

P_Key is taken from Partition Definition. Q_Key, TClass, rate, FlowRate and mtu can be specified

FlowRate -> FlowLabel

New patch with correct commit message:
======================================

Allow for the pre-creation of these groups on a partition by partition basis.

P_Key is taken from Partition Definition. Q_Key, TClass, rate, FlowLabel and mtu can be specified.

For IP groups, rate and mtu are verified to match the broadcast groups parameters. The P_Key bits in the mgid itself is verified to match the P_Key in the Partition Definition. If the P_Key bits in the mgid are 0x0000 then the P_Key is taken from the Partition Definition.

The syntax extends the existing syntax by allowing MC groups to be specified one per line, intermixed with the port specifications.

Changes from V1:

Incorporate Hal's comments:
Add FlowLabel
copy documentation from man page to doc/partition-config.txt code format cleanup
Remove "ERR:" from messages

Move group flag parsing to common function for broadcast and generic groups. Update documentation for the support of the other flags in the broadcast group.
Error message clean up
Update commit message

---
 doc/partition-config.txt       |  179 +++++++++++++--------
 include/opensm/osm_base.h      |    5 +
 include/opensm/osm_partition.h |   12 +-
 man/opensm.8.in                |  125 ++++++++++-----
 opensm/osm_prtn.c              |  113 ++++++++++----
 opensm/osm_prtn_config.c       |  345 +++++++++++++++++++++++++++++++++++-----
 opensm/osm_qos_policy.c        |   48 +++---
 opensm/osm_subnet.c            |    2 +-
 8 files changed, 619 insertions(+), 210 deletions(-)
doc/partition-config.txt +112 -67
index 537f6a7..cb5d66f 100644
@@ -2,8 +2,9 @@ OpenSM Partition configuration
 ===============================
 
 The default name of OpenSM partitions configuration file is
-'/etc/opensm/partitions.conf'. The default may be changed by
-using the --Pconfig (-P) option with OpenSM.
+'$(OPENSM_CONFIG_DIR)/partitions.conf' (where $(OPENSM_CONFIG_DIR) is set at
+configure time and defaults to ${sysconfdir}/opensm). The default may be
+changed at run time by using the --Pconfig (-P) option with OpenSM.
 
 The default partition will be created by OpenSM unconditionally even
 when partition configuration file does not exist or cannot be accessed.
@@ -26,73 +27,105 @@ File Format
 ===========
 
 Comments:
---------
 
-Line content followed after '#' character is comment and ignored by
+Line content followed after \'#\' character is comment and ignored by
 parser.
 
-
 General file format:
--------------------
-
-<Partition Definition>:<PortGUIDs list> ;
-
-
-Partition Definition:
---------------------
-
-[PartitionName][=PKey][,flag[=value]][,defmember=full|limited]
-
-PartitionName - string, to 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
-                list. Default is limited.
-
-Currently recognized flags are:
-
-ipoib       - indicates that this partition may be used for IPoIB, as
-              result IPoIB capable MC group will be created.
-rate=<val>  - specifies rate for this IPoIB MC group (default is 3 (10GBps))
-mtu=<val>   - specifies MTU for this IPoIB MC group (default is 4 (2048))
-sl=<val>    - specifies SL for this IPoIB MC group (default is 0)
-scope=<val> - specifies scope for this IPoIB MC group (default is 2 (link
-local))
-
-Note that values for 'rate', 'mtu'. and 'scope' should be specified as defined
-in the IBTA specification (for example mtu=4 for 2048).
 
-
-PortGUIDs list:
---------------
-
-[PortGUID[=full|=limited]] [,PortGUID[=full|=limited]] [,PortGUID] ...
-
-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.
+<Partition Definition>:[<newline>]<Partition Properties>;
+
+     Partition Definition:
+       [PartitionName][=PKey][,ipoib_bc_flags][,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.
+        ipoib_bc_flags - used to indicate/specify IPoIB capability of this partition.
+
+        defmember=full|limited - specifies default membership for port guid
+                        list. Default is limited.
+
+     ipoib_bc_flags:
+        ipoib_flag|[mgroup_flag]*
+
+        ipoib_flag - indicates that this partition may be used for IPoIB, as
+		     a result the IPoIB broadcast group will be created with
+		     the flags given, if any.
+
+     Partition Properties:
+       [<Port list>|<MCast Group>]* | <Port list>
+
+     Port list:
+        <Port Specifier>[,<Port Specifier>]
+
+     Port Specifier:
+        <PortGUID>[=[full|limited]]
+
+        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) limited
+                           membership is assumed.
+
+     MCast Group:
+        mgid=gid[,mgroup_flag]*<newline>
+
+	            - gid specified is verified to be a Multicast address
+		      IP groups are verified to match the rate and mtu of the
+		      broadcast group.  The P_Key bits of the mgid for IP
+		      groups are verified to either match the P_Key specified
+		      in by "Partition Definition" or if they are 0x0000 the
+		      P_Key will be copied into those bits.
+
+     mgroup_flag:
+        rate=<val>  - specifies rate for this MC group
+                      (default is 3 (10GBps))
+        mtu=<val>   - specifies MTU for this MC group
+                      (default is 4 (2048))
+        sl=<val>    - specifies SL for this MC group
+                      (default is 0)
+        scope=<val> - specifies scope for this MC group
+                      (default is 2 (link local)).  Multiple scope settings
+                      are permitted for a partition.
+		      NOTE: This overwrites the scope nibble of the specified
+			    mgid.  Furthermore specifying multiple scope
+			    settings will result in multiple MC groups
+			    being created.
+        qkey=<val>      - specifies the Q_Key for this MC group
+                          (default: 0x0b1b for IP groups, 0 for other groups)
+                          WARNING: changing this for the broadcast group may
+			           break IPoIB on client nodes!!!
+        tclass=<val>    - specifies tclass for this MC group
+                          (default is 0)
+        FlowLabel=<val> - specifies FlowLabel for this MC group
+                          (default is 0)
+
+     newline: '\n'
+
+
+Note that values for rate, mtu, and scope, for both partitions and multicast
+groups, should be specified as defined in the IBTA specification (for example,
+mtu=4 for 2048).
 
 There are several useful keywords for PortGUID definition:
 
-- 'ALL' means all end ports in this subnet.
-- 'ALL_CAS' means all Channel Adapter end ports in this subnet.
-- 'ALL_SWITCHES' means all Switch end ports in this subnet.
-- 'ALL_ROUTERS' means all Router end ports in this subnet.
-- 'SELF' means subnet manager's port.
+ - 'ALL' means all end ports in this subnet.
+ - 'ALL_CAS' means all Channel Adapter end ports in this subnet.
+ - 'ALL_SWITCHES' means all Switch end ports in this subnet.
+ - 'ALL_ROUTERS' means all Router end ports in this subnet.
+ - 'SELF' means subnet manager's port.
 
 Empty list means no ports in this partition.
 
 
+
 Notes:
 -----
 
-White spaces are permitted between delimiters ('=', ',',':',';').
-
-The Line can be wrapped after ':' followed after Partition Definition and
-between.
+White space is permitted between delimiters ('=', ',',':',';').
 
 PartitionName does not need to be unique, PKey does need to be unique.
 If PKey is repeated then those partition configurations will be merged
@@ -103,22 +136,34 @@ definition, but then PKey should be explicitly specified (otherwise
 different PKey values will be generated for those definitions).
 
 
+
 Examples:
 --------
 
-Default=0x7fff : ALL, SELF=full ;
-Default=0x7fff : ALL, ALL_SWITCHES=full, SELF=full ;
-
-NewPartition , ipoib : 0x123456=full, 0x3456789034=limi, 0x2134af2306 ;
-
-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;
+ Default=0x7fff : ALL, SELF=full ;
+ Default=0x7fff : ALL, ALL_SWITCHES=full, SELF=full ;
+
+ NewPartition , ipoib : 0x123456=full, 0x3456789034=limi, 0x2134af2306 ;
+
+ 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;
+
+ # multicast groups added to default
+ Default=0x7fff,ipoib:
+        mgid=ff12:401b::0707,sl=1 # random IPv4 group
+        mgid=ff12:601b::16    # MLDv2-capable routers
+        mgid=ff12:401b::16    # IGMP
+        mgid=ff12:601b::2     # All routers
+        mgid=ff12::1,sl=1,Q_Key=0xDEADBEEF,rate=3,mtu=2 # random group
+        ALL=full;
 
 
 Note:
include/opensm/osm_base.h +5 -0
index e558c55..869ba9c 100644
@@ -53,6 +53,7 @@
 #endif
 
 #include <complib/cl_types.h>
+#include <iba/ib_types.h>
 
 #ifdef __cplusplus
 #  define BEGIN_C_DECLS extern "C" {
@@ -954,6 +955,10 @@ typedef enum _osm_sm_signal {
 #define OSM_VENDOR_ID_HP4           0x00237D
 #define OSM_VENDOR_ID_OPENIB        0x001405
 
+/* IPoIB Broadcast Defaults */
+#define OSM_IPOIB_BROADCAST_MGRP_QKEY 0x0b1b
+extern const ib_gid_t osm_ipoib_broadcast_mgid;
+
 /**********/
 
 END_C_DECLS
include/opensm/osm_partition.h +7 -5
index fdb34b9..629bad2 100644
@@ -94,10 +94,11 @@ typedef struct osm_prtn {
 	cl_map_item_t map_item;
 	ib_net16_t pkey;
 	uint8_t sl;
-	osm_mgrp_t *mgrp;
 	cl_map_t full_guid_tbl;
 	cl_map_t part_guid_tbl;
 	char name[32];
+	osm_mgrp_t **mgrps;
+	int nmgrps;
 } osm_prtn_t;
 /*
 * FIELDS
@@ -110,9 +111,10 @@ typedef struct osm_prtn {
 *	sl
 *		The Service Level (SL) associated with this Partiton.
 *
-*	mgrp
-*		The pointer to the well known Multicast Group
-*		that was created for this partition (when configured).
+*       mgrps
+*		List of well known Multicast Groups
+*		that were created for this partition (when configured).
+*		This includes the IPoIB broadcast group.
 *
 *	full_guid_tbl
 *		Container of pointers to all Port objects in the Partition
@@ -139,7 +141,7 @@ typedef struct osm_prtn {
 *
 * SYNOPSIS
 */
-void osm_prtn_delete(IN OUT osm_prtn_t ** pp_prtn);
+void osm_prtn_delete(IN osm_subn_t * p_subn, IN OUT osm_prtn_t ** pp_prtn);
 /*
 * PARAMETERS
 *	pp_prtn
man/opensm.8.in +83 -42

143 lines not on this page · raw message

opensm/osm_prtn.c +85 -28

193 lines not on this page · raw message

opensm/osm_prtn_config.c +301 -44

439 lines not on this page · raw message

opensm/osm_qos_policy.c +25 -23

60 lines not on this page · raw message

opensm/osm_subnet.c +1 -1
index 8d636bc..810160c 100644
@@ -492,7 +492,7 @@ void osm_subn_destroy(IN osm_subn_t * p_subn)
 	       (osm_prtn_t *) cl_qmap_end(&p_subn->prtn_pkey_tbl)) {
 		p_prtn = p_next_prtn;
 		p_next_prtn = (osm_prtn_t *) cl_qmap_next(&p_prtn->map_item);
-		osm_prtn_delete(&p_prtn);
+		osm_prtn_delete(p_subn, &p_prtn);
 	}
 
 	cl_fmap_remove_all(&p_subn->mgrp_mgid_tbl);
Signature · 6 lines
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw

Hi Ira,

Quoted 38 lines · Ira Weiny
Quoted 10 lines · On Fri, 4 Nov 2011 10:56:26 -0700 Hal Rosenstock…

Ira,

Looks good to me; just one nit in the commit message:

Quoted 2 lines · Ira Weiny

P_Key is taken from Partition Definition. Q_Key, TClass, rate, FlowRate and mtu can be specified

FlowRate -> FlowLabel

New patch with correct commit message:
======================================

Allow for the pre-creation of these groups on a partition by partition basis.

P_Key is taken from Partition Definition. Q_Key, TClass, rate, FlowLabel and mtu can be specified.

For IP groups, rate and mtu are verified to match the broadcast groups parameters. The P_Key bits in the mgid itself is verified to match the P_Key in the Partition Definition. If the P_Key bits in the mgid are 0x0000 then the P_Key is taken from the Partition Definition.

The syntax extends the existing syntax by allowing MC groups to be specified one per line, intermixed with the port specifications.

Changes from V1:

Incorporate Hal's comments:
Add FlowLabel
copy documentation from man page to doc/partition-config.txt code format cleanup
Remove "ERR:" from messages

Quoted 8 lines

Move group flag parsing to common function for broadcast and generic groups. Update documentation for the support of the other flags in the broadcast group.
Error message clean up
Update commit message

---

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html