Lines Matching refs:srv_p
359 static void init_abr_vc (IADEV *dev, srv_cls_param_t *srv_p) { in init_abr_vc() argument
360 srv_p->class_type = ATM_ABR; in init_abr_vc()
361 srv_p->pcr = dev->LineRate; in init_abr_vc()
362 srv_p->mcr = 0; in init_abr_vc()
363 srv_p->icr = 0x055cb7; in init_abr_vc()
364 srv_p->tbe = 0xffffff; in init_abr_vc()
365 srv_p->frtt = 0x3a; in init_abr_vc()
366 srv_p->rif = 0xf; in init_abr_vc()
367 srv_p->rdf = 0xb; in init_abr_vc()
368 srv_p->nrm = 0x4; in init_abr_vc()
369 srv_p->trm = 0x7; in init_abr_vc()
370 srv_p->cdf = 0x3; in init_abr_vc()
371 srv_p->adtf = 50; in init_abr_vc()
375 ia_open_abr_vc(IADEV *dev, srv_cls_param_t *srv_p, in ia_open_abr_vc() argument
388 if (srv_p->pcr == 0) in ia_open_abr_vc()
390 if (srv_p->pcr > dev->LineRate) in ia_open_abr_vc()
391 srv_p->pcr = dev->LineRate; in ia_open_abr_vc()
392 if ((srv_p->mcr + dev->sum_mcr) > dev->LineRate) in ia_open_abr_vc()
394 if (srv_p->mcr > srv_p->pcr) in ia_open_abr_vc()
396 if (!(srv_p->icr)) in ia_open_abr_vc()
397 srv_p->icr = srv_p->pcr; in ia_open_abr_vc()
398 if ((srv_p->icr < srv_p->mcr) || (srv_p->icr > srv_p->pcr)) in ia_open_abr_vc()
400 if ((srv_p->tbe < MIN_TBE) || (srv_p->tbe > MAX_TBE)) in ia_open_abr_vc()
402 if ((srv_p->frtt < MIN_FRTT) || (srv_p->frtt > MAX_FRTT)) in ia_open_abr_vc()
404 if (srv_p->nrm > MAX_NRM) in ia_open_abr_vc()
406 if (srv_p->trm > MAX_TRM) in ia_open_abr_vc()
408 if (srv_p->adtf > MAX_ADTF) in ia_open_abr_vc()
410 else if (srv_p->adtf == 0) in ia_open_abr_vc()
411 srv_p->adtf = 1; in ia_open_abr_vc()
412 if (srv_p->cdf > MAX_CDF) in ia_open_abr_vc()
414 if (srv_p->rif > MAX_RIF) in ia_open_abr_vc()
416 if (srv_p->rdf > MAX_RDF) in ia_open_abr_vc()
421 nrm = 2 << srv_p->nrm; /* (2 ** (srv_p->nrm +1)) */ in ia_open_abr_vc()
424 trm = 100000/(2 << (16 - srv_p->trm)); in ia_open_abr_vc()
426 f_abr_vc->f_nrmexp =(((srv_p->nrm +1) & 0x0f) << 12)|(MRM << 8) | trm; in ia_open_abr_vc()
427 crm = srv_p->tbe / nrm; in ia_open_abr_vc()
430 f_abr_vc->f_pcr = cellrate_to_float(srv_p->pcr); in ia_open_abr_vc()
431 icr = min( srv_p->icr, (srv_p->tbe > srv_p->frtt) ? in ia_open_abr_vc()
432 ((srv_p->tbe/srv_p->frtt)*1000000) : in ia_open_abr_vc()
433 (1000000/(srv_p->frtt/srv_p->tbe))); in ia_open_abr_vc()
435 adtf = (10000 * srv_p->adtf)/8192; in ia_open_abr_vc()
437 f_abr_vc->f_cdf = ((7 - srv_p->cdf) << 12 | adtf) & 0xfff; in ia_open_abr_vc()
438 f_abr_vc->f_mcr = cellrate_to_float(srv_p->mcr); in ia_open_abr_vc()
447 r_abr_vc->r_status_rdf = (15 - srv_p->rdf) & 0x000f; in ia_open_abr_vc()
448 air = srv_p->pcr << (15 - srv_p->rif); in ia_open_abr_vc()
452 dev->sum_mcr += srv_p->mcr; in ia_open_abr_vc()
1402 srv_cls_param_t srv_p; local
1403 init_abr_vc(iadev, &srv_p);
1404 ia_open_abr_vc(iadev, &srv_p, vcc, 0);
1840 { srv_cls_param_t srv_p; local
1842 init_abr_vc(iadev, &srv_p);
1844 srv_p.pcr = vcc->qos.txtp.pcr;
1849 srv_p.mcr = vcc->qos.txtp.min_pcr;
1852 else srv_p.mcr = 0;
1854 srv_p.icr = vcc->qos.txtp.icr;
1856 srv_p.tbe = vcc->qos.txtp.tbe;
1858 srv_p.frtt = vcc->qos.txtp.frtt;
1860 srv_p.rif = vcc->qos.txtp.rif;
1862 srv_p.rdf = vcc->qos.txtp.rdf;
1864 srv_p.nrm = vcc->qos.txtp.nrm;
1866 srv_p.trm = vcc->qos.txtp.trm;
1868 srv_p.adtf = vcc->qos.txtp.adtf;
1870 srv_p.cdf = vcc->qos.txtp.cdf;
1871 if (srv_p.icr > srv_p.pcr)
1872 srv_p.icr = srv_p.pcr;
1874 srv_p.pcr, srv_p.mcr);)
1875 ia_open_abr_vc(iadev, &srv_p, vcc, 1);