[ofa-general] Re: [PATCH] infiniband-diags/ibroute: Add support for MulticastFDBTop
Hal Rosenstock
hal.rosenstock at gmail.com
Sun Aug 30 05:42:00 PDT 2009
On 8/30/09, Sasha Khapyorsky <sashak at voltaire.com> wrote:
> On 10:03 Wed 26 Aug , Hal Rosenstock wrote:
> >
> > Add support for SwitchInfo:MulticastFDBTop
> > Added by MgtWG errata #4505-4508 and #4640
> >
> > If MulticastFDBTop is set to other than 0, only fetch
> MulticastForwardingTable
> > blocks up through MulticastFDBTop rather than MulticastFDBCap
> >
> > If MulticastFDBTop is set to 0xbfff, this means no entries (per #4640)
> >
> > Signed-off-by: Hal Rosenstock <hal.rosenstock at gmail.com>
> > ---
> > diff --git a/infiniband-diags/src/ibroute.c
> b/infiniband-diags/src/ibroute.c
> > index 106c934..f3ebe56 100644
> > --- a/infiniband-diags/src/ibroute.c
> > +++ b/infiniband-diags/src/ibroute.c
> > @@ -1,5 +1,6 @@
> > /*
> > * Copyright (c) 2004-2008 Voltaire Inc. All rights reserved.
> > + * Copyright (c) 2009 Mellanox Technologies LTD. All rights reserved.
> > *
> > * This software is available to you under a choice of one of two
> > * licenses. You may choose to be licensed under the terms of the GNU
> > @@ -140,16 +141,24 @@ char *dump_multicast_tables(ib_portid_t * portid,
> unsigned startlid,
> > char *s;
> > uint64_t nodeguid;
> > uint32_t mod;
> > - unsigned block, i, j, e, nports, cap, chunks, startblock,
> lastblock;
> > + unsigned block, i, j, e, nports, cap, top, chunks,
> > + startblock, lastblock;
> > int n = 0;
> >
> > if ((s = check_switch(portid, &nports, &nodeguid, sw, nd)))
> > return s;
> >
> > mad_decode_field(sw, IB_SW_MCAST_FDB_CAP_F, &cap);
> > + mad_decode_field(sw, IB_SW_MCAST_FDB_TOP_F, &top);
> >
> > if (!endlid || endlid > IB_MIN_MCAST_LID + cap - 1)
> > endlid = IB_MIN_MCAST_LID + cap - 1;
> > + if (!dump_all && top && top < endlid) {
> > + if (top < IB_MIN_MCAST_LID - 1 || top == 0xffff)
>
> I don't understand what does this "top == 0xffff" check?
MFTTop is only allowed up to 0xfffe so it's the max but I now see that gets
checked later where endlid > IB_MAX_MCAST_LID.
> Shouldn't be something like
>
> (top > IB_MIN_MCAST_LID + cap - 1 && top != 0xbfff)
>
> instead?
Yes.
> > + IBWARN("illegal top mlid %x", top);
> > + else
> > + endlid = top;
> > + }
>
> And where is the case of "no entries" (top = 0xbfff) handled (as
> declared in change log)?
This is handled by the block loop inside of dump_multicast_tables.
-- Hal
> Sasha
>
> >
> > if (!startlid)
> > startlid = IB_MIN_MCAST_LID;
> > @@ -187,7 +196,8 @@ char *dump_multicast_tables(ib_portid_t * portid,
> unsigned startlid,
> > printf(" MLid\n");
> > }
> > if (ibverbose)
> > - printf("Switch multicast mlid capability is %d\n", cap);
> > + printf("Switch multicast mlid capability is %d top is
> %d\n",
> > + cap, top);
> >
> > chunks = ALIGN(nports + 1, 16) / 16;
> >
> >
> _______________________________________________
> general mailing list
> general at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
>
> To unsubscribe, please visit
> http://openib.org/mailman/listinfo/openib-general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20090830/79f661b0/attachment.html>
More information about the general
mailing list