Commit 33fa06d0 authored by Jaroslava Fiedlerova's avatar Jaroslava Fiedlerova

Merge remote-tracking branch 'origin/nr-rlc-less-logging' into integration_2024_w33

parents ba70d91b 5e547c61
...@@ -1765,9 +1765,7 @@ void nr_rlc_entity_am_recv_sdu(nr_rlc_entity_t *_entity, ...@@ -1765,9 +1765,7 @@ void nr_rlc_entity_am_recv_sdu(nr_rlc_entity_t *_entity,
/* log SDUs rejected, at most once per second */ /* log SDUs rejected, at most once per second */
if (entity->sdu_rejected != 0 if (entity->sdu_rejected != 0
&& entity->t_current > entity->t_log_buffer_full + 1000) { && entity->t_current > entity->t_log_buffer_full + 1000) {
LOG_E(RLC, "%s:%d:%s: warning: %d SDU rejected, SDU buffer full\n", LOG_E(RLC, "%d SDU rejected, SDU buffer full\n", entity->sdu_rejected);
__FILE__, __LINE__, __FUNCTION__,
entity->sdu_rejected);
entity->sdu_rejected = 0; entity->sdu_rejected = 0;
entity->t_log_buffer_full = entity->t_current; entity->t_log_buffer_full = entity->t_current;
} }
......
...@@ -136,9 +136,16 @@ void nr_rlc_entity_tm_recv_sdu(nr_rlc_entity_t *_entity, ...@@ -136,9 +136,16 @@ void nr_rlc_entity_tm_recv_sdu(nr_rlc_entity_t *_entity,
exit(1); exit(1);
} }
/* log SDUs rejected, at most once per second */
if (entity->sdu_rejected != 0
&& entity->t_current > entity->t_log_buffer_full + 1000) {
LOG_E(RLC, "%d SDU rejected, SDU buffer full\n", entity->sdu_rejected);
entity->sdu_rejected = 0;
entity->t_log_buffer_full = entity->t_current;
}
if (entity->tx_size + size > entity->tx_maxsize) { if (entity->tx_size + size > entity->tx_maxsize) {
LOG_D(RLC, "%s:%d:%s: warning: SDU rejected, SDU buffer full\n", entity->sdu_rejected++;
__FILE__, __LINE__, __FUNCTION__);
entity->common.stats.rxsdu_dd_pkts++; entity->common.stats.rxsdu_dd_pkts++;
entity->common.stats.rxsdu_dd_bytes += size; entity->common.stats.rxsdu_dd_bytes += size;
...@@ -181,6 +188,11 @@ void nr_rlc_entity_tm_discard_sdu(nr_rlc_entity_t *_entity, int sdu_id) ...@@ -181,6 +188,11 @@ void nr_rlc_entity_tm_discard_sdu(nr_rlc_entity_t *_entity, int sdu_id)
static void clear_entity(nr_rlc_entity_tm_t *entity) static void clear_entity(nr_rlc_entity_tm_t *entity)
{ {
entity->t_current = 0;
entity->t_log_buffer_full = 0;
entity->sdu_rejected = 0;
nr_rlc_free_sdu_segment_list(entity->tx_list); nr_rlc_free_sdu_segment_list(entity->tx_list);
entity->tx_list = NULL; entity->tx_list = NULL;
......
...@@ -31,6 +31,10 @@ typedef struct { ...@@ -31,6 +31,10 @@ typedef struct {
/* set to the latest know time by the user of the module. Unit: ms */ /* set to the latest know time by the user of the module. Unit: ms */
uint64_t t_current; uint64_t t_current;
/* deal with logging of buffer full */
uint64_t t_log_buffer_full;
int sdu_rejected;
/* tx management */ /* tx management */
nr_rlc_sdu_segment_t *tx_list; nr_rlc_sdu_segment_t *tx_list;
nr_rlc_sdu_segment_t *tx_end; nr_rlc_sdu_segment_t *tx_end;
......
...@@ -575,9 +575,16 @@ void nr_rlc_entity_um_recv_sdu(nr_rlc_entity_t *_entity, ...@@ -575,9 +575,16 @@ void nr_rlc_entity_um_recv_sdu(nr_rlc_entity_t *_entity,
exit(1); exit(1);
} }
/* log SDUs rejected, at most once per second */
if (entity->sdu_rejected != 0
&& entity->t_current > entity->t_log_buffer_full + 1000) {
LOG_E(RLC, "%d SDU rejected, SDU buffer full\n", entity->sdu_rejected);
entity->sdu_rejected = 0;
entity->t_log_buffer_full = entity->t_current;
}
if (entity->tx_size + size > entity->tx_maxsize) { if (entity->tx_size + size > entity->tx_maxsize) {
LOG_W(RLC, "%s:%d:%s: warning: SDU rejected, SDU buffer full\n", entity->sdu_rejected++;
__FILE__, __LINE__, __FUNCTION__);
entity->common.stats.rxsdu_dd_pkts++; entity->common.stats.rxsdu_dd_pkts++;
entity->common.stats.rxsdu_dd_bytes += size; entity->common.stats.rxsdu_dd_bytes += size;
...@@ -712,11 +719,13 @@ static void clear_entity(nr_rlc_entity_um_t *entity) ...@@ -712,11 +719,13 @@ static void clear_entity(nr_rlc_entity_um_t *entity)
entity->rx_next_reassembly = 0; entity->rx_next_reassembly = 0;
entity->rx_timer_trigger = 0; entity->rx_timer_trigger = 0;
entity->tx_next = 0; entity->tx_next = 0;
entity->t_current = 0; entity->t_current = 0;
entity->t_log_buffer_full = 0;
entity->sdu_rejected = 0;
entity->t_reassembly_start = 0; entity->t_reassembly_start = 0;
cur_rx = entity->rx_list; cur_rx = entity->rx_list;
......
...@@ -47,6 +47,10 @@ typedef struct { ...@@ -47,6 +47,10 @@ typedef struct {
/* set to the latest know time by the user of the module. Unit: ms */ /* set to the latest know time by the user of the module. Unit: ms */
uint64_t t_current; uint64_t t_current;
/* deal with logging of buffer full */
uint64_t t_log_buffer_full;
int sdu_rejected;
/* timers (stores the TTI of activation, 0 means not active) */ /* timers (stores the TTI of activation, 0 means not active) */
uint64_t t_reassembly_start; uint64_t t_reassembly_start;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment