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

December 2022

  • 1 participants
  • 1979 discussions
Change in osmo-pcu[master]: Refactor code related to DL-TBF upgrade to multislot
by pespin 13 Dec '22

13 Dec '22
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-pcu/+/30569 to look at the new patch set (#2). Change subject: Refactor code related to DL-TBF upgrade to multislot ...................................................................... Refactor code related to DL-TBF upgrade to multislot * Make clear the code relates to DL-TBF and not UL-TBF. * Change wording to "upgrade" to match the existing field and API "tbf_can_upgrade_to_multislot()". * Free the TBF if we cannot allocate new resources. Change-Id: I0e4f8d7e46235a471b2124b280c81ff07b6967a4 --- M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp M src/tbf_dl.h M src/tbf_dl_fsm.c M tests/alloc/AllocTest.cpp M tests/tbf/TbfTest.cpp M tests/tbf/TbfTest.err 8 files changed, 58 insertions(+), 61 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/69/30569/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30569 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I0e4f8d7e46235a471b2124b280c81ff07b6967a4 Gerrit-Change-Number: 30569 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmo-pcu[master]: Trigger PACCH assignment inside dl_tbf_upgrade_to_multislot()
by pespin 13 Dec '22

13 Dec '22
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-pcu/+/30570 to look at the new patch set (#2). Change subject: Trigger PACCH assignment inside dl_tbf_upgrade_to_multislot() ...................................................................... Trigger PACCH assignment inside dl_tbf_upgrade_to_multislot() The triggering of the assignment for the new TBF allocation is part of the "upgrade to multislot" process, hence move that inside the function. Change-Id: Ic2b959f2476b900cb263ccd8f6698ed843bafd29 --- M src/tbf_dl.cpp M src/tbf_dl_fsm.c M tests/alloc/AllocTest.err M tests/tbf/TbfTest.err 4 files changed, 47,122 insertions(+), 23,564 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/70/30570/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30570 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ic2b959f2476b900cb263ccd8f6698ed843bafd29 Gerrit-Change-Number: 30570 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmo-bts[master]: l1sap: Accept RFC5993 and TS 101.318 HR GSM payload
by pespin 13 Dec '22

13 Dec '22
Attention is currently required from: fixeria, dexter. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/30523 ) Change subject: l1sap: Accept RFC5993 and TS 101.318 HR GSM payload ...................................................................... Patch Set 4: (1 comment) File src/common/l1sap.c: https://gerrit.osmocom.org/c/osmo-bts/+/30523/comment/4180639f_66c3fabf PS3, Line 1915: * reception depending on what the particular BTS model supports. In case no preference is set, it will be > I thought about this but I don't know the formats for all BTS models. […] Better setting one than leaving it "who knows". If somebody tests octobts again and it sees the error message, then that can be easily spotted and fixed. It's much better than feeding stuff without proper checks imho. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/30523 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I17f0b546042fa333780fd2f5c315898ab0df574c Gerrit-Change-Number: 30523 Gerrit-PatchSet: 4 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 13 Dec 2022 15:01:49 +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
Change in osmo-bts[master]: l1sap: Accept RFC5993 and TS 101.318 HR GSM payload
by dexter 13 Dec '22

13 Dec '22
Attention is currently required from: pespin, fixeria. dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/30523 ) Change subject: l1sap: Accept RFC5993 and TS 101.318 HR GSM payload ...................................................................... Patch Set 3: (1 comment) File src/common/l1sap.c: https://gerrit.osmocom.org/c/osmo-bts/+/30523/comment/0e2325de_86cc0068 PS3, Line 1260: if (lchan->tch_mode == GSM48_CMODE_SPEECH_V1 && lchan->type == GSM_LCHAN_TCH_H) { > You could do a switch (lchan->tch_mode) together with the block above. Done -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/30523 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I17f0b546042fa333780fd2f5c315898ab0df574c Gerrit-Change-Number: 30523 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Tue, 13 Dec 2022 14:43:50 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bts[master]: l1sap: Accept RFC5993 and TS 101.318 HR GSM payload
by dexter 13 Dec '22

13 Dec '22
Attention is currently required from: pespin, fixeria. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bts/+/30523 to look at the new patch set (#4). Change subject: l1sap: Accept RFC5993 and TS 101.318 HR GSM payload ...................................................................... l1sap: Accept RFC5993 and TS 101.318 HR GSM payload Unfotunately there are two different RTP formats for HR GSM specified and it is unclear which should be used with GSM networks. Also esch BTS model may have a preference for either one or the other format. Lets set internal flags to determine the preference for each BTS model and then lets use this information to convert incoming RTP packets into the prefered format. Doing so we will make sure that always both formats are accepted. Related: OS#5688 Change-Id: I17f0b546042fa333780fd2f5c315898ab0df574c --- M include/osmo-bts/bts.h M include/osmo-bts/lchan.h M src/common/l1sap.c M src/osmo-bts-lc15/main.c M src/osmo-bts-oc2g/main.c M src/osmo-bts-sysmo/main.c M src/osmo-bts-trx/main.c 7 files changed, 63 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/23/30523/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/30523 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I17f0b546042fa333780fd2f5c315898ab0df574c Gerrit-Change-Number: 30523 Gerrit-PatchSet: 4 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmo-bts[master]: l1sap: Accept RFC5993 and TS 101.318 HR GSM payload
by dexter 13 Dec '22

13 Dec '22
Attention is currently required from: pespin, fixeria. dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/30523 ) Change subject: l1sap: Accept RFC5993 and TS 101.318 HR GSM payload ...................................................................... Patch Set 4: (2 comments) File src/common/l1sap.c: https://gerrit.osmocom.org/c/osmo-bts/+/30523/comment/9ba2f3e7_57deb2ca PS3, Line 1915: * reception depending on what the particular BTS model supports. In case no preference is set, it will be > I'd go for explicitly setting supported values in each bts_model, and avoid code paths where we end […] I thought about this but I don't know the formats for all BTS models. I think for all those sysmo-bts like models we can assume that it is TS 101.319 but what about octbts? I am not sure. https://gerrit.osmocom.org/c/osmo-bts/+/30523/comment/acf971f1_33218f41 PS3, Line 1924: * byte TOC header in frond of the audio payload. (See also: RFC 5993, section 5.2) */ > typo: front Done -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/30523 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I17f0b546042fa333780fd2f5c315898ab0df574c Gerrit-Change-Number: 30523 Gerrit-PatchSet: 4 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Tue, 13 Dec 2022 14:43:30 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in osmo-pcu[master]: Trigger PACCH assignment inside dl_tbf_upgrade_to_multislot()
by pespin 13 Dec '22

13 Dec '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30570 ) Change subject: Trigger PACCH assignment inside dl_tbf_upgrade_to_multislot() ...................................................................... Trigger PACCH assignment inside dl_tbf_upgrade_to_multislot() The triggering of the assignment for the new TBF allocation is part of the "upgrade to multislot" process, hence move that inside the function. Change-Id: Ic2b959f2476b900cb263ccd8f6698ed843bafd29 --- M src/tbf_dl.cpp M tests/alloc/AllocTest.err M tests/tbf/TbfTest.err 3 files changed, 47,121 insertions(+), 23,560 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/70/30570/1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30570 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ic2b959f2476b900cb263ccd8f6698ed843bafd29 Gerrit-Change-Number: 30570 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-pcu[master]: Refactor code related to DL-TBF upgrade to multislot
by pespin 13 Dec '22

13 Dec '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30569 ) Change subject: Refactor code related to DL-TBF upgrade to multislot ...................................................................... Refactor code related to DL-TBF upgrade to multislot * Make clear the code relates to DL-TBF and not UL-TBF. * Change wording to "upgrade" to match the existing field and API "tbf_can_upgrade_to_multislot()". * Free the TBF if we cannot allocate new resources. Change-Id: I0e4f8d7e46235a471b2124b280c81ff07b6967a4 --- M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp M src/tbf_dl.h M src/tbf_dl_fsm.c M tests/alloc/AllocTest.cpp M tests/tbf/TbfTest.cpp M tests/tbf/TbfTest.err 8 files changed, 59 insertions(+), 61 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/69/30569/1 diff --git a/src/tbf.cpp b/src/tbf.cpp index 89343a8..0dfab32 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -206,7 +206,7 @@ ms_attach_tbf(m_ms, this); } -static void tbf_unlink_pdch(struct gprs_rlcmac_tbf *tbf) +void tbf_unlink_pdch(struct gprs_rlcmac_tbf *tbf) { int ts; @@ -277,33 +277,6 @@ OSMO_MAX(64, (the_pcu->vty.ws_base + num_pdch * the_pcu->vty.ws_pdch) / 32 * 32)); } -int gprs_rlcmac_tbf::update() -{ - int rc; - - LOGP(DTBF, LOGL_DEBUG, "********** DL-TBF update **********\n"); - OSMO_ASSERT(direction == GPRS_RLCMAC_DL_TBF); - - tbf_unlink_pdch(this); - rc = the_pcu->alloc_algorithm(bts, this, false, -1); - /* if no resource */ - if (rc < 0) { - LOGPTBF(this, LOGL_ERROR, "No resource after update???\n"); - bts_do_rate_ctr_inc(bts, CTR_TBF_ALLOC_FAIL); - return rc; - } - - if (is_egprs_enabled()) { - gprs_rlcmac_dl_tbf *dl_tbf = tbf_as_dl_tbf(this); - if (dl_tbf) - dl_tbf->set_window_size(); - } - - tbf_update_state_fsm_name(this); - - return 0; -} - void tbf_assign_control_ts(struct gprs_rlcmac_tbf *tbf) { int8_t first_common_ts = ms_first_common_ts(tbf_ms(tbf)); @@ -885,12 +858,6 @@ { return tbf->upgrade_to_multislot; } - -int tbf_update(struct gprs_rlcmac_tbf *tbf) -{ - return tbf->update(); -} - /* first TS used by TBF */ struct gprs_rlcmac_pdch *tbf_get_first_ts(struct gprs_rlcmac_tbf *tbf) { diff --git a/src/tbf.h b/src/tbf.h index 4a08da9..29f0d6f 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -147,10 +147,10 @@ const char* tbf_rlcmac_diag(const struct gprs_rlcmac_tbf *tbf); bool tbf_is_control_ts(const struct gprs_rlcmac_tbf *tbf, const struct gprs_rlcmac_pdch *pdch); bool tbf_can_upgrade_to_multislot(const struct gprs_rlcmac_tbf *tbf); -int tbf_update(struct gprs_rlcmac_tbf *tbf); struct gprs_rlcmac_pdch *tbf_get_first_ts(struct gprs_rlcmac_tbf *tbf); const struct gprs_rlcmac_pdch *tbf_get_first_ts_const(const struct gprs_rlcmac_tbf *tbf); struct gprs_rlcmac_trx *tbf_get_trx(struct gprs_rlcmac_tbf *tbf); +void tbf_unlink_pdch(struct gprs_rlcmac_tbf *tbf); void tbf_stop_timers(struct gprs_rlcmac_tbf *tbf, const char *reason); #ifdef __cplusplus } @@ -183,7 +183,6 @@ bool n_inc(enum tbf_counters n); void n_reset(enum tbf_counters n); - int update(); void handle_timeout(); void stop_timers(const char *reason); bool timers_pending(enum tbf_timers t); diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index f5637f9..c5ce666 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -446,6 +446,30 @@ bts_snd_dl_ass(ms->bts, tbf); } +int dl_tbf_upgrade_to_multislot(struct gprs_rlcmac_dl_tbf *tbf) +{ + int rc; + struct gprs_rlcmac_trx *trx = tbf_get_trx(tbf); + struct gprs_rlcmac_bts *bts = trx->bts; + + LOGPTBFDL(tbf, LOGL_DEBUG, "Upgrade to multislot\n"); + + tbf_unlink_pdch(tbf); + rc = the_pcu->alloc_algorithm(bts, dl_tbf_as_tbf(tbf), false, -1); + /* if no resource */ + if (rc < 0) { + LOGPTBFDL(tbf, LOGL_ERROR, "No resources allocated during upgrade to multislot!\n"); + bts_do_rate_ctr_inc(bts, CTR_TBF_ALLOC_FAIL); + return rc; + } + + if (tbf_is_egprs_enabled(dl_tbf_as_tbf(tbf))) + tbf->set_window_size(); + tbf_update_state_fsm_name(tbf); + + return 0; +} + void gprs_rlcmac_dl_tbf::schedule_next_frame() { struct msgb *msg; diff --git a/src/tbf_dl.h b/src/tbf_dl.h index 8d4d716..2fc4f5f 100644 --- a/src/tbf_dl.h +++ b/src/tbf_dl.h @@ -151,6 +151,7 @@ void dl_tbf_trigger_ass_on_pacch(struct gprs_rlcmac_dl_tbf *tbf, struct gprs_rlcmac_tbf *old_tbf); void dl_tbf_trigger_ass_on_pch(struct gprs_rlcmac_dl_tbf *tbf); void dl_tbf_request_dl_ack(struct gprs_rlcmac_dl_tbf *tbf); +int dl_tbf_upgrade_to_multislot(struct gprs_rlcmac_dl_tbf *tbf); static inline struct gprs_rlcmac_tbf *dl_tbf_as_tbf(struct gprs_rlcmac_dl_tbf *dl_tbf) { diff --git a/src/tbf_dl_fsm.c b/src/tbf_dl_fsm.c index f306510..67a2ccc 100644 --- a/src/tbf_dl_fsm.c +++ b/src/tbf_dl_fsm.c @@ -321,29 +321,36 @@ static void handle_timeout_X2002(struct osmo_fsm_inst *fi) { struct tbf_dl_fsm_ctx *ctx = (struct tbf_dl_fsm_ctx *)fi->priv; + int rc; - if (fi->state == TBF_ST_ASSIGN) { - tbf_assign_control_ts(ctx->tbf); - - if (!tbf_can_upgrade_to_multislot(ctx->tbf)) { - /* change state to FLOW, so scheduler - * will start transmission */ - osmo_fsm_inst_dispatch(fi, TBF_EV_ASSIGN_READY_CCCH, NULL); - return; - } - - /* This tbf can be upgraded to use multiple DL - * timeslots and now that there is already one - * slot assigned send another DL assignment via - * PDCH. */ - - /* keep to flags */ - ctx->state_flags &= GPRS_RLCMAC_FLAG_TO_MASK; - - tbf_update(ctx->tbf); - dl_tbf_trigger_ass_on_pacch(ctx->dl_tbf, ctx->tbf); - } else + if (fi->state != TBF_ST_ASSIGN) { LOGPTBFDL(ctx->dl_tbf, LOGL_NOTICE, "Continue flow after IMM.ASS confirm\n"); + return; + } + + /* state TBF_ST_ASSIGN: */ + tbf_assign_control_ts(ctx->tbf); + + if (!tbf_can_upgrade_to_multislot(ctx->tbf)) { + /* change state to FLOW, so scheduler + * will start transmission */ + osmo_fsm_inst_dispatch(fi, TBF_EV_ASSIGN_READY_CCCH, NULL); + return; + } + + /* This tbf can be upgraded to use multiple DL timeslots and now that there is already + * one slot assigned send another DL assignment via PDCH. + */ + + /* keep TO flags */ + ctx->state_flags &= GPRS_RLCMAC_FLAG_TO_MASK; + + rc = dl_tbf_upgrade_to_multislot(ctx->dl_tbf); + if (rc < 0) { + tbf_free(ctx->tbf); + return; + } + dl_tbf_trigger_ass_on_pacch(ctx->dl_tbf, ctx->tbf); } static int tbf_dl_fsm_timer_cb(struct osmo_fsm_inst *fi) diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp index 3316702..215a7ae 100644 --- a/tests/alloc/AllocTest.cpp +++ b/tests/alloc/AllocTest.cpp @@ -283,8 +283,8 @@ dump_assignment(ul_tbf, "UL", verbose); - /* now update the dl_tbf */ - dl_tbf->update(); + /* now upgrade the dl_tbf */ + OSMO_ASSERT(dl_tbf_upgrade_to_multislot(dl_tbf) == 0); dump_assignment(dl_tbf, "DL", verbose); check_tfi_usage(bts); diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index 79d0f63..314d2d9 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -2408,7 +2408,7 @@ ws_check(dl_tbf, __func__, 1, 128 + 1 * 64, false); - dl_tbf->update(); + OSMO_ASSERT(dl_tbf_upgrade_to_multislot(dl_tbf) == 0); /* window size should be 384 */ ws_check(dl_tbf, __func__, 4, 128 + 4 * 64, true); diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index 2606b01..048e03e 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -7146,7 +7146,7 @@ TBF(DL:TFI-0-0-0:STATE-NEW:EGPRS) setting EGPRS DL window size to 192, base(128) slots(1) ws_pdch(64) ws(192) DL TBF slots: 0x10, N: 1, WS: 192 -********** DL-TBF update ********** +TBF(DL:TFI-0-0-0:STATE-NEW:EGPRS) Upgrade to multislot PDCH(bts=0,trx=0,ts=4) Detaching TBF(DL:TFI-0-0-0:STATE-NEW:EGPRS), 1 TBFs, USFs = 00, TFIs = 00000001. [DL] algo B <multi> (suggested TRX: -1): Alloc start Found first unallocated TRX=0 TFI=0 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30569 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I0e4f8d7e46235a471b2124b280c81ff07b6967a4 Gerrit-Change-Number: 30569 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-pcu[master]: Get rid of tbf->first_ts
by pespin 13 Dec '22

13 Dec '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30568 ) Change subject: Get rid of tbf->first_ts ...................................................................... Get rid of tbf->first_ts There's no big benefit in keeping it stored since it can be quickly found. This makes the tbf data structure simplier and easier to maintain, and discharges the alloc_algorithm functions from an extra step. Change-Id: I5d2f665f648f8637466bfdd3bf7b924cb61ede33 --- M src/bts.cpp M src/encoding.cpp M src/gprs_rlcmac_ts_alloc.cpp M src/pcu_vty_functions.cpp M src/tbf.cpp M src/tbf.h M src/tbf_ul.cpp 7 files changed, 47 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/68/30568/1 diff --git a/src/bts.cpp b/src/bts.cpp index c6253f4..5ae0714 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -988,7 +988,8 @@ goto send_imm_ass_rej; } tbf->set_ta(ta); - pdch = &tbf->trx->pdch[tbf->first_ts]; + /* Only single TS can be allocated through AGCH, hence first TS is the only one: */ + pdch = tbf_get_first_ts(tbf); usf = tbf->m_usf[pdch->ts_no]; bts_do_rate_ctr_inc(bts, CTR_IMMEDIATE_ASSIGN_UL_TBF_ONE_PHASE); } @@ -1076,12 +1077,15 @@ void bts_snd_dl_ass(struct gprs_rlcmac_bts *bts, const struct gprs_rlcmac_dl_tbf *tbf) { - uint8_t trx_no = tbf->trx->trx_no; - uint8_t ts_no = tbf->first_ts; uint16_t pgroup = ms_paging_group(tbf_ms(tbf)); int plen; + const struct gprs_rlcmac_pdch *pdch; LOGPTBF(tbf, LOGL_INFO, "TX: START Immediate Assignment Downlink (PCH)\n"); + + /* Only one TS can be assigned through PCH, hence the first one is the only one: */ + pdch = tbf_get_first_ts_const(tbf); + bitvec *immediate_assignment = bitvec_alloc(22, tall_pcu_ctx); /* without plen */ bitvec_unhex(immediate_assignment, DUMMY_VEC); /* standard '2B'O padding */ /* 3GPP TS 44.018, section 9.1.18.0d states that the network shall code the @@ -1090,10 +1094,10 @@ * message sent by a mobile station. Use last_rts_fn + 21216 (16 TDMA * super-frame periods, or ~21.3 seconds) to achieve a decent distance. */ LOGP(DRLCMAC, LOGL_DEBUG, " - TRX=%d (%d) TS=%d TA=%d\n", - trx_no, tbf->trx->arfcn, ts_no, tbf->ta()); - plen = Encoding::write_immediate_assignment(&bts->trx[trx_no].pdch[ts_no], + tbf->trx->trx_no, tbf->trx->arfcn, pdch->ts_no, tbf->ta()); + plen = Encoding::write_immediate_assignment(pdch, tbf, immediate_assignment, true, 125, - GSM_TDMA_FN_SUM(tbf->pdch[ts_no]->last_rts_fn, 21216), + GSM_TDMA_FN_SUM(pdch->last_rts_fn, 21216), tbf->ta(), 7, false, 0, bts_get_ms_pwr_alpha(bts), bts->pcu->vty.gamma, -1, GSM_L1_BURST_TYPE_ACCESS_0); diff --git a/src/encoding.cpp b/src/encoding.cpp index c5f4dd4..370dbe2 100644 --- a/src/encoding.cpp +++ b/src/encoding.cpp @@ -553,7 +553,7 @@ Direct_encoding_1_t fh_params; /* Check one PDCH, if it's hopping then all other should too */ - pdch = tbf->pdch[tbf->first_ts]; + pdch = tbf_get_first_ts_const(tbf); OSMO_ASSERT(pdch != NULL); /* Training Sequence Code */ @@ -562,7 +562,7 @@ /* If frequency hopping is not in use, encode a single ARFCN */ if (!pdch->fh.enabled) { freq_params->UnionType = 0x00; - freq_params->u.ARFCN = tbf->trx->arfcn; + freq_params->u.ARFCN = pdch->trx->arfcn; return; } diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp index 026ad6e..96098a9 100644 --- a/src/gprs_rlcmac_ts_alloc.cpp +++ b/src/gprs_rlcmac_ts_alloc.cpp @@ -411,7 +411,6 @@ tbf->trx = trx; /* the only one TS is the common TS */ - tbf->first_ts = ts; ms_set_reserved_slots(ms, trx, 1 << ts, 1 << ts); ms_set_first_common_ts(ms, ts); @@ -865,7 +864,7 @@ int8_t first_common_ts; uint8_t slotcount = 0; uint8_t reserve_count = 0, trx_no; - int first_ts = -1; + int first_ts; int usf[8] = {-1, -1, -1, -1, -1, -1, -1, -1}; int rc; int tfi; @@ -920,15 +919,14 @@ } first_ts = ffs(rc) - 1; - first_common_ts = ffs(dl_slots & ul_slots) - 1; - - if (first_common_ts < 0) { - LOGPAL(tbf, "B", single, use_trx, LOGL_NOTICE, "first common slot unavailable\n"); + if (first_ts < 0) { + LOGPAL(tbf, "B", single, use_trx, LOGL_NOTICE, "first slot unavailable\n"); return -EINVAL; } - if (first_ts < 0) { - LOGPAL(tbf, "B", single, use_trx, LOGL_NOTICE, "first slot unavailable\n"); + first_common_ts = ffs(dl_slots & ul_slots) - 1; + if (first_common_ts < 0) { + LOGPAL(tbf, "B", single, use_trx, LOGL_NOTICE, "first common slot unavailable\n"); return -EINVAL; } @@ -948,7 +946,6 @@ update_ms_reserved_slots(trx, ms, reserved_ul_slots, reserved_dl_slots, ul_slots, dl_slots); ms_set_first_common_ts(ms, first_common_ts); tbf->trx = trx; - tbf->first_ts = first_ts; if (tbf->direction == GPRS_RLCMAC_DL_TBF) assign_dl_tbf_slots(tbf_as_dl_tbf(tbf), trx, dl_slots, tfi); diff --git a/src/pcu_vty_functions.cpp b/src/pcu_vty_functions.cpp index e35e817..17aa203 100644 --- a/src/pcu_vty_functions.cpp +++ b/src/pcu_vty_functions.cpp @@ -61,12 +61,11 @@ tbf->ta(), tbf->direction == GPRS_RLCMAC_UL_TBF ? "UL" : "DL", tbf->imsi(), VTY_NEWLINE); - vty_out(vty, " created=%lu state=%s flags=%08x [CCCH:%u, PACCH:%u] 1st_TS=%d 1st_cTS=%" PRId8 " ctrl_TS=%d MS_CLASS=%d/%d%s", + vty_out(vty, " created=%lu state=%s flags=%08x [CCCH:%u, PACCH:%u] 1st_cTS=%" PRId8 " ctrl_TS=%d MS_CLASS=%d/%d%s", tbf->created_ts(), tbf->state_name(), state_flags, state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH), state_flags & (1 << GPRS_RLCMAC_FLAG_PACCH), - tbf->first_ts, ms_first_common_ts(ms), tbf->control_ts, tbf->ms_class(), ms_egprs_ms_class(ms), diff --git a/src/tbf.cpp b/src/tbf.cpp index 7483d49..89343a8 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -90,7 +90,6 @@ gprs_rlcmac_tbf::gprs_rlcmac_tbf(struct gprs_rlcmac_bts *bts_, GprsMs *ms, gprs_rlcmac_tbf_direction dir) : direction(dir), trx(NULL), - first_ts(TBF_TS_UNSET), control_ts(TBF_TS_UNSET), fT(0), num_fT_exp(0), @@ -892,6 +891,32 @@ return tbf->update(); } +/* first TS used by TBF */ +struct gprs_rlcmac_pdch *tbf_get_first_ts(struct gprs_rlcmac_tbf *tbf) +{ + unsigned int i; + + for (i = 0; i < 8; i++) { + struct gprs_rlcmac_pdch *pdch; + pdch = tbf->pdch[i]; + if (pdch) + return pdch; + } + return NULL; +} +const struct gprs_rlcmac_pdch *tbf_get_first_ts_const(const struct gprs_rlcmac_tbf *tbf) +{ + unsigned int i; + + for (i = 0; i < 8; i++) { + const struct gprs_rlcmac_pdch *pdch; + pdch = tbf->pdch[i]; + if (pdch) + return pdch; + } + return NULL; +} + const char* tbf_rlcmac_diag(const struct gprs_rlcmac_tbf *tbf) { static char buf[256]; diff --git a/src/tbf.h b/src/tbf.h index d4d52f9..4a08da9 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -148,6 +148,8 @@ bool tbf_is_control_ts(const struct gprs_rlcmac_tbf *tbf, const struct gprs_rlcmac_pdch *pdch); bool tbf_can_upgrade_to_multislot(const struct gprs_rlcmac_tbf *tbf); int tbf_update(struct gprs_rlcmac_tbf *tbf); +struct gprs_rlcmac_pdch *tbf_get_first_ts(struct gprs_rlcmac_tbf *tbf); +const struct gprs_rlcmac_pdch *tbf_get_first_ts_const(const struct gprs_rlcmac_tbf *tbf); struct gprs_rlcmac_trx *tbf_get_trx(struct gprs_rlcmac_tbf *tbf); void tbf_stop_timers(struct gprs_rlcmac_tbf *tbf, const char *reason); #ifdef __cplusplus @@ -218,7 +220,6 @@ enum gprs_rlcmac_tbf_direction direction; struct gprs_rlcmac_trx *trx; - uint8_t first_ts; /* first TS used by TBF */ uint8_t control_ts; /* timeslot control messages and polling */ struct gprs_rlcmac_pdch *pdch[8]; /* list of PDCHs allocated to TBF */ diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index e4e4f79..8333a2f 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -166,7 +166,6 @@ ul_tbf->trx = trx; /* The only one TS is the common, control TS */ - ul_tbf->first_ts = ts; ms_set_first_common_ts(ms, ts); tbf_assign_control_ts(ul_tbf); ul_tbf->m_ctrs = rate_ctr_group_alloc(ul_tbf, &tbf_ctrg_desc, next_tbf_ctr_group_id++); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30568 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I5d2f665f648f8637466bfdd3bf7b924cb61ede33 Gerrit-Change-Number: 30568 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-bts[master]: l1sap: Accept RFC5993 and TS 101.318 HR GSM payload
by pespin 13 Dec '22

13 Dec '22
Attention is currently required from: fixeria, dexter. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/30523 ) Change subject: l1sap: Accept RFC5993 and TS 101.318 HR GSM payload ...................................................................... Patch Set 3: (3 comments) File src/common/l1sap.c: https://gerrit.osmocom.org/c/osmo-bts/+/30523/comment/c391ed94_9c509326 PS3, Line 1260: if (lchan->tch_mode == GSM48_CMODE_SPEECH_V1 && lchan->type == GSM_LCHAN_TCH_H) { You could do a switch (lchan->tch_mode) together with the block above. https://gerrit.osmocom.org/c/osmo-bts/+/30523/comment/b61143e3_221dbae0 PS3, Line 1915: * reception depending on what the particular BTS model supports. In case no preference is set, it will be I'd go for explicitly setting supported values in each bts_model, and avoid code paths where we end up sending god knows what to the lower layers. This also means the code block below can be structured a bit (right now it's quite messy with large conditions difficult to follow without early returns). https://gerrit.osmocom.org/c/osmo-bts/+/30523/comment/9d79108b_05f7441e PS3, Line 1924: * byte TOC header in frond of the audio payload. (See also: RFC 5993, section 5.2) */ typo: front -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/30523 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I17f0b546042fa333780fd2f5c315898ab0df574c Gerrit-Change-Number: 30523 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 13 Dec 2022 12:11:56 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • ...
  • 198
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.