Lines Matching full:vcc

207               printk("Fatal err, desc table vcc or skb is NULL\n");  in get_desc()
237 static void clear_lockup (struct atm_vcc *vcc, IADEV *dev) { in clear_lockup() argument
246 if (vcc->qos.txtp.traffic_class == ATM_ABR) { in clear_lockup()
247 vcstatus = (vcstatus_t *) &(dev->testTable[vcc->vci]->vc_status); in clear_lockup()
251 abr_vc += vcc->vci; in clear_lockup()
252 eabr_vc += vcc->vci; in clear_lockup()
263 if((tempCellSlot == dev->testTable[vcc->vci]->lastTime) in clear_lockup()
264 && (tempFract == dev->testTable[vcc->vci]->fract)) in clear_lockup()
266 dev->testTable[vcc->vci]->lastTime = tempCellSlot; in clear_lockup()
267 dev->testTable[vcc->vci]->fract = tempFract; in clear_lockup()
283 shd_tbl[i] = vcc->vci; in clear_lockup()
285 IF_ERR(printk("ABR Seg. may not continue on VC %x\n",vcc->vci);) in clear_lockup()
378 struct atm_vcc *vcc, u8 flag) in ia_open_abr_vc() argument
386 f_abr_vc += vcc->vci; in ia_open_abr_vc()
446 *(ptr16 + vcc->vci) = NO_AAL5_PKT | REASS_ABR; in ia_open_abr_vc()
448 r_abr_vc += vcc->vci; in ia_open_abr_vc()
453 dev->testTable[vcc->vci]->vc_status = VC_ACTIVE | VC_ABR; in ia_open_abr_vc()
462 static int ia_cbr_setup (IADEV *dev, struct atm_vcc *vcc) { in ia_cbr_setup() argument
476 if (vcc->qos.txtp.max_pcr <= 0) { in ia_cbr_setup()
480 rate = vcc->qos.txtp.max_pcr; in ia_cbr_setup()
497 ia_vcc = INPH_IA_VCC(vcc); in ia_cbr_setup()
508 vcIndex = vcc->vci; in ia_cbr_setup()
577 static void ia_cbrVc_close (struct atm_vcc *vcc) { in ia_cbrVc_close() argument
582 iadev = INPH_IA_DEV(vcc->dev); in ia_cbrVc_close()
592 if (*SchedTbl == vcc->vci) { in ia_cbrVc_close()
613 static int ia_pkt_tx (struct atm_vcc *vcc, struct sk_buff *skb);
618 struct atm_vcc *vcc; in ia_que_tx() local
622 if (!(vcc = ATM_SKB(skb)->vcc)) { in ia_que_tx()
624 printk("ia_que_tx: Null vcc\n"); in ia_que_tx()
627 if (!test_bit(ATM_VF_READY,&vcc->flags)) { in ia_que_tx()
629 printk("Free the SKB on closed vci %d \n", vcc->vci); in ia_que_tx()
632 if (ia_pkt_tx (vcc, skb)) { in ia_que_tx()
641 struct atm_vcc *vcc = NULL; in ia_tx_poll() local
653 vcc = ATM_SKB(skb)->vcc; in ia_tx_poll()
654 if (!vcc) { in ia_tx_poll()
655 printk("ia_tx_poll: vcc is null\n"); in ia_tx_poll()
660 iavcc = INPH_IA_VCC(vcc); in ia_tx_poll()
670 printk("IA_tx_intr: Vci %d lost pkt!!!\n", vcc->vci); in ia_tx_poll()
673 if ((vcc->pop) && (skb1->len != 0)) in ia_tx_poll()
675 vcc->pop(vcc, skb1); in ia_tx_poll()
684 IF_EVENT(printk("IA: Vci %d - skb not found requeued\n",vcc->vci);) in ia_tx_poll()
688 if ((vcc->pop) && (skb->len != 0)) in ia_tx_poll()
690 vcc->pop(vcc, skb); in ia_tx_poll()
1100 struct atm_vcc *vcc; local
1140 vcc = iadev->rx_open[buf_desc_ptr->vc_index & 0xffff];
1141 if (!vcc)
1144 printk("IA: null vcc, drop PDU\n");
1153 atomic_inc(&vcc->stats->rx_err);
1176 atomic_inc(&vcc->stats->rx_err);
1180 if (!(skb = atm_alloc_charge(vcc, len, GFP_ATOMIC))) {
1181 if (vcc->vci < 32)
1187 ATM_SKB(skb)->vcc = vcc;
1277 struct atm_vcc *vcc; local
1316 /* no VCC related housekeeping done as yet. lets see */
1317 vcc = ATM_SKB(skb)->vcc;
1318 if (!vcc) {
1319 printk("IA: null vcc\n");
1323 ia_vcc = INPH_IA_VCC(vcc);
1326 atomic_inc(&vcc->stats->rx_err);
1327 atm_return(vcc, skb->truesize);
1338 atomic_inc(&vcc->stats->rx_err);
1341 atm_return(vcc, skb->truesize);
1353 vcc->push(vcc,skb);
1354 atomic_inc(&vcc->stats->rx);
1377 static int open_rx(struct atm_vcc *vcc) argument
1382 IF_EVENT(printk("iadev: open_rx %d.%d\n", vcc->vpi, vcc->vci);)
1384 if (vcc->qos.rxtp.traffic_class == ATM_NONE) return 0;
1385 iadev = INPH_IA_DEV(vcc->dev);
1386 if (vcc->qos.rxtp.traffic_class == ATM_ABR) {
1395 vc_table += vcc->vci;
1398 *vc_table = vcc->vci << 6;
1401 if ((vcc->qos.rxtp.traffic_class == ATM_ABR) ||
1402 (vcc->qos.txtp.traffic_class == ATM_ABR))
1406 ia_open_abr_vc(iadev, &srv_p, vcc, 0);
1410 reass_ptr += vcc->vci;
1414 if (iadev->rx_open[vcc->vci])
1416 vcc->dev->number, vcc->vci);
1417 iadev->rx_open[vcc->vci] = vcc;
1691 struct atm_vcc *vcc; local
1713 vcc = ATM_SKB(skb)->vcc;
1714 if (!vcc) {
1715 printk("tx_dle_intr: vcc is null\n");
1721 iavcc = INPH_IA_VCC(vcc);
1728 if (vcc->qos.txtp.pcr >= iadev->rate_limit) {
1729 if ((vcc->pop) && (skb->len != 0))
1731 vcc->pop(vcc, skb);
1749 static int open_tx(struct atm_vcc *vcc) argument
1756 IF_EVENT(printk("iadev: open_tx entered vcc->vci = %d\n", vcc->vci);)
1757 if (vcc->qos.txtp.traffic_class == ATM_NONE) return 0;
1758 iadev = INPH_IA_DEV(vcc->dev);
1761 if (vcc->qos.txtp.traffic_class == ATM_ABR) {
1765 if (vcc->qos.txtp.traffic_class == ATM_CBR) {
1770 ia_vcc = INPH_IA_VCC(vcc);
1772 if (vcc->qos.txtp.max_sdu >
1775 vcc->qos.txtp.max_sdu,iadev->tx_buf_sz);
1776 vcc->dev_data = NULL;
1784 if (vcc->qos.txtp.max_pcr == ATM_MAX_PCR)
1785 vcc->qos.txtp.pcr = iadev->LineRate;
1786 else if ((vcc->qos.txtp.max_pcr == 0)&&( vcc->qos.txtp.pcr <= 0))
1787 vcc->qos.txtp.pcr = iadev->LineRate;
1788 else if ((vcc->qos.txtp.max_pcr > vcc->qos.txtp.pcr) && (vcc->qos.txtp.max_pcr> 0))
1789 vcc->qos.txtp.pcr = vcc->qos.txtp.max_pcr;
1790 if (vcc->qos.txtp.pcr > iadev->LineRate)
1791 vcc->qos.txtp.pcr = iadev->LineRate;
1792 ia_vcc->pcr = vcc->qos.txtp.pcr;
1801 struct sock *sk = sk_atm(vcc);
1803 if (vcc->qos.txtp.max_sdu != 0) {
1805 sk->sk_sndbuf = vcc->qos.txtp.max_sdu * 5;
1807 sk->sk_sndbuf = vcc->qos.txtp.max_sdu * 4;
1809 sk->sk_sndbuf = vcc->qos.txtp.max_sdu * 3;
1817 vc += vcc->vci;
1818 evc += vcc->vci;
1827 evc->atm_hdr1 = (vcc->vci >> 12) & 0x000f;
1828 evc->atm_hdr2 = (vcc->vci & 0x0fff) << 4;
1831 if (vcc->qos.txtp.traffic_class == ATM_UBR)
1836 if (vcc->qos.txtp.pcr > 0)
1837 vc->acr = cellrate_to_float(vcc->qos.txtp.pcr);
1839 vcc->qos.txtp.max_pcr,vc->acr);)
1841 else if (vcc->qos.txtp.traffic_class == ATM_ABR)
1843 IF_ABR(printk("Tx ABR VCC\n");)
1845 if (vcc->qos.txtp.pcr > 0)
1846 srv_p.pcr = vcc->qos.txtp.pcr;
1847 if (vcc->qos.txtp.min_pcr > 0) {
1848 int tmpsum = iadev->sum_mcr+iadev->sum_cbr+vcc->qos.txtp.min_pcr;
1851 srv_p.mcr = vcc->qos.txtp.min_pcr;
1852 iadev->sum_mcr += vcc->qos.txtp.min_pcr;
1855 if (vcc->qos.txtp.icr)
1856 srv_p.icr = vcc->qos.txtp.icr;
1857 if (vcc->qos.txtp.tbe)
1858 srv_p.tbe = vcc->qos.txtp.tbe;
1859 if (vcc->qos.txtp.frtt)
1860 srv_p.frtt = vcc->qos.txtp.frtt;
1861 if (vcc->qos.txtp.rif)
1862 srv_p.rif = vcc->qos.txtp.rif;
1863 if (vcc->qos.txtp.rdf)
1864 srv_p.rdf = vcc->qos.txtp.rdf;
1865 if (vcc->qos.txtp.nrm_pres)
1866 srv_p.nrm = vcc->qos.txtp.nrm;
1867 if (vcc->qos.txtp.trm_pres)
1868 srv_p.trm = vcc->qos.txtp.trm;
1869 if (vcc->qos.txtp.adtf_pres)
1870 srv_p.adtf = vcc->qos.txtp.adtf;
1871 if (vcc->qos.txtp.cdf_pres)
1872 srv_p.cdf = vcc->qos.txtp.cdf;
1875 IF_ABR(printk("ABR:vcc->qos.txtp.max_pcr = %d mcr = %d\n",
1877 ia_open_abr_vc(iadev, &srv_p, vcc, 1);
1878 } else if (vcc->qos.txtp.traffic_class == ATM_CBR) {
1883 if (vcc->qos.txtp.max_pcr > iadev->LineRate) {
1889 if ((ret = ia_cbr_setup (iadev, vcc)) < 0) {
1896 iadev->testTable[vcc->vci]->vc_status |= VC_ACTIVE;
2609 static void ia_close(struct atm_vcc *vcc) argument
2619 iadev = INPH_IA_DEV(vcc->dev);
2620 ia_vcc = INPH_IA_VCC(vcc);
2624 ia_vcc->vc_desc_cnt,vcc->vci);)
2625 clear_bit(ATM_VF_READY,&vcc->flags);
2628 if (vcc->qos.txtp.traffic_class != ATM_NONE) {
2635 if (ATM_SKB(skb)->vcc == vcc){
2636 if (vcc->pop) vcc->pop(vcc, skb);
2652 iadev->testTable[vcc->vci]->lastTime = 0;
2653 iadev->testTable[vcc->vci]->fract = 0;
2654 iadev->testTable[vcc->vci]->vc_status = VC_UBR;
2655 if (vcc->qos.txtp.traffic_class == ATM_ABR) {
2656 if (vcc->qos.txtp.min_pcr > 0)
2657 iadev->sum_mcr -= vcc->qos.txtp.min_pcr;
2659 if (vcc->qos.txtp.traffic_class == ATM_CBR) {
2660 ia_vcc = INPH_IA_VCC(vcc);
2662 ia_cbrVc_close (vcc);
2667 if (vcc->qos.rxtp.traffic_class != ATM_NONE) {
2670 vc_table += vcc->vci;
2674 vc_table += vcc->vci;
2675 *vc_table = (vcc->vci << 6) | 15;
2676 if (vcc->qos.rxtp.traffic_class == ATM_ABR) {
2679 abr_vc_table += vcc->vci;
2684 rx_dle_intr(vcc->dev);
2685 iadev->rx_open[vcc->vci] = NULL;
2687 kfree(INPH_IA_VCC(vcc));
2689 vcc->dev_data = NULL;
2690 clear_bit(ATM_VF_ADDR,&vcc->flags);
2694 static int ia_open(struct atm_vcc *vcc) argument
2698 if (!test_bit(ATM_VF_PARTIAL,&vcc->flags))
2701 vcc->dev_data = NULL;
2703 if (vcc->vci != ATM_VPI_UNSPEC && vcc->vpi != ATM_VCI_UNSPEC)
2706 set_bit(ATM_VF_ADDR,&vcc->flags);
2708 if (vcc->qos.aal != ATM_AAL5)
2711 vcc->dev->number, vcc->vpi, vcc->vci);)
2716 vcc->dev_data = ia_vcc;
2718 if ((error = open_rx(vcc)))
2721 ia_close(vcc);
2725 if ((error = open_tx(vcc)))
2728 ia_close(vcc);
2732 set_bit(ATM_VF_READY,&vcc->flags);
2748 static int ia_change_qos(struct atm_vcc *vcc, struct atm_qos *qos, int flags) argument
2886 static int ia_pkt_tx (struct atm_vcc *vcc, struct sk_buff *skb) { argument
2896 iadev = INPH_IA_DEV(vcc->dev);
2897 iavcc = INPH_IA_VCC(vcc);
2900 if (vcc->pop)
2901 vcc->pop(vcc, skb);
2909 if (vcc->pop)
2910 vcc->pop(vcc, skb);
2917 if (vcc->pop)
2918 vcc->pop(vcc, skb);
2937 atomic_inc(&vcc->stats->tx);
2938 if (vcc->pop)
2939 vcc->pop(vcc, skb);
2951 /* remember the desc and vcc mapping */
2998 buf_desc_ptr->vc_index = vcc->vci;
3001 if (vcc->qos.txtp.traffic_class == ATM_ABR)
3002 clear_lockup (vcc, iadev);
3039 ATM_DESC(skb) = vcc->vci;
3042 atomic_inc(&vcc->stats->tx);
3049 if (atomic_read(&vcc->stats->tx) % 20 == 0) {
3051 vcc->tx_quota = vcc->tx_quota * 3 / 4;
3052 printk("Tx1: vcc->tx_quota = %d \n", (u32)vcc->tx_quota );
3054 iavcc->saved_tx_quota = vcc->tx_quota;
3056 // vcc->tx_quota = 3 * iavcc->saved_tx_quota / 4;
3057 printk("Tx2: vcc->tx_quota = %d \n", (u32)vcc->tx_quota );
3066 static int ia_send(struct atm_vcc *vcc, struct sk_buff *skb) argument
3071 iadev = INPH_IA_DEV(vcc->dev);
3080 if (!test_bit(ATM_VF_READY,&vcc->flags)){
3085 ATM_SKB(skb)->vcc = vcc;
3091 if (ia_pkt_tx (vcc, skb)) {