[ofa-general] Re: [openib-general] [PATCH] IB/core: Set static rate in ib_init_ah_from_path()

Dotan Barak dotanb at dev.mellanox.co.il
Wed Feb 28 22:57:39 PST 2007


Sean Hefty wrote:
>> int ib_init_ah_from_path(struct ib_device *device, u8 port_num,
>>                          struct ib_sa_path_rec *rec, struct 
>> ib_ah_attr *ah_attr)
>> {
>>         int ret;
>>         u16 gid_index;
>>
>>         memset(ah_attr, 0, sizeof *ah_attr);
>>         ah_attr->dlid = be16_to_cpu(rec->dlid);
>>         ah_attr->sl = rec->sl;
>>         ah_attr->src_path_bits = be16_to_cpu(rec->slid) & 0x7f;
>
> I looked at this more, and to be technically correct here, what we can 
> do is:
>
> in update_sm_ah:
>    use port_attr.LMC to record a src_path_mask with ib_sa_port
>
> in ib_init_ah_from_path:
>    use the src_path_mask from ib_sa_port to set src_path_bits
>
> However, I'm not completely convinced that masking off the upper bits 
> of the SLID is necessary when setting the src_path_bits, which means 
> that the mask used above could be removed.
I think that this behavior is much better that current behavior ..

thanks
Dotan




More information about the general mailing list