Lines Matching full:vcc

206               printk("Fatal err, desc table vcc or skb is NULL\n");  in get_desc()
236 static void clear_lockup (struct atm_vcc *vcc, IADEV *dev) { in clear_lockup() argument
245 if (vcc->qos.txtp.traffic_class == ATM_ABR) { in clear_lockup()
246 vcstatus = (vcstatus_t *) &(dev->testTable[vcc->vci]->vc_status); in clear_lockup()
250 abr_vc += vcc->vci; in clear_lockup()
251 eabr_vc += vcc->vci; in clear_lockup()
262 if((tempCellSlot == dev->testTable[vcc->vci]->lastTime) in clear_lockup()
263 && (tempFract == dev->testTable[vcc->vci]->fract)) in clear_lockup()
265 dev->testTable[vcc->vci]->lastTime = tempCellSlot; in clear_lockup()
266 dev->testTable[vcc->vci]->fract = tempFract; in clear_lockup()
282 shd_tbl[i] = vcc->vci; in clear_lockup()
284 IF_ERR(printk("ABR Seg. may not continue on VC %x\n",vcc->vci);) in clear_lockup()
377 struct atm_vcc *vcc, u8 flag) in ia_open_abr_vc() argument
385 f_abr_vc += vcc->vci; in ia_open_abr_vc()
445 *(ptr16 + vcc->vci) = NO_AAL5_PKT | REASS_ABR; in ia_open_abr_vc()
447 r_abr_vc += vcc->vci; in ia_open_abr_vc()
452 dev->testTable[vcc->vci]->vc_status = VC_ACTIVE | VC_ABR; in ia_open_abr_vc()
461 static int ia_cbr_setup (IADEV *dev, struct atm_vcc *vcc) { in ia_cbr_setup() argument
475 if (vcc->qos.txtp.max_pcr <= 0) { in ia_cbr_setup()
479 rate = vcc->qos.txtp.max_pcr; in ia_cbr_setup()
496 ia_vcc = INPH_IA_VCC(vcc); in ia_cbr_setup()
507 vcIndex = vcc->vci; in ia_cbr_setup()
576 static void ia_cbrVc_close (struct atm_vcc *vcc) { in ia_cbrVc_close() argument
581 iadev = INPH_IA_DEV(vcc->dev); in ia_cbrVc_close()
591 if (*SchedTbl == vcc->vci) { in ia_cbrVc_close()
612 static int ia_pkt_tx (struct atm_vcc *vcc, struct sk_buff *skb);
617 struct atm_vcc *vcc; in ia_que_tx() local
621 if (!(vcc = ATM_SKB(skb)->vcc)) { in ia_que_tx()
623 printk("ia_que_tx: Null vcc\n"); in ia_que_tx()
626 if (!test_bit(ATM_VF_READY,&vcc->flags)) { in ia_que_tx()
628 printk("Free the SKB on closed vci %d \n", vcc->vci); in ia_que_tx()
631 if (ia_pkt_tx (vcc, skb)) { in ia_que_tx()
640 struct atm_vcc *vcc = NULL; in ia_tx_poll() local
652 vcc = ATM_SKB(skb)->vcc; in ia_tx_poll()
653 if (!vcc) { in ia_tx_poll()
654 printk("ia_tx_poll: vcc is null\n"); in ia_tx_poll()
659 iavcc = INPH_IA_VCC(vcc); in ia_tx_poll()
669 printk("IA_tx_intr: Vci %d lost pkt!!!\n", vcc->vci); in ia_tx_poll()
672 if ((vcc->pop) && (skb1->len != 0)) in ia_tx_poll()
674 vcc->pop(vcc, skb1); in ia_tx_poll()
683 IF_EVENT(printk("IA: Vci %d - skb not found requeued\n",vcc->vci);) in ia_tx_poll()
687 if ((vcc->pop) && (skb->len != 0)) in ia_tx_poll()
689 vcc->pop(vcc, skb); in ia_tx_poll()
1099 struct atm_vcc *vcc; local
1139 vcc = iadev->rx_open[buf_desc_ptr->vc_index & 0xffff];
1140 if (!vcc)
1143 printk("IA: null vcc, drop PDU\n");
1152 atomic_inc(&vcc->stats->rx_err);
1175 atomic_inc(&vcc->stats->rx_err);
1179 if (!(skb = atm_alloc_charge(vcc, len, GFP_ATOMIC))) {
1180 if (vcc->vci < 32)
1186 ATM_SKB(skb)->vcc = vcc;
1276 struct atm_vcc *vcc; local
1315 /* no VCC related housekeeping done as yet. lets see */
1316 vcc = ATM_SKB(skb)->vcc;
1317 if (!vcc) {
1318 printk("IA: null vcc\n");
1322 ia_vcc = INPH_IA_VCC(vcc);
1325 atomic_inc(&vcc->stats->rx_err);
1326 atm_return(vcc, skb->truesize);
1337 atomic_inc(&vcc->stats->rx_err);
1340 atm_return(vcc, skb->truesize);
1352 vcc->push(vcc,skb);
1353 atomic_inc(&vcc->stats->rx);
1376 static int open_rx(struct atm_vcc *vcc) argument
1381 IF_EVENT(printk("iadev: open_rx %d.%d\n", vcc->vpi, vcc->vci);)
1383 if (vcc->qos.rxtp.traffic_class == ATM_NONE) return 0;
1384 iadev = INPH_IA_DEV(vcc->dev);
1385 if (vcc->qos.rxtp.traffic_class == ATM_ABR) {
1394 vc_table += vcc->vci;
1397 *vc_table = vcc->vci << 6;
1400 if ((vcc->qos.rxtp.traffic_class == ATM_ABR) ||
1401 (vcc->qos.txtp.traffic_class == ATM_ABR))
1405 ia_open_abr_vc(iadev, &srv_p, vcc, 0);
1409 reass_ptr += vcc->vci;
1413 if (iadev->rx_open[vcc->vci])
1415 vcc->dev->number, vcc->vci);
1416 iadev->rx_open[vcc->vci] = vcc;
1690 struct atm_vcc *vcc; local
1712 vcc = ATM_SKB(skb)->vcc;
1713 if (!vcc) {
1714 printk("tx_dle_intr: vcc is null\n");
1720 iavcc = INPH_IA_VCC(vcc);
1727 if (vcc->qos.txtp.pcr >= iadev->rate_limit) {
1728 if ((vcc->pop) && (skb->len != 0))
1730 vcc->pop(vcc, skb);
1748 static int open_tx(struct atm_vcc *vcc) argument
1755 IF_EVENT(printk("iadev: open_tx entered vcc->vci = %d\n", vcc->vci);)
1756 if (vcc->qos.txtp.traffic_class == ATM_NONE) return 0;
1757 iadev = INPH_IA_DEV(vcc->dev);
1760 if (vcc->qos.txtp.traffic_class == ATM_ABR) {
1764 if (vcc->qos.txtp.traffic_class == ATM_CBR) {
1769 ia_vcc = INPH_IA_VCC(vcc);
1771 if (vcc->qos.txtp.max_sdu >
1774 vcc->qos.txtp.max_sdu,iadev->tx_buf_sz);
1775 vcc->dev_data = NULL;
1783 if (vcc->qos.txtp.max_pcr == ATM_MAX_PCR)
1784 vcc->qos.txtp.pcr = iadev->LineRate;
1785 else if ((vcc->qos.txtp.max_pcr == 0)&&( vcc->qos.txtp.pcr <= 0))
1786 vcc->qos.txtp.pcr = iadev->LineRate;
1787 else if ((vcc->qos.txtp.max_pcr > vcc->qos.txtp.pcr) && (vcc->qos.txtp.max_pcr> 0))
1788 vcc->qos.txtp.pcr = vcc->qos.txtp.max_pcr;
1789 if (vcc->qos.txtp.pcr > iadev->LineRate)
1790 vcc->qos.txtp.pcr = iadev->LineRate;
1791 ia_vcc->pcr = vcc->qos.txtp.pcr;
1800 struct sock *sk = sk_atm(vcc);
1802 if (vcc->qos.txtp.max_sdu != 0) {
1804 sk->sk_sndbuf = vcc->qos.txtp.max_sdu * 5;
1806 sk->sk_sndbuf = vcc->qos.txtp.max_sdu * 4;
1808 sk->sk_sndbuf = vcc->qos.txtp.max_sdu * 3;
1816 vc += vcc->vci;
1817 evc += vcc->vci;
1826 evc->atm_hdr1 = (vcc->vci >> 12) & 0x000f;
1827 evc->atm_hdr2 = (vcc->vci & 0x0fff) << 4;
1830 if (vcc->qos.txtp.traffic_class == ATM_UBR)
1835 if (vcc->qos.txtp.pcr > 0)
1836 vc->acr = cellrate_to_float(vcc->qos.txtp.pcr);
1838 vcc->qos.txtp.max_pcr,vc->acr);)
1840 else if (vcc->qos.txtp.traffic_class == ATM_ABR)
1842 IF_ABR(printk("Tx ABR VCC\n");)
1844 if (vcc->qos.txtp.pcr > 0)
1845 srv_p.pcr = vcc->qos.txtp.pcr;
1846 if (vcc->qos.txtp.min_pcr > 0) {
1847 int tmpsum = iadev->sum_mcr+iadev->sum_cbr+vcc->qos.txtp.min_pcr;
1850 srv_p.mcr = vcc->qos.txtp.min_pcr;
1851 iadev->sum_mcr += vcc->qos.txtp.min_pcr;
1854 if (vcc->qos.txtp.icr)
1855 srv_p.icr = vcc->qos.txtp.icr;
1856 if (vcc->qos.txtp.tbe)
1857 srv_p.tbe = vcc->qos.txtp.tbe;
1858 if (vcc->qos.txtp.frtt)
1859 srv_p.frtt = vcc->qos.txtp.frtt;
1860 if (vcc->qos.txtp.rif)
1861 srv_p.rif = vcc->qos.txtp.rif;
1862 if (vcc->qos.txtp.rdf)
1863 srv_p.rdf = vcc->qos.txtp.rdf;
1864 if (vcc->qos.txtp.nrm_pres)
1865 srv_p.nrm = vcc->qos.txtp.nrm;
1866 if (vcc->qos.txtp.trm_pres)
1867 srv_p.trm = vcc->qos.txtp.trm;
1868 if (vcc->qos.txtp.adtf_pres)
1869 srv_p.adtf = vcc->qos.txtp.adtf;
1870 if (vcc->qos.txtp.cdf_pres)
1871 srv_p.cdf = vcc->qos.txtp.cdf;
1874 IF_ABR(printk("ABR:vcc->qos.txtp.max_pcr = %d mcr = %d\n",
1876 ia_open_abr_vc(iadev, &srv_p, vcc, 1);
1877 } else if (vcc->qos.txtp.traffic_class == ATM_CBR) {
1882 if (vcc->qos.txtp.max_pcr > iadev->LineRate) {
1888 if ((ret = ia_cbr_setup (iadev, vcc)) < 0) {
1895 iadev->testTable[vcc->vci]->vc_status |= VC_ACTIVE;
2610 static void ia_close(struct atm_vcc *vcc) argument
2620 iadev = INPH_IA_DEV(vcc->dev);
2621 ia_vcc = INPH_IA_VCC(vcc);
2625 ia_vcc->vc_desc_cnt,vcc->vci);)
2626 clear_bit(ATM_VF_READY,&vcc->flags);
2629 if (vcc->qos.txtp.traffic_class != ATM_NONE) {
2636 if (ATM_SKB(skb)->vcc == vcc){
2637 if (vcc->pop) vcc->pop(vcc, skb);
2653 iadev->testTable[vcc->vci]->lastTime = 0;
2654 iadev->testTable[vcc->vci]->fract = 0;
2655 iadev->testTable[vcc->vci]->vc_status = VC_UBR;
2656 if (vcc->qos.txtp.traffic_class == ATM_ABR) {
2657 if (vcc->qos.txtp.min_pcr > 0)
2658 iadev->sum_mcr -= vcc->qos.txtp.min_pcr;
2660 if (vcc->qos.txtp.traffic_class == ATM_CBR) {
2661 ia_vcc = INPH_IA_VCC(vcc);
2663 ia_cbrVc_close (vcc);
2668 if (vcc->qos.rxtp.traffic_class != ATM_NONE) {
2671 vc_table += vcc->vci;
2675 vc_table += vcc->vci;
2676 *vc_table = (vcc->vci << 6) | 15;
2677 if (vcc->qos.rxtp.traffic_class == ATM_ABR) {
2680 abr_vc_table += vcc->vci;
2685 rx_dle_intr(vcc->dev);
2686 iadev->rx_open[vcc->vci] = NULL;
2688 kfree(INPH_IA_VCC(vcc));
2690 vcc->dev_data = NULL;
2691 clear_bit(ATM_VF_ADDR,&vcc->flags);
2695 static int ia_open(struct atm_vcc *vcc) argument
2699 if (!test_bit(ATM_VF_PARTIAL,&vcc->flags))
2702 vcc->dev_data = NULL;
2704 if (vcc->vci != ATM_VPI_UNSPEC && vcc->vpi != ATM_VCI_UNSPEC)
2707 set_bit(ATM_VF_ADDR,&vcc->flags);
2709 if (vcc->qos.aal != ATM_AAL5)
2712 vcc->dev->number, vcc->vpi, vcc->vci);)
2717 vcc->dev_data = ia_vcc;
2719 if ((error = open_rx(vcc)))
2722 ia_close(vcc);
2726 if ((error = open_tx(vcc)))
2729 ia_close(vcc);
2733 set_bit(ATM_VF_READY,&vcc->flags);
2749 static int ia_change_qos(struct atm_vcc *vcc, struct atm_qos *qos, int flags) argument
2887 static int ia_pkt_tx (struct atm_vcc *vcc, struct sk_buff *skb) { argument
2897 iadev = INPH_IA_DEV(vcc->dev);
2898 iavcc = INPH_IA_VCC(vcc);
2901 if (vcc->pop)
2902 vcc->pop(vcc, skb);
2910 if (vcc->pop)
2911 vcc->pop(vcc, skb);
2918 if (vcc->pop)
2919 vcc->pop(vcc, skb);
2938 atomic_inc(&vcc->stats->tx);
2939 if (vcc->pop)
2940 vcc->pop(vcc, skb);
2952 /* remember the desc and vcc mapping */
2999 buf_desc_ptr->vc_index = vcc->vci;
3002 if (vcc->qos.txtp.traffic_class == ATM_ABR)
3003 clear_lockup (vcc, iadev);
3040 ATM_DESC(skb) = vcc->vci;
3043 atomic_inc(&vcc->stats->tx);
3050 if (atomic_read(&vcc->stats->tx) % 20 == 0) {
3052 vcc->tx_quota = vcc->tx_quota * 3 / 4;
3053 printk("Tx1: vcc->tx_quota = %d \n", (u32)vcc->tx_quota );
3055 iavcc->saved_tx_quota = vcc->tx_quota;
3057 // vcc->tx_quota = 3 * iavcc->saved_tx_quota / 4;
3058 printk("Tx2: vcc->tx_quota = %d \n", (u32)vcc->tx_quota );
3067 static int ia_send(struct atm_vcc *vcc, struct sk_buff *skb) argument
3072 iadev = INPH_IA_DEV(vcc->dev);
3081 if (!test_bit(ATM_VF_READY,&vcc->flags)){
3086 ATM_SKB(skb)->vcc = vcc;
3092 if (ia_pkt_tx (vcc, skb)) {