nr rlc tm: reduce "SDU rejected" logging
once per second is enough
This commit is contained in:
@@ -136,9 +136,16 @@ void nr_rlc_entity_tm_recv_sdu(nr_rlc_entity_t *_entity,
|
||||
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) {
|
||||
LOG_D(RLC, "%s:%d:%s: warning: SDU rejected, SDU buffer full\n",
|
||||
__FILE__, __LINE__, __FUNCTION__);
|
||||
entity->sdu_rejected++;
|
||||
|
||||
entity->common.stats.rxsdu_dd_pkts++;
|
||||
entity->common.stats.rxsdu_dd_bytes += size;
|
||||
@@ -181,6 +188,9 @@ 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)
|
||||
{
|
||||
entity->t_log_buffer_full = 0;
|
||||
entity->sdu_rejected = 0;
|
||||
|
||||
nr_rlc_free_sdu_segment_list(entity->tx_list);
|
||||
|
||||
entity->tx_list = NULL;
|
||||
|
||||
@@ -31,6 +31,10 @@ typedef struct {
|
||||
/* set to the latest know time by the user of the module. Unit: ms */
|
||||
uint64_t t_current;
|
||||
|
||||
/* deal with logging of buffer full */
|
||||
uint64_t t_log_buffer_full;
|
||||
int sdu_rejected;
|
||||
|
||||
/* tx management */
|
||||
nr_rlc_sdu_segment_t *tx_list;
|
||||
nr_rlc_sdu_segment_t *tx_end;
|
||||
|
||||
Reference in New Issue
Block a user