public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* assertion failed in osm_switch_get_lft_block() function
@ 2014-12-19 20:46 Vangelis Tasoulas
       [not found] ` <54948EB7.1020706-S8y2klWGCOFhl2p70BpVqQ@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Vangelis Tasoulas @ 2014-12-19 20:46 UTC (permalink / raw)
  To: Linux RDMA Mailing List

[-- Attachment #1: Type: text/plain, Size: 692 bytes --]

Hello,

When I use LIDs from the top LFT block (0xbfc0-0xbfff), I get an
assertion error from the function osm_switch_get_lft_block() which is
implemented in osm_switch.c.

The line is this one:
CL_ASSERT(base_lid_ho + IB_SMP_DATA_SIZE <= IB_LID_UCAST_END_HO);

In the topmost LFT block, the base_lid_ho has the value 49088 and the
IB_SMP_DATA_SIZE is 64. Together they add up to 49152 but the assertion
checks if they are less than 0xbfff (49151).

Shouldn't this line be something like the following?

CL_ASSERT(base_lid_ho + IB_SMP_DATA_SIZE - 1 <= IB_LID_UCAST_END_HO);

or

CL_ASSERT(base_lid_ho + IB_SMP_DATA_SIZE <= IB_LID_UCAST_END_HO + 1);

Cheers,
Vangelis


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-12-20 13:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-19 20:46 assertion failed in osm_switch_get_lft_block() function Vangelis Tasoulas
     [not found] ` <54948EB7.1020706-S8y2klWGCOFhl2p70BpVqQ@public.gmane.org>
2014-12-20 13:08   ` Hal Rosenstock

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox