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 requed\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()
1097 struct atm_vcc *vcc; local
1137 vcc = iadev->rx_open[buf_desc_ptr->vc_index & 0xffff];
1138 if (!vcc)
1141 printk("IA: null vcc, drop PDU\n");
1150 atomic_inc(&vcc->stats->rx_err);
1173 atomic_inc(&vcc->stats->rx_err);
1177 if (!(skb = atm_alloc_charge(vcc, len, GFP_ATOMIC))) {
1178 if (vcc->vci < 32)
1184 ATM_SKB(skb)->vcc = vcc;
1274 struct atm_vcc *vcc; local
1313 /* no VCC related housekeeping done as yet. lets see */
1314 vcc = ATM_SKB(skb)->vcc;
1315 if (!vcc) {
1316 printk("IA: null vcc\n");
1320 ia_vcc = INPH_IA_VCC(vcc);
1323 atomic_inc(&vcc->stats->rx_err);
1324 atm_return(vcc, skb->truesize);
1335 atomic_inc(&vcc->stats->rx_err);
1338 atm_return(vcc, skb->truesize);
1350 vcc->push(vcc,skb);
1351 atomic_inc(&vcc->stats->rx);
1374 static int open_rx(struct atm_vcc *vcc) argument
1379 IF_EVENT(printk("iadev: open_rx %d.%d\n", vcc->vpi, vcc->vci);)
1381 if (vcc->qos.rxtp.traffic_class == ATM_NONE) return 0;
1382 iadev = INPH_IA_DEV(vcc->dev);
1383 if (vcc->qos.rxtp.traffic_class == ATM_ABR) {
1392 vc_table += vcc->vci;
1395 *vc_table = vcc->vci << 6;
1398 if ((vcc->qos.rxtp.traffic_class == ATM_ABR) ||
1399 (vcc->qos.txtp.traffic_class == ATM_ABR))
1403 ia_open_abr_vc(iadev, &srv_p, vcc, 0);
1407 reass_ptr += vcc->vci;
1411 if (iadev->rx_open[vcc->vci])
1413 vcc->dev->number, vcc->vci);
1414 iadev->rx_open[vcc->vci] = vcc;
1688 struct atm_vcc *vcc; local
1710 vcc = ATM_SKB(skb)->vcc;
1711 if (!vcc) {
1712 printk("tx_dle_intr: vcc is null\n");
1718 iavcc = INPH_IA_VCC(vcc);
1725 if (vcc->qos.txtp.pcr >= iadev->rate_limit) {
1726 if ((vcc->pop) && (skb->len != 0))
1728 vcc->pop(vcc, skb);
1746 static int open_tx(struct atm_vcc *vcc) argument
1753 IF_EVENT(printk("iadev: open_tx entered vcc->vci = %d\n", vcc->vci);)
1754 if (vcc->qos.txtp.traffic_class == ATM_NONE) return 0;
1755 iadev = INPH_IA_DEV(vcc->dev);
1758 if (vcc->qos.txtp.traffic_class == ATM_ABR) {
1762 if (vcc->qos.txtp.traffic_class == ATM_CBR) {
1767 ia_vcc = INPH_IA_VCC(vcc);
1769 if (vcc->qos.txtp.max_sdu >
1772 vcc->qos.txtp.max_sdu,iadev->tx_buf_sz);
1773 vcc->dev_data = NULL;
1781 if (vcc->qos.txtp.max_pcr == ATM_MAX_PCR)
1782 vcc->qos.txtp.pcr = iadev->LineRate;
1783 else if ((vcc->qos.txtp.max_pcr == 0)&&( vcc->qos.txtp.pcr <= 0))
1784 vcc->qos.txtp.pcr = iadev->LineRate;
1785 else if ((vcc->qos.txtp.max_pcr > vcc->qos.txtp.pcr) && (vcc->qos.txtp.max_pcr> 0))
1786 vcc->qos.txtp.pcr = vcc->qos.txtp.max_pcr;
1787 if (vcc->qos.txtp.pcr > iadev->LineRate)
1788 vcc->qos.txtp.pcr = iadev->LineRate;
1789 ia_vcc->pcr = vcc->qos.txtp.pcr;
1798 struct sock *sk = sk_atm(vcc);
1800 if (vcc->qos.txtp.max_sdu != 0) {
1802 sk->sk_sndbuf = vcc->qos.txtp.max_sdu * 5;
1804 sk->sk_sndbuf = vcc->qos.txtp.max_sdu * 4;
1806 sk->sk_sndbuf = vcc->qos.txtp.max_sdu * 3;
1814 vc += vcc->vci;
1815 evc += vcc->vci;
1824 evc->atm_hdr1 = (vcc->vci >> 12) & 0x000f;
1825 evc->atm_hdr2 = (vcc->vci & 0x0fff) << 4;
1828 if (vcc->qos.txtp.traffic_class == ATM_UBR)
1833 if (vcc->qos.txtp.pcr > 0)
1834 vc->acr = cellrate_to_float(vcc->qos.txtp.pcr);
1836 vcc->qos.txtp.max_pcr,vc->acr);)
1838 else if (vcc->qos.txtp.traffic_class == ATM_ABR)
1840 IF_ABR(printk("Tx ABR VCC\n");)
1842 if (vcc->qos.txtp.pcr > 0)
1843 srv_p.pcr = vcc->qos.txtp.pcr;
1844 if (vcc->qos.txtp.min_pcr > 0) {
1845 int tmpsum = iadev->sum_mcr+iadev->sum_cbr+vcc->qos.txtp.min_pcr;
1848 srv_p.mcr = vcc->qos.txtp.min_pcr;
1849 iadev->sum_mcr += vcc->qos.txtp.min_pcr;
1852 if (vcc->qos.txtp.icr)
1853 srv_p.icr = vcc->qos.txtp.icr;
1854 if (vcc->qos.txtp.tbe)
1855 srv_p.tbe = vcc->qos.txtp.tbe;
1856 if (vcc->qos.txtp.frtt)
1857 srv_p.frtt = vcc->qos.txtp.frtt;
1858 if (vcc->qos.txtp.rif)
1859 srv_p.rif = vcc->qos.txtp.rif;
1860 if (vcc->qos.txtp.rdf)
1861 srv_p.rdf = vcc->qos.txtp.rdf;
1862 if (vcc->qos.txtp.nrm_pres)
1863 srv_p.nrm = vcc->qos.txtp.nrm;
1864 if (vcc->qos.txtp.trm_pres)
1865 srv_p.trm = vcc->qos.txtp.trm;
1866 if (vcc->qos.txtp.adtf_pres)
1867 srv_p.adtf = vcc->qos.txtp.adtf;
1868 if (vcc->qos.txtp.cdf_pres)
1869 srv_p.cdf = vcc->qos.txtp.cdf;
1872 IF_ABR(printk("ABR:vcc->qos.txtp.max_pcr = %d mcr = %d\n",
1874 ia_open_abr_vc(iadev, &srv_p, vcc, 1);
1875 } else if (vcc->qos.txtp.traffic_class == ATM_CBR) {
1880 if (vcc->qos.txtp.max_pcr > iadev->LineRate) {
1886 if ((ret = ia_cbr_setup (iadev, vcc)) < 0) {
1893 iadev->testTable[vcc->vci]->vc_status |= VC_ACTIVE;
2606 static void ia_close(struct atm_vcc *vcc) argument
2616 iadev = INPH_IA_DEV(vcc->dev);
2617 ia_vcc = INPH_IA_VCC(vcc);
2621 ia_vcc->vc_desc_cnt,vcc->vci);)
2622 clear_bit(ATM_VF_READY,&vcc->flags);
2625 if (vcc->qos.txtp.traffic_class != ATM_NONE) {
2632 if (ATM_SKB(skb)->vcc == vcc){
2633 if (vcc->pop) vcc->pop(vcc, skb);
2649 iadev->testTable[vcc->vci]->lastTime = 0;
2650 iadev->testTable[vcc->vci]->fract = 0;
2651 iadev->testTable[vcc->vci]->vc_status = VC_UBR;
2652 if (vcc->qos.txtp.traffic_class == ATM_ABR) {
2653 if (vcc->qos.txtp.min_pcr > 0)
2654 iadev->sum_mcr -= vcc->qos.txtp.min_pcr;
2656 if (vcc->qos.txtp.traffic_class == ATM_CBR) {
2657 ia_vcc = INPH_IA_VCC(vcc);
2659 ia_cbrVc_close (vcc);
2664 if (vcc->qos.rxtp.traffic_class != ATM_NONE) {
2667 vc_table += vcc->vci;
2671 vc_table += vcc->vci;
2672 *vc_table = (vcc->vci << 6) | 15;
2673 if (vcc->qos.rxtp.traffic_class == ATM_ABR) {
2676 abr_vc_table += vcc->vci;
2681 rx_dle_intr(vcc->dev);
2682 iadev->rx_open[vcc->vci] = NULL;
2684 kfree(INPH_IA_VCC(vcc));
2686 vcc->dev_data = NULL;
2687 clear_bit(ATM_VF_ADDR,&vcc->flags);
2691 static int ia_open(struct atm_vcc *vcc) argument
2695 if (!test_bit(ATM_VF_PARTIAL,&vcc->flags))
2698 vcc->dev_data = NULL;
2700 if (vcc->vci != ATM_VPI_UNSPEC && vcc->vpi != ATM_VCI_UNSPEC)
2703 set_bit(ATM_VF_ADDR,&vcc->flags);
2705 if (vcc->qos.aal != ATM_AAL5)
2708 vcc->dev->number, vcc->vpi, vcc->vci);)
2713 vcc->dev_data = ia_vcc;
2715 if ((error = open_rx(vcc)))
2718 ia_close(vcc);
2722 if ((error = open_tx(vcc)))
2725 ia_close(vcc);
2729 set_bit(ATM_VF_READY,&vcc->flags);
2745 static int ia_change_qos(struct atm_vcc *vcc, struct atm_qos *qos, int flags) argument
2883 static int ia_pkt_tx (struct atm_vcc *vcc, struct sk_buff *skb) { argument
2893 iadev = INPH_IA_DEV(vcc->dev);
2894 iavcc = INPH_IA_VCC(vcc);
2897 if (vcc->pop)
2898 vcc->pop(vcc, skb);
2906 if (vcc->pop)
2907 vcc->pop(vcc, skb);
2914 if (vcc->pop)
2915 vcc->pop(vcc, skb);
2934 atomic_inc(&vcc->stats->tx);
2935 if (vcc->pop)
2936 vcc->pop(vcc, skb);
2948 /* remember the desc and vcc mapping */
2995 buf_desc_ptr->vc_index = vcc->vci;
2998 if (vcc->qos.txtp.traffic_class == ATM_ABR)
2999 clear_lockup (vcc, iadev);
3036 ATM_DESC(skb) = vcc->vci;
3039 atomic_inc(&vcc->stats->tx);
3046 if (atomic_read(&vcc->stats->tx) % 20 == 0) {
3048 vcc->tx_quota = vcc->tx_quota * 3 / 4;
3049 printk("Tx1: vcc->tx_quota = %d \n", (u32)vcc->tx_quota );
3051 iavcc->saved_tx_quota = vcc->tx_quota;
3053 // vcc->tx_quota = 3 * iavcc->saved_tx_quota / 4;
3054 printk("Tx2: vcc->tx_quota = %d \n", (u32)vcc->tx_quota );
3063 static int ia_send(struct atm_vcc *vcc, struct sk_buff *skb) argument
3068 iadev = INPH_IA_DEV(vcc->dev);
3077 if (!test_bit(ATM_VF_READY,&vcc->flags)){
3082 ATM_SKB(skb)->vcc = vcc;
3088 if (ia_pkt_tx (vcc, skb)) {