summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2017-08-19 12:38:24 +0600
committerVadim Yanitskiy <axilirator@gmail.com>2017-10-23 22:05:49 +0330
commitd7afb9f8d71b89474b2c37095c4b938efbbcf3fc (patch)
treed465e7379ac2ea84125caf754b0b2d175e6c853c
parentdedf3e42d3dd6e239a0586778996816f9f0b0fd9 (diff)
host/trxcon/scheduler: separate logging of data messages
-rw-r--r--src/host/trxcon/logging.c8
-rw-r--r--src/host/trxcon/logging.h3
-rw-r--r--src/host/trxcon/sched_lchan_rach.c6
-rw-r--r--src/host/trxcon/sched_lchan_sch.c6
-rw-r--r--src/host/trxcon/sched_lchan_xcch.c12
-rw-r--r--src/host/trxcon/sched_trx.c2
6 files changed, 22 insertions, 15 deletions
diff --git a/src/host/trxcon/logging.c b/src/host/trxcon/logging.c
index 119456b6..a76b4d97 100644
--- a/src/host/trxcon/logging.c
+++ b/src/host/trxcon/logging.c
@@ -60,7 +60,13 @@ static struct log_info_cat trx_log_info_cat[] = {
},
[DSCH] = {
.name = "DSCH",
- .description = "Scheduler",
+ .description = "Scheduler management",
+ .color = "\033[1;36m",
+ .enabled = 1, .loglevel = LOGL_NOTICE,
+ },
+ [DSCHD] = {
+ .name = "DSCHD",
+ .description = "Scheduler data",
.color = "\033[1;36m",
.enabled = 1, .loglevel = LOGL_NOTICE,
},
diff --git a/src/host/trxcon/logging.h b/src/host/trxcon/logging.h
index 6221c55e..0206362a 100644
--- a/src/host/trxcon/logging.h
+++ b/src/host/trxcon/logging.h
@@ -2,7 +2,7 @@
#include <osmocom/core/logging.h>
-#define DEBUG_DEFAULT "DAPP:DL1C:DL1D:DTRX:DTRXD:DSCH"
+#define DEBUG_DEFAULT "DAPP:DL1C:DL1D:DTRX:DTRXD:DSCH:DSCHD"
enum {
DAPP,
@@ -11,6 +11,7 @@ enum {
DTRX,
DTRXD,
DSCH,
+ DSCHD,
};
int trx_log_init(const char *category_mask);
diff --git a/src/host/trxcon/sched_lchan_rach.c b/src/host/trxcon/sched_lchan_rach.c
index 613f644d..82017836 100644
--- a/src/host/trxcon/sched_lchan_rach.c
+++ b/src/host/trxcon/sched_lchan_rach.c
@@ -73,7 +73,7 @@ int tx_rach_fn(struct trx_instance *trx, struct trx_ts *ts,
/* Encode payload */
rc = gsm0503_rach_encode(payload, &req->ra, trx->bsic);
if (rc) {
- LOGP(DSCH, LOGL_ERROR, "Could not encode RACH burst\n");
+ LOGP(DSCHD, LOGL_ERROR, "Could not encode RACH burst\n");
return rc;
}
@@ -83,12 +83,12 @@ int tx_rach_fn(struct trx_instance *trx, struct trx_ts *ts,
memcpy(burst + 49, payload, 36); /* payload */
memset(burst + 85, 0, 63); /* TB + GP */
- LOGP(DSCH, LOGL_DEBUG, "Transmitting RACH fn=%u\n", fn);
+ LOGP(DSCHD, LOGL_DEBUG, "Transmitting RACH fn=%u\n", fn);
/* Send burst to transceiver */
rc = trx_if_tx_burst(trx, ts->index, fn, trx->tx_power, burst);
if (rc) {
- LOGP(DSCH, LOGL_ERROR, "Could not send burst to transceiver\n");
+ LOGP(DSCHD, LOGL_ERROR, "Could not send burst to transceiver\n");
return rc;
}
diff --git a/src/host/trxcon/sched_lchan_sch.c b/src/host/trxcon/sched_lchan_sch.c
index db73b926..6b4543f5 100644
--- a/src/host/trxcon/sched_lchan_sch.c
+++ b/src/host/trxcon/sched_lchan_sch.c
@@ -87,19 +87,19 @@ int rx_sch_fn(struct trx_instance *trx, struct trx_ts *ts,
/* Attempt to decode */
rc = gsm0503_sch_decode(sb_info, payload);
if (rc) {
- LOGP(DSCH, LOGL_DEBUG, "Received bad SCH burst at fn=%u\n", fn);
+ LOGP(DSCHD, LOGL_DEBUG, "Received bad SCH burst at fn=%u\n", fn);
return rc;
}
/* Decode BSIC and TDMA frame number */
decode_sb(&time, &bsic, sb_info);
- LOGP(DSCH, LOGL_DEBUG, "Received SCH: bsic=%u, fn=%u, sched_fn=%u\n",
+ LOGP(DSCHD, LOGL_DEBUG, "Received SCH: bsic=%u, fn=%u, sched_fn=%u\n",
bsic, time.fn, trx->sched.fn_counter_proc);
/* Check if decoded frame number matches */
if (time.fn != fn) {
- LOGP(DSCH, LOGL_ERROR, "Decoded fn=%u does not match "
+ LOGP(DSCHD, LOGL_ERROR, "Decoded fn=%u does not match "
"fn=%u provided by scheduler\n", time.fn, fn);
return -EINVAL;
}
diff --git a/src/host/trxcon/sched_lchan_xcch.c b/src/host/trxcon/sched_lchan_xcch.c
index 958d80d7..f57c8fce 100644
--- a/src/host/trxcon/sched_lchan_xcch.c
+++ b/src/host/trxcon/sched_lchan_xcch.c
@@ -65,7 +65,7 @@ int rx_data_fn(struct trx_instance *trx, struct trx_ts *ts,
toa_sum = &lchan->toa_sum;
toa_num = &lchan->toa_num;
- LOGP(DSCH, LOGL_DEBUG, "Data received on %s: fn=%u ts=%u bid=%u\n",
+ LOGP(DSCHD, LOGL_DEBUG, "Data received on %s: fn=%u ts=%u bid=%u\n",
lchan_desc->name, fn, ts->index, bid);
/* Clear buffer & store frame number of first burst */
@@ -99,7 +99,7 @@ int rx_data_fn(struct trx_instance *trx, struct trx_ts *ts,
/* Check for complete set of bursts */
if ((*mask & 0xf) != 0xf) {
- LOGP(DSCH, LOGL_DEBUG, "Received incomplete data frame at "
+ LOGP(DSCHD, LOGL_DEBUG, "Received incomplete data frame at "
"fn=%u (%u/%u) for %s\n", *first_fn,
(*first_fn) % ts->mf_layout->period,
ts->mf_layout->period,
@@ -111,7 +111,7 @@ int rx_data_fn(struct trx_instance *trx, struct trx_ts *ts,
/* Attempt to decode */
rc = gsm0503_xcch_decode(l2, buffer, &n_errors, &n_bits_total);
if (rc) {
- LOGP(DSCH, LOGL_DEBUG, "Received bad data frame at fn=%u "
+ LOGP(DSCHD, LOGL_DEBUG, "Received bad data frame at fn=%u "
"(%u/%u) for %s\n", *first_fn,
(*first_fn) % ts->mf_layout->period,
ts->mf_layout->period,
@@ -159,7 +159,7 @@ int tx_data_fn(struct trx_instance *trx, struct trx_ts *ts,
/* Encode bursts */
rc = gsm0503_xcch_encode(buffer, l2);
if (rc) {
- LOGP(DSCH, LOGL_ERROR, "Failed to encode L2 payload\n");
+ LOGP(DSCHD, LOGL_ERROR, "Failed to encode L2 payload\n");
/* Remove primitive from queue and free memory */
llist_del(&prim->list);
@@ -185,13 +185,13 @@ send_burst:
memcpy(burst + 87, offset + 58, 58); /* Payload 2/2 */
memset(burst + 145, 0, 3); /* TB */
- LOGP(DSCH, LOGL_DEBUG, "Transmitting %s fn=%u ts=%u burst=%u\n",
+ LOGP(DSCHD, LOGL_DEBUG, "Transmitting %s fn=%u ts=%u burst=%u\n",
lchan_desc->name, fn, ts->index, bid);
/* Send burst to transceiver */
rc = trx_if_tx_burst(trx, ts->index, fn, trx->tx_power, burst);
if (rc) {
- LOGP(DSCH, LOGL_ERROR, "Could not send burst to transceiver\n");
+ LOGP(DSCHD, LOGL_ERROR, "Could not send burst to transceiver\n");
/* Remove primitive from queue and free memory */
prim = llist_entry(ts->tx_prims.next, struct trx_ts_prim, list);
diff --git a/src/host/trxcon/sched_trx.c b/src/host/trxcon/sched_trx.c
index c7520b91..b7ebfeb2 100644
--- a/src/host/trxcon/sched_trx.c
+++ b/src/host/trxcon/sched_trx.c
@@ -533,7 +533,7 @@ int sched_trx_handle_rx_burst(struct trx_instance *trx, uint8_t tn,
/* Check whether required timeslot is allocated and configured */
ts = trx->ts_list[tn];
if (ts == NULL || ts->mf_layout == NULL) {
- LOGP(DSCH, LOGL_DEBUG, "TDMA timeslot #%u isn't configured, "
+ LOGP(DSCHD, LOGL_DEBUG, "TDMA timeslot #%u isn't configured, "
"ignoring burst...\n", tn);
return -EINVAL;
}