[openib-general] gen2_basic patch boogum?

Dotan Barak dotanb at dev.mellanox.co.il
Wed Sep 20 22:38:30 PDT 2006


Hi Robert.

Robert Walsh wrote:
> Hi Dotan,
>
> I just noticed that you didn't apply one of my patch hunks that called
> get_is_global().  I know why you didn't do it (the dlid is always 0: see
> line 218 of test_av.c), but should you still be setting the is_global
> field in the ah_attr structure to some value?  Right now, it will just
> be set to some random unitialized stack value.
>
> Regards,
>  Robert.
>   
You are right, i removed this line because the dlid is constant 0.
here is the initialization of the variable:
           struct ibv_ah_attr av_attr  = {
                        .dlid          = 0,
                        .sl            = VL_range(rand_gen, 0, 15),
                        .src_path_bits = VL_range(rand_gen, 0, 0x8f),
                        .port_num      = port,
                        .static_rate   = get_static_rate(1, rand_gen),
                        .grh           = {
                                .traffic_class = VL_range(rand_gen, 1, 
0xff),
                                .flow_label = VL_random(rand_gen, 0x100000),
                                .hop_limit = VL_range(rand_gen, 1, 0xff),
                        }
                };


This attributes of av_attr that are being initialized in this code will 
have the value that is being assigned to them.
All the rest of the attributes (for example: is_global) are being set 
with 0.

Dotan





More information about the general mailing list