Lines Matching refs:clg
144 } clg; member
209 struct clgstate *clg = &q->clg; in loss_4state() local
222 switch (clg->state) { in loss_4state()
224 if (rnd < clg->a4) { in loss_4state()
225 clg->state = LOST_IN_GAP_PERIOD; in loss_4state()
227 } else if (clg->a4 < rnd && rnd < clg->a1 + clg->a4) { in loss_4state()
228 clg->state = LOST_IN_BURST_PERIOD; in loss_4state()
230 } else if (clg->a1 + clg->a4 < rnd) { in loss_4state()
231 clg->state = TX_IN_GAP_PERIOD; in loss_4state()
236 if (rnd < clg->a5) { in loss_4state()
237 clg->state = LOST_IN_BURST_PERIOD; in loss_4state()
240 clg->state = TX_IN_BURST_PERIOD; in loss_4state()
245 if (rnd < clg->a3) in loss_4state()
246 clg->state = TX_IN_BURST_PERIOD; in loss_4state()
247 else if (clg->a3 < rnd && rnd < clg->a2 + clg->a3) { in loss_4state()
248 clg->state = TX_IN_GAP_PERIOD; in loss_4state()
249 } else if (clg->a2 + clg->a3 < rnd) { in loss_4state()
250 clg->state = LOST_IN_BURST_PERIOD; in loss_4state()
255 clg->state = TX_IN_GAP_PERIOD; in loss_4state()
274 struct clgstate *clg = &q->clg; in loss_gilb_ell() local
277 switch (clg->state) { in loss_gilb_ell()
279 if (prandom_u32_state(s) < clg->a1) in loss_gilb_ell()
280 clg->state = BAD_STATE; in loss_gilb_ell()
281 if (prandom_u32_state(s) < clg->a4) in loss_gilb_ell()
285 if (prandom_u32_state(s) < clg->a2) in loss_gilb_ell()
286 clg->state = GOOD_STATE; in loss_gilb_ell()
287 if (prandom_u32_state(s) > clg->a3) in loss_gilb_ell()
897 q->clg.state = TX_IN_GAP_PERIOD; in get_loss_clg()
898 q->clg.a1 = gi->p13; in get_loss_clg()
899 q->clg.a2 = gi->p31; in get_loss_clg()
900 q->clg.a3 = gi->p32; in get_loss_clg()
901 q->clg.a4 = gi->p14; in get_loss_clg()
902 q->clg.a5 = gi->p23; in get_loss_clg()
915 q->clg.state = GOOD_STATE; in get_loss_clg()
916 q->clg.a1 = ge->p; in get_loss_clg()
917 q->clg.a2 = ge->r; in get_loss_clg()
918 q->clg.a3 = ge->h; in get_loss_clg()
919 q->clg.a4 = ge->k1; in get_loss_clg()
997 old_clg = q->clg; in netem_change()
1004 q->clg = old_clg; in netem_change()
1123 .p13 = q->clg.a1, in dump_loss_model()
1124 .p31 = q->clg.a2, in dump_loss_model()
1125 .p32 = q->clg.a3, in dump_loss_model()
1126 .p14 = q->clg.a4, in dump_loss_model()
1127 .p23 = q->clg.a5, in dump_loss_model()
1136 .p = q->clg.a1, in dump_loss_model()
1137 .r = q->clg.a2, in dump_loss_model()
1138 .h = q->clg.a3, in dump_loss_model()
1139 .k1 = q->clg.a4, in dump_loss_model()