Commit c97c9f05 authored by hardy's avatar hardy

Merge remote-tracking branch 'origin/nr-rlc-small-fixes' into integration_2021_wk49_b

parents c08c23f2 9fcde85f
...@@ -1596,9 +1596,18 @@ void nr_rlc_entity_am_recv_sdu(nr_rlc_entity_t *_entity, ...@@ -1596,9 +1596,18 @@ void nr_rlc_entity_am_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, "%s:%d:%s: warning: %d SDU rejected, SDU buffer full\n",
__FILE__, __LINE__, __FUNCTION__,
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_E(RLC, "%s:%d:%s: warning: SDU rejected, SDU buffer full\n", entity->sdu_rejected++;
__FILE__, __LINE__, __FUNCTION__);
return; return;
} }
...@@ -1742,6 +1751,9 @@ static void check_t_reassembly(nr_rlc_entity_am_t *entity) ...@@ -1742,6 +1751,9 @@ static void check_t_reassembly(nr_rlc_entity_am_t *entity)
sn = (sn + 1) % entity->sn_modulus; sn = (sn + 1) % entity->sn_modulus;
entity->rx_highest_status = sn; entity->rx_highest_status = sn;
/* trigger status report */
entity->status_triggered = 1;
if (sn_compare_rx(entity, entity->rx_next_highest, if (sn_compare_rx(entity, entity->rx_next_highest,
(entity->rx_highest_status+1) % entity->sn_modulus) > 0 || (entity->rx_highest_status+1) % entity->sn_modulus) > 0 ||
(entity->rx_next_highest == (entity->rx_next_highest ==
...@@ -1827,6 +1839,9 @@ static void clear_entity(nr_rlc_entity_am_t *entity) ...@@ -1827,6 +1839,9 @@ static void clear_entity(nr_rlc_entity_am_t *entity)
entity->t_current = 0; entity->t_current = 0;
entity->t_log_buffer_full = 0;
entity->sdu_rejected = 0;
entity->t_poll_retransmit_start = 0; entity->t_poll_retransmit_start = 0;
entity->t_reassembly_start = 0; entity->t_reassembly_start = 0;
entity->t_status_prohibit_start = 0; entity->t_status_prohibit_start = 0;
......
...@@ -60,6 +60,10 @@ typedef struct { ...@@ -60,6 +60,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_poll_retransmit_start; uint64_t t_poll_retransmit_start;
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