Andreas Eversberg | e6228b3 | 2012-07-03 13:36:03 +0200 | [diff] [blame] | 1 | This document describes the handling of TBFs |
| 2 | -------------------------------------------- |
| 3 | |
| 4 | Notes: |
| 5 | TBF |
| 6 | Instance for one temporary block flow. |
| 7 | |
| 8 | LLC Frame |
| 9 | Current frame to be transmitted or received. If tbf->llc_length is not 0, |
| 10 | the frame exists, if 0, the frame does not exist. If tbf->llc_index is not |
| 11 | 0, parts of the frame have been transmitted or received so far. |
| 12 | |
| 13 | LLC Queue |
| 14 | Queue of next frames to be transmitted. |
| 15 | |
| 16 | States: |
| 17 | GPRS_RLCMAC_ASSIGN |
| 18 | After a downlink TBF is created, it resides in this state until the |
| 19 | block flow can start. This is required to give the mobile time to listen |
| 20 | to connect to downlink PDCH. |
| 21 | |
| 22 | GPRS_RLCMAC_FLOW, |
| 23 | During packet flow, this state indicates downlink and uplink TBF block |
| 24 | flow. |
| 25 | |
| 26 | GPRS_RLCMAC_FINISHED, |
| 27 | Uplink TBF: |
| 28 | After final block is received AND all other blocks are completely |
| 29 | received, the state is entered. The PACKET CONTROL ACK is still not |
| 30 | received. (Counter N3103 is counted on each poll request.) |
| 31 | Downlink TBF: |
| 32 | All blocks including the final block has been transmitted. Not all |
| 33 | downlink blocks are acknowledged yet. (Counter N3015 is counted on each |
| 34 | poll request.) |
| 35 | |
| 36 | GPRS_RLCMAC_WAIT_RELEASE, |
| 37 | The all blocks on downlink TBF have been acked by mobile. The penalty |
| 38 | timer T3192 is running on mobile. |
| 39 | |
| 40 | GPRS_RLCMAC_RELEASING, |
| 41 | Wait for TFI/USF to be re-used. This state is entered when a counter |
| 42 | reaches it's maximum and T3169 is running. |
| 43 | |
| 44 | |
| 45 | When downlink LLC PDU is received: |
| 46 | |
| 47 | If downlink TBF exists for given TLLI, but not in RELEASING state: |
| 48 | If downlink TBF is in FLOW or FINISHED state: |
| 49 | Enqueue PDU to LLC Queue of TBF. |
| 50 | Done. |
| 51 | If downlink TBF is in WAIT RELEASE state: |
| 52 | Attach PDU to LLC Frame of TBF. |
| 53 | Put TBF back into FLOW state. |
| 54 | Done. |
| 55 | If dowlink TBF does not exists for given TLLI, or in RELEASING state: |
| 56 | Create new downlink TBF. |
| 57 | Attach PDU to LLC Frame of TBF. |
| 58 | If uplink TBF exists for given TLLI, but not in RELEASING state: |
| 59 | Assign packet channel PACCH. |
| 60 | Done. |
| 61 | If uplink TBF does not exists for given TLLI, or in RELEASING state: |
| 62 | Assign packet channel AGCH. |
| 63 | Done. |
| 64 | |
| 65 | When channel request for uplink TBF is received: |
| 66 | |
| 67 | Create new uplink TBF. |
| 68 | If channel request was received on RACH |
| 69 | Assign packet channel AGCH. |
| 70 | Done |
| 71 | If channel request was received on PACCH |
| 72 | Assign packet channel PACCH. |
| 73 | Done |
| 74 | |
| 75 | Handling of LLC Frame of downlink TBF and LLC Queue of downlink TBF: |
| 76 | |
| 77 | If a downlink TBF is created, the LLC PDU is attached to LLC Frame of TBF |
| 78 | (downlink flow is assigned to MS). |
| 79 | |
| 80 | If a downlink TBF exists, the LLC PDU is enqueued to LLC Queue of TBF. |
| 81 | |
| 82 | During transfer of downlink blocks, the LLC Queue is dequeued whenever all |
| 83 | segments of LLC Frame were used for generation of downlink blocks. (If a |
| 84 | block is partly filled with LLC Frame segment, its remaining space is filled |
| 85 | with the next LLC Frame from the Queue.) |
| 86 | |
| 87 | If the transfer is finished, no more LLC Frames are dequeued from the LLC |
| 88 | Queue, in case a new frame has arrived during lifetime of TBF. |
| 89 | |
| 90 | If the all downlink blocks have been acknowledged, the LLC Queue is |
| 91 | dequeued and an existing frame is attached to LLC Frame. If so, the new |
| 92 | state is FLOW (downlink flow is assigned to MS), otherwise WAIT RELEASE. |
| 93 | |
| 94 | If a new LLC PDU is attached to LLC Frame during WAIT RELEASE state, the |
| 95 | state is changed to FLOW (downlink flow is assigned to MS). |
| 96 | |
| 97 | Handling of LLC Frame on uplink TBF: |
| 98 | |
| 99 | Received uplink blocks are appended to LLC Frame of TBF. If the PDU is |
| 100 | complete, it is forwarded to the upper layer. |
| 101 | |
| 102 | Polling: |
| 103 | In order to poll uplink control block from MS, a special poll state and |
| 104 | frame number is stored at TBF. The scheduler reads that value and will not |
| 105 | assign uplink ressource for other TBFs at that frame number. |
| 106 | |
| 107 | When there is no uplink transmission received on the block, a timeout is |
| 108 | indicated by layer 1 interface. There are two ways of checking timeout: |
| 109 | - The received frame is bad (BFI). |
| 110 | - The GSM indicates that the block should have been already received. |
| 111 | |