Differentiate between the E2E and P2P delay timeout intervals.
We have one timer used for both delay request mechanisms, and we ought to set the message interval accordingly. Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
ace0d71a80
commit
c06f3adc84
7
port.c
7
port.c
|
@ -379,7 +379,12 @@ static int port_set_delay_tmo(struct port *p)
|
||||||
struct itimerspec tmo = {
|
struct itimerspec tmo = {
|
||||||
{0, 0}, {0, 0}
|
{0, 0}, {0, 0}
|
||||||
};
|
};
|
||||||
int index = random() % TMTAB_MAX;
|
int index;
|
||||||
|
if (p->delayMechanism == DM_P2P) {
|
||||||
|
return set_tmo(p->fda.fd[FD_DELAY_TIMER], 1,
|
||||||
|
p->logMinPdelayReqInterval);
|
||||||
|
}
|
||||||
|
index = random() % TMTAB_MAX;
|
||||||
tmo.it_value = p->tmtab.ts[index];
|
tmo.it_value = p->tmtab.ts[index];
|
||||||
return timerfd_settime(p->fda.fd[FD_DELAY_TIMER], 0, &tmo, NULL);
|
return timerfd_settime(p->fda.fd[FD_DELAY_TIMER], 0, &tmo, NULL);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue