[ofw] wrong usage of ib_member_set_state
Smith, Stan
stan.smith at intel.com
Tue Sep 27 13:31:09 PDT 2011
From: ofw-bounces at lists.openfabrics.org [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Tzachi Dar
Sent: Tuesday, September 27, 2011 12:19 PM
To: ofw at lists.openfabrics.org; Hal Rosenstock
Subject: [ofw] wrong usage of ib_member_set_state
on windows we have the following 3 functions:
AL_INLINE void AL_API
ib_member_set_state(
IN OUT uint8_t* const p_scope_state,
IN const uint8_t state )
{
CL_ASSERT( state <= 0x0F );
/* State is LS 4-bits. */
*p_scope_state &= 0x0F;
*p_scope_state |= (state & 0x0F);
}
AL_INLINE void AL_API
ib_member_set_join_state(
IN OUT ib_member_rec_t *p_mc_rec,
IN const uint8_t state )
{
p_mc_rec->scope_state &= 0xF0;
p_mc_rec->scope_state |= (state & 0x0F);
}
AL_INLINE uint8_t AL_API
ib_member_set_scope_state(
IN const uint8_t scope,
IN const uint8_t state )
{
/* Scope is MS 4-bits, state is LS 4-bits */
return ((scope << 4) | (state & 0xF));
}
Ipoib is using ib_member_set_state().
As far as I can tell this will cause the scope to be zero (on table 3, the value of 0 is reserved). Is this what we relay wanted to have?
ib_member_set_state() does not appear to be the desired solution.
Hal's suggestion looks good (use ib_member_set_join_state), what do you think?
Stan.
Thanks
Tzachi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20110927/3952f3c9/attachment.html>
More information about the ofw
mailing list