lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

March 2023

  • 1 participants
  • 3642 discussions
[M] Change in osmo-bts[master]: TCH-IND interface: move link quality check into model code
by falconia 28 Mar '23

28 Mar '23
Attention is currently required from: laforge. falconia has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/32097 ) Change subject: TCH-IND interface: move link quality check into model code ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: > I am not really following the reason why this change is needed to implement the continuous-rtp-streaming, sorry. Fair enough - I shall produce an implementation of rtp continuous-streaming without the present change (without moving the link quality check from where it is) on my next iteration, and then you can see which version is better. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32097 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Id95e48a578b7a8ce576862655abbe553c5b9a7bf Gerrit-Change-Number: 32097 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Tue, 28 Mar 2023 15:56:54 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Gerrit-MessageType: comment
1 0
0 0
[S] Change in gapk[master]: fmt_rtp_amr,fmt_rtp_efr: replace damaged packets with silence
by laforge 28 Mar '23

28 Mar '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/gapk/+/32094 ) Change subject: fmt_rtp_amr,fmt_rtp_efr: replace damaged packets with silence ...................................................................... fmt_rtp_amr,fmt_rtp_efr: replace damaged packets with silence Change-Id: I7245aa0bc0955cc8b94d5401a15e694f50498093 --- M src/fmt_rtp_amr.c M src/fmt_rtp_efr.c 2 files changed, 32 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/fmt_rtp_amr.c b/src/fmt_rtp_amr.c index a6a3c9f..4982c83 100644 --- a/src/fmt_rtp_amr.c +++ b/src/fmt_rtp_amr.c @@ -27,6 +27,9 @@ #include <osmocom/gapk/formats.h> #include <osmocom/gapk/utils.h> +/* AMR SID frame is according to TS 126 101 4.2.3 */ +static const uint8_t SILENCE[] = {0x80, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00}; + /* conversion function: RTP payload -> canonical format */ static int rtp_amr_from_canon(uint8_t *dst, const uint8_t *src, unsigned int src_len) @@ -42,6 +45,12 @@ static int rtp_amr_to_canon(uint8_t *dst, const uint8_t *src, unsigned int src_len) { + /* Detect severely damaged frames according to RFC4867 4.3.2 */ + if ((src[1] & 0x04) == 0) { + src = SILENCE; + src_len = sizeof(SILENCE); + } + /* skip Payload Header according to RFC4867 4.4.1 */ memcpy(dst, src+1, src_len-1); diff --git a/src/fmt_rtp_efr.c b/src/fmt_rtp_efr.c index 7afb1a3..214010e 100644 --- a/src/fmt_rtp_efr.c +++ b/src/fmt_rtp_efr.c @@ -30,6 +30,17 @@ #define EFR_LEN 31 #define EFR_MAGIC 0xc +/* EFR encoding starts with 0xc, if all other bits are 0 the packet is probably damaged */ +static const uint8_t DAMAGED_PACKET[EFR_LEN] = { + 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; +/* EFR SID frame is according to TS 101 318 5.3.2 */ +static const uint8_t SILENCE[EFR_LEN] = { + 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + /* conversion function: RTP payload -> canonical format */ static int rtp_efr_from_canon(uint8_t *dst, const uint8_t *src, unsigned int src_len) @@ -58,6 +69,9 @@ return EFR_CANON_LEN; } + if (!memcmp(DAMAGED_PACKET, src, EFR_LEN)) + src = SILENCE; + for (i=0; i<(EFR_LEN-1); i++) dst[i] = (src[i] << 4) | (src[i+1] >> 4); dst[EFR_LEN-1] = src[EFR_LEN-1] << 4; -- To view, visit https://gerrit.osmocom.org/c/gapk/+/32094 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: gapk Gerrit-Branch: master Gerrit-Change-Id: I7245aa0bc0955cc8b94d5401a15e694f50498093 Gerrit-Change-Number: 32094 Gerrit-PatchSet: 3 Gerrit-Owner: matanp <matan1008(a)gmail.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in gapk[master]: fmt_rtp_amr,fmt_rtp_efr: replace damaged packets with silence
by laforge 28 Mar '23

28 Mar '23
Attention is currently required from: matanp. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/gapk/+/32094 ) Change subject: fmt_rtp_amr,fmt_rtp_efr: replace damaged packets with silence ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/gapk/+/32094 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: gapk Gerrit-Branch: master Gerrit-Change-Id: I7245aa0bc0955cc8b94d5401a15e694f50498093 Gerrit-Change-Number: 32094 Gerrit-PatchSet: 3 Gerrit-Owner: matanp <matan1008(a)gmail.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: matanp <matan1008(a)gmail.com> Gerrit-Comment-Date: Tue, 28 Mar 2023 15:52:45 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-bts[master]: trx: detect UL SID in EFR just like in FR
by falconia 28 Mar '23

28 Mar '23
Attention is currently required from: laforge, pespin. falconia has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/32095 ) Change subject: trx: detect UL SID in EFR just like in FR ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: > ACK, was exactly my thought, too. […] ACK, will do as instructed on the next iteration. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32095 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ib043e00dbf92145c2a6c32f6365517244472a922 Gerrit-Change-Number: 32095 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 28 Mar 2023 15:38:59 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in gapk[master]: fmt_rtp_amr,fmt_rtp_efr: replace damaged packets with silence
by pespin 28 Mar '23

28 Mar '23
Attention is currently required from: matanp. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/gapk/+/32094 ) Change subject: fmt_rtp_amr,fmt_rtp_efr: replace damaged packets with silence ...................................................................... Patch Set 3: Code-Review+1 (1 comment) File src/fmt_rtp_efr.c: https://gerrit.osmocom.org/c/gapk/+/32094/comment/ad5b6b3e_5d09ebe5 PS2, Line 70: if (!memcmp(DAMAGED_PACKET, src, EFR_LEN)) > Yes, the if statement in line 65 checks it Ack -- To view, visit https://gerrit.osmocom.org/c/gapk/+/32094 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: gapk Gerrit-Branch: master Gerrit-Change-Id: I7245aa0bc0955cc8b94d5401a15e694f50498093 Gerrit-Change-Number: 32094 Gerrit-PatchSet: 3 Gerrit-Owner: matanp <matan1008(a)gmail.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: matanp <matan1008(a)gmail.com> Gerrit-Comment-Date: Tue, 28 Mar 2023 15:30:55 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Comment-In-Reply-To: matanp <matan1008(a)gmail.com> Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-bts[master]: common/vty: Print AMR MultiRate Configuration in "show lchan"
by laforge 28 Mar '23

28 Mar '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/32091 ) Change subject: common/vty: Print AMR MultiRate Configuration in "show lchan" ...................................................................... common/vty: Print AMR MultiRate Configuration in "show lchan" It can be useful to introspect the current active AMR mode set. Related: OS#5944 Change-Id: I630af8c3835c2fcbea325c07db269d25e4e18f62 --- M src/common/vty.c M src/osmo-bts-virtual/Makefile.am 2 files changed, 28 insertions(+), 0 deletions(-) Approvals: pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/src/common/vty.c b/src/common/vty.c index bd18221..93fc0d6 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -43,6 +43,7 @@ #include <osmocom/core/sockaddr_str.h> #include <osmocom/trau/osmo_ortp.h> #include <osmocom/core/fsm.h> +#include <osmocom/codec/codec.h> #include <osmo-bts/logging.h> #include <osmo-bts/gsm_data.h> @@ -1941,6 +1942,19 @@ vty_out(vty, " Channel Mode / Codec: %s%s", gsm48_chan_mode_name(lchan->tch_mode), VTY_NEWLINE); + if (lchan->tch_mode == GSM48_CMODE_SPEECH_AMR) { + const struct amr_multirate_conf *amr_mrc = &lchan->tch.amr_mr; + const struct gsm48_multi_rate_conf *mr_conf = + (const struct gsm48_multi_rate_conf *) amr_mrc->gsm48_ie; + vty_out(vty, " AMR Multi-Rate Configuration: ICMI=%u, Start Mode=%u gsm48=%02x%02x%s", + mr_conf->icmi, mr_conf->smod, amr_mrc->gsm48_ie[0], amr_mrc->gsm48_ie[1], VTY_NEWLINE); + for (uint8_t i = 0; i < amr_mrc->num_modes; i++) { + const struct amr_mode *amode = &amr_mrc->mode[i]; + vty_out(vty, " AMR Mode %u (%s), threshold=%u, hysteresis=%u%s", + amode->mode, osmo_amr_type_name(amode->mode), + amode->threshold, amode->hysteresis, VTY_NEWLINE); + } + } if (lchan->abis_ip.bound_ip) { ia.s_addr = htonl(lchan->abis_ip.bound_ip); diff --git a/src/osmo-bts-virtual/Makefile.am b/src/osmo-bts-virtual/Makefile.am index 2ae53b4..bbb79ec 100644 --- a/src/osmo-bts-virtual/Makefile.am +++ b/src/osmo-bts-virtual/Makefile.am @@ -7,6 +7,7 @@ $(LIBOSMOABIS_CFLAGS) \ $(LIBOSMOTRAU_CFLAGS) \ $(LIBOSMONETIF_CFLAGS) \ + $(LIBOSMOCODEC_CFLAGS) \ $(LIBGPS_CFLAGS) \ $(NULL) @@ -20,6 +21,7 @@ $(LIBOSMOABIS_LIBS) \ $(LIBOSMOTRAU_LIBS) \ $(LIBOSMONETIF_LIBS) \ + $(LIBOSMOCODEC_LIBS) \ -ldl \ $(NULL) -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32091 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I630af8c3835c2fcbea325c07db269d25e4e18f62 Gerrit-Change-Number: 32091 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-bts[master]: common/vty: Print AMR MultiRate Configuration in "show lchan"
by laforge 28 Mar '23

28 Mar '23
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/32091 ) Change subject: common/vty: Print AMR MultiRate Configuration in "show lchan" ...................................................................... Patch Set 2: (1 comment) Patchset: PS2: Does what it's supposed to do: ``` BTS 0, TRX 0, Timeslot 6 (primary), Lchan 1: Type TCH_H Osmocom Dyn TS: as TCH/H State: ACTIVE Channel Mode / Codec: SPEECH_AMR AMR Multi-Rate Configuration: ICMI=0, Start Mode=0 gsm48=2004 AMR Mode 2 (AMR 5,90 kbit/s), threshold=0, hysteresis=0 ``` -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32091 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I630af8c3835c2fcbea325c07db269d25e4e18f62 Gerrit-Change-Number: 32091 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 28 Mar 2023 15:25:03 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-bts[master]: bts-{sysmo,oc2g,lc15}: Fix RTP of AMR SID_FIRST_P1
by laforge 28 Mar '23

28 Mar '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/32088 ) Change subject: bts-{sysmo,oc2g,lc15}: Fix RTP of AMR SID_FIRST_P1 ...................................................................... bts-{sysmo,oc2g,lc15}: Fix RTP of AMR SID_FIRST_P1 When we receive a SID_FIRST_P1 frame from the PHY (during AMR/HR DTXu), we must generate a SID frame on the RTP side. The existing code * ignored that the Amr_SidFirstP1 PHYIF message actually contains the RTP payload * manually generated the same content using osmo_amr_rtp_enc() * forgot to prefix that with the AMR CMR+TOC * in the end, sent a completely broken (too short) AMR SID frame over RTP Let's fix this by simply using the 7-byte RTP payload with CMR+TOC that the PHY is providing to us. Change-Id: I90479efcc002d497648a71e73847af54e6208358 Related: OS#5944 --- M src/osmo-bts-lc15/tch.c M src/osmo-bts-oc2g/tch.c M src/osmo-bts-sysmo/tch.c 3 files changed, 29 insertions(+), 24 deletions(-) Approvals: fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified laforge: Looks good to me, approved; Verified diff --git a/src/osmo-bts-lc15/tch.c b/src/osmo-bts-lc15/tch.c index bd84bee..f9a4e21 100644 --- a/src/osmo-bts-lc15/tch.c +++ b/src/osmo-bts-lc15/tch.c @@ -360,7 +360,7 @@ { GsmL1_Prim_t *l1p = msgb_l1prim(l1p_msg); GsmL1_PhDataInd_t *data_ind = &l1p->u.phDataInd; - uint8_t *payload, payload_type, payload_len, sid_first[9] = { 0 }; + uint8_t *payload, payload_type, payload_len; struct msgb *rmsg = NULL; struct gsm_lchan *lchan = &trx->ts[L1SAP_CHAN2TS(chan_nr)].lchan[l1sap_chan2ss(chan_nr)]; @@ -450,14 +450,8 @@ rmsg = l1_to_rtppayload_efr(payload, payload_len, lchan); break; case GsmL1_TchPlType_Amr: - rmsg = l1_to_rtppayload_amr(payload, payload_len, lchan); - break; case GsmL1_TchPlType_Amr_SidFirstP1: - memcpy(sid_first, payload, payload_len); - int len = osmo_amr_rtp_enc(sid_first, 0, AMR_SID, AMR_GOOD); - if (len < 0) - return 0; - rmsg = l1_to_rtppayload_amr(sid_first, len, lchan); + rmsg = l1_to_rtppayload_amr(payload, payload_len, lchan); break; } diff --git a/src/osmo-bts-oc2g/tch.c b/src/osmo-bts-oc2g/tch.c index d469740..bd97959 100644 --- a/src/osmo-bts-oc2g/tch.c +++ b/src/osmo-bts-oc2g/tch.c @@ -360,7 +360,7 @@ { GsmL1_Prim_t *l1p = msgb_l1prim(l1p_msg); GsmL1_PhDataInd_t *data_ind = &l1p->u.phDataInd; - uint8_t *payload, payload_type, payload_len, sid_first[9] = { 0 }; + uint8_t *payload, payload_type, payload_len; struct msgb *rmsg = NULL; struct gsm_lchan *lchan = &trx->ts[L1SAP_CHAN2TS(chan_nr)].lchan[l1sap_chan2ss(chan_nr)]; @@ -460,14 +460,8 @@ rmsg = l1_to_rtppayload_efr(payload, payload_len, lchan); break; case GsmL1_TchPlType_Amr: - rmsg = l1_to_rtppayload_amr(payload, payload_len, lchan); - break; case GsmL1_TchPlType_Amr_SidFirstP1: - memcpy(sid_first, payload, payload_len); - int len = osmo_amr_rtp_enc(sid_first, 0, AMR_SID, AMR_GOOD); - if (len < 0) - return 0; - rmsg = l1_to_rtppayload_amr(sid_first, len, lchan); + rmsg = l1_to_rtppayload_amr(payload, payload_len, lchan); break; } diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index b308a5f..e901d47 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -505,7 +505,7 @@ { GsmL1_Prim_t *l1p = msgb_l1prim(l1p_msg); GsmL1_PhDataInd_t *data_ind = &l1p->u.phDataInd; - uint8_t *payload, payload_type, payload_len, sid_first[9] = { 0 }; + uint8_t *payload, payload_type, payload_len; struct msgb *rmsg = NULL; struct gsm_lchan *lchan = &trx->ts[L1SAP_CHAN2TS(chan_nr)].lchan[l1sap_chan2ss(chan_nr)]; @@ -602,14 +602,8 @@ break; #endif case GsmL1_TchPlType_Amr: - rmsg = l1_to_rtppayload_amr(payload, payload_len, lchan); - break; case GsmL1_TchPlType_Amr_SidFirstP1: - memcpy(sid_first, payload, payload_len); - int len = osmo_amr_rtp_enc(sid_first, 0, AMR_SID, AMR_GOOD); - if (len < 0) - return 0; - rmsg = l1_to_rtppayload_amr(sid_first, len, lchan); + rmsg = l1_to_rtppayload_amr(payload, payload_len, lchan); break; /* FIXME: what about GsmL1_TchPlType_Amr_SidBad? not well documented. */ } -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32088 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I90479efcc002d497648a71e73847af54e6208358 Gerrit-Change-Number: 32088 Gerrit-PatchSet: 4 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-bts[master]: Introduce LOGPLCFN() for logging lchan-name + frame number
by laforge 28 Mar '23

28 Mar '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/32087 ) Change subject: Introduce LOGPLCFN() for logging lchan-name + frame number ...................................................................... Introduce LOGPLCFN() for logging lchan-name + frame number So far, we've had LOGPLCHAN() and LOGPFN(). This resulted in a number of log lines containing frame numbers *not* containing the lchan context, which makes it difficult to deterine which of potentially many concurrently active lchans is logging. Let's introduce LOGPLCFN() for a FN-extended version of LOGPLCHAN(), and convert all callers that have the related context. Change-Id: I214af0448652a9f321ccbab77977b67663ba28f9 --- M include/osmo-bts/logging.h M src/common/measurement.c M src/osmo-bts-lc15/l1_if.c M src/osmo-bts-lc15/tch.c M src/osmo-bts-oc2g/l1_if.c M src/osmo-bts-oc2g/tch.c M src/osmo-bts-octphy/l1_if.c M src/osmo-bts-octphy/l1_tch.c M src/osmo-bts-sysmo/l1_if.c M src/osmo-bts-sysmo/tch.c 10 files changed, 110 insertions(+), 97 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/include/osmo-bts/logging.h b/include/osmo-bts/logging.h index 1e69d9f..70f07dd 100644 --- a/include/osmo-bts/logging.h +++ b/include/osmo-bts/logging.h @@ -37,4 +37,8 @@ #define DEBUGPFN(ss, fn, fmt, args...) \ LOGP(ss, LOGL_DEBUG, "%s " fmt, gsm_fn_as_gsmtime_str(fn), ## args) +/* LOGP with lchan + frame number prefix */ +#define LOGPLCFN(lchan, ss, lvl, fn, fmt, args...) \ + LOGP(ss, lvl, "%s %s " fmt, gsm_lchan_name(lchan), gsm_fn_as_gsmtime_str(fn), ## args) + #endif /* _LOGGING_H */ diff --git a/src/common/measurement.c b/src/common/measurement.c index ff6f640..388f710 100644 --- a/src/common/measurement.c +++ b/src/common/measurement.c @@ -73,8 +73,8 @@ * SUB */ return true; default: - LOGPFN(DMEAS, LOGL_ERROR, fn, "%s: Unsupported lchan->tch_mode %u\n", - gsm_lchan_name(lchan), lchan->tch_mode); + LOGPLCFN(lchan, DMEAS, LOGL_ERROR, fn, "Unsupported lchan->tch_mode %u\n", + lchan->tch_mode); break; } break; @@ -89,8 +89,8 @@ * SUB */ return true; default: - LOGPFN(DMEAS, LOGL_ERROR, fn, "%s: Unsupported lchan->tch_mode %u\n", - gsm_lchan_name(lchan), lchan->tch_mode); + LOGPLCFN(lchan, DMEAS, LOGL_ERROR, fn, "Unsupported lchan->tch_mode %u\n", + lchan->tch_mode); break; } break; @@ -269,9 +269,9 @@ } if (rc == 1) { - DEBUGP(DMEAS, - "%s meas period end fn:%u, fn_mod:%i, status:%d, pchan:%s\n", - gsm_lchan_name(lchan), fn, fn_mod, rc, gsm_pchan_name(pchan)); + LOGPLCFN(lchan, DMEAS, LOGL_DEBUG, fn, + "meas period end fn_mod:%d, status:%d, pchan:%s\n", + fn_mod, rc, gsm_pchan_name(pchan)); } return rc; @@ -307,16 +307,15 @@ struct bts_ul_meas *dest; if (lchan->state != LCHAN_S_ACTIVE) { - LOGPFN(DMEAS, LOGL_NOTICE, fn, - "%s measurement during state: %s, num_ul_meas=%d, fn_mod=%u\n", - gsm_lchan_name(lchan), gsm_lchans_name(lchan->state), - lchan->meas.num_ul_meas, fn_mod); + LOGPLCFN(lchan, DMEAS, LOGL_NOTICE, fn, + "measurement during state: %s, num_ul_meas=%d, fn_mod=%u\n", + gsm_lchans_name(lchan->state), lchan->meas.num_ul_meas, fn_mod); } if (lchan->meas.num_ul_meas >= ARRAY_SIZE(lchan->meas.uplink)) { - LOGPFN(DMEAS, LOGL_NOTICE, fn, - "%s no space for uplink measurement, num_ul_meas=%d, fn_mod=%u\n", - gsm_lchan_name(lchan), lchan->meas.num_ul_meas, fn_mod); + LOGPLCFN(lchan, DMEAS, LOGL_NOTICE, fn, + "no space for uplink measurement, num_ul_meas=%d, fn_mod=%u\n", + lchan->meas.num_ul_meas, fn_mod); return -ENOSPC; } diff --git a/src/osmo-bts-lc15/l1_if.c b/src/osmo-bts-lc15/l1_if.c index 987b6e3..2955440 100644 --- a/src/osmo-bts-lc15/l1_if.c +++ b/src/osmo-bts-lc15/l1_if.c @@ -395,9 +395,8 @@ else sapi = GsmL1_Sapi_Agch; } else { - LOGPFN(DL1C, LOGL_NOTICE, u32Fn, "unknown prim %d op %d " - "chan_nr %d link_id %d\n", l1sap->oph.primitive, - l1sap->oph.operation, chan_nr, link_id); + LOGPLCFN(lchan, DL1C, LOGL_NOTICE, u32Fn, "unknown prim %d op %d chan_nr %d link_id %d\n", + l1sap->oph.primitive, l1sap->oph.operation, chan_nr, link_id); msgb_free(l1msg); return -EINVAL; } @@ -458,9 +457,9 @@ memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, msgb_l2len(msg)); } - LOGPFN(DL1P, LOGL_DEBUG, u32Fn, "PH-DATA.req(%s)\n", - osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, - l1p->u.phDataReq.msgUnitParam.u8Size)); + LOGPLCFN(lchan, DL1P, LOGL_DEBUG, u32Fn, "PH-DATA.req(%s)\n", + osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, + l1p->u.phDataReq.msgUnitParam.u8Size)); } else { /* empty frame */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); @@ -470,7 +469,7 @@ /* send message to DSP's queue */ if (osmo_wqueue_enqueue(&fl1->write_q[MQ_L1_WRITE], l1msg) != 0) { - LOGPFN(DL1P, LOGL_ERROR, u32Fn, "MQ_L1_WRITE queue full. Dropping msg.\n"); + LOGPLCFN(lchan, DL1P, LOGL_ERROR, u32Fn, "MQ_L1_WRITE queue full. Dropping msg.\n"); msgb_free(l1msg); } else dtx_int_signal(lchan); @@ -553,7 +552,7 @@ } /* send message to DSP's queue */ if (osmo_wqueue_enqueue(&fl1->write_q[MQ_L1_WRITE], nmsg) < 0) { - LOGPFN(DL1P, LOGL_ERROR, u32Fn, "MQ_L1_WRITE queue full. Dropping msg.\n"); + LOGPLCFN(lchan, DL1P, LOGL_ERROR, u32Fn, "MQ_L1_WRITE queue full. Dropping msg.\n"); msgb_free(nmsg); return -ENOBUFS; } diff --git a/src/osmo-bts-lc15/tch.c b/src/osmo-bts-lc15/tch.c index ff93c75..bd84bee 100644 --- a/src/osmo-bts-lc15/tch.c +++ b/src/osmo-bts-lc15/tch.c @@ -368,7 +368,7 @@ return -EAGAIN; if (data_ind->msgUnitParam.u8Size < 1) { - LOGPFN(DL1P, LOGL_DEBUG, data_ind->u32Fn, "chan_nr %d Rx Payload size 0\n", chan_nr); + LOGPLCFN(lchan, DL1P, LOGL_DEBUG, data_ind->u32Fn, "chan_nr %d Rx Payload size 0\n", chan_nr); /* Push empty payload to upper layers */ rmsg = msgb_alloc_headroom(256, 128, "L1P-to-RTP"); return add_l1sap_header(trx, rmsg, lchan, chan_nr, data_ind->u32Fn, @@ -399,8 +399,8 @@ if (lchan->type != GSM_LCHAN_TCH_H && lchan->type != GSM_LCHAN_TCH_F) goto err_payload_match; - LOGPFN(DL1P, LOGL_DEBUG, data_ind->u32Fn, "DTX: received ONSET from L1 " - "(%d bytes)\n", payload_len); + LOGPLCFN(lchan, DL1P, LOGL_DEBUG, data_ind->u32Fn, "DTX: received ONSET from L1 " + "(%d bytes)\n", payload_len); /* according to 3GPP TS 26.093 ONSET frames precede the first speech frame of a speech burst - set the marker for next RTP frame */ @@ -409,33 +409,32 @@ case GsmL1_TchPlType_Amr_SidFirstP1: if (lchan->type != GSM_LCHAN_TCH_H) goto err_payload_match; - LOGPFN(DL1P, LOGL_DEBUG, data_ind->u32Fn, "DTX: received SID_FIRST_P1 from L1 " - "(%d bytes)\n", payload_len); + LOGPLCFN(lchan, DL1P, LOGL_DEBUG, data_ind->u32Fn, "DTX: received SID_FIRST_P1 from L1 " + "(%d bytes)\n", payload_len); break; case GsmL1_TchPlType_Amr_SidFirstP2: if (lchan->type != GSM_LCHAN_TCH_H) goto err_payload_match; - LOGPFN(DL1P, LOGL_DEBUG, data_ind->u32Fn, "DTX: received SID_FIRST_P2 from L1 " - "(%d bytes)\n", payload_len); + LOGPLCFN(lchan, DL1P, LOGL_DEBUG, data_ind->u32Fn, "DTX: received SID_FIRST_P2 from L1 " + "(%d bytes)\n", payload_len); break; case GsmL1_TchPlType_Amr_SidFirstInH: if (lchan->type != GSM_LCHAN_TCH_H) goto err_payload_match; lchan->rtp_tx_marker = true; - LOGPFN(DL1P, LOGL_DEBUG, data_ind->u32Fn, "DTX: received SID_FIRST_INH from L1 " - "(%d bytes)\n", payload_len); + LOGPLCFN(lchan, DL1P, LOGL_DEBUG, data_ind->u32Fn, "DTX: received SID_FIRST_INH from L1 " + "(%d bytes)\n", payload_len); break; case GsmL1_TchPlType_Amr_SidUpdateInH: if (lchan->type != GSM_LCHAN_TCH_H) goto err_payload_match; lchan->rtp_tx_marker = true; - LOGPFN(DL1P, LOGL_DEBUG, data_ind->u32Fn, "DTX: received SID_UPDATE_INH from L1 " - "(%d bytes)\n", payload_len); + LOGPLCFN(lchan, DL1P, LOGL_DEBUG, data_ind->u32Fn, "DTX: received SID_UPDATE_INH from L1 " + "(%d bytes)\n", payload_len); break; default: - LOGPFN(DL1P, LOGL_NOTICE, data_ind->u32Fn, "%s Rx Payload Type %s is unsupported\n", - gsm_lchan_name(lchan), - get_value_string(lc15bts_tch_pl_names, payload_type)); + LOGPLCFN(lchan, DL1P, LOGL_NOTICE, data_ind->u32Fn, "%s Rx Payload Type %s is unsupported\n", + gsm_lchan_name(lchan), get_value_string(lc15bts_tch_pl_names, payload_type)); break; } @@ -470,8 +469,8 @@ return 0; err_payload_match: - LOGPFN(DL1P, LOGL_ERROR, data_ind->u32Fn, "%s Rx Payload Type %s incompatible with lchan\n", - gsm_lchan_name(lchan), get_value_string(lc15bts_tch_pl_names, payload_type)); + LOGPLCFN(lchan, DL1P, LOGL_ERROR, data_ind->u32Fn, "%s Rx Payload Type %s incompatible with lchan\n", + gsm_lchan_name(lchan), get_value_string(lc15bts_tch_pl_names, payload_type)); return -EINVAL; } diff --git a/src/osmo-bts-oc2g/l1_if.c b/src/osmo-bts-oc2g/l1_if.c index 3308a46..8762063 100644 --- a/src/osmo-bts-oc2g/l1_if.c +++ b/src/osmo-bts-oc2g/l1_if.c @@ -440,9 +440,9 @@ else sapi = GsmL1_Sapi_Agch; } else { - LOGPFN(DL1C, LOGL_NOTICE, u32Fn, "unknown prim %d op %d " - "chan_nr %d link_id %d\n", l1sap->oph.primitive, - l1sap->oph.operation, chan_nr, link_id); + LOGPLCFN(lchan, DL1C, LOGL_NOTICE, u32Fn, "unknown prim %d op %d " + "chan_nr %d link_id %d\n", l1sap->oph.primitive, + l1sap->oph.operation, chan_nr, link_id); msgb_free(l1msg); return -EINVAL; } @@ -503,9 +503,9 @@ memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, msgb_l2len(msg)); } - LOGPFN(DL1P, LOGL_DEBUG, u32Fn, "PH-DATA.req(%s)\n", - osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, - l1p->u.phDataReq.msgUnitParam.u8Size)); + LOGPLCFN(lchan, DL1P, LOGL_DEBUG, u32Fn, "PH-DATA.req(%s)\n", + osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, + l1p->u.phDataReq.msgUnitParam.u8Size)); } else { GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); if (lchan->rsl_cmode == RSL_CMOD_SPD_SIGN) @@ -523,7 +523,7 @@ /* send message to DSP's queue */ if (osmo_wqueue_enqueue(&fl1->write_q[MQ_L1_WRITE], l1msg) != 0) { - LOGPFN(DL1P, LOGL_ERROR, u32Fn, "MQ_L1_WRITE queue full. Dropping msg.\n"); + LOGPLCFN(lchan, DL1P, LOGL_ERROR, u32Fn, "MQ_L1_WRITE queue full. Dropping msg.\n"); msgb_free(l1msg); } else dtx_int_signal(lchan); @@ -606,7 +606,7 @@ } /* send message to DSP's queue */ if (osmo_wqueue_enqueue(&fl1->write_q[MQ_L1_WRITE], nmsg) < 0) { - LOGPFN(DL1P, LOGL_ERROR, u32Fn, "MQ_L1_WRITE queue full. Dropping msg.\n"); + LOGPLCFN(lchan, DL1P, LOGL_ERROR, u32Fn, "MQ_L1_WRITE queue full. Dropping msg.\n"); msgb_free(nmsg); return -ENOBUFS; } diff --git a/src/osmo-bts-oc2g/tch.c b/src/osmo-bts-oc2g/tch.c index d039b5e..d469740 100644 --- a/src/osmo-bts-oc2g/tch.c +++ b/src/osmo-bts-oc2g/tch.c @@ -368,7 +368,7 @@ return -EAGAIN; if (data_ind->msgUnitParam.u8Size < 1) { - LOGPFN(DL1P, LOGL_DEBUG, data_ind->u32Fn, "chan_nr %d Rx Payload size 0\n", chan_nr); + LOGPLCFN(lchan, DL1P, LOGL_DEBUG, data_ind->u32Fn, "chan_nr %d Rx Payload size 0\n", chan_nr); /* Push empty payload to upper layers */ rmsg = msgb_alloc_headroom(256, 128, "L1P-to-RTP"); return add_l1sap_header(trx, rmsg, lchan, chan_nr, data_ind->u32Fn, @@ -403,8 +403,8 @@ if (lchan->type != GSM_LCHAN_TCH_H && lchan->type != GSM_LCHAN_TCH_F) goto err_payload_match; - LOGPFN(DL1P, LOGL_DEBUG, data_ind->u32Fn, "DTX: received ONSET from L1 " - "(%d bytes)\n", payload_len); + LOGPLCFN(lchan, DL1P, LOGL_DEBUG, data_ind->u32Fn, "DTX: received ONSET from L1 " + "(%d bytes)\n", payload_len); /* according to 3GPP TS 26.093 ONSET frames precede the first speech frame of a speech burst - set the marker for next RTP frame */ @@ -414,43 +414,40 @@ case GsmL1_TchPlType_Amr_SidFirstP1: if (lchan->type != GSM_LCHAN_TCH_H) goto err_payload_match; - LOGPFN(DL1P, LOGL_DEBUG, data_ind->u32Fn, "DTX: received SID_FIRST_P1 from L1 " - "(%d bytes)\n", payload_len); + LOGPLCFN(lchan, DL1P, LOGL_DEBUG, data_ind->u32Fn, "DTX: received SID_FIRST_P1 from L1 " + "(%d bytes)\n", payload_len); break; case GsmL1_TchPlType_Amr_SidFirstP2: if (lchan->type != GSM_LCHAN_TCH_H) goto err_payload_match; - LOGPFN(DL1P, LOGL_DEBUG, data_ind->u32Fn, "DTX: received SID_FIRST_P2 from L1 " - "(%d bytes)\n", payload_len); + LOGPLCFN(lchan, DL1P, LOGL_DEBUG, data_ind->u32Fn, "DTX: received SID_FIRST_P2 from L1 " + "(%d bytes)\n", payload_len); break; case GsmL1_TchPlType_Amr_SidFirstInH: if (lchan->type != GSM_LCHAN_TCH_H) goto err_payload_match; lchan->tch.dtx.is_speech_resume = true; lchan->rtp_tx_marker = true; - LOGPFN(DL1P, LOGL_DEBUG, data_ind->u32Fn, "DTX: received SID_FIRST_INH from L1 " - "(%d bytes)\n", payload_len); + LOGPLCFN(lchan, DL1P, LOGL_DEBUG, data_ind->u32Fn, "DTX: received SID_FIRST_INH from L1 " + "(%d bytes)\n", payload_len); break; case GsmL1_TchPlType_Amr_SidUpdateInH: if (lchan->type != GSM_LCHAN_TCH_H) goto err_payload_match; lchan->tch.dtx.is_speech_resume = true; lchan->rtp_tx_marker = true; - LOGPFN(DL1P, LOGL_DEBUG, data_ind->u32Fn, "DTX: received SID_UPDATE_INH from L1 " - "(%d bytes)\n", payload_len); + LOGPLCFN(lchan, DL1P, LOGL_DEBUG, data_ind->u32Fn, "DTX: received SID_UPDATE_INH from L1 " + "(%d bytes)\n", payload_len); break; default: - LOGPFN(DL1P, LOGL_NOTICE, data_ind->u32Fn, "%s Rx Payload Type %s is unsupported\n", - gsm_lchan_name(lchan), - get_value_string(oc2gbts_tch_pl_names, payload_type)); + LOGPLCFN(lchan, DL1P, LOGL_NOTICE, data_ind->u32Fn, "%s Rx Payload Type %s is unsupported\n", + gsm_lchan_name(lchan), get_value_string(oc2gbts_tch_pl_names, payload_type)); break; } - LOGP(DL1P, LOGL_DEBUG, "%s %s lchan->rtp_tx_marker = %s, len=%u\n", - gsm_lchan_name(lchan), - get_value_string(oc2gbts_tch_pl_names, payload_type), - lchan->rtp_tx_marker ? "true" : "false", - payload_len); + LOGPLCHAN(lchan, DL1P, LOGL_DEBUG, "%s lchan->rtp_tx_marker = %s, len=%u\n", + get_value_string(oc2gbts_tch_pl_names, payload_type), + lchan->rtp_tx_marker ? "true" : "false", payload_len); switch (payload_type) { case GsmL1_TchPlType_Fr: @@ -482,8 +479,8 @@ return 0; err_payload_match: - LOGPFN(DL1P, LOGL_ERROR, data_ind->u32Fn, "%s Rx Payload Type %s incompatible with lchan\n", - gsm_lchan_name(lchan), get_value_string(oc2gbts_tch_pl_names, payload_type)); + LOGPLCFN(lchan, DL1P, LOGL_ERROR, data_ind->u32Fn, "%s Rx Payload Type %s incompatible with lchan\n", + gsm_lchan_name(lchan), get_value_string(oc2gbts_tch_pl_names, payload_type)); return -EINVAL; } diff --git a/src/osmo-bts-octphy/l1_if.c b/src/osmo-bts-octphy/l1_if.c index 4898eb6..1488a9d 100644 --- a/src/osmo-bts-octphy/l1_if.c +++ b/src/osmo-bts-octphy/l1_if.c @@ -589,7 +589,7 @@ if (msg) { nmsg = l1p_msgb_alloc(); if (!nmsg) { - LOGPFN(DL1C, LOGL_FATAL, u32Fn, "L1SAP PH-TCH.req msg alloc failed\n"); + LOGPLCFN(lchan, DL1C, LOGL_FATAL, u32Fn, "L1SAP PH-TCH.req msg alloc failed\n"); return -ENOMEM; } diff --git a/src/osmo-bts-octphy/l1_tch.c b/src/osmo-bts-octphy/l1_tch.c index bffa1e9..bce55f1 100644 --- a/src/osmo-bts-octphy/l1_tch.c +++ b/src/osmo-bts-octphy/l1_tch.c @@ -146,7 +146,7 @@ &trx->ts[L1SAP_CHAN2TS(chan_nr)].lchan[l1sap_chan2ss(chan_nr)]; if (data_ind->Data.ulDataLength < 1) { - LOGPFN(DL1P, LOGL_DEBUG, fn, "chan_nr %d Rx Payload size 0\n", chan_nr); + LOGPLCFN(lchan, DL1P, LOGL_DEBUG, fn, "chan_nr %d Rx Payload size 0\n", chan_nr); /* Push empty payload to upper layers */ rmsg = msgb_alloc_headroom(256, 128, "L1P-to-RTP"); return add_l1sap_header(trx, rmsg, lchan, chan_nr, @@ -173,13 +173,13 @@ goto err_payload_match; break; default: - LOGPFN(DL1P, LOGL_NOTICE, fn, "%s Rx Payload Type %d is unsupported\n", - gsm_lchan_name(lchan), payload_type); + LOGPLCFN(lchan, DL1P, LOGL_NOTICE, fn, "%s Rx Payload Type %d is unsupported\n", + gsm_lchan_name(lchan), payload_type); break; } - LOGPFN(DL1P, LOGL_DEBUG, fn, "%s Rx codec frame (%u): %s\n", gsm_lchan_name(lchan), - payload_len, osmo_hexdump(payload, payload_len)); + LOGPLCFN(lchan, DL1P, LOGL_DEBUG, fn, "%s Rx codec frame (%u): %s\n", gsm_lchan_name(lchan), + payload_len, osmo_hexdump(payload, payload_len)); switch (payload_type) { case cOCTVC1_GSM_PAYLOAD_TYPE_ENUM_FULL_RATE: @@ -201,7 +201,7 @@ rmsg = l1_to_rtppayload_amr(payload, payload_len, &lchan->tch.amr_mr); #else - LOGPFN(DL1P, LOGL_ERROR, fn, "OctPHY only supports FR!\n"); + LOGPLCFN(lchan, DL1P, LOGL_ERROR, fn, "OctPHY only supports FR!\n"); return -1; #endif break; @@ -215,8 +215,8 @@ return 0; err_payload_match: - LOGPFN(DL1P, LOGL_ERROR, fn, "%s Rx Payload Type %d incompatible with lchan\n", - gsm_lchan_name(lchan), payload_type); + LOGPLCFN(lchan, DL1P, LOGL_ERROR, fn, "%s Rx Payload Type %d incompatible with lchan\n", + gsm_lchan_name(lchan), payload_type); return -EINVAL; } diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 646cf01..19f0c5a 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -392,7 +392,7 @@ else sapi = GsmL1_Sapi_Agch; } else { - LOGPFN(DL1C, LOGL_NOTICE, u32Fn, "unknown prim %d op %d " + LOGPLCFN(lchan, DL1C, LOGL_NOTICE, u32Fn, "unknown prim %d op %d " "chan_nr %d link_id %d\n", l1sap->oph.primitive, l1sap->oph.operation, chan_nr, link_id); msgb_free(l1msg); @@ -455,7 +455,7 @@ memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, msgb_l2len(msg)); } - LOGPFN(DL1P, LOGL_DEBUG, u32Fn, "PH-DATA.req(%s)\n", + LOGPLCFN(lchan, DL1P, LOGL_DEBUG, u32Fn, "PH-DATA.req(%s)\n", osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, l1p->u.phDataReq.msgUnitParam.u8Size)); } else { @@ -467,7 +467,7 @@ /* send message to DSP's queue */ if (osmo_wqueue_enqueue(&fl1->write_q[MQ_L1_WRITE], l1msg) != 0) { - LOGPFN(DL1P, LOGL_ERROR, u32Fn, "MQ_L1_WRITE queue full. Dropping msg.\n"); + LOGPLCFN(lchan, DL1P, LOGL_ERROR, u32Fn, "MQ_L1_WRITE queue full. Dropping msg.\n"); msgb_free(l1msg); } else dtx_int_signal(lchan); @@ -550,7 +550,7 @@ } /* send message to DSP's queue */ if (osmo_wqueue_enqueue(&fl1->write_q[MQ_L1_WRITE], nmsg) != 0) { - LOGPFN(DL1P, LOGL_ERROR, u32Fn, "MQ_L1_WRITE queue full. Dropping msg.\n"); + LOGPLCFN(lchan, DL1P, LOGL_ERROR, u32Fn, "MQ_L1_WRITE queue full. Dropping msg.\n"); msgb_free(nmsg); return -ENOBUFS; } diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index fc9af77..b308a5f 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -513,7 +513,7 @@ return -EAGAIN; if (data_ind->msgUnitParam.u8Size < 1) { - LOGPFN(DL1P, LOGL_DEBUG, data_ind->u32Fn, "chan_nr %d Rx Payload size 0\n", chan_nr); + LOGPLCFN(lchan, DL1P, LOGL_DEBUG, data_ind->u32Fn, "chan_nr %d Rx Payload size 0\n", chan_nr); /* Push empty payload to upper layers */ rmsg = msgb_alloc_headroom(256, 128, "L1P-to-RTP"); return add_l1sap_header(trx, rmsg, lchan, chan_nr, data_ind->u32Fn, @@ -549,8 +549,8 @@ if (lchan->type != GSM_LCHAN_TCH_H && lchan->type != GSM_LCHAN_TCH_F) goto err_payload_match; - LOGPFN(DL1P, LOGL_DEBUG, data_ind->u32Fn, "DTX: received ONSET from L1 " - "(%d bytes)\n", payload_len); + LOGPLCFN(lchan, DL1P, LOGL_DEBUG, data_ind->u32Fn, "DTX: received ONSET from L1 " + "(%d bytes)\n", payload_len); /* according to 3GPP TS 26.093 ONSET frames precede the first speech frame of a speech burst - set the marker for next RTP frame */ @@ -559,33 +559,32 @@ case GsmL1_TchPlType_Amr_SidFirstP1: if (lchan->type != GSM_LCHAN_TCH_H) goto err_payload_match; - LOGPFN(DL1P, LOGL_DEBUG, data_ind->u32Fn, "DTX: received SID_FIRST_P1 from L1 " - "(%d bytes)\n", payload_len); + LOGPLCFN(lchan, DL1P, LOGL_DEBUG, data_ind->u32Fn, "DTX: received SID_FIRST_P1 from L1 " + "(%d bytes)\n", payload_len); break; case GsmL1_TchPlType_Amr_SidFirstP2: if (lchan->type != GSM_LCHAN_TCH_H) goto err_payload_match; - LOGPFN(DL1P, LOGL_DEBUG, data_ind->u32Fn, "DTX: received SID_FIRST_P2 from L1 " - "(%d bytes)\n", payload_len); + LOGPLCFN(lchan, DL1P, LOGL_DEBUG, data_ind->u32Fn, "DTX: received SID_FIRST_P2 from L1 " + "(%d bytes)\n", payload_len); break; case GsmL1_TchPlType_Amr_SidFirstInH: if (lchan->type != GSM_LCHAN_TCH_H) goto err_payload_match; lchan->rtp_tx_marker = true; - LOGPFN(DL1P, LOGL_DEBUG, data_ind->u32Fn, "DTX: received SID_FIRST_INH from L1 " - "(%d bytes)\n", payload_len); + LOGPLCFN(lchan, DL1P, LOGL_DEBUG, data_ind->u32Fn, "DTX: received SID_FIRST_INH from L1 " + "(%d bytes)\n", payload_len); break; case GsmL1_TchPlType_Amr_SidUpdateInH: if (lchan->type != GSM_LCHAN_TCH_H) goto err_payload_match; lchan->rtp_tx_marker = true; - LOGPFN(DL1P, LOGL_DEBUG, data_ind->u32Fn, "DTX: received SID_UPDATE_INH from L1 " - "(%d bytes)\n", payload_len); + LOGPLCFN(lchan, DL1P, LOGL_DEBUG, data_ind->u32Fn, "DTX: received SID_UPDATE_INH from L1 " + "(%d bytes)\n", payload_len); break; default: - LOGPFN(DL1P, LOGL_NOTICE, data_ind->u32Fn, "%s Rx Payload Type %s is unsupported\n", - gsm_lchan_name(lchan), - get_value_string(femtobts_tch_pl_names, payload_type)); + LOGPLCFN(lchan, DL1P, LOGL_NOTICE, data_ind->u32Fn, "%s Rx Payload Type %s is unsupported\n", + gsm_lchan_name(lchan), get_value_string(femtobts_tch_pl_names, payload_type)); break; } @@ -626,9 +625,8 @@ return 0; err_payload_match: - LOGPFN(DL1P, LOGL_ERROR, data_ind->u32Fn, "%s Rx Payload Type %s incompatible with lchan\n", - gsm_lchan_name(lchan), - get_value_string(femtobts_tch_pl_names, payload_type)); + LOGPLCFN(lchan, DL1P, LOGL_ERROR, data_ind->u32Fn, "%s Rx Payload Type %s incompatible with lchan\n", + gsm_lchan_name(lchan), get_value_string(femtobts_tch_pl_names, payload_type)); return -EINVAL; } -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32087 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I214af0448652a9f321ccbab77977b67663ba28f9 Gerrit-Change-Number: 32087 Gerrit-PatchSet: 4 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-bts[master]: Introduce LOGPLCFN() for logging lchan-name + frame number
by laforge 28 Mar '23

28 Mar '23
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/32087 ) Change subject: Introduce LOGPLCFN() for logging lchan-name + frame number ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32087 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I214af0448652a9f321ccbab77977b67663ba28f9 Gerrit-Change-Number: 32087 Gerrit-PatchSet: 4 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Tue, 28 Mar 2023 15:23:18 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • ...
  • 365
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.