nr rlc: add enum for rlc mode (am, um, or tm)

This commit is contained in:
Cedric Roux
2022-09-06 15:58:47 +02:00
parent 4e4a0b7ba3
commit 3b42e46cf0
2 changed files with 10 additions and 4 deletions
+3 -3
View File
@@ -110,7 +110,7 @@ nr_rlc_entity_t *new_nr_rlc_entity_am(
ret->common.max_retx_reached = max_retx_reached;
ret->common.max_retx_reached_data = max_retx_reached_data;
ret->common.stats.mode = 0; /* 0 for AM */
ret->common.stats.mode = NR_RLC_AM;
/* let's take average over the last 100 milliseconds
* initial_size of 1024 is arbitrary
@@ -165,7 +165,7 @@ nr_rlc_entity_t *new_nr_rlc_entity_um(
ret->common.deliver_sdu = deliver_sdu;
ret->common.deliver_sdu_data = deliver_sdu_data;
ret->common.stats.mode = 1; /* 1 for UM */
ret->common.stats.mode = NR_RLC_UM;
/* let's take average over the last 100 milliseconds
* initial_size of 1024 is arbitrary
@@ -205,7 +205,7 @@ nr_rlc_entity_t *new_nr_rlc_entity_tm(
ret->common.deliver_sdu = deliver_sdu;
ret->common.deliver_sdu_data = deliver_sdu_data;
ret->common.stats.mode = 2; /* 2 for TM */
ret->common.stats.mode = NR_RLC_TM;
/* let's take average over the last 100 milliseconds
* initial_size of 1024 is arbitrary
+7 -1
View File
@@ -28,8 +28,14 @@
#define NR_SDU_MAX 16000 /* max NR PDCP SDU size is 9000, let's take more */
typedef enum {
NR_RLC_AM,
NR_RLC_UM,
NR_RLC_TM,
} nr_rlc_mode_t;
typedef struct {
uint32_t mode; /* 0: RLC AM, 1: RLC UM, 2: RLC TM */
nr_rlc_mode_t mode; /* AM, UM, or TM */
/* PDU stats */
/* TX */