Commit a1997d64 authored by Davide Ciminaghi's avatar Davide Ciminaghi Committed by Alessandro Rubini

timeout: introduce QUALIFICATION timeout (for pre-master)

parent ca86ffd2
......@@ -57,6 +57,7 @@ enum pp_timeouts {
PP_TO_ANN_RECEIPT,
PP_TO_ANN_SEND,
PP_TO_FAULTY,
PP_TO_QUALIFICATION,
/* Two timeouts for the protocol extension */
PP_TO_EXT_0,
PP_TO_EXT_1,
......
......@@ -25,6 +25,7 @@ static struct timeout_config to_configs[__PP_TO_ARRAY_SIZE] = {
[PP_TO_ANN_RECEIPT] = {"ANN_RECEIPT", RAND_NONE,},
[PP_TO_ANN_SEND] = {"ANN_SEND", RAND_70_130,},
[PP_TO_FAULTY] = {"FAULTY", RAND_NONE, 4000},
[PP_TO_QUALIFICATION] = {"QUAL", RAND_NONE,}
/* extension timeouts are explicitly set to a value */
};
......@@ -40,6 +41,8 @@ void pp_timeout_init(struct pp_instance *ppi)
to_configs[PP_TO_ANN_RECEIPT].value = 1000 * (
port->announceReceiptTimeout << port->logAnnounceInterval);
to_configs[PP_TO_ANN_SEND].value = port->logAnnounceInterval;
to_configs[PP_TO_QUALIFICATION].value =
(1000 << port->logAnnounceInterval)*(DSCUR(ppi)->stepsRemoved + 1);
}
void __pp_timeout_set(struct pp_instance *ppi, int index, int millisec)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment