rlc_um_control_primitives.c 15.3 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
 * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The OpenAirInterface Software Alliance licenses this file to You under
 * the OAI Public License, Version 1.0  (the "License"); you may not use this file
 * except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.openairinterface.org/?page_id=698
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *-------------------------------------------------------------------------------
 * For more information about the OpenAirInterface (OAI) Software Alliance:
 *      contact@openairinterface.org
 */
gauthier's avatar
gauthier committed
21

22
23
#define RLC_UM_MODULE 1
#define RLC_UM_CONTROL_PRIMITIVES_C 1
24
#include "platform_types.h"
25
#include "assertions.h"
26
27
28
29
30
31
32
33
34
35
//-----------------------------------------------------------------------------
#include "rlc_um.h"
#include "rlc_primitives.h"
#include "list.h"
#include "rrm_config_structs.h"
#include "LAYER2/MAC/extern.h"
#include "UTIL/LOG/log.h"

#include "rlc_um_control_primitives.h"
#include "T-Reordering.h"
gauthier's avatar
gauthier committed
36
#include "msc.h"
37
38

//-----------------------------------------------------------------------------
39
void config_req_rlc_um (
40
41
42
  const protocol_ctxt_t* const ctxt_pP,
  const srb_flag_t      srb_flagP,
  const rlc_um_info_t  * const config_um_pP,
43
44
  const rb_id_t           rb_idP,
  const logical_chan_id_t chan_idP)
45
{
46
47
  rlc_union_t     *rlc_union_p  = NULL;
  rlc_um_entity_t *rlc_p        = NULL;
48
  hash_key_t       key          = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
49
  hashtable_rc_t   h_rc;
gauthier's avatar
gauthier committed
50

51
  h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
52

53
  if (h_rc == HASH_TABLE_OK) {
54
    rlc_p = &rlc_union_p->rlc.um;
55
56
    LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" CONFIG_REQ timer_reordering=%d sn_field_length=%d is_mXch=%d RB %u\n",
          PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_p),
gauthier's avatar
gauthier committed
57
58
59
60
61
          config_um_pP->timer_reordering,
          config_um_pP->sn_field_length,
          config_um_pP->is_mXch,
          rb_idP);

62
63
64
    rlc_um_init(ctxt_pP, rlc_p);

    if (rlc_um_fsm_notify_event (ctxt_pP, rlc_p, RLC_UM_RECEIVE_CRLC_CONFIG_REQ_ENTER_DATA_TRANSFER_READY_STATE_EVENT)) {
65
      rlc_um_set_debug_infos(ctxt_pP, rlc_p, srb_flagP, rb_idP, chan_idP);
66
67
68
69
70
71
72
73
      rlc_um_configure(
        ctxt_pP,
        rlc_p,
        config_um_pP->timer_reordering,
        config_um_pP->sn_field_length,
        config_um_pP->sn_field_length,
        config_um_pP->is_mXch);
    }
74
  } else {
75
76
    LOG_E(RLC, PROTOCOL_RLC_UM_CTXT_FMT"  CONFIG_REQ RB %u  RLC UM NOT FOUND\n",
          PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_p),
77
78
          rb_idP);
  }
79
80
}
//-----------------------------------------------------------------------------
81
const uint32_t const t_Reordering_tab[T_Reordering_spare1] = {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,110,120,130,140,150,160,170,180,190,200};
82

83
void config_req_rlc_um_asn1 (
84
85
86
87
88
89
90
  const protocol_ctxt_t* const ctxt_pP,
  const srb_flag_t          srb_flagP,
  const MBMS_flag_t         mbms_flagP,
  const mbms_session_id_t   mbms_session_idP,
  const mbms_service_id_t   mbms_service_idP,
  const UL_UM_RLC_t       * const ul_rlc_pP,
  const DL_UM_RLC_t       * const dl_rlc_pP,
91
92
  const rb_id_t             rb_idP,
  const logical_chan_id_t   chan_idP)
93
{
94
95
96
97
  uint32_t         ul_sn_FieldLength   = 0;
  uint32_t         dl_sn_FieldLength   = 0;
  uint32_t         t_Reordering        = 0;
  rlc_union_t     *rlc_union_p         = NULL;
gauthier's avatar
gauthier committed
98
  rlc_um_entity_t *rlc_p               = NULL;
99
  hash_key_t       key                 = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
100
101
  hashtable_rc_t   h_rc;

102
#if Rel10
103

gauthier's avatar
gauthier committed
104
  if (mbms_flagP) {
105
106
    AssertFatal(dl_rlc_pP, "No RLC UM DL config");
    AssertFatal(ul_rlc_pP == NULL, "RLC UM UL config present");
107
    key = RLC_COLL_KEY_MBMS_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, mbms_service_idP, mbms_session_idP);
108
    h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
109
110
111
    AssertFatal (h_rc == HASH_TABLE_OK, "RLC NOT FOUND enb id %u rnti %i enb flag %u service id %u, session id %u",
                 ctxt_pP->module_id,
                 ctxt_pP->rnti,
112
113
114
115
116
                 ctxt_pP->enb_flag,
                 mbms_service_idP,
                 mbms_session_idP);
    rlc_p = &rlc_union_p->rlc.um;
  } else
gauthier's avatar
gauthier committed
117
118
#endif
  {
119
    key  = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
120
121
    h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
    AssertFatal (h_rc == HASH_TABLE_OK, "RLC NOT FOUND enb id %u ue id %i enb flag %u rb id %u, srb flag %u",
122
123
                 ctxt_pP->module_id,
                 ctxt_pP->rnti,
124
125
126
127
                 ctxt_pP->enb_flag,
                 rb_idP,
                 srb_flagP);
    rlc_p = &rlc_union_p->rlc.um;
gauthier's avatar
gauthier committed
128
  }
129
130

  //-----------------------------------------------------------------------------
131
132
  LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT"  CONFIG_REQ timer_reordering=%dms sn_field_length=   RB %u \n",
        PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_p),
133
134
        (dl_rlc_pP && dl_rlc_pP->t_Reordering<31)?t_Reordering_tab[dl_rlc_pP->t_Reordering]:-1,
        rb_idP);
gauthier's avatar
gauthier committed
135

136
  rlc_um_init(ctxt_pP, rlc_p);
137

gauthier's avatar
gauthier committed
138

139
  if (rlc_um_fsm_notify_event (ctxt_pP, rlc_p, RLC_UM_RECEIVE_CRLC_CONFIG_REQ_ENTER_DATA_TRANSFER_READY_STATE_EVENT)) {
140
    rlc_um_set_debug_infos(ctxt_pP,rlc_p, srb_flagP, rb_idP, chan_idP);
141
142
143
144
145
146
147
148
149
150
151
152

    if (ul_rlc_pP != NULL) {
      switch (ul_rlc_pP->sn_FieldLength) {
      case SN_FieldLength_size5:
        ul_sn_FieldLength = 5;
        break;

      case SN_FieldLength_size10:
        ul_sn_FieldLength = 10;
        break;

      default:
gauthier's avatar
gauthier committed
153
        LOG_E(RLC,PROTOCOL_RLC_UM_CTXT_FMT" [CONFIGURE] RB %u INVALID UL sn_FieldLength %d, RLC NOT CONFIGURED\n",
154
              PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_p),
155
156
              rlc_p->rb_id,
              ul_rlc_pP->sn_FieldLength);
gauthier's avatar
gauthier committed
157
158
159
160
161
162
163
164
165
        MSC_LOG_RX_DISCARDED_MESSAGE(
      	    (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
      	    (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
      	    NULL,
      	    0,
      	    MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" CONFIG-REQ UL sn_FieldLength %u",
      	    MSC_AS_TIME_ARGS(ctxt_pP),
      	    PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc_p),
      	    ul_rlc_pP->sn_FieldLength);
166
        return;
167
      }
168
169
170
171
172
173
174
175
176
177
178
179
180
    }

    if (dl_rlc_pP != NULL) {
      switch (dl_rlc_pP->sn_FieldLength) {
      case SN_FieldLength_size5:
        dl_sn_FieldLength = 5;
        break;

      case SN_FieldLength_size10:
        dl_sn_FieldLength = 10;
        break;

      default:
gauthier's avatar
gauthier committed
181
        LOG_E(RLC,PROTOCOL_RLC_UM_CTXT_FMT" [CONFIGURE] RB %u INVALID DL sn_FieldLength %d, RLC NOT CONFIGURED\n",
182
              PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_p),
183
184
              rlc_p->rb_id,
              dl_rlc_pP->sn_FieldLength);
gauthier's avatar
gauthier committed
185
186
187
188
189
190
191
192
193
        MSC_LOG_RX_DISCARDED_MESSAGE(
      	    (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
      	    (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
      	    NULL,
      	    0,
      	    MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" CONFIG-REQ DL sn_FieldLength %u",
      	    MSC_AS_TIME_ARGS(ctxt_pP),
      	    PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc_p),
      	    dl_rlc_pP->sn_FieldLength);
194
        return;
195
      }
196
197
198

      if (dl_rlc_pP->t_Reordering<T_Reordering_spare1) {
        t_Reordering = t_Reordering_tab[dl_rlc_pP->t_Reordering];
199
      } else {
200
201
        LOG_E(RLC,PROTOCOL_RLC_UM_CTXT_FMT" [CONFIGURE] RB %u INVALID T_Reordering %d, RLC NOT CONFIGURED\n",
              PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_p),
202
203
              rlc_p->rb_id,
              dl_rlc_pP->t_Reordering);
gauthier's avatar
gauthier committed
204
205
206
207
208
209
210
211
212
213

        MSC_LOG_RX_DISCARDED_MESSAGE(
      	    (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
      	    (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
      	    NULL,
      	    0,
      	    MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" CONFIG-REQ t_Reord %u",
      	    MSC_AS_TIME_ARGS(ctxt_pP),
      	    PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc_p),
      	    dl_rlc_pP->t_Reordering);
214
        return;
215
      }
216
217
218
219
220
221
222
223
    }

    if (ctxt_pP->enb_flag > 0) {
      rlc_um_configure(ctxt_pP,rlc_p,
                       t_Reordering,
                       ul_sn_FieldLength,
                       dl_sn_FieldLength,
                       mbms_flagP);
gauthier's avatar
gauthier committed
224
225
226
227
228
229
230
231
232
233
234
      MSC_LOG_RX_MESSAGE(
    	    (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
    	    (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
    	    NULL,
    	    0,
    	    MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" CONFIG-REQ t_Reord %u rx snfl %u tx snfl %u",
    	    MSC_AS_TIME_ARGS(ctxt_pP),
    	    PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc_p),
    	    t_Reordering,
    	    ul_sn_FieldLength,
    	    dl_sn_FieldLength);
235
    } else {
gauthier's avatar
gauthier committed
236

237
238
239
240
241
      rlc_um_configure(ctxt_pP,rlc_p,
                       t_Reordering,
                       dl_sn_FieldLength,
                       ul_sn_FieldLength,
                       mbms_flagP);
gauthier's avatar
gauthier committed
242
243
244
245
246
247
248
249
250
251
252
      MSC_LOG_RX_MESSAGE(
    	    (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
    	    (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
    	    NULL,
    	    0,
    	    MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" CONFIG-REQ t_Reord %u rx snfl %u tx snfl %u",
    	    MSC_AS_TIME_ARGS(ctxt_pP),
    	    PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc_p),
    	    t_Reordering,
    	    dl_sn_FieldLength,
    	    ul_sn_FieldLength);
253
    }
gauthier's avatar
gauthier committed
254
  }
255
256
257
}
//-----------------------------------------------------------------------------
void
258
rlc_um_init (
259
260
261
  const protocol_ctxt_t* const ctxt_pP,
  rlc_um_entity_t * const rlc_pP
)
262
263
{

gauthier's avatar
gauthier committed
264
  AssertFatal(rlc_pP, "Bad RLC UM pointer (NULL)");
265

266
  if (rlc_pP->initialized) {
267
268
    LOG_D(RLC,PROTOCOL_RLC_UM_CTXT_FMT" [INIT] ALREADY DONE, DOING NOTHING\n",
          PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP));
269
  } else {
270
271
    LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" [INIT] STATE VARIABLES, BUFFERS, LISTS\n",
          PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP));
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
    memset (rlc_pP, 0, sizeof (rlc_um_entity_t));
    // TX SIDE
    list_init (&rlc_pP->pdus_to_mac_layer, NULL);
    pthread_mutex_init(&rlc_pP->lock_input_sdus, NULL);
    list_init (&rlc_pP->input_sdus, NULL);

    rlc_pP->protocol_state = RLC_NULL_STATE;

    //rlc_pP->vt_us = 0;

    // RX SIDE
    list_init (&rlc_pP->pdus_from_mac_layer, NULL);
    //rlc_pP->vr_ur = 0;
    //rlc_pP->vr_ux = 0;
    //rlc_pP->vr_uh = 0;
    //rlc_pP->output_sdu_size_to_write = 0;
    //rlc_pP->output_sdu_in_construction = NULL;

    rlc_pP->rx_sn_length          = 10;
    rlc_pP->rx_header_min_length_in_bytes = 2;
    rlc_pP->tx_sn_length          = 10;
    rlc_pP->tx_header_min_length_in_bytes = 2;

    pthread_mutex_init(&rlc_pP->lock_dar_buffer, NULL);

    if (rlc_pP->dar_buffer == NULL) {
      rlc_pP->dar_buffer = calloc (1, 1024 * sizeof (void *));
    }

    rlc_pP->first_pdu = 1;
    rlc_pP->initialized = TRUE;
303
  }
304
305
306
}
//-----------------------------------------------------------------------------
void
307
rlc_um_reset_state_variables (
308
309
310
  const protocol_ctxt_t* const ctxt_pP,
  rlc_um_entity_t * const rlc_pP
)
311
{
gauthier's avatar
gauthier committed
312
  rlc_pP->buffer_occupancy = 0;
gauthier's avatar
Clean    
gauthier committed
313

314
315

  // TX SIDE
gauthier's avatar
gauthier committed
316
  rlc_pP->vt_us = 0;
317
  // RX SIDE
gauthier's avatar
gauthier committed
318
319
320
  rlc_pP->vr_ur = 0;
  rlc_pP->vr_ux = 0;
  rlc_pP->vr_uh = 0;
321
322
323
}
//-----------------------------------------------------------------------------
void
324
rlc_um_cleanup (
325
  rlc_um_entity_t * const rlc_pP)
326
327
328
{
  int             index;
  // TX SIDE
gauthier's avatar
gauthier committed
329
  list_free (&rlc_pP->pdus_to_mac_layer);
gauthier's avatar
mutex !    
gauthier committed
330
  pthread_mutex_destroy(&rlc_pP->lock_input_sdus);
331
  list_free (&rlc_pP->input_sdus);
332
333

  // RX SIDE
gauthier's avatar
gauthier committed
334
  list_free (&rlc_pP->pdus_from_mac_layer);
335

gauthier's avatar
gauthier committed
336
  if ((rlc_pP->output_sdu_in_construction)) {
337
    free_mem_block (rlc_pP->output_sdu_in_construction, __func__);
338
  }
339

340
  if (rlc_pP->dar_buffer) {
341
342
    for (index = 0; index < 1024; index++) {
      if (rlc_pP->dar_buffer[index]) {
343
        free_mem_block (rlc_pP->dar_buffer[index], __func__);
344
      }
345
346
347
348
    }

    free (rlc_pP->dar_buffer);
    rlc_pP->dar_buffer = NULL;
349
  }
350

351
  pthread_mutex_destroy(&rlc_pP->lock_dar_buffer);
gauthier's avatar
gauthier committed
352
  memset(rlc_pP, 0, sizeof(rlc_um_entity_t));
353
354
355
}

//-----------------------------------------------------------------------------
356
void rlc_um_configure(
357
358
359
360
361
362
  const protocol_ctxt_t* const ctxt_pP,
  rlc_um_entity_t * const rlc_pP,
  const uint32_t         timer_reorderingP,
  const uint32_t         rx_sn_field_lengthP,
  const uint32_t         tx_sn_field_lengthP,
  const uint32_t         is_mXchP)
363
{
gauthier's avatar
gauthier committed
364
  if (rx_sn_field_lengthP == 10) {
365
366
367
368
    rlc_pP->rx_sn_length                  = 10;
    rlc_pP->rx_sn_modulo                  = RLC_UM_SN_10_BITS_MODULO;
    rlc_pP->rx_um_window_size             = RLC_UM_WINDOW_SIZE_SN_10_BITS;
    rlc_pP->rx_header_min_length_in_bytes = 2;
gauthier's avatar
gauthier committed
369
  } else if (rx_sn_field_lengthP == 5) {
370
371
372
373
    rlc_pP->rx_sn_length                  = 5;
    rlc_pP->rx_sn_modulo                  = RLC_UM_SN_5_BITS_MODULO;
    rlc_pP->rx_um_window_size             = RLC_UM_WINDOW_SIZE_SN_5_BITS;
    rlc_pP->rx_header_min_length_in_bytes = 1;
gauthier's avatar
gauthier committed
374
  } else if (rx_sn_field_lengthP != 0) {
375
376
    LOG_E(RLC, PROTOCOL_RLC_UM_CTXT_FMT" [CONFIGURE] RB %u INVALID RX SN LENGTH %d BITS NOT IMPLEMENTED YET, RLC NOT CONFIGURED\n",
          PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
377
378
379
          rlc_pP->rb_id,
          rx_sn_field_lengthP);
    return;
gauthier's avatar
gauthier committed
380
381
382
  }

  if (tx_sn_field_lengthP == 10) {
383
384
385
386
    rlc_pP->tx_sn_length                  = 10;
    rlc_pP->tx_sn_modulo                  = RLC_UM_SN_10_BITS_MODULO;
    rlc_pP->tx_um_window_size             = RLC_UM_WINDOW_SIZE_SN_10_BITS;
    rlc_pP->tx_header_min_length_in_bytes = 2;
gauthier's avatar
gauthier committed
387
  } else if (tx_sn_field_lengthP == 5) {
388
389
390
391
    rlc_pP->tx_sn_length                  = 5;
    rlc_pP->tx_sn_modulo                  = RLC_UM_SN_5_BITS_MODULO;
    rlc_pP->tx_um_window_size             = RLC_UM_WINDOW_SIZE_SN_5_BITS;
    rlc_pP->tx_header_min_length_in_bytes = 1;
gauthier's avatar
gauthier committed
392
  } else if (tx_sn_field_lengthP != 0) {
393
394
    LOG_E(RLC, PROTOCOL_RLC_UM_CTXT_FMT" [CONFIGURE] RB %u INVALID RX SN LENGTH %d BITS NOT IMPLEMENTED YET, RLC NOT CONFIGURED\n",
          PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
395
396
397
          rlc_pP->rb_id,
          tx_sn_field_lengthP);
    return;
gauthier's avatar
gauthier committed
398
399
400
  }

  if (is_mXchP > 0) {
401
402
    rlc_pP->tx_um_window_size = 0;
    rlc_pP->rx_um_window_size = 0;
gauthier's avatar
gauthier committed
403
  }
404

gauthier's avatar
gauthier committed
405
406
407
408
409
410
  rlc_pP->is_mxch = is_mXchP;

  rlc_pP->last_reassemblied_sn  = rlc_pP->rx_sn_modulo - 1;
  rlc_pP->last_reassemblied_missing_sn  = rlc_pP->rx_sn_modulo - 1;
  rlc_pP->reassembly_missing_sn_detected = 0;
  // timers
411
  rlc_um_init_timer_reordering(ctxt_pP,rlc_pP, timer_reorderingP);
gauthier's avatar
gauthier committed
412
413
414

  rlc_pP->first_pdu = 1;

415
  rlc_um_reset_state_variables (ctxt_pP,rlc_pP);
416
417
}
//-----------------------------------------------------------------------------
418
void rlc_um_set_debug_infos(
419
420
  const protocol_ctxt_t* const ctxt_pP,
  rlc_um_entity_t * const rlc_pP,
421
422
  const srb_flag_t        srb_flagP,
  const rb_id_t           rb_idP,
423
  const logical_chan_id_t chan_idP) 
424
{
425
426
  LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" [SET DEBUG INFOS] rb_id %d srb_flag %d\n",
        PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
427
428
        rb_idP,
        srb_flagP);
429
  rlc_pP->rb_id      = rb_idP;
430
  rlc_pP->channel_id = chan_idP;
431

432
  if (srb_flagP) {
433
    rlc_pP->is_data_plane = 0;
434
  } else {
435
    rlc_pP->is_data_plane = 1;
gauthier's avatar
gauthier committed
436
  }
437
}