[openib-general] [PATCH] multicast: add support for MGID 0
Hal Rosenstock
halr at voltaire.com
Wed Jul 26 19:11:45 PDT 2006
Hi Sean,
On Wed, 2006-07-26 at 20:10, Sean Hefty wrote:
> Add support to join a multicast group with MGID = 0, with the actual
> MGID of the group returned by the SA. The multicast module must be able
> to handle multiple requests for MGID = 0, with each request causing a
> new multicast group to be created.
>
> Also enhance the API for ib_get_mcmember_rec() to support a requested
> MGID of 0. In this case, a default MCMemberRecord is returned to the
> user and may be used when creating a new multicast group. Currently,
> the default values are hard-coded by the multicast module, but that can
> be extended in the future or overridden by the user before creating
> the group.
>
> Signed-off-by: Sean Hefty <sean.hefty at intel.com>
> ---
[snip...]
> Index: core/multicast.c
> ===================================================================
> --- core/multicast.c (revision 8695)
> +++ core/multicast.c (working copy)
[snip...]
> + if (mgid && memcmp(mgid, &mgid0, sizeof mgid0)) {
> + spin_lock_irqsave(&port->lock, flags);
> + group = mcast_find(port, mgid);
> + if (group)
> + *rec = group->rec;
> + else
> + ret = -EADDRNOTAVAIL;
> + spin_unlock_irqrestore(&port->lock, flags);
> + } else {
> + memset(rec, 0, sizeof *rec);
> + ib_get_cached_gid(device, port_num, 0, &rec->port_gid);
> + rec->pkey = 0xFFFF;
> + get_random_bytes(&rec->qkey, sizeof rec->qkey);
> + rec->join_state = 1;
> + }
These are the hard coded values for pkey, qkey, and join state mentioned
above. Should there be module parameters to override them ?
Also, where do the other parameters (components) that are necessary to
create a group come from ?
Another option would be to obtain all of them from the appropriate
(partition based) IPoIB broadcast group.
-- Hal
More information about the general
mailing list