[openib-general] [CM] question about the code that handle the attribute: packet_life_time

Dotan Barak dotanb at dev.mellanox.co.il
Wed Nov 22 02:25:51 PST 2006


I noticed the following code lines in the cm.c (this code handles 
packet_life_time):

in function: cm_format_req
       cm_req_set_primary_local_ack_timeout(req_msg,
                min(31, param->primary_path->packet_life_time + 1));

in function: cm_format_paths_from_req
        primary_path->packet_life_time_selector = IB_SA_EQ;
        primary_path->packet_life_time =
                cm_req_get_primary_local_ack_timeout(req_msg);
        primary_path->packet_life_time -= 
(primary_path->packet_life_time > 0);

Why do you check the minimum between 31 and packet_life_time + 1?
I understand where the value 31 is coming from, but why do you add 1 to 
the original packet_life_time value?

This code results that if the user will have a value > 31 in the 
packet_life_time, the event REQ.{primary/alternate}.packet_life_time (in 
the passive side) will be 0x1E at the end,
(and not 0x1F which is the maximum possible value).

thanks
Dotan




More information about the general mailing list