From 6654453e2289c967916d180d89c5692d0b2b11d6 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Wed, 1 Jul 2020 17:14:22 +0200 Subject: [PATCH] pdcp: reduce amount of log messages during tx drop logging encrypted PDU seperately. Instead, only log formatted PDCP PDU before passing to lower layers --- lib/src/upper/pdcp_entity_lte.cc | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/src/upper/pdcp_entity_lte.cc b/lib/src/upper/pdcp_entity_lte.cc index 5fba49ebc..bfadd5c3b 100644 --- a/lib/src/upper/pdcp_entity_lte.cc +++ b/lib/src/upper/pdcp_entity_lte.cc @@ -116,14 +116,6 @@ void pdcp_entity_lte::write_sdu(unique_byte_buffer_t sdu, bool blocking) enable_security_tx_sn = -1; } - log->info_hex(sdu->msg, - sdu->N_bytes, - "TX %s SDU, SN=%d, integrity=%s, encryption=%s", - rrc->get_rb_name(lcid).c_str(), - tx_count, - srslte_direction_text[integrity_direction], - srslte_direction_text[encryption_direction]); - write_data_header(sdu, tx_count); // Append MAC (SRBs only) @@ -140,9 +132,16 @@ void pdcp_entity_lte::write_sdu(unique_byte_buffer_t sdu, bool blocking) if (encryption_direction == DIRECTION_TX || encryption_direction == DIRECTION_TXRX) { cipher_encrypt( &sdu->msg[cfg.hdr_len_bytes], sdu->N_bytes - cfg.hdr_len_bytes, tx_count, &sdu->msg[cfg.hdr_len_bytes]); - log->info_hex(sdu->msg, sdu->N_bytes, "TX %s SDU (encrypted)", rrc->get_rb_name(lcid).c_str()); } + log->info_hex(sdu->msg, + sdu->N_bytes, + "TX %s PDU, SN=%d, integrity=%s, encryption=%s", + rrc->get_rb_name(lcid).c_str(), + tx_count, + srslte_direction_text[integrity_direction], + srslte_direction_text[encryption_direction]); + // Incremente NEXT_PDCP_TX_SN and TX_HFN st.next_pdcp_tx_sn++; if (st.next_pdcp_tx_sn > maximum_pdcp_sn) {