diff options
Diffstat (limited to 'src/lib/frct.c')
-rw-r--r-- | src/lib/frct.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/frct.c b/src/lib/frct.c index bcb031c3..00261272 100644 --- a/src/lib/frct.c +++ b/src/lib/frct.c @@ -105,7 +105,8 @@ static void frct_fini(void) timerwheel_destroy(frct.tw); } -static struct frcti * frcti_create(int fd) +static struct frcti * frcti_create(int fd, + qoscube_t qc) { struct frcti * frcti; time_t delta_t; @@ -133,6 +134,9 @@ static struct frcti * frcti_create(int fd) delta_t = (frcti->mpl + frcti->a + frcti->r) / 1000; + if (qc == QOS_CUBE_DATA) + frcti->snd_cr.cflags |= FRCTFRTX; + frcti->snd_cr.conf = true; frcti->snd_cr.inact = 3 * delta_t + 1; frcti->snd_cr.act = now.tv_sec - (frcti->snd_cr.inact + 1); @@ -317,6 +321,9 @@ static int __frcti_snd(struct frcti * frcti, pci->seqno = hton32(snd_cr->seqno++); if (!(snd_cr->cflags & FRCTFRTX)) snd_cr->lwe++; + else + /* TODO: update on ACK */ + snd_cr->lwe++; snd_cr->act = now.tv_sec; snd_cr->conf = false; |