[openib-general] question regarding GRH flag in ib_ah_attr
Jason Gunthorpe
jgunthorpe at obsidianresearch.com
Wed May 10 17:40:49 PDT 2006
On Wed, May 10, 2006 at 04:44:42PM -0700, Roland Dreier wrote:
> Sean> Does anyone know how the user determines if the grh flag
> Sean> should be set in the ib_ah_attr when allocating an ib_ah?
> Sean> Do they do this by examining the GIDs in a path record?
>
> Good question. It's always needed for multicast, of course. For
> unicast, I guess one could look at whether the subnet prefixes of the
> SGID and DGID are the same, but I'm not sure that's sufficient -- a
> router could conceivably sit between two subnets with the same subnet
> prefix.
> Perhaps some of the Obsidian guys could comment?
Our intention in the absence of standardization is to leverage common
practice in IPv6 for numbering - which means that global prefixes need
to be globally unique (or at least site unqiue). A generic N port
router cannot connect subnets with the same prefix because it
is ambiguous where to send the packets.
Logically I think the GRH usage should be selected after the output
port is determined based on matching the port's PortInfo.GIDPrefix and
the IBA default prefix (the link local prefix FE80:: which is always
on-link) against the DGID. If there is a match it is on link,
otherwise it is off link, through a router, and a GRH is necessary.
Right now IBA only allows two prefixes, FE80:: and PortInfo.GIDPrefix
so the check described above can be reduced to comparing the SGID and
DGID prefixes, if they are different and the DGID prefix is not FE80::
then it is off link and needs a GRH.
Regards,
Jason
More information about the general
mailing list