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 -----
  • November
  • 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

May 2023

  • 1 participants
  • 2583 discussions
[M] Change in osmo-bts[master]: TCH DL, FR & EFR: reshape SIDs per 06.31/06.81 section 5.1.2
by falconia 15 May '23

15 May '23
Attention is currently required from: pespin, dexter. falconia has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/32714 ) Change subject: TCH DL, FR & EFR: reshape SIDs per 06.31/06.81 section 5.1.2 ...................................................................... Patch Set 3: (5 comments) Commit Message: https://gerrit.osmocom.org/c/osmo-bts/+/32714/comment/b5cc6710_3f11d6ed PS2, Line 8: > I will cover this topic in proper detail in June OsmoDevCall, but here is a shorter version: the pro […] The new patchset has a reworded commit message - please review. File include/osmo-bts/lchan.h: https://gerrit.osmocom.org/c/osmo-bts/+/32714/comment/dc80b0a5_b2a1be97 PS2, Line 281: } nonamr; > I'll go with dexter's suggestion of dtx_fr_efr for the new substruct, plus renaming the old dtx subs […] Done https://gerrit.osmocom.org/c/osmo-bts/+/32714/comment/fd4eefc1_b94817c8 PS2, Line 282: uint8_t last_cmr; > dexter's comment is correct - the last_cmr member is in the larger tch substruct, not in either of t […] Done File src/common/l1sap.c: https://gerrit.osmocom.org/c/osmo-bts/+/32714/comment/178637d9_25ae4dc5 PS2, Line 1315: if (lchan->type == GSM_LCHAN_TCH_F) > I'll change this code to use nested switch statements for lchan->type and lchan->nr in the next vers […] Done https://gerrit.osmocom.org/c/osmo-bts/+/32714/comment/7a1659ad_24dea7cc PS2, Line 1334: bool is_nonamr_sid = false; > Will do. Done -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32714 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I924ab21952dcf8bb03ba7ccef790474bf66fc9e5 Gerrit-Change-Number: 32714 Gerrit-PatchSet: 3 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: dexter <pmaier(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Mon, 15 May 2023 19:38:35 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: falconia <falcon(a)freecalypso.org> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-bts[master]: TCH DL, FR & EFR: reshape SIDs per 06.31/06.81 section 5.1.2
by falconia 15 May '23

15 May '23
Attention is currently required from: pespin, dexter. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bts/+/32714 to look at the new patch set (#3). Change subject: TCH DL, FR & EFR: reshape SIDs per 06.31/06.81 section 5.1.2 ...................................................................... TCH DL, FR & EFR: reshape SIDs per 06.31/06.81 section 5.1.2 Section 5.1.2 of GSM 06.31 & 06.81 (DTX specs for FR & EFR) specifies the expected shape of radio downlink in the presence of SIDs: one SID frame after each talkspurt (after speech frames), and one SID frame in every SACCH-aligned position every 480 ms, or if the actual SACCH- aligned position is taken up by FACCH, then just one SID frame as soon as possible after that FACCH - and no transmitted SID frames in other positions. This just-referenced spec section was written with the assumption that it will only be applied when DTXd is enabled - however, if the RTP stream for call leg B DL comes from call leg A UL (TrFO), then we are going to receive SID frames in the stream intended for our DL even when DTXd is disabled or not supported altogether. The easiest solution is to apply FR/EFR (and in the future HR1 too) DTXd logic whenever the incoming RTP stream contains SID frames, irrespective of physical DTXd enable/disable state. If we apply such "logical DTXd" when physical DTXd is disabled, the BTS model PHY will end up transmitting induced BFIs (dummy FACCH or inverted CRC3) in those frame positions where the "logical DTXd" function says "please transmit nothing". The point remains, however, that the prescribed SID shape on the radio downlink (expected positions of SID frames) won't happen on its own: in the case of TrFO, whichever SID frames are present will be in wrong positions for leg B DL, and even in the case of transcoded calls the responsibility for DL SID shaping cannot be placed on the RTP stream source because that source won't know where SACCH alignment will lie. Therefore, the necessary DL SID reshaping has to be done in the RTP stream receiver in OsmoBTS. Related: OS#5996 Change-Id: I924ab21952dcf8bb03ba7ccef790474bf66fc9e5 --- M include/osmo-bts/lchan.h M src/common/l1sap.c 2 files changed, 163 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/14/32714/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32714 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I924ab21952dcf8bb03ba7ccef790474bf66fc9e5 Gerrit-Change-Number: 32714 Gerrit-PatchSet: 3 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: dexter <pmaier(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[M] Change in osmo-pcu[master]: gprs_rlcmac: also use direct TLLI PCUIF for paging MAC blocks
by dexter 15 May '23

15 May '23
Attention is currently required from: jolly, pespin. dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/32694 ) Change subject: gprs_rlcmac: also use direct TLLI PCUIF for paging MAC blocks ...................................................................... Patch Set 2: (1 comment) Patchset: PS2: > yes thinking of it, I think only the ImmAss sent over PCH need to be confirmed, I see no reason to c […] Thanks for making that clear. To be honest I also do not see a why pagings should be confirmed. From the BSS perspective it is a fire and forget message and who knows when the MS decides to perform the channel request... -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/32694 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I99cfe373fa157cfb32b74c113ad9935347653a71 Gerrit-Change-Number: 32694 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 15 May 2023 19:16:06 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-bts[master]: TCH DL, FR & EFR: reshape SIDs per 06.31/06.81 section 5.1.2
by falconia 15 May '23

15 May '23
Attention is currently required from: pespin, dexter. falconia has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/32714 ) Change subject: TCH DL, FR & EFR: reshape SIDs per 06.31/06.81 section 5.1.2 ...................................................................... Patch Set 2: (5 comments) Commit Message: https://gerrit.osmocom.org/c/osmo-bts/+/32714/comment/50aa15b3_aeb9bb59 PS2, Line 8: > It might be helpful to mention DTX to make more clear what this is about. […] I will cover this topic in proper detail in June OsmoDevCall, but here is a shorter version: the problem being solved here is one of TrFO rather than DTX. DTX is defined and enabled/disabled separately for UL and DL directions; DTXu is always allowed and almost always desired, but DTXd is only possible if you have a cell with more than just C0. The problem is TrFO: what do we do when the RTP output of call leg A (which has DTXu enabled) goes to the RTP input of call leg B, which does not have DTXd? (Right now no OsmoBTS model has correctly working DTXd for non-AMR, but this lack of support is a separate problem, and a low-priority one because it matters only for users with lots of spectrum and multi-TRX hw.) The scenario where a BTS receives DTX SIDs in its RTP input but does not do physical DTXd on the radio DL was not envisioned at all in any of the non-AMR DTX specs (not FR, not HR, not EFR), hence we have to improvise. My solution is to effect a kind of fake DTXd: in those frame positions where real DTXd would transmit nothing at all (physical Tx off), transmit something that would cause a BFI condition in the GSM MS receiver. It just so happens that all of our BTS models already transmit such induced-BFI conditions when fed a zero-length payload: osmo-bts-trx sends dummy FACCH, whereas sysmoBTS PHY appears to invert the CRC3 bits of GSM 05.03 section 3.1.2.1. I should also note that in the case of FR1 and HR1 codecs this fake DTXd approach is not the only feasible one - the alternative would be to implement the rules of TS 28.062 section C.3.2.1.1 - these rules are written for in-band TFO, but can be applied just as well to TrFO. However, implementing those rules seems infeasible (or at least inordinately difficult) for EFR, leaving fake DTXd as the only feasible approach. And if we have to do fake DTXd for EFR, why not do it for all 3 classic non-AMR codecs? I shall give your comment some thought - how to reflect in the commit message and code comments that we are dealing with DTX SIDs going to a BTS that may not have DTXd. Although when and if we do implement real DTXd for non-AMR, the same logic will apply there, so at least there's that. File include/osmo-bts/lchan.h: https://gerrit.osmocom.org/c/osmo-bts/+/32714/comment/c05516a5_b76b3372 PS2, Line 281: } nonamr; > I would rename it to fr_efr too. […] I'll go with dexter's suggestion of dtx_fr_efr for the new substruct, plus renaming the old dtx substruct to dtx_amr. I should also mention that the correct non-AMR DTX logic for HR1 is almost exactly the same as for FR & EFR, hence when and if someone extends my FR/EFR logic to also cover HR1, the same substruct will likely be used. Why am I not fully covering HR1 from the get-go? In addition to OS#5688, there are some extra difficulties with HR1 which I shall cover in my OsmoDevCall presentation in June. https://gerrit.osmocom.org/c/osmo-bts/+/32714/comment/6f50022c_aa1a8ff2 PS2, Line 282: uint8_t last_cmr; > Its a sub struct "tch", so the location should be fine. dexter's comment is correct - the last_cmr member is in the larger tch substruct, not in either of the two DTX substructs. File src/common/l1sap.c: https://gerrit.osmocom.org/c/osmo-bts/+/32714/comment/ea5453be_7dfff7d4 PS2, Line 1315: if (lchan->type == GSM_LCHAN_TCH_F) > "switch (lchan->type)" should make this function less cryptic imho. I'll change this code to use nested switch statements for lchan->type and lchan->nr in the next version. https://gerrit.osmocom.org/c/osmo-bts/+/32714/comment/260dd889_584055bc PS2, Line 1334: bool is_nonamr_sid = false; > better rename this to is_fr_efr_sid as well. Will do. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32714 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I924ab21952dcf8bb03ba7ccef790474bf66fc9e5 Gerrit-Change-Number: 32714 Gerrit-PatchSet: 2 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: dexter <pmaier(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Mon, 15 May 2023 18:10:45 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-bts[master]: common+trx: make uplink ECU optional
by falconia 15 May '23

15 May '23
Attention is currently required from: laforge, pespin. falconia has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/32110 ) Change subject: common+trx: make uplink ECU optional ...................................................................... Patch Set 4: (1 comment) File src/common/vty.c: https://gerrit.osmocom.org/c/osmo-bts/+/32110/comment/9d296871_a24c8ff9 PS4, Line 809: bts->suppress_ul_ecu = false; > I find it weird that you are kinda changing the boolean logic with the VTY command when using the va […] I wrote the code the way I did so that the default of having this UL ECU enabled would happen on its own through zero-init of struct gsm_bts. But I agree that an affirmative boolean such as use_ul_ecu will be much better, and I just found the right place to set the backward-compatible default in bts_init(). I will spin a new patchset. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32110 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I0acca9c6d7da966a623287563e0789db9e0fae8e Gerrit-Change-Number: 32110 Gerrit-PatchSet: 4 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 15 May 2023 17:18:53 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-bts[master]: osmo-bts-trx: alloc/free burst buffers in trx_sched_set_lchan()
by fixeria 15 May '23

15 May '23
Attention is currently required from: laforge, pespin, msuraev. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/31672 ) Change subject: osmo-bts-trx: alloc/free burst buffers in trx_sched_set_lchan() ...................................................................... Patch Set 5: (1 comment) This change is ready for review. Commit Message: https://gerrit.osmocom.org/c/osmo-bts/+/31672/comment/1738aa92_564e3011 PS4, Line 14: o that we can dynamically choose : buffer size depending on the channel mode (speech/data). > I don't know if this is really an advantage. […] I changed the patch to allocate the maximum size (4 8-PSK modulated bursts) regardless of the lchan type being activated. In a follow-up patch the allocation size is further increased to hold up to 22 GMSK modulated bursts. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/31672 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I6a5f76023fc492786076a63016f81285b3576c33 Gerrit-Change-Number: 31672 Gerrit-PatchSet: 5 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: msuraev <msuraev(a)sysmocom.de> Gerrit-Comment-Date: Mon, 15 May 2023 17:07:22 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-bts[master]: [WIP] osmo-bts-trx: implement TCH/F9.6 support for CSD
by fixeria 15 May '23

15 May '23
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/32727 ) Change subject: [WIP] osmo-bts-trx: implement TCH/F9.6 support for CSD ...................................................................... [WIP] osmo-bts-trx: implement TCH/F9.6 support for CSD According to 3GPP TS 45.003, Figure 1a and section 3.3.4, for CSD a new block of coded data starts with every fourth burst and is distributed over 22 bursts. This requires us to: * enlarge the maximum burst buffer size to 22 * (2 * 58) bytes; * enlarge per-l1cs Uplink burst mask to hold up to 32 bits; * enlarge per-l1cs Uplink meas ring buffer to 22 entries; * add SCHED_MEAS_AVG_M_S22N22 - new Uplink meas AVG mode. Change-Id: I08ffbf8e79ce76a586d61f5463890c6e72a6d9b9 Related: OS#1572 --- M include/osmo-bts/scheduler.h M src/common/bts.c M src/common/scheduler.c M src/osmo-bts-trx/sched_lchan_pdtch.c M src/osmo-bts-trx/sched_lchan_tchf.c M src/osmo-bts-trx/sched_lchan_tchh.c M src/osmo-bts-trx/sched_lchan_xcch.c M src/osmo-bts-trx/scheduler_trx.c 8 files changed, 126 insertions(+), 38 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/27/32727/1 diff --git a/include/osmo-bts/scheduler.h b/include/osmo-bts/scheduler.h index 01e8e2b..b0c4b2f 100644 --- a/include/osmo-bts/scheduler.h +++ b/include/osmo-bts/scheduler.h @@ -93,7 +93,7 @@ sbit_t *ul_bursts; /* burst buffer for RX */ sbit_t *ul_bursts_prev;/* previous burst buffer for RX (repeated SACCH) */ uint32_t ul_first_fn; /* fn of first burst */ - uint8_t ul_mask; /* mask of received bursts */ + uint32_t ul_mask; /* mask of received bursts */ /* loss detection */ uint32_t last_tdma_fn; /* last processed TDMA frame number */ @@ -131,7 +131,7 @@ /* Uplink measurements */ struct { /* Active channel measurements (simple ring buffer) */ - struct l1sched_meas_set buf[8]; /* up to 8 entries */ + struct l1sched_meas_set buf[22]; /* up to 22 entries */ unsigned int current; /* current position */ /* Interference measurements */ @@ -300,6 +300,8 @@ /* Averaging mode for trx_sched_meas_avg() */ enum sched_meas_avg_mode { + /* last 22 bursts (for CSD on TCH/F and TCH/H) */ + SCHED_MEAS_AVG_M_S22N22, /* last 4 bursts (default for xCCH, PTCCH and PDTCH) */ SCHED_MEAS_AVG_M_S4N4, /* last 8 bursts (default for TCH/F and FACCH/F) */ diff --git a/src/common/bts.c b/src/common/bts.c index 242c5dd..0f8dcc7 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -776,23 +776,11 @@ return &bts->gsm_time; } -int bts_supports_cm(const struct gsm_bts *bts, - const struct rsl_ie_chan_mode *cm) +static int bts_supports_cm_speech(const struct gsm_bts *bts, + const struct rsl_ie_chan_mode *cm) { enum osmo_bts_features feature = _NUM_BTS_FEAT; - switch (cm->spd_ind) { - case RSL_CMOD_SPD_SIGN: - /* We assume that signalling support is mandatory, - * there is no BTS_FEAT_* definition to check that. */ - return 1; - case RSL_CMOD_SPD_SPEECH: - break; - case RSL_CMOD_SPD_DATA: - default: - return 0; - } - /* Before the requested pchan/cm combination can be checked, we need to * convert it to a feature identifier we can check */ switch (cm->chan_rt) { @@ -849,6 +837,44 @@ return 0; } +static int bts_supports_cm_data(const struct gsm_bts *bts, + const struct rsl_ie_chan_mode *cm) +{ + /* XXX: only osmo-bts-trx has limited support of CSD */ + switch (bts->variant) { + case BTS_OSMO_TRX: + /* XXX: only TCH/F9.6 (Um rate 12.0 kbit/s) is supported */ + if (cm->chan_rt != RSL_CMOD_CRT_TCH_Bm) + return 0; + switch (cm->chan_rate) { + case RSL_CMOD_CSD_NT_12k0: + case RSL_CMOD_CSD_T_9k6: + return 1; + } + return 0; + default: + return 0; + } +} + +int bts_supports_cm(const struct gsm_bts *bts, + const struct rsl_ie_chan_mode *cm) +{ + switch (cm->spd_ind) { + case RSL_CMOD_SPD_SIGN: + /* We assume that signalling support is mandatory, + * there is no BTS_FEAT_* definition to check that. */ + return 1; + case RSL_CMOD_SPD_SPEECH: + return bts_supports_cm_speech(bts, cm); + case RSL_CMOD_SPD_DATA: + return bts_supports_cm_data(bts, cm); + default: + return 0; + } + +} + /* return the gsm_lchan for the CBCH (if it exists at all) */ struct gsm_lchan *gsm_bts_get_cbch(struct gsm_bts *bts) { diff --git a/src/common/scheduler.c b/src/common/scheduler.c index cacae6c..62fe758 100644 --- a/src/common/scheduler.c +++ b/src/common/scheduler.c @@ -1077,9 +1077,9 @@ chan_state->lchan = lchan; /* Allocate memory for Rx/Tx burst buffers. Use the maximim size - * of 4 * (3 * 2 * 58) bytes, which is sufficient to store 4 8PSK - * modulated bursts. */ - const size_t buf_size = 4 * GSM_NBITS_NB_8PSK_PAYLOAD; + * of 22 * (2 * 58) bytes, which is sufficient to store 22 GMSK + * modulated bursts for CSD or 4 8PSK modulated bursts for EGPRS. */ + const size_t buf_size = 22 * GSM_NBITS_NB_GMSK_PAYLOAD; if (trx_chan_desc[chan].dl_fn != NULL) chan_state->dl_bursts = talloc_zero_size(l1ts, buf_size); if (trx_chan_desc[chan].ul_fn != NULL) { diff --git a/src/osmo-bts-trx/sched_lchan_pdtch.c b/src/osmo-bts-trx/sched_lchan_pdtch.c index 5ff7229..9ae68d0 100644 --- a/src/osmo-bts-trx/sched_lchan_pdtch.c +++ b/src/osmo-bts-trx/sched_lchan_pdtch.c @@ -44,7 +44,7 @@ struct l1sched_chan_state *chan_state = &l1ts->chan_state[bi->chan]; sbit_t *burst, *bursts_p = chan_state->ul_bursts; uint32_t first_fn; - uint8_t *mask = &chan_state->ul_mask; + uint32_t *mask = &chan_state->ul_mask; struct l1sched_meas_set meas_avg; uint8_t l2[EGPRS_0503_MAX_BYTES]; int n_errors = 0; diff --git a/src/osmo-bts-trx/sched_lchan_tchf.c b/src/osmo-bts-trx/sched_lchan_tchf.c index 6dfdff8..400252d 100644 --- a/src/osmo-bts-trx/sched_lchan_tchf.c +++ b/src/osmo-bts-trx/sched_lchan_tchf.c @@ -76,7 +76,7 @@ struct l1sched_chan_state *chan_state = &l1ts->chan_state[bi->chan]; struct gsm_lchan *lchan = chan_state->lchan; sbit_t *burst, *bursts_p = chan_state->ul_bursts; - uint8_t *mask = &chan_state->ul_mask; + uint32_t *mask = &chan_state->ul_mask; uint8_t rsl_cmode = chan_state->rsl_cmode; uint8_t tch_mode = chan_state->tch_mode; uint8_t tch_data[128]; /* just to be safe */ @@ -101,8 +101,9 @@ /* shift the buffer by 4 bursts leftwards */ if (bi->bid == 0) { - memcpy(bursts_p, bursts_p + 464, 464); - memset(bursts_p + 464, 0, 464); + const size_t bl = GSM_NBITS_NB_GMSK_PAYLOAD; + memmove(&bursts_p[0], &bursts_p[4 * bl], 18 * bl); + memset(&bursts_p[18 * bl], 0, 4 * bl); *mask = *mask << 4; } @@ -112,13 +113,13 @@ /* store measurements */ trx_sched_meas_push(chan_state, bi); - /* copy burst to end of buffer of 8 bursts */ - burst = bursts_p + bi->bid * 116 + 464; + /* copy burst to end of buffer of 22 bursts */ + burst = bursts_p + (bi->bid + 18) * GSM_NBITS_NB_GMSK_PAYLOAD; if (bi->burst_len > 0) { memcpy(burst, bi->burst + 3, 58); memcpy(burst + 58, bi->burst + 87, 58); } else - memset(burst, 0, 116); + memset(burst, 0, GSM_NBITS_NB_GMSK_PAYLOAD); /* wait until complete set of bursts */ if (bi->bid != 3) @@ -132,8 +133,13 @@ return 0; /* TODO: send BFI */ } - /* decode - * also shift buffer by 4 bursts for interleaving */ + /* TCH/F: speech and signalling frames are interleaved over 8 bursts, while + * CSD frames are interleaved over 22 bursts. Unless we're in CSD mode, + * decode only the last 8 bursts to avoid introducing additional delays. */ + if (rsl_cmode != RSL_CMOD_SPD_DATA) + bursts_p += (22 - 8) * GSM_NBITS_NB_GMSK_PAYLOAD; + + /* decode the payload */ switch (tch_mode) { case GSM48_CMODE_SIGN: case GSM48_CMODE_SPEECH_V1: /* FR */ @@ -221,6 +227,21 @@ } break; +#if 0 + /* CSD (TCH/F9.6): 12.0 kbit/s radio interface rate */ + case GSM48_CMODE_DATA_12k0: + { + ubit_t decoded[244]; + sbit_t cB[456]; + + /* TODO: unmap, handle FACCH */ + gsm0503_tch_f96_deinterleave(&cB[0], bursts_p); + osmo_conv_decode(&gsm0503_tch_f96, &cB[0], &decoded[0]); + osmo_ubit2pbit_ext(&tch_data[0], 0, decoded, 0, 240, 1); + meas_avg_mode = SCHED_MEAS_AVG_M_S22N22; + break; + } +#endif default: LOGL1SB(DL1P, LOGL_ERROR, l1ts, bi, "TCH mode %u invalid, please fix!\n", @@ -474,6 +495,7 @@ struct l1sched_chan_state *chan_state = &l1ts->chan_state[br->chan]; uint8_t tch_mode = chan_state->tch_mode; ubit_t *burst, *bursts_p = chan_state->dl_bursts; + const size_t bl = GSM_NBITS_NB_GMSK_PAYLOAD; struct msgb *msg; /* send burst, if we already got a frame */ @@ -483,8 +505,8 @@ /* BURST BYPASS */ /* shift buffer by 4 bursts for interleaving */ - memcpy(bursts_p, bursts_p + 464, 464); - memset(bursts_p + 464, 0, 464); + memmove(&bursts_p[0], &bursts_p[4 * bl], 18 * bl); + memset(&bursts_p[18 * bl], 0, 4 * bl); /* dequeue a message to be transmitted */ msg = tch_dl_dequeue(l1ts, br); @@ -503,11 +525,17 @@ goto send_burst; } - /* populate the buffer with bursts */ - if (msgb_l2len(msg) == GSM_MACBLOCK_LEN) { - gsm0503_tch_fr_encode(bursts_p, msg->l2h, msgb_l2len(msg), 1); + if (msgb_l2len(msg) == GSM_MACBLOCK_LEN) chan_state->dl_facch_bursts = 8; - } else if (tch_mode == GSM48_CMODE_SPEECH_AMR) { + + /* populate the buffer with bursts */ + switch (tch_mode) { + case GSM48_CMODE_SIGN: + case GSM48_CMODE_SPEECH_V1: + case GSM48_CMODE_SPEECH_EFR: + gsm0503_tch_fr_encode(bursts_p, msg->l2h, msgb_l2len(msg), 1); + break; + case GSM48_CMODE_SPEECH_AMR: /* the first FN 4,13,21 defines that CMI is included in frame, * the first FN 0,8,17 defines that CMR is included in frame. */ @@ -517,8 +545,20 @@ chan_state->codec, chan_state->codecs, chan_state->dl_ft, chan_state->dl_cmr); - } else { - gsm0503_tch_fr_encode(bursts_p, msg->l2h, msgb_l2len(msg), 1); + break; +#if 0 + case GSM48_CMODE_DATA_12k0: + { + ubit_t encoded[244]; + sbit_t cB[456]; + + // osmo_conv_encode(&gsm0503_tch_f96, &cB[0], &decoded[0]); + // gsm0503_tch_f96_interleave(&cB[0], bursts_p); + break; + } +#endif + default: + OSMO_ASSERT(0); } /* free message */ diff --git a/src/osmo-bts-trx/sched_lchan_tchh.c b/src/osmo-bts-trx/sched_lchan_tchh.c index 94e2a9c..e9f0b6f 100644 --- a/src/osmo-bts-trx/sched_lchan_tchh.c +++ b/src/osmo-bts-trx/sched_lchan_tchh.c @@ -98,7 +98,7 @@ struct l1sched_chan_state *chan_state = &l1ts->chan_state[bi->chan]; struct gsm_lchan *lchan = chan_state->lchan; sbit_t *burst, *bursts_p = chan_state->ul_bursts; - uint8_t *mask = &chan_state->ul_mask; + uint32_t *mask = &chan_state->ul_mask; uint8_t rsl_cmode = chan_state->rsl_cmode; uint8_t tch_mode = chan_state->tch_mode; uint8_t tch_data[128]; /* just to be safe */ diff --git a/src/osmo-bts-trx/sched_lchan_xcch.c b/src/osmo-bts-trx/sched_lchan_xcch.c index 1945d32..34b37c1 100644 --- a/src/osmo-bts-trx/sched_lchan_xcch.c +++ b/src/osmo-bts-trx/sched_lchan_xcch.c @@ -52,7 +52,7 @@ struct l1sched_chan_state *chan_state = &l1ts->chan_state[bi->chan]; sbit_t *burst, *bursts_p = chan_state->ul_bursts; uint32_t *first_fn = &chan_state->ul_first_fn; - uint8_t *mask = &chan_state->ul_mask; + uint32_t *mask = &chan_state->ul_mask; uint8_t l2[GSM_MACBLOCK_LEN], l2_len; struct l1sched_meas_set meas_avg; int n_errors = 0; diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index e7ed5ea..08f3fda 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -638,6 +638,7 @@ /* Measurement averaging mode sets: [MODE] = { SHIFT, NUM } */ static const uint8_t trx_sched_meas_modeset[][2] = { + [SCHED_MEAS_AVG_M_S22N22] = { 22, 22 }, [SCHED_MEAS_AVG_M_S4N4] = { 4, 4 }, [SCHED_MEAS_AVG_M_S8N8] = { 8, 8 }, [SCHED_MEAS_AVG_M_S6N4] = { 6, 4 }, -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32727 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I08ffbf8e79ce76a586d61f5463890c6e72a6d9b9 Gerrit-Change-Number: 32727 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-bts[master]: osmo-bts-trx: use direct pointer to chan_state->{ul,dl}_bursts
by fixeria 15 May '23

15 May '23
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/32726 ) Change subject: osmo-bts-trx: use direct pointer to chan_state->{ul,dl}_bursts ...................................................................... osmo-bts-trx: use direct pointer to chan_state->{ul,dl}_bursts There is no more need to access the UL/DL buffers via pointer to pointer thanks to the previous patch [1] moving the memory management routines out of the logical channel specific Rx/Tx handlers. Change-Id: Ib1e8e86ac60a7ac9b0415ef66b609eaa33443c19 Related: [1] c45e03726af8a2b46b7166b3c47bc666ba933a69 --- M src/osmo-bts-trx/sched_lchan_pdtch.c M src/osmo-bts-trx/sched_lchan_tchf.c M src/osmo-bts-trx/sched_lchan_tchh.c M src/osmo-bts-trx/sched_lchan_xcch.c 4 files changed, 68 insertions(+), 54 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/26/32726/1 diff --git a/src/osmo-bts-trx/sched_lchan_pdtch.c b/src/osmo-bts-trx/sched_lchan_pdtch.c index ddb4478..5ff7229 100644 --- a/src/osmo-bts-trx/sched_lchan_pdtch.c +++ b/src/osmo-bts-trx/sched_lchan_pdtch.c @@ -42,7 +42,7 @@ int rx_pdtch_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi) { struct l1sched_chan_state *chan_state = &l1ts->chan_state[bi->chan]; - sbit_t *burst, **bursts_p = &chan_state->ul_bursts; + sbit_t *burst, *bursts_p = chan_state->ul_bursts; uint32_t first_fn; uint8_t *mask = &chan_state->ul_mask; struct l1sched_meas_set meas_avg; @@ -62,7 +62,7 @@ /* clear burst */ if (bi->bid == 0) { - memset(*bursts_p, 0, GSM0503_EGPRS_BURSTS_NBITS); + memset(bursts_p, 0, GSM0503_EGPRS_BURSTS_NBITS); *mask = 0x0; } @@ -75,20 +75,20 @@ /* copy burst to buffer of 4 bursts */ switch (bi->burst_len) { case EGPRS_BURST_LEN: - burst = *bursts_p + bi->bid * 348; + burst = bursts_p + bi->bid * 348; memcpy(burst, bi->burst + 9, 174); memcpy(burst + 174, bi->burst + 261, 174); n_bursts_bits = GSM0503_EGPRS_BURSTS_NBITS; break; case GSM_BURST_LEN: - burst = *bursts_p + bi->bid * 116; + burst = bursts_p + bi->bid * 116; memcpy(burst, bi->burst + 3, 58); memcpy(burst + 58, bi->burst + 87, 58); n_bursts_bits = GSM0503_GPRS_BURSTS_NBITS; break; case 0: /* NOPE.ind, assume GPRS? */ - burst = *bursts_p + bi->bid * 116; + burst = bursts_p + bi->bid * 116; memset(burst, 0, 116); n_bursts_bits = GSM0503_GPRS_BURSTS_NBITS; } @@ -113,11 +113,11 @@ * then we incur decoding overhead of 31 bits on the Type 3 EGPRS * header, which is tolerable. */ - rc = gsm0503_pdtch_egprs_decode(l2, *bursts_p, n_bursts_bits, + rc = gsm0503_pdtch_egprs_decode(l2, bursts_p, n_bursts_bits, NULL, &n_errors, &n_bits_total); if ((bi->burst_len == GSM_BURST_LEN) && (rc < 0)) { - rc = gsm0503_pdtch_decode(l2, *bursts_p, NULL, + rc = gsm0503_pdtch_decode(l2, bursts_p, NULL, &n_errors, &n_bits_total); } @@ -144,7 +144,7 @@ int tx_pdtch_fn(struct l1sched_ts *l1ts, struct trx_dl_burst_req *br) { struct msgb *msg = NULL; /* make GCC happy */ - ubit_t *burst, **bursts_p = &l1ts->chan_state[br->chan].dl_bursts; + ubit_t *burst, *bursts_p = l1ts->chan_state[br->chan].dl_bursts; enum trx_mod_type *mod = &l1ts->chan_state[br->chan].dl_mod_type; int rc = 0; @@ -166,9 +166,9 @@ /* BURST BYPASS */ /* encode bursts */ - rc = gsm0503_pdtch_egprs_encode(*bursts_p, msg->l2h, msg->tail - msg->l2h); + rc = gsm0503_pdtch_egprs_encode(bursts_p, msg->l2h, msg->tail - msg->l2h); if (rc < 0) - rc = gsm0503_pdtch_encode(*bursts_p, msg->l2h, msg->tail - msg->l2h); + rc = gsm0503_pdtch_encode(bursts_p, msg->l2h, msg->tail - msg->l2h); /* check validity of message */ if (rc < 0) { @@ -189,7 +189,7 @@ send_burst: /* compose burst */ if (*mod == TRX_MOD_T_8PSK) { - burst = *bursts_p + br->bid * 348; + burst = bursts_p + br->bid * 348; memset(br->burst, 1, 9); memcpy(br->burst + 9, burst, 174); memcpy(br->burst + 183, TRX_8PSK_NB_TSC(br), 78); @@ -198,7 +198,7 @@ br->burst_len = EGPRS_BURST_LEN; } else { - burst = *bursts_p + br->bid * 116; + burst = bursts_p + br->bid * 116; memcpy(br->burst + 3, burst, 58); memcpy(br->burst + 61, TRX_GMSK_NB_TSC(br), 26); memcpy(br->burst + 87, burst + 58, 58); diff --git a/src/osmo-bts-trx/sched_lchan_tchf.c b/src/osmo-bts-trx/sched_lchan_tchf.c index 823f410..6dfdff8 100644 --- a/src/osmo-bts-trx/sched_lchan_tchf.c +++ b/src/osmo-bts-trx/sched_lchan_tchf.c @@ -75,7 +75,7 @@ { struct l1sched_chan_state *chan_state = &l1ts->chan_state[bi->chan]; struct gsm_lchan *lchan = chan_state->lchan; - sbit_t *burst, **bursts_p = &chan_state->ul_bursts; + sbit_t *burst, *bursts_p = chan_state->ul_bursts; uint8_t *mask = &chan_state->ul_mask; uint8_t rsl_cmode = chan_state->rsl_cmode; uint8_t tch_mode = chan_state->tch_mode; @@ -101,8 +101,8 @@ /* shift the buffer by 4 bursts leftwards */ if (bi->bid == 0) { - memcpy(*bursts_p, *bursts_p + 464, 464); - memset(*bursts_p + 464, 0, 464); + memcpy(bursts_p, bursts_p + 464, 464); + memset(bursts_p + 464, 0, 464); *mask = *mask << 4; } @@ -113,7 +113,7 @@ trx_sched_meas_push(chan_state, bi); /* copy burst to end of buffer of 8 bursts */ - burst = *bursts_p + bi->bid * 116 + 464; + burst = bursts_p + bi->bid * 116 + 464; if (bi->burst_len > 0) { memcpy(burst, bi->burst + 3, 58); memcpy(burst + 58, bi->burst + 87, 58); @@ -137,12 +137,12 @@ switch (tch_mode) { case GSM48_CMODE_SIGN: case GSM48_CMODE_SPEECH_V1: /* FR */ - rc = gsm0503_tch_fr_decode(tch_data, *bursts_p, 1, 0, &n_errors, &n_bits_total); + rc = gsm0503_tch_fr_decode(tch_data, bursts_p, 1, 0, &n_errors, &n_bits_total); if (rc == GSM_FR_BYTES) /* only for valid *speech* frames */ lchan_set_marker(osmo_fr_is_any_sid(tch_data), lchan); /* DTXu */ break; case GSM48_CMODE_SPEECH_EFR: /* EFR */ - rc = gsm0503_tch_fr_decode(tch_data, *bursts_p, 1, 1, &n_errors, &n_bits_total); + rc = gsm0503_tch_fr_decode(tch_data, bursts_p, 1, 1, &n_errors, &n_bits_total); if (rc == GSM_EFR_BYTES) /* only for valid *speech* frames */ lchan_set_marker(osmo_efr_is_any_sid(tch_data), lchan); /* DTXu */ break; @@ -168,7 +168,7 @@ * we receive an FACCH frame instead of a voice frame (we * do not know this before we actually decode the frame) */ amr = sizeof(struct amr_hdr); - rc = gsm0503_tch_afs_decode_dtx(tch_data + amr, *bursts_p, + rc = gsm0503_tch_afs_decode_dtx(tch_data + amr, bursts_p, amr_is_cmr, chan_state->codec, chan_state->codecs, &chan_state->ul_ft, &chan_state->ul_cmr, &n_errors, &n_bits_total, &chan_state->amr_last_dtx); @@ -473,7 +473,7 @@ { struct l1sched_chan_state *chan_state = &l1ts->chan_state[br->chan]; uint8_t tch_mode = chan_state->tch_mode; - ubit_t *burst, **bursts_p = &chan_state->dl_bursts; + ubit_t *burst, *bursts_p = chan_state->dl_bursts; struct msgb *msg; /* send burst, if we already got a frame */ @@ -483,8 +483,8 @@ /* BURST BYPASS */ /* shift buffer by 4 bursts for interleaving */ - memcpy(*bursts_p, *bursts_p + 464, 464); - memset(*bursts_p + 464, 0, 464); + memcpy(bursts_p, bursts_p + 464, 464); + memset(bursts_p + 464, 0, 464); /* dequeue a message to be transmitted */ msg = tch_dl_dequeue(l1ts, br); @@ -498,27 +498,27 @@ }; LOGL1SB(DL1P, LOGL_DEBUG, l1ts, br, "No TCH or FACCH prim for transmit.\n"); - gsm0503_tch_fr_encode(*bursts_p, dummy, sizeof(dummy), 1); + gsm0503_tch_fr_encode(bursts_p, dummy, sizeof(dummy), 1); chan_state->dl_facch_bursts = 8; goto send_burst; } /* populate the buffer with bursts */ if (msgb_l2len(msg) == GSM_MACBLOCK_LEN) { - gsm0503_tch_fr_encode(*bursts_p, msg->l2h, msgb_l2len(msg), 1); + gsm0503_tch_fr_encode(bursts_p, msg->l2h, msgb_l2len(msg), 1); chan_state->dl_facch_bursts = 8; } else if (tch_mode == GSM48_CMODE_SPEECH_AMR) { /* the first FN 4,13,21 defines that CMI is included in frame, * the first FN 0,8,17 defines that CMR is included in frame. */ - gsm0503_tch_afs_encode(*bursts_p, msg->l2h + sizeof(struct amr_hdr), + gsm0503_tch_afs_encode(bursts_p, msg->l2h + sizeof(struct amr_hdr), msgb_l2len(msg) - sizeof(struct amr_hdr), !sched_tchf_dl_amr_cmi_map[br->fn % 26], chan_state->codec, chan_state->codecs, chan_state->dl_ft, chan_state->dl_cmr); } else { - gsm0503_tch_fr_encode(*bursts_p, msg->l2h, msgb_l2len(msg), 1); + gsm0503_tch_fr_encode(bursts_p, msg->l2h, msgb_l2len(msg), 1); } /* free message */ @@ -526,7 +526,7 @@ send_burst: /* compose burst */ - burst = *bursts_p + br->bid * 116; + burst = bursts_p + br->bid * 116; memcpy(br->burst + 3, burst, 58); memcpy(br->burst + 61, TRX_GMSK_NB_TSC(br), 26); memcpy(br->burst + 87, burst + 58, 58); diff --git a/src/osmo-bts-trx/sched_lchan_tchh.c b/src/osmo-bts-trx/sched_lchan_tchh.c index 068351a..94e2a9c 100644 --- a/src/osmo-bts-trx/sched_lchan_tchh.c +++ b/src/osmo-bts-trx/sched_lchan_tchh.c @@ -97,7 +97,7 @@ { struct l1sched_chan_state *chan_state = &l1ts->chan_state[bi->chan]; struct gsm_lchan *lchan = chan_state->lchan; - sbit_t *burst, **bursts_p = &chan_state->ul_bursts; + sbit_t *burst, *bursts_p = chan_state->ul_bursts; uint8_t *mask = &chan_state->ul_mask; uint8_t rsl_cmode = chan_state->rsl_cmode; uint8_t tch_mode = chan_state->tch_mode; @@ -124,9 +124,9 @@ /* shift the buffer by 2 bursts leftwards */ if (bi->bid == 0) { - memcpy(*bursts_p, *bursts_p + 232, 232); - memcpy(*bursts_p + 232, *bursts_p + 464, 232); - memset(*bursts_p + 464, 0, 232); + memcpy(bursts_p, bursts_p + 232, 232); + memcpy(bursts_p + 232, bursts_p + 464, 232); + memset(bursts_p + 464, 0, 232); *mask = *mask << 2; } @@ -137,7 +137,7 @@ trx_sched_meas_push(chan_state, bi); /* copy burst to end of buffer of 6 bursts */ - burst = *bursts_p + bi->bid * 116 + 464; + burst = bursts_p + bi->bid * 116 + 464; if (bi->burst_len > 0) { memcpy(burst, bi->burst + 3, 58); memcpy(burst + 58, bi->burst + 87, 58); @@ -174,7 +174,7 @@ meas_avg_mode = SCHED_MEAS_AVG_M_S6N6; /* fall-through */ case GSM48_CMODE_SPEECH_V1: /* HR or signalling */ - rc = gsm0503_tch_hr_decode(tch_data, *bursts_p, + rc = gsm0503_tch_hr_decode(tch_data, bursts_p, !sched_tchh_ul_facch_map[bi->fn % 26], &n_errors, &n_bits_total); if (rc == GSM_HR_BYTES_RTP_RFC5993) { /* only for valid *speech* frames */ @@ -204,7 +204,7 @@ /* See comment in function rx_tchf_fn() */ amr = sizeof(struct amr_hdr); - rc = gsm0503_tch_ahs_decode_dtx(tch_data + amr, *bursts_p, + rc = gsm0503_tch_ahs_decode_dtx(tch_data + amr, bursts_p, !sched_tchh_ul_facch_map[bi->fn % 26], !fn_is_cmi, chan_state->codec, chan_state->codecs, &chan_state->ul_ft, @@ -372,7 +372,7 @@ { struct l1sched_chan_state *chan_state = &l1ts->chan_state[br->chan]; uint8_t tch_mode = chan_state->tch_mode; - ubit_t *burst, **bursts_p = &chan_state->dl_bursts; + ubit_t *burst, *bursts_p = chan_state->dl_bursts; struct msgb *msg; /* send burst, if we already got a frame */ @@ -382,12 +382,12 @@ /* BURST BYPASS */ /* shift buffer by 2 bursts for interleaving */ - memcpy(*bursts_p, *bursts_p + 232, 232); + memcpy(bursts_p, bursts_p + 232, 232); if (chan_state->dl_ongoing_facch) { - memcpy(*bursts_p + 232, *bursts_p + 464, 232); - memset(*bursts_p + 464, 0, 232); + memcpy(bursts_p + 232, bursts_p + 464, 232); + memset(bursts_p + 464, 0, 232); } else { - memset(*bursts_p + 232, 0, 232); + memset(bursts_p + 232, 0, 232); } /* dequeue a message to be transmitted */ @@ -418,7 +418,7 @@ goto send_burst; } - gsm0503_tch_hr_encode(*bursts_p, dummy, sizeof(dummy)); + gsm0503_tch_hr_encode(bursts_p, dummy, sizeof(dummy)); chan_state->dl_ongoing_facch = 1; chan_state->dl_facch_bursts = 6; goto send_burst; @@ -426,21 +426,21 @@ /* populate the buffer with bursts */ if (msgb_l2len(msg) == GSM_MACBLOCK_LEN) { - gsm0503_tch_hr_encode(*bursts_p, msg->l2h, msgb_l2len(msg)); + gsm0503_tch_hr_encode(bursts_p, msg->l2h, msgb_l2len(msg)); chan_state->dl_ongoing_facch = 1; /* first of two TCH frames */ chan_state->dl_facch_bursts = 6; } else if (tch_mode == GSM48_CMODE_SPEECH_AMR) { /* the first FN 4,13,21 or 5,14,22 defines that CMI is included * in frame, the first FN 0,8,17 or 1,9,18 defines that CMR is * included in frame. */ - gsm0503_tch_ahs_encode(*bursts_p, msg->l2h + sizeof(struct amr_hdr), + gsm0503_tch_ahs_encode(bursts_p, msg->l2h + sizeof(struct amr_hdr), msgb_l2len(msg) - sizeof(struct amr_hdr), !sched_tchh_dl_amr_cmi_map[br->fn % 26], chan_state->codec, chan_state->codecs, chan_state->dl_ft, chan_state->dl_cmr); } else { - gsm0503_tch_hr_encode(*bursts_p, msg->l2h, msgb_l2len(msg)); + gsm0503_tch_hr_encode(bursts_p, msg->l2h, msgb_l2len(msg)); } /* free message */ @@ -448,7 +448,7 @@ send_burst: /* compose burst */ - burst = *bursts_p + br->bid * 116; + burst = bursts_p + br->bid * 116; memcpy(br->burst + 3, burst, 58); memcpy(br->burst + 61, TRX_GMSK_NB_TSC(br), 26); memcpy(br->burst + 87, burst + 58, 58); diff --git a/src/osmo-bts-trx/sched_lchan_xcch.c b/src/osmo-bts-trx/sched_lchan_xcch.c index 786b509..1945d32 100644 --- a/src/osmo-bts-trx/sched_lchan_xcch.c +++ b/src/osmo-bts-trx/sched_lchan_xcch.c @@ -50,7 +50,7 @@ int rx_data_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi) { struct l1sched_chan_state *chan_state = &l1ts->chan_state[bi->chan]; - sbit_t *burst, **bursts_p = &chan_state->ul_bursts; + sbit_t *burst, *bursts_p = chan_state->ul_bursts; uint32_t *first_fn = &chan_state->ul_first_fn; uint8_t *mask = &chan_state->ul_mask; uint8_t l2[GSM_MACBLOCK_LEN], l2_len; @@ -71,7 +71,7 @@ /* clear burst & store frame number of first burst */ if (bi->bid == 0) { - memset(*bursts_p, 0, 464); + memset(bursts_p, 0, 464); *mask = 0x0; *first_fn = bi->fn; } @@ -84,7 +84,7 @@ /* Copy burst to buffer of 4 bursts. If the burst indication contains * no data, ensure that the buffer does not stay uninitialized */ - burst = *bursts_p + bi->bid * 116; + burst = bursts_p + bi->bid * 116; if (bi->burst_len > 0) { memcpy(burst, bi->burst + 3, 58); memcpy(burst + 58, bi->burst + 87, 58); @@ -112,7 +112,7 @@ *mask = 0x0; /* decode */ - rc = gsm0503_xcch_decode(l2, *bursts_p, &n_errors, &n_bits_total); + rc = gsm0503_xcch_decode(l2, bursts_p, &n_errors, &n_bits_total); if (rc) { LOGL1SB(DL1P, LOGL_NOTICE, l1ts, bi, "Received bad data (%u/%u)\n", bi->fn % l1ts->mf_period, l1ts->mf_period); @@ -123,8 +123,8 @@ * information from the previous SACCH block. See also: * 3GPP TS 44.006, section 11.2 */ if (rep_sacch) { - add_sbits(*bursts_p, chan_state->ul_bursts_prev); - rc = gsm0503_xcch_decode(l2, *bursts_p, &n_errors, &n_bits_total); + add_sbits(bursts_p, chan_state->ul_bursts_prev); + rc = gsm0503_xcch_decode(l2, bursts_p, &n_errors, &n_bits_total); if (rc) { LOGL1SB(DL1P, LOGL_NOTICE, l1ts, bi, "Combining current SACCH block with previous SACCH block also yields bad data (%u/%u)\n", @@ -143,7 +143,7 @@ /* Keep a copy to ease decoding in the next repetition pass */ if (rep_sacch) - memcpy(chan_state->ul_bursts_prev, *bursts_p, 464); + memcpy(chan_state->ul_bursts_prev, bursts_p, 464); return _sched_compose_ph_data_ind(l1ts, *first_fn, bi->chan, l2, l2_len, @@ -156,7 +156,7 @@ int tx_data_fn(struct l1sched_ts *l1ts, struct trx_dl_burst_req *br) { struct msgb *msg = NULL; /* make GCC happy */ - ubit_t *burst, **bursts_p = &l1ts->chan_state[br->chan].dl_bursts; + ubit_t *burst, *bursts_p = l1ts->chan_state[br->chan].dl_bursts; /* send burst, if we already got a frame */ if (br->bid > 0) @@ -181,14 +181,14 @@ /* BURST BYPASS */ /* encode bursts */ - gsm0503_xcch_encode(*bursts_p, msg->l2h); + gsm0503_xcch_encode(bursts_p, msg->l2h); /* free message */ msgb_free(msg); send_burst: /* compose burst */ - burst = *bursts_p + br->bid * 116; + burst = bursts_p + br->bid * 116; memcpy(br->burst + 3, burst, 58); memcpy(br->burst + 61, TRX_GMSK_NB_TSC(br), 26); memcpy(br->burst + 87, burst + 58, 58); -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32726 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ib1e8e86ac60a7ac9b0415ef66b609eaa33443c19 Gerrit-Change-Number: 32726 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in libosmocore[master]: coding: fix doxygen doc for _xcch_encode_cB()
by fixeria 15 May '23

15 May '23
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/32725 ) Change subject: coding: fix doxygen doc for _xcch_encode_cB() ...................................................................... coding: fix doxygen doc for _xcch_encode_cB() Change-Id: I09ed28bd3060b9c2c958f0f465a92af7d6bacadd --- M src/coding/gsm0503_coding.c 1 file changed, 10 insertions(+), 1 deletion(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c index f2b0180..07c8c98 100644 --- a/src/coding/gsm0503_coding.c +++ b/src/coding/gsm0503_coding.c @@ -606,7 +606,7 @@ /*! convenience wrapper for encoding to coded bits * \param[out] cB caller-allocated buffer for 456 coded bits as per TS 05.03 4.1.3 - * \param[out] l2_data to-be-encoded L2 Frame + * \param[in] l2_data to-be-encoded L2 Frame * \returns 0 */ static int _xcch_encode_cB(ubit_t *cB, const uint8_t *l2_data) { -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/32725 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I09ed28bd3060b9c2c958f0f465a92af7d6bacadd Gerrit-Change-Number: 32725 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[L] Change in libosmocore[master]: codec: replace GSM-FR ECU with new implementation
by falconia 15 May '23

15 May '23
Attention is currently required from: laforge, dexter. falconia has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/32685 ) Change subject: codec: replace GSM-FR ECU with new implementation ...................................................................... Patch Set 3: (1 comment) File include/osmocom/codec/ecu.h: https://gerrit.osmocom.org/c/libosmocore/+/32685/comment/248ff8b3_6259a5db PS3, Line 9: /* ECU state for GSM-FR - deprecated version only! */ > It is not so clear why we keep this. […] The old implementation _with its state structure_ is a public API of its own, predating the abstracted ECU API, and at least gapk still uses that old, officially deprecated API - and "uses" not only in the sense of calling the old functions, but gapk code actually digs inside that struct osmo_ecu_fr_state! -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/32685 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I0200e423ca6165c1313ec9a4effc3f3047f5f032 Gerrit-Change-Number: 32685 Gerrit-PatchSet: 3 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Mon, 15 May 2023 16:47:32 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • ...
  • 259
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.