[ofa-general] perfquery looking at the wrong bits
Max Matveev
makc at sgi.com
Fri Oct 12 03:11:14 PDT 2007
In OFED 1.2 perfquery attempts to check if a port supports extended
counters:
} else {
/* Should ClassPortInfo be implemented in libibmad ? */
pc2 = (uint16_t *)&pc[2]; /* CapabilityMask */
cap_mask = *pc2;
if (!(cap_mask & 0x100)) /* 1.2 errata: bit 9 is extended counter support */
IBWARN("PerfMgt ClassPortInfo 0x%x extended counters not indicated\n", cap_mask);
It seems to be what there are at least 2 problems here:
1. bit 9, if we're counting from 0, will have mask of 0x200,
not 0x100. mask of 0x100 will be for counter aggregation according
to IBA 1.2.
2. If capmask is 16 bit big-endian word, then we're looking
at the wrong byte on x86, we must ntohs(*pc2) first.
max
More information about the general
mailing list