• Home
  • Raw
  • Download

Lines Matching refs:vcc

234 static void clear_lockup (struct atm_vcc *vcc, IADEV *dev) {  in clear_lockup()  argument
243 if (vcc->qos.txtp.traffic_class == ATM_ABR) { in clear_lockup()
244 vcstatus = (vcstatus_t *) &(dev->testTable[vcc->vci]->vc_status); in clear_lockup()
248 abr_vc += vcc->vci; in clear_lockup()
249 eabr_vc += vcc->vci; in clear_lockup()
260 if((tempCellSlot == dev->testTable[vcc->vci]->lastTime) in clear_lockup()
261 && (tempFract == dev->testTable[vcc->vci]->fract)) in clear_lockup()
263 dev->testTable[vcc->vci]->lastTime = tempCellSlot; in clear_lockup()
264 dev->testTable[vcc->vci]->fract = tempFract; in clear_lockup()
280 shd_tbl[i] = vcc->vci; in clear_lockup()
282 IF_ERR(printk("ABR Seg. may not continue on VC %x\n",vcc->vci);) in clear_lockup()
375 struct atm_vcc *vcc, u8 flag) in ia_open_abr_vc() argument
383 f_abr_vc += vcc->vci; in ia_open_abr_vc()
443 *(ptr16 + vcc->vci) = NO_AAL5_PKT | REASS_ABR; in ia_open_abr_vc()
445 r_abr_vc += vcc->vci; in ia_open_abr_vc()
450 dev->testTable[vcc->vci]->vc_status = VC_ACTIVE | VC_ABR; in ia_open_abr_vc()
459 static int ia_cbr_setup (IADEV *dev, struct atm_vcc *vcc) { in ia_cbr_setup() argument
473 if (vcc->qos.txtp.max_pcr <= 0) { in ia_cbr_setup()
477 rate = vcc->qos.txtp.max_pcr; in ia_cbr_setup()
494 ia_vcc = INPH_IA_VCC(vcc); in ia_cbr_setup()
505 vcIndex = vcc->vci; in ia_cbr_setup()
574 static void ia_cbrVc_close (struct atm_vcc *vcc) { in ia_cbrVc_close() argument
579 iadev = INPH_IA_DEV(vcc->dev); in ia_cbrVc_close()
589 if (*SchedTbl == vcc->vci) { in ia_cbrVc_close()
610 static int ia_pkt_tx (struct atm_vcc *vcc, struct sk_buff *skb);
615 struct atm_vcc *vcc; in ia_que_tx() local
619 if (!(vcc = ATM_SKB(skb)->vcc)) { in ia_que_tx()
624 if (!test_bit(ATM_VF_READY,&vcc->flags)) { in ia_que_tx()
626 printk("Free the SKB on closed vci %d \n", vcc->vci); in ia_que_tx()
629 if (ia_pkt_tx (vcc, skb)) { in ia_que_tx()
638 struct atm_vcc *vcc = NULL; in ia_tx_poll() local
650 vcc = ATM_SKB(skb)->vcc; in ia_tx_poll()
651 if (!vcc) { in ia_tx_poll()
657 iavcc = INPH_IA_VCC(vcc); in ia_tx_poll()
667 printk("IA_tx_intr: Vci %d lost pkt!!!\n", vcc->vci); in ia_tx_poll()
670 if ((vcc->pop) && (skb1->len != 0)) in ia_tx_poll()
672 vcc->pop(vcc, skb1); in ia_tx_poll()
681 IF_EVENT(printk("IA: Vci %d - skb not found requed\n",vcc->vci);) in ia_tx_poll()
685 if ((vcc->pop) && (skb->len != 0)) in ia_tx_poll()
687 vcc->pop(vcc, skb); in ia_tx_poll()
1095 struct atm_vcc *vcc; local
1135 vcc = iadev->rx_open[buf_desc_ptr->vc_index & 0xffff];
1136 if (!vcc)
1148 atomic_inc(&vcc->stats->rx_err);
1171 atomic_inc(&vcc->stats->rx_err);
1175 if (!(skb = atm_alloc_charge(vcc, len, GFP_ATOMIC))) {
1176 if (vcc->vci < 32)
1182 ATM_SKB(skb)->vcc = vcc;
1272 struct atm_vcc *vcc; local
1312 vcc = ATM_SKB(skb)->vcc;
1313 if (!vcc) {
1318 ia_vcc = INPH_IA_VCC(vcc);
1321 atomic_inc(&vcc->stats->rx_err);
1322 atm_return(vcc, skb->truesize);
1333 atomic_inc(&vcc->stats->rx_err);
1336 atm_return(vcc, skb->truesize);
1348 vcc->push(vcc,skb);
1349 atomic_inc(&vcc->stats->rx);
1372 static int open_rx(struct atm_vcc *vcc) argument
1377 IF_EVENT(printk("iadev: open_rx %d.%d\n", vcc->vpi, vcc->vci);)
1379 if (vcc->qos.rxtp.traffic_class == ATM_NONE) return 0;
1380 iadev = INPH_IA_DEV(vcc->dev);
1381 if (vcc->qos.rxtp.traffic_class == ATM_ABR) {
1390 vc_table += vcc->vci;
1393 *vc_table = vcc->vci << 6;
1396 if ((vcc->qos.rxtp.traffic_class == ATM_ABR) ||
1397 (vcc->qos.txtp.traffic_class == ATM_ABR))
1401 ia_open_abr_vc(iadev, &srv_p, vcc, 0);
1405 reass_ptr += vcc->vci;
1409 if (iadev->rx_open[vcc->vci])
1411 vcc->dev->number, vcc->vci);
1412 iadev->rx_open[vcc->vci] = vcc;
1686 struct atm_vcc *vcc; local
1708 vcc = ATM_SKB(skb)->vcc;
1709 if (!vcc) {
1716 iavcc = INPH_IA_VCC(vcc);
1723 if (vcc->qos.txtp.pcr >= iadev->rate_limit) {
1724 if ((vcc->pop) && (skb->len != 0))
1726 vcc->pop(vcc, skb);
1744 static int open_tx(struct atm_vcc *vcc) argument
1751 IF_EVENT(printk("iadev: open_tx entered vcc->vci = %d\n", vcc->vci);)
1752 if (vcc->qos.txtp.traffic_class == ATM_NONE) return 0;
1753 iadev = INPH_IA_DEV(vcc->dev);
1756 if (vcc->qos.txtp.traffic_class == ATM_ABR) {
1760 if (vcc->qos.txtp.traffic_class == ATM_CBR) {
1765 ia_vcc = INPH_IA_VCC(vcc);
1767 if (vcc->qos.txtp.max_sdu >
1770 vcc->qos.txtp.max_sdu,iadev->tx_buf_sz);
1771 vcc->dev_data = NULL;
1779 if (vcc->qos.txtp.max_pcr == ATM_MAX_PCR)
1780 vcc->qos.txtp.pcr = iadev->LineRate;
1781 else if ((vcc->qos.txtp.max_pcr == 0)&&( vcc->qos.txtp.pcr <= 0))
1782 vcc->qos.txtp.pcr = iadev->LineRate;
1783 else if ((vcc->qos.txtp.max_pcr > vcc->qos.txtp.pcr) && (vcc->qos.txtp.max_pcr> 0))
1784 vcc->qos.txtp.pcr = vcc->qos.txtp.max_pcr;
1785 if (vcc->qos.txtp.pcr > iadev->LineRate)
1786 vcc->qos.txtp.pcr = iadev->LineRate;
1787 ia_vcc->pcr = vcc->qos.txtp.pcr;
1796 struct sock *sk = sk_atm(vcc);
1798 if (vcc->qos.txtp.max_sdu != 0) {
1800 sk->sk_sndbuf = vcc->qos.txtp.max_sdu * 5;
1802 sk->sk_sndbuf = vcc->qos.txtp.max_sdu * 4;
1804 sk->sk_sndbuf = vcc->qos.txtp.max_sdu * 3;
1812 vc += vcc->vci;
1813 evc += vcc->vci;
1822 evc->atm_hdr1 = (vcc->vci >> 12) & 0x000f;
1823 evc->atm_hdr2 = (vcc->vci & 0x0fff) << 4;
1826 if (vcc->qos.txtp.traffic_class == ATM_UBR)
1831 if (vcc->qos.txtp.pcr > 0)
1832 vc->acr = cellrate_to_float(vcc->qos.txtp.pcr);
1834 vcc->qos.txtp.max_pcr,vc->acr);)
1836 else if (vcc->qos.txtp.traffic_class == ATM_ABR)
1840 if (vcc->qos.txtp.pcr > 0)
1841 srv_p.pcr = vcc->qos.txtp.pcr;
1842 if (vcc->qos.txtp.min_pcr > 0) {
1843 int tmpsum = iadev->sum_mcr+iadev->sum_cbr+vcc->qos.txtp.min_pcr;
1846 srv_p.mcr = vcc->qos.txtp.min_pcr;
1847 iadev->sum_mcr += vcc->qos.txtp.min_pcr;
1850 if (vcc->qos.txtp.icr)
1851 srv_p.icr = vcc->qos.txtp.icr;
1852 if (vcc->qos.txtp.tbe)
1853 srv_p.tbe = vcc->qos.txtp.tbe;
1854 if (vcc->qos.txtp.frtt)
1855 srv_p.frtt = vcc->qos.txtp.frtt;
1856 if (vcc->qos.txtp.rif)
1857 srv_p.rif = vcc->qos.txtp.rif;
1858 if (vcc->qos.txtp.rdf)
1859 srv_p.rdf = vcc->qos.txtp.rdf;
1860 if (vcc->qos.txtp.nrm_pres)
1861 srv_p.nrm = vcc->qos.txtp.nrm;
1862 if (vcc->qos.txtp.trm_pres)
1863 srv_p.trm = vcc->qos.txtp.trm;
1864 if (vcc->qos.txtp.adtf_pres)
1865 srv_p.adtf = vcc->qos.txtp.adtf;
1866 if (vcc->qos.txtp.cdf_pres)
1867 srv_p.cdf = vcc->qos.txtp.cdf;
1872 ia_open_abr_vc(iadev, &srv_p, vcc, 1);
1873 } else if (vcc->qos.txtp.traffic_class == ATM_CBR) {
1878 if (vcc->qos.txtp.max_pcr > iadev->LineRate) {
1884 if ((ret = ia_cbr_setup (iadev, vcc)) < 0) {
1891 iadev->testTable[vcc->vci]->vc_status |= VC_ACTIVE;
2597 static void ia_close(struct atm_vcc *vcc) argument
2607 iadev = INPH_IA_DEV(vcc->dev);
2608 ia_vcc = INPH_IA_VCC(vcc);
2612 ia_vcc->vc_desc_cnt,vcc->vci);)
2613 clear_bit(ATM_VF_READY,&vcc->flags);
2616 if (vcc->qos.txtp.traffic_class != ATM_NONE) {
2623 if (ATM_SKB(skb)->vcc == vcc){
2624 if (vcc->pop) vcc->pop(vcc, skb);
2640 iadev->testTable[vcc->vci]->lastTime = 0;
2641 iadev->testTable[vcc->vci]->fract = 0;
2642 iadev->testTable[vcc->vci]->vc_status = VC_UBR;
2643 if (vcc->qos.txtp.traffic_class == ATM_ABR) {
2644 if (vcc->qos.txtp.min_pcr > 0)
2645 iadev->sum_mcr -= vcc->qos.txtp.min_pcr;
2647 if (vcc->qos.txtp.traffic_class == ATM_CBR) {
2648 ia_vcc = INPH_IA_VCC(vcc);
2650 ia_cbrVc_close (vcc);
2655 if (vcc->qos.rxtp.traffic_class != ATM_NONE) {
2658 vc_table += vcc->vci;
2662 vc_table += vcc->vci;
2663 *vc_table = (vcc->vci << 6) | 15;
2664 if (vcc->qos.rxtp.traffic_class == ATM_ABR) {
2667 abr_vc_table += vcc->vci;
2672 rx_dle_intr(vcc->dev);
2673 iadev->rx_open[vcc->vci] = NULL;
2675 kfree(INPH_IA_VCC(vcc));
2677 vcc->dev_data = NULL;
2678 clear_bit(ATM_VF_ADDR,&vcc->flags);
2682 static int ia_open(struct atm_vcc *vcc) argument
2686 if (!test_bit(ATM_VF_PARTIAL,&vcc->flags))
2689 vcc->dev_data = NULL;
2691 if (vcc->vci != ATM_VPI_UNSPEC && vcc->vpi != ATM_VCI_UNSPEC)
2694 set_bit(ATM_VF_ADDR,&vcc->flags);
2696 if (vcc->qos.aal != ATM_AAL5)
2699 vcc->dev->number, vcc->vpi, vcc->vci);)
2704 vcc->dev_data = ia_vcc;
2706 if ((error = open_rx(vcc)))
2709 ia_close(vcc);
2713 if ((error = open_tx(vcc)))
2716 ia_close(vcc);
2720 set_bit(ATM_VF_READY,&vcc->flags);
2736 static int ia_change_qos(struct atm_vcc *vcc, struct atm_qos *qos, int flags) argument
2877 static int ia_getsockopt(struct atm_vcc *vcc, int level, int optname, argument
2884 static int ia_setsockopt(struct atm_vcc *vcc, int level, int optname, argument
2891 static int ia_pkt_tx (struct atm_vcc *vcc, struct sk_buff *skb) { argument
2901 iadev = INPH_IA_DEV(vcc->dev);
2902 iavcc = INPH_IA_VCC(vcc);
2905 if (vcc->pop)
2906 vcc->pop(vcc, skb);
2914 if (vcc->pop)
2915 vcc->pop(vcc, skb);
2922 if (vcc->pop)
2923 vcc->pop(vcc, skb);
2942 atomic_inc(&vcc->stats->tx);
2943 if (vcc->pop)
2944 vcc->pop(vcc, skb);
3003 buf_desc_ptr->vc_index = vcc->vci;
3006 if (vcc->qos.txtp.traffic_class == ATM_ABR)
3007 clear_lockup (vcc, iadev);
3044 ATM_DESC(skb) = vcc->vci;
3047 atomic_inc(&vcc->stats->tx);
3054 if (atomic_read(&vcc->stats->tx) % 20 == 0) {
3056 vcc->tx_quota = vcc->tx_quota * 3 / 4;
3057 printk("Tx1: vcc->tx_quota = %d \n", (u32)vcc->tx_quota );
3059 iavcc->saved_tx_quota = vcc->tx_quota;
3062 printk("Tx2: vcc->tx_quota = %d \n", (u32)vcc->tx_quota );
3071 static int ia_send(struct atm_vcc *vcc, struct sk_buff *skb) argument
3076 iadev = INPH_IA_DEV(vcc->dev);
3085 if (!test_bit(ATM_VF_READY,&vcc->flags)){
3090 ATM_SKB(skb)->vcc = vcc;
3096 if (ia_pkt_tx (vcc, skb)) {