Skip to contentSkip to conversation

assertion failed in osm_switch_get_lft_block() function

DISCUSSION Vangelis Tasoulas 2 participants 2 messages Dec 19, 2014 – Dec 20, 2014 1 message not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

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

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 13 lines · Vangelis Tasoulas

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).

Quoted 7 lines

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);

Yes. Would you issue patch for this ?

Thanks.

-- Hal

Quoted 3 lines

Cheers,
Vangelis

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html