fixeria has submitted this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/34908?usp=email )

Change subject: layer23: rework L1CTL TRAFFIC.{ind,req} related logging
......................................................................

layer23: rework L1CTL TRAFFIC.{ind,req} related logging

Make these Rx/Tx messages more informative.

Change-Id: I9c73db3c3650547030b8c354016e65195daebb62
Related: OS#4396
---
M src/host/layer23/src/common/l1ctl.c
1 file changed, 16 insertions(+), 12 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved




diff --git a/src/host/layer23/src/common/l1ctl.c 
b/src/host/layer23/src/common/l1ctl.c
index c4589f0..349f048 100644
--- a/src/host/layer23/src/common/l1ctl.c
+++ b/src/host/layer23/src/common/l1ctl.c
@@ -844,7 +844,6 @@
 {
        struct l1ctl_info_dl *dl;
        struct l1ctl_traffic_ind *ti;
-       size_t frame_len;
        uint8_t *frame;

        if (msgb_l1len(msg) < sizeof(*dl)) {
@@ -861,11 +860,8 @@
        msg->l2h = dl->payload;
        msg->l3h = frame;

-       /* Calculate the frame length */
-       frame_len = msgb_l3len(msg);
-
-       DEBUGP(DL1C, "TRAFFIC IND len=%zu (%s)\n", frame_len,
-               osmo_hexdump(frame, frame_len));
+       LOGP(DL1C, LOGL_DEBUG, "Rx TRAFFIC.ind (fn=%u, chan_nr=0x%02x, len=%u): 
%s\n",
+            ntohl(dl->frame_nr), dl->chan_nr, msgb_l3len(msg), 
msgb_hexdump_l3(msg));

        /* distribute or drop */
        if (ms->l1_entity.l1_traffic_ind)
@@ -882,7 +878,6 @@
        struct l1ctl_hdr *l1h;
        struct l1ctl_info_ul *l1i_ul;
        struct l1ctl_traffic_req *tr;
-       size_t frame_len;
        uint8_t *frame;

        /* Header handling */
@@ -890,11 +885,8 @@
        frame = (uint8_t *) tr->data;
        msg->l3h = frame;

-       /* Calculate the frame length */
-       frame_len = msgb_l3len(msg);
-
-       DEBUGP(DL1C, "TRAFFIC REQ len=%zu (%s)\n", frame_len,
-               osmo_hexdump(frame, frame_len));
+       LOGP(DL1C, LOGL_DEBUG, "Tx TRAFFIC.req (chan_nr=0x%02x, len=%u): %s\n",
+            chan_nr, msgb_l3len(msg), msgb_hexdump_l3(msg));

        /* prepend uplink info header */
        l1i_ul = (struct l1ctl_info_ul *) msgb_push(msg, sizeof(*l1i_ul));

--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34908?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I9c73db3c3650547030b8c354016e65195daebb62
Gerrit-Change-Number: 34908
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-MessageType: merged

Reply via email to