Review at  https://gerrit.osmocom.org/7731

tbf: hex output of tbf data in log

The log text of tbf_dl.cpip and tbf_ul.cpp only displays the length
of the actual tbf data but not the content, which might be useful for debugging.

- log tbf data in gprs_rlcmac_dl_tbf::append_data()
- log tbf data in gprs_rlcmac_ul_tbf::assemble_forward_llc()

Change-Id: I6c5adda8aaead00b1ba4359c34866e6842ea161f
Related: SYS#4139
Patch-by: Octasic inc.
---
M src/tbf_dl.cpp
M src/tbf_ul.cpp
2 files changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/31/7731/1

diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index dd24963..883849e 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -96,7 +96,8 @@
                                const uint16_t pdu_delay_csec,
                                const uint8_t *data, const uint16_t len)
 {
-       LOGPTBFDL(this, LOGL_DEBUG, "appending %u bytes\n", len);
+       LOGPTBFDL(this, LOGL_DEBUG, "append, len[%u], data[%s]\n",
+                 len, osmo_hexdump(data, len));
        gprs_llc_queue::MetaInfo info;
        struct msgb *llc_msg = msgb_alloc(len, "llc_pdu_queue");
        if (!llc_msg)
diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp
index 02f4ddb..89cee2c 100644
--- a/src/tbf_ul.cpp
+++ b/src/tbf_ul.cpp
@@ -93,7 +93,8 @@
 
                if (frame->is_complete) {
                        /* send frame to SGSN */
-                       LOGPTBFUL(this, LOGL_DEBUG, "complete UL frame 
len=%d\n", m_llc.frame_length());
+                       LOGPTBFUL(this, LOGL_DEBUG, "complete UL frame len[%d], 
data[%s]\n",
+                                 m_llc.frame_length(), 
osmo_hexdump(m_llc.frame, m_llc.frame_length()));
                        snd_ul_ud();
                        bts->llc_ul_bytes(m_llc.frame_length());
                        m_llc.reset();

-- 
To view, visit https://gerrit.osmocom.org/7731
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6c5adda8aaead00b1ba4359c34866e6842ea161f
Gerrit-PatchSet: 1
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: dexter <pma...@sysmocom.de>

Reply via email to