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]: Move first_common_ts from gprs_rlcmac_tbf to GprsMs
by pespin 16 Dec '22

16 Dec '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30566 ) Change subject: Move first_common_ts from gprs_rlcmac_tbf to GprsMs ...................................................................... Move first_common_ts from gprs_rlcmac_tbf to GprsMs The field contains a common value between the 2 active TBFs of the MS, so it makes no sense to have them duplicated on each TBF. It can be sanely stored in the MS object. Change-Id: I8df01a99ccbfaf7a442ade5000ee282bd638fbba --- M src/gprs_ms.c M src/gprs_ms.h 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 M tests/alloc/AllocTest.cpp 8 files changed, 33 insertions(+), 40 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gprs_ms.c b/src/gprs_ms.c index 933953e..c9eaf97 100644 --- a/src/gprs_ms.c +++ b/src/gprs_ms.c @@ -120,6 +120,7 @@ ms->current_cs_ul = UNKNOWN; ms->current_cs_dl = UNKNOWN; ms->is_idle = true; + ms->first_common_ts = TBF_TS_UNSET; INIT_LLIST_HEAD(&ms->list); INIT_LLIST_HEAD(&ms->old_tbfs); @@ -383,6 +384,7 @@ if (!ms->dl_tbf && !ms->ul_tbf) { ms_set_reserved_slots(ms, NULL, 0, 0); + ms->first_common_ts = TBF_TS_UNSET; if (ms_tlli(ms) != 0) ms_release_timer_start(ms); @@ -918,15 +920,15 @@ return cs; } -int ms_first_common_ts(const struct GprsMs *ms) +int8_t ms_first_common_ts(const struct GprsMs *ms) { - if (ms->dl_tbf) - return tbf_first_common_ts(dl_tbf_as_tbf(ms->dl_tbf)); + return ms->first_common_ts; +} - if (ms->ul_tbf) - return tbf_first_common_ts(ul_tbf_as_tbf(ms->ul_tbf)); - - return -1; +void ms_set_first_common_ts(struct GprsMs *ms, uint8_t first_common_ts) +{ + OSMO_ASSERT(first_common_ts < 8); + ms->first_common_ts = first_common_ts; } uint8_t ms_dl_slots(const struct GprsMs *ms) diff --git a/src/gprs_ms.h b/src/gprs_ms.h index 4ff261c..716ad74 100644 --- a/src/gprs_ms.h +++ b/src/gprs_ms.h @@ -64,6 +64,8 @@ struct gprs_rlcmac_ul_tbf *ul_tbf; struct gprs_rlcmac_dl_tbf *dl_tbf; struct llist_head old_tbfs; /* list of gprs_rlcmac_tbf */ + /* First common timeslot number used both in UL and DL, 0..7 or TBF_TS_UNSET (-1): */ + int8_t first_common_ts; uint32_t tlli; uint32_t new_ul_tlli; @@ -101,7 +103,8 @@ struct GprsMs *ms_alloc(struct gprs_rlcmac_bts *bts, uint32_t tlli); -int ms_first_common_ts(const struct GprsMs *ms); +int8_t ms_first_common_ts(const struct GprsMs *ms); +void ms_set_first_common_ts(struct GprsMs *ms, uint8_t first_common_ts); void ms_set_reserved_slots(struct GprsMs *ms, struct gprs_rlcmac_trx *trx, uint8_t ul_slots, uint8_t dl_slots); struct GprsMs *ms_ref(struct GprsMs *ms); diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp index b5757a7..026ad6e 100644 --- a/src/gprs_rlcmac_ts_alloc.cpp +++ b/src/gprs_rlcmac_ts_alloc.cpp @@ -411,8 +411,9 @@ tbf->trx = trx; /* the only one TS is the common TS */ - tbf->first_ts = tbf->first_common_ts = ts; + tbf->first_ts = ts; ms_set_reserved_slots(ms, trx, 1 << ts, 1 << ts); + ms_set_first_common_ts(ms, ts); tbf->upgrade_to_multislot = false; bts_do_rate_ctr_inc(bts, CTR_TBF_ALLOC_ALGO_A); @@ -945,9 +946,8 @@ /* Step 4: Update MS and TBF and really allocate the resources */ 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_common_ts = first_common_ts; tbf->first_ts = first_ts; if (tbf->direction == GPRS_RLCMAC_DL_TBF) diff --git a/src/pcu_vty_functions.cpp b/src/pcu_vty_functions.cpp index 76baffe..e35e817 100644 --- a/src/pcu_vty_functions.cpp +++ b/src/pcu_vty_functions.cpp @@ -54,21 +54,22 @@ gprs_rlcmac_ul_tbf *ul_tbf = tbf_as_ul_tbf(tbf); gprs_rlcmac_dl_tbf *dl_tbf = tbf_as_dl_tbf(tbf); uint32_t state_flags = tbf_state_flags(tbf); + struct GprsMs *ms = tbf_ms(tbf); vty_out(vty, "TBF: TFI=%d TLLI=0x%08x (%s) TA=%u DIR=%s IMSI=%s%s", tbf->tfi(), tbf->tlli(), tbf->is_tlli_valid() ? "valid" : "invalid", 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=%d ctrl_TS=%d MS_CLASS=%d/%d%s", + 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", 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, - tbf->first_common_ts, tbf->control_ts, + ms_first_common_ts(ms), tbf->control_ts, tbf->ms_class(), - ms_egprs_ms_class(tbf->ms()), + ms_egprs_ms_class(ms), VTY_NEWLINE); vty_out(vty, " TS_alloc="); for (int i = 0; i < 8; i++) { diff --git a/src/tbf.cpp b/src/tbf.cpp index 3d9d453..7483d49 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -91,7 +91,6 @@ direction(dir), trx(NULL), first_ts(TBF_TS_UNSET), - first_common_ts(TBF_TS_UNSET), control_ts(TBF_TS_UNSET), fT(0), num_fT_exp(0), @@ -308,13 +307,14 @@ void tbf_assign_control_ts(struct gprs_rlcmac_tbf *tbf) { + int8_t first_common_ts = ms_first_common_ts(tbf_ms(tbf)); if (tbf->control_ts == TBF_TS_UNSET) LOGPTBF(tbf, LOGL_INFO, "Setting Control TS %d\n", - tbf->first_common_ts); - else if (tbf->control_ts != tbf->first_common_ts) + first_common_ts); + else if (tbf->control_ts != first_common_ts) LOGPTBF(tbf, LOGL_INFO, "Changing Control TS %d -> %d\n", - tbf->control_ts, tbf->first_common_ts); - tbf->control_ts = tbf->first_common_ts; + tbf->control_ts, first_common_ts); + tbf->control_ts = first_common_ts; } void gprs_rlcmac_tbf::n_reset(enum tbf_counters n) @@ -738,7 +738,8 @@ if (direction == GPRS_RLCMAC_DL_TBF) { if (control_ts < 8) slots |= 1 << control_ts; - if (first_common_ts < 8) + int8_t first_common_ts = ms_first_common_ts(tbf_ms(this)); + if (first_common_ts != TBF_TS_UNSET) slots |= 1 << first_common_ts; return slots; @@ -825,11 +826,6 @@ return &tbf->m_llc; } -uint8_t tbf_first_common_ts(const struct gprs_rlcmac_tbf *tbf) -{ - return tbf->first_common_ts; -} - uint8_t tbf_dl_slots(const struct gprs_rlcmac_tbf *tbf) { return tbf->dl_slots(); diff --git a/src/tbf.h b/src/tbf.h index 211b8a7..d4d52f9 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -134,7 +134,6 @@ bool tbf_timers_pending(struct gprs_rlcmac_tbf *tbf, enum tbf_timers t); void tbf_free(struct gprs_rlcmac_tbf *tbf); struct gprs_llc *tbf_llc(struct gprs_rlcmac_tbf *tbf); -uint8_t tbf_first_common_ts(const struct gprs_rlcmac_tbf *tbf); uint8_t tbf_dl_slots(const struct gprs_rlcmac_tbf *tbf); uint8_t tbf_ul_slots(const struct gprs_rlcmac_tbf *tbf); bool tbf_is_tfi_assigned(const struct gprs_rlcmac_tbf *tbf); @@ -220,8 +219,6 @@ enum gprs_rlcmac_tbf_direction direction; struct gprs_rlcmac_trx *trx; uint8_t first_ts; /* first TS used by TBF */ - uint8_t first_common_ts; /* first TS where the phone can send and - receive simultaniously */ 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 43cd4f6..e4e4f79 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -167,7 +167,7 @@ ul_tbf->trx = trx; /* The only one TS is the common, control TS */ ul_tbf->first_ts = ts; - ul_tbf->first_common_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++); ul_tbf->m_ul_egprs_ctrs = rate_ctr_group_alloc(ul_tbf, diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp index 379e69a..3316702 100644 --- a/tests/alloc/AllocTest.cpp +++ b/tests/alloc/AllocTest.cpp @@ -176,12 +176,13 @@ { if (!verbose) return; + const struct GprsMs *ms = tbf_ms(tbf); for (size_t i = 0; i < ARRAY_SIZE(tbf->pdch); ++i) if (tbf->pdch[i]) printf("PDCH[%zu] is used for %s\n", i, dir); printf("PDCH[%d] is control_ts for %s\n", tbf->control_ts, dir); - printf("PDCH[%d] is first common for %s\n", tbf->first_common_ts, dir); + printf("PDCH[%d] is first common for %s\n", ms_first_common_ts(ms), dir); } #define ENABLE_PDCH(ts_no, enable_flag, trx) \ @@ -237,8 +238,6 @@ dump_assignment(dl_tbf, "DL", verbose); - OSMO_ASSERT(dl_tbf->first_common_ts == ul_tbf->first_common_ts); - check_tfi_usage(bts); tbf_free(dl_tbf); @@ -284,12 +283,9 @@ dump_assignment(ul_tbf, "UL", verbose); - OSMO_ASSERT(dl_tbf->first_common_ts == ul_tbf->first_common_ts); - /* now update the dl_tbf */ dl_tbf->update(); dump_assignment(dl_tbf, "DL", verbose); - OSMO_ASSERT(dl_tbf->first_common_ts == ul_tbf->first_common_ts); check_tfi_usage(bts); @@ -334,8 +330,6 @@ dump_assignment(dl_tbf, "DL", true); - OSMO_ASSERT(dl_tbf->first_common_ts == ul_tbf->first_common_ts); - check_tfi_usage(bts); tbf_free(dl_tbf); @@ -575,13 +569,13 @@ trx = ms_current_trx(ms); OSMO_ASSERT(ul_tbf || dl_tbf); - + OSMO_ASSERT(ms_first_common_ts(ms) != TBF_TS_UNSET); if (ul_tbf) { - ul_slots = 1 << ul_tbf->first_common_ts; + ul_slots = 1 << (uint8_t)ms_first_common_ts(ms); tfi = ul_tbf->tfi(); dir = GPRS_RLCMAC_UL_TBF; } else { - ul_slots = 1 << dl_tbf->first_common_ts; + ul_slots = 1 << (uint8_t)ms_first_common_ts(ms); tfi = dl_tbf->tfi(); dir = GPRS_RLCMAC_DL_TBF; } -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30566 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I8df01a99ccbfaf7a442ade5000ee282bd638fbba Gerrit-Change-Number: 30566 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> 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
Change in osmo-pcu[master]: Get rid of tbf->first_ts
by pespin 16 Dec '22

16 Dec '22
pespin has submitted this change. ( 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(-) Approvals: laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved Jenkins Builder: Verified 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..8358b8f 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 < ARRAY_SIZE(tbf->pdch); 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 < ARRAY_SIZE(tbf->pdch); 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: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> 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
Change in osmo-pcu[master]: Refactor code related to DL-TBF upgrade to multislot
by pespin 16 Dec '22

16 Dec '22
Attention is currently required from: fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30569 ) Change subject: Refactor code related to DL-TBF upgrade to multislot ...................................................................... Patch Set 3: Code-Review+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: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> 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-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Fri, 16 Dec 2022 11:05:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-pcu[master]: Move first_common_ts from gprs_rlcmac_tbf to GprsMs
by pespin 16 Dec '22

16 Dec '22
Attention is currently required from: laforge. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30566 ) Change subject: Move first_common_ts from gprs_rlcmac_tbf to GprsMs ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30566 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I8df01a99ccbfaf7a442ade5000ee282bd638fbba Gerrit-Change-Number: 30566 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> 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-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Fri, 16 Dec 2022 11:04:51 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-pcu[master]: Refactor code related to DL-TBF upgrade to multislot
by pespin 16 Dec '22

16 Dec '22
Attention is currently required from: fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30569 ) Change subject: Refactor code related to DL-TBF upgrade to multislot ...................................................................... Patch Set 3: (1 comment) File src/tbf_dl_fsm.c: https://gerrit.osmocom.org/c/osmo-pcu/+/30569/comment/73808227_e53ce6d1 PS3, Line 347: dl_tbf_upgrade_to_multislot > So we check if this TBF can be upgraded to multislot prior to this, but do we check if we actually h […] The current code doesn't allow "checking if we actually have enough resources", since the alloc_algo is touching itself the state of the tbf/pdch/ms afaiu. I have ideas to make the resource allocation a 2 step process of finding a result and later on allocating, but that's not yet there. In any case, I'm by no means worsening the state here. In previous state the PDCHs were detached from the TBF but the TBF was not freed. -- 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: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Fri, 16 Dec 2022 11:03:42 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in osmocom-bb[master]: trxcon: allow advancing FBSB timeout (quirks for slow PHYs)
by fixeria 16 Dec '22

16 Dec '22
Attention is currently required from: laforge. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30612 ) Change subject: trxcon: allow advancing FBSB timeout (quirks for slow PHYs) ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: > not sure if "advance" is the best term. "extend" or "prolong" would be more obvious to me. […] Ack. I'll rework the patch. -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30612 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ia68954c5bdacda45fc871ffea0ccdf2460936408 Gerrit-Change-Number: 30612 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Fri, 16 Dec 2022 11:01:41 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bsc[master]: abis_rsl: signal HR GSM RTP format to BTS via RSL
by fixeria 16 Dec '22

16 Dec '22
Attention is currently required from: dexter. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/30630 ) Change subject: abis_rsl: signal HR GSM RTP format to BTS via RSL ...................................................................... Patch Set 1: (1 comment) File src/osmo-bsc/bts_vty.c: https://gerrit.osmocom.org/c/osmo-bsc/+/30630/comment/d14fa56d_c0eb2ee2 PS1, Line 1017: "Disable HR GSM RTP payload format setting)\n") Missing NO_STR. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/30630 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I16804364d95da9e1f5ac3b831c31079a7409e58d Gerrit-Change-Number: 30630 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Fri, 16 Dec 2022 10:59:59 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bts[master]: rsl: allow configuration of HR GSM RTP format via CHANNEL ACTIVATE
by fixeria 16 Dec '22

16 Dec '22
Attention is currently required from: dexter. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/30629 ) Change subject: rsl: allow configuration of HR GSM RTP format via CHANNEL ACTIVATE ...................................................................... Patch Set 1: (2 comments) File src/common/rsl.c: https://gerrit.osmocom.org/c/osmo-bts/+/30629/comment/54897efe_f7ce020c PS1, Line 1631: 0x00 We may want to have an enumerated type for these values defined somewhere in libosmocore? https://gerrit.osmocom.org/c/osmo-bts/+/30629/comment/4a923a9d_fd7c2c26 PS1, Line 1636: LOGP LOGPLCHAN -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/30629 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Id53ebebdf987fc59cf4e38bcddb75663fd7bb8fc Gerrit-Change-Number: 30629 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Fri, 16 Dec 2022 10:42:41 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bsc[master]: abis_rsl: signal HR GSM RTP format to BTS via RSL
by dexter 16 Dec '22

16 Dec '22
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/30630 ) Change subject: abis_rsl: signal HR GSM RTP format to BTS via RSL ...................................................................... abis_rsl: signal HR GSM RTP format to BTS via RSL There are two RTP formats that can be used to transfer HR GSM audio (RFC 5339 and ETSI TS 101.318) Change-Id: I16804364d95da9e1f5ac3b831c31079a7409e58d Related: OS#5688 --- M include/osmocom/bsc/bts.h M src/osmo-bsc/abis_rsl.c M src/osmo-bsc/bts_vty.c 3 files changed, 86 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/30/30630/1 diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h index 1a84a0e..ed43138 100644 --- a/include/osmocom/bsc/bts.h +++ b/include/osmocom/bsc/bts.h @@ -326,6 +326,12 @@ struct gprs_rlc_cfg rlc_cfg; }; +enum hr_gsm_rtp_fmt { + RTP_FMT_NATIVE, + RTP_FMT_SPEECH_H_V1_TS101318, + RTP_FMT_SPEECH_H_V1_RFC5993, +}; + /* One BTS */ struct gsm_bts { /* list header in net->bts_list */ @@ -646,6 +652,9 @@ TOP_ACCH_CHAN_MODE_SPEECH_V3, /* Speech channels using AMR codec */ } top_acch_chan_mode; + /* Specifies which HR GSM format to use (RFC 5993 or ETSI TS 101.813) */ + enum hr_gsm_rtp_fmt hr_gsm_rtp_fmt; + /* MS/BS Power Control parameters */ struct gsm_power_ctrl_params ms_power_ctrl; struct gsm_power_ctrl_params bs_power_ctrl; diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index bb1c5d6..864b42d 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -582,6 +582,33 @@ (void *)&bts->top_acch_cap); } +/* indicate which RTP format to use for HR GSM, SPEECH V1 */ +static void put_hr_gsm_rtp_fmt_ie(const struct gsm_lchan *lchan, + const struct rsl_ie_chan_mode *cm, + struct msgb *msg) +{ + struct gsm_bts_trx *trx = lchan->ts->trx; + struct gsm_bts *bts = trx->bts; + uint8_t val[1]; + + /* This setting is only applicable for cassic SPEECH V1 in HR mode */ + if (cm->chan_rate != RSL_CMOD_SP_GSM1 || lchan->type != GSM_LCHAN_TCH_H) + return; + + switch (bts->hr_gsm_rtp_fmt) { + case RTP_FMT_SPEECH_H_V1_TS101318: + val[0] = 0x00; + break; + case RTP_FMT_SPEECH_H_V1_RFC5993: + val[0] = 0x01; + break; + default: + return; + } + + msgb_tlv_put(msg, RSL_IE_OSMO_HR_GSM_RTP_FMT, sizeof(val), val); +} + /* Write RSL_IE_OSMO_TRAINING_SEQUENCE to msgb. The tsc_set argument's range is 1-4, tsc argument range is 0-7. */ static void put_osmo_training_sequence_ie(struct msgb *msg, uint8_t tsc_set, uint8_t tsc) { @@ -716,6 +743,7 @@ put_rep_acch_cap_ie(lchan, msg); put_top_acch_cap_ie(lchan, &cm, msg); + put_hr_gsm_rtp_fmt_ie(lchan, &cm, msg); /* Selecting a specific TSC Set is only applicable to VAMOS mode */ if (lchan->activate.info.vamos && lchan->activate.tsc_set >= 1) @@ -788,6 +816,7 @@ put_rep_acch_cap_ie(lchan, msg); put_top_acch_cap_ie(lchan, &cm, msg); + put_hr_gsm_rtp_fmt_ie(lchan, &cm, msg); /* Selecting a specific TSC Set is only applicable to VAMOS mode. Send this Osmocom specific IE only to OsmoBTS * types. */ diff --git a/src/osmo-bsc/bts_vty.c b/src/osmo-bsc/bts_vty.c index 50e49b8..89665b1 100644 --- a/src/osmo-bsc/bts_vty.c +++ b/src/osmo-bsc/bts_vty.c @@ -984,6 +984,45 @@ return CMD_SUCCESS; } +DEFUN_USRATTR(cfg_bts_hr_gsm_rtp, + cfg_bts_hr_gsm_rtp_cmd, + X(BSC_VTY_ATTR_NEW_LCHAN), + "hr-gsm-rtp (rfc5993|ts101318)", + "Set RTP payload format for HR GSM\n" + "Payload as specified by RFC 5993 (with TOC header byte)\n" + "Payload as specified by TS 101.318 (TIPHON)\n") +{ + struct gsm_bts *bts = vty->index; + + if (bts->model->type != GSM_BTS_TYPE_OSMOBTS) { + vty_out(vty, "%% HR GSM format selection is not supported by BTS %u%s", + bts->nr, VTY_NEWLINE); + return CMD_WARNING; + } + + if (!strcmp(argv[0], "rfc5993")) + bts->hr_gsm_rtp_fmt = RTP_FMT_SPEECH_H_V1_RFC5993; + else if (!strcmp(argv[0], "ts101318")) + bts->hr_gsm_rtp_fmt = RTP_FMT_SPEECH_H_V1_TS101318; + else + return CMD_WARNING; + + return CMD_SUCCESS; +} + +DEFUN_USRATTR(cfg_bts_no_hr_gsm_rtp, + cfg_bts_no_hr_gsm_rtp_cmd, + X(BSC_VTY_ATTR_NEW_LCHAN), + "no hr-gsm-rtp", + "Disable HR GSM RTP payload format setting)\n") +{ + struct gsm_bts *bts = vty->index; + + bts->hr_gsm_rtp_fmt = RTP_FMT_NATIVE; + + return CMD_SUCCESS; +} + #define CD_STR "Channel Description\n" DEFUN_USRATTR(cfg_bts_chan_desc_att, @@ -4660,6 +4699,13 @@ || bts->rep_acch_cap.dl_facch_cmd) vty_out(vty, " repeat rxqual %u%s", bts->rep_acch_cap.rxqual, VTY_NEWLINE); + if (bts->hr_gsm_rtp_fmt != RTP_FMT_NATIVE) { + if (bts->hr_gsm_rtp_fmt == RTP_FMT_SPEECH_H_V1_RFC5993) + vty_out(vty, " hr-gsm-rtp rfc5993%s", VTY_NEWLINE); + if (bts->hr_gsm_rtp_fmt == RTP_FMT_SPEECH_H_V1_TS101318) + vty_out(vty, " hr-gsm-rtp ts101318%s", VTY_NEWLINE); + } + if (bts->interf_meas_params_cfg.avg_period != interf_meas_params_def.avg_period) { vty_out(vty, " interference-meas avg-period %u%s", bts->interf_meas_params_cfg.avg_period, @@ -4876,6 +4922,8 @@ install_element(BTS_NODE, &cfg_bts_top_no_dl_acch_cmd); install_element(BTS_NODE, &cfg_bts_top_dl_acch_rxqual_cmd); install_element(BTS_NODE, &cfg_bts_top_dl_acch_chan_mode_cmd); + install_element(BTS_NODE, &cfg_bts_hr_gsm_rtp_cmd); + install_element(BTS_NODE, &cfg_bts_no_hr_gsm_rtp_cmd); install_element(BTS_NODE, &cfg_bts_interf_meas_avg_period_cmd); install_element(BTS_NODE, &cfg_bts_interf_meas_level_bounds_cmd); install_element(BTS_NODE, &cfg_bts_srvcc_fast_return_cmd); -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/30630 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I16804364d95da9e1f5ac3b831c31079a7409e58d Gerrit-Change-Number: 30630 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-bts[master]: rsl: allow configuration of HR GSM RTP format via CHANNEL ACTIVATE
by Jenkins Builder 16 Dec '22

16 Dec '22
Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/30629 ) Change subject: rsl: allow configuration of HR GSM RTP format via CHANNEL ACTIVATE ...................................................................... Patch Set 1: (1 comment) File src/common/rsl.c: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-1984): https://gerrit.osmocom.org/c/osmo-bts/+/30629/comment/7778aced_5eba32fb PS1, Line 1633: } else if (TLVP_VAL(tp, RSL_IE_OSMO_HR_GSM_RTP_FMT)[0] == 0x01) { please, no space before tabs -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/30629 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Id53ebebdf987fc59cf4e38bcddb75663fd7bb8fc Gerrit-Change-Number: 30629 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Fri, 16 Dec 2022 10:05:29 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • ...
  • 198
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.