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 osmocom-bb[master]: layer23: fix rx_l1_sim_conf(): msg->l2h is NULL, use msg->l1h
by pespin 16 Dec '22

16 Dec '22
Attention is currently required from: laforge, fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30613 ) Change subject: layer23: fix rx_l1_sim_conf(): msg->l2h is NULL, use msg->l1h ...................................................................... Patch Set 1: Code-Review+1 (1 comment) File src/host/layer23/src/common/l1ctl.c: https://gerrit.osmocom.org/c/osmocom-bb/+/30613/comment/13dee7dc_ef434020 PS1, Line 742: LOGP(DL1C, LOGL_INFO, "SIM %s\n", osmo_hexdump(data, len)); Independent of this patch, I think it's really worth having a special case inside osmo_hexdump to print "(null)" if the pointer is NULL. What do you think? do you want to submit it? -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30613 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I7c68a3ad393be5fd0413e00e119a06db59672357 Gerrit-Change-Number: 30613 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Fri, 16 Dec 2022 11:19:46 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in libosmo-gprs[master]: llc: Proper separation of public & private APIs, Introduce llc_prim API
by pespin 16 Dec '22

16 Dec '22
Attention is currently required from: fixeria, dexter. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/30489 ) Change subject: llc: Proper separation of public & private APIs, Introduce llc_prim API ...................................................................... Patch Set 3: (1 comment) Patchset: PS3: I'm merging this in a few hours after 1.5 weeks without getting further major concerns. -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/30489 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I588eb576b2703262f4ab9566ec362920d8390cfd Gerrit-Change-Number: 30489 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Fri, 16 Dec 2022 11:17:34 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
Change in osmo-pcu[master]: pdch: Introduce APIs to print PDCH name
by pespin 16 Dec '22

16 Dec '22
Attention is currently required from: pespin. Hello Jenkins Builder, laforge, fixeria, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-pcu/+/30619 to look at the new patch set (#2). Change subject: pdch: Introduce APIs to print PDCH name ...................................................................... pdch: Introduce APIs to print PDCH name This will allow printing PDCH with same formatting outside of LOGPDCH. Change-Id: If18cb4a48237751e0dddede6793191b36dfe386d --- M src/pdch.cpp M src/pdch.h 2 files changed, 17 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/19/30619/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30619 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: If18cb4a48237751e0dddede6793191b36dfe386d Gerrit-Change-Number: 30619 Gerrit-PatchSet: 2 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: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmo-pcu[master]: Convert tbf->control_ts to be a gprs_rlcmac_pdch*
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/+/30620 ) Change subject: Convert tbf->control_ts to be a gprs_rlcmac_pdch* ...................................................................... Patch Set 2: (2 comments) File src/pdch.cpp: https://gerrit.osmocom.org/c/osmo-pcu/+/30620/comment/66e7611a_84e3db14 PS2, Line 1316: ts == pdch > Same here: comparing foo_ts to pdch may look confusing, so it's better to have a unified naming by d […] This is rather cosmetic and has to be applied in several places, so rather applies to an extra patch. I am fine with keeping this naming for now so that it's also easier to understand and understand against older code. File tests/alloc/AllocTest.cpp: https://gerrit.osmocom.org/c/osmo-pcu/+/30620/comment/c9af9127_d8d1b535 PS2, Line 186: tbf->control_ts > Maybe move NULL checking to pdch_name()? This way one could pass PDCH pointers directly without worr […] No, I want the code to explicitly show where/which fields can be null. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30620 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I6a97b6528b2f9d78dfbca8fb97ab7c621f777fc7 Gerrit-Change-Number: 30620 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Fri, 16 Dec 2022 11:15:30 +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 osmo-pcu[master]: Convert ms_first_common_ts to struct gprs_rlcmac_pdch
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/+/30575 ) Change subject: Convert ms_first_common_ts to struct gprs_rlcmac_pdch ...................................................................... Patch Set 2: (1 comment) File src/gprs_ms.h: https://gerrit.osmocom.org/c/osmo-pcu/+/30575/comment/a4caaa93_8a0aae25 PS2, Line 68: _ts > How about renaming s/_ts/_pdch/ to make the type of this field cleaner? I thought about it already but I'm not sure it's really an improvement since the spec anyway talks about timeslots when explaining when/what is to be set, so having it named "ts" here also makes sense, I see no real need to change it (I'm not saying I'm against changing either, just that this is good enoguh so far). -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30575 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I19373939ec104d371e3e91422f018a8175cb0f89 Gerrit-Change-Number: 30575 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Fri, 16 Dec 2022 11:07:04 +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 osmo-pcu[master]: Trigger PACCH assignment inside dl_tbf_upgrade_to_multislot()
by pespin 16 Dec '22

16 Dec '22
pespin has submitted this change. ( 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 src/tbf_dl_fsm.c M tests/alloc/AllocTest.err M tests/tbf/TbfTest.err 4 files changed, 47,122 insertions(+), 23,564 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved Jenkins Builder: Verified -- 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: 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]: tbf_ul: Fix wrong struct type in field
by pespin 16 Dec '22

16 Dec '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30571 ) Change subject: tbf_ul: Fix wrong struct type in field ...................................................................... tbf_ul: Fix wrong struct type in field This typo was harmless so far because both old and new structures have the exact same content. Change-Id: If2e20128a589a25b9dc3fd08340cdb92aad158c3 --- M src/tbf_ul.h 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/tbf_ul.h b/src/tbf_ul.h index 38784f8..c5c55f7 100644 --- a/src/tbf_ul.h +++ b/src/tbf_ul.h @@ -105,7 +105,7 @@ struct rate_ctr_group *m_ul_egprs_ctrs; struct tbf_ul_fsm_ctx state_fsm; - struct tbf_ul_ass_fsm_ctx ul_ack_fsm; + struct tbf_ul_ack_fsm_ctx ul_ack_fsm; protected: void maybe_schedule_uplink_acknack(const gprs_rlc_data_info *rlc, bool countdown_finished); 1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30571 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: If2e20128a589a25b9dc3fd08340cdb92aad158c3 Gerrit-Change-Number: 30571 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 rejecting UL-TBF upon rx of PktResourceReq
by pespin 16 Dec '22

16 Dec '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30572 ) Change subject: Refactor code rejecting UL-TBF upon rx of PktResourceReq ...................................................................... Refactor code rejecting UL-TBF upon rx of PktResourceReq * Make it similar to the already existing TBF allocation procedures * Pass pdch pointer instead of trx and ts numbers Change-Id: I04b3b65942732cc652adeaa507529b849292ff61 --- M src/gprs_ms.c M src/gprs_ms.h M src/pdch.cpp M src/tbf_ul.cpp M src/tbf_ul.h M tests/tbf/TbfTest.cpp 6 files changed, 27 insertions(+), 12 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/gprs_ms.c b/src/gprs_ms.c index c9eaf97..073dd4a 100644 --- a/src/gprs_ms.c +++ b/src/gprs_ms.c @@ -1160,6 +1160,22 @@ return ul_tbf; } +/* Create a temporary dummy TBF to Tx a ImmAssReject if allocating a new one during + * packet resource Request failed. This is similar as ul_tbf_alloc() but without + * calling tbf->setup() (in charge of TFI/USF allocation), and reusing resources + * from Packet Resource Request we received. See TS 44.060 sec 7.1.3.2.1 */ +struct gprs_rlcmac_ul_tbf *ms_new_ul_tbf_rejected_pacch(struct GprsMs *ms, struct gprs_rlcmac_pdch *pdch) +{ + struct gprs_rlcmac_ul_tbf *ul_tbf; + ul_tbf = ul_tbf_alloc_rejected(ms->bts, ms, pdch); + if (!ul_tbf) + return NULL; + osmo_fsm_inst_dispatch(tbf_state_fi(ul_tbf_as_tbf(ul_tbf)), TBF_EV_ASSIGN_ADD_PACCH, NULL); + osmo_fsm_inst_dispatch(tbf_ul_ass_fi(ul_tbf_as_tbf(ul_tbf)), TBF_UL_ASS_EV_SCHED_ASS_REJ, NULL); + + return ul_tbf; +} + /* A new DL-TBF is allocated and assigned through PACCH using "tbf". * "tbf" may be either a UL-TBF or a DL-TBF. * Note: This should be called only when MS is reachable, see ms_is_reachable_for_dl_ass(). diff --git a/src/gprs_ms.h b/src/gprs_ms.h index 716ad74..92292e3 100644 --- a/src/gprs_ms.h +++ b/src/gprs_ms.h @@ -151,6 +151,7 @@ struct gprs_rlcmac_ul_tbf *ms_new_ul_tbf_assigned_pacch(struct GprsMs *ms, int8_t use_trx); struct gprs_rlcmac_ul_tbf *ms_new_ul_tbf_assigned_agch(struct GprsMs *ms); +struct gprs_rlcmac_ul_tbf *ms_new_ul_tbf_rejected_pacch(struct GprsMs *ms, struct gprs_rlcmac_pdch *pdch); int ms_new_dl_tbf_assigned_on_pacch(struct GprsMs *ms, struct gprs_rlcmac_tbf *tbf); int ms_new_dl_tbf_assigned_on_pch(struct GprsMs *ms); int ms_append_llc_dl_data(struct GprsMs *ms, uint16_t pdu_delay_csec, const uint8_t *data, uint16_t len); diff --git a/src/pdch.cpp b/src/pdch.cpp index 75afc88..5a683ff 100644 --- a/src/pdch.cpp +++ b/src/pdch.cpp @@ -825,7 +825,7 @@ new_ul_tbf = ms_new_ul_tbf_assigned_pacch(ms, trx_no()); if (!new_ul_tbf) { - handle_tbf_reject(bts, ms, trx_no(), ts_no); + ms_new_ul_tbf_rejected_pacch(ms, this); goto return_unref; } diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 8333a2f..b04c511 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -151,11 +151,11 @@ * packet resource Request failed. This is similar as tbf_alloc_ul() but without * calling tbf->setup() (in charge of TFI/USF allocation), and reusing resources * from Packet Resource Request we received. See TS 44.060 sec 7.1.3.2.1 */ -struct gprs_rlcmac_ul_tbf *handle_tbf_reject(struct gprs_rlcmac_bts *bts, - GprsMs *ms, uint8_t trx_no, uint8_t ts) +struct gprs_rlcmac_ul_tbf *ul_tbf_alloc_rejected(struct gprs_rlcmac_bts *bts, struct GprsMs *ms, + struct gprs_rlcmac_pdch *pdch) { struct gprs_rlcmac_ul_tbf *ul_tbf = NULL; - struct gprs_rlcmac_trx *trx = &bts->trx[trx_no]; + struct gprs_rlcmac_trx *trx = pdch->trx; OSMO_ASSERT(ms); ul_tbf = talloc(tall_pcu_ctx, struct gprs_rlcmac_ul_tbf); @@ -166,7 +166,7 @@ ul_tbf->trx = trx; /* The only one TS is the common, control TS */ - ms_set_first_common_ts(ms, ts); + ms_set_first_common_ts(ms, pdch->ts_no); 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, @@ -176,17 +176,15 @@ &tbf_ul_gprs_ctrg_desc, ul_tbf->m_ctrs->idx); if (!ul_tbf->m_ctrs || !ul_tbf->m_ul_egprs_ctrs || !ul_tbf->m_ul_gprs_ctrs) { - LOGPTBF(ul_tbf, LOGL_ERROR, "Cound not allocate TBF UL rate counters\n"); + LOGPTBF(ul_tbf, LOGL_ERROR, "Could not allocate TBF UL rate counters\n"); talloc_free(ul_tbf); return NULL; } tbf_update_state_fsm_name(ul_tbf); ms_attach_tbf(ms, ul_tbf); - llist_add(tbf_trx_list((struct gprs_rlcmac_tbf *)ul_tbf), &trx->ul_tbfs); + llist_add(tbf_trx_list(ul_tbf), &trx->ul_tbfs); bts_do_rate_ctr_inc(ul_tbf->bts, CTR_TBF_UL_ALLOCATED); - osmo_fsm_inst_dispatch(ul_tbf->state_fi, TBF_EV_ASSIGN_ADD_PACCH, NULL); - osmo_fsm_inst_dispatch(ul_tbf->ul_ass_fsm.fi, TBF_UL_ASS_EV_SCHED_ASS_REJ, NULL); return ul_tbf; } diff --git a/src/tbf_ul.h b/src/tbf_ul.h index c5c55f7..aa54c8f 100644 --- a/src/tbf_ul.h +++ b/src/tbf_ul.h @@ -123,8 +123,6 @@ return m_window.ws(); } -struct gprs_rlcmac_ul_tbf *handle_tbf_reject(struct gprs_rlcmac_bts *bts, - GprsMs *ms, uint8_t trx_no, uint8_t ts_no); #else /* ifdef __cplusplus */ struct gprs_rlcmac_ul_tbf; @@ -135,6 +133,8 @@ extern "C" { #endif struct gprs_rlcmac_ul_tbf *ul_tbf_alloc(struct gprs_rlcmac_bts *bts, struct GprsMs *ms, int8_t use_trx, bool single_slot); +struct gprs_rlcmac_ul_tbf *ul_tbf_alloc_rejected(struct gprs_rlcmac_bts *bts, struct GprsMs *ms, + struct gprs_rlcmac_pdch *pdch); void update_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, int8_t ta_delta); void set_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, uint8_t ta); struct gprs_rlcmac_ul_tbf *tbf_as_ul_tbf(struct gprs_rlcmac_tbf *tbf); diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index 314d2d9..80dfc2f 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -3240,7 +3240,7 @@ ms = bts_alloc_ms(bts, 0, 0); ms_set_tlli(ms, tlli); - ul_tbf = handle_tbf_reject(bts, ms, trx_no, ts_no); + ul_tbf = ms_new_ul_tbf_rejected_pacch(ms, &bts->trx[trx_no].pdch[ts_no]); OSMO_ASSERT(ul_tbf != 0); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30572 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I04b3b65942732cc652adeaa507529b849292ff61 Gerrit-Change-Number: 30572 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]: bts: Adapt slot_mask to trx defined array size
by pespin 16 Dec '22

16 Dec '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30573 ) Change subject: bts: Adapt slot_mask to trx defined array size ...................................................................... bts: Adapt slot_mask to trx defined array size struct gprs_rlcmac_bts still hardcodes it to 8, but using ARRAY_SIZE there should aim at seeing the relation between those, and avoid having one updated without the other. Related: OS#5827 Change-Id: I165588ba10d8528a9a496175d8dfe9d902c89e55 --- M src/bts.cpp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/bts.cpp b/src/bts.cpp index 5ae0714..06ac5a7 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -424,7 +424,7 @@ struct gprs_rlcmac_tbf *tbf; struct llist_head *tmp; const struct osmo_mobile_identity *mi; - uint8_t slot_mask[8]; + uint8_t slot_mask[ARRAY_SIZE(bts->trx)]; int8_t first_ts; /* must be signed */ /* First, build the MI used to page on PDCH from available subscriber info: */ 1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30573 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I165588ba10d8528a9a496175d8dfe9d902c89e55 Gerrit-Change-Number: 30573 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
pespin has submitted this change. ( 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, 58 insertions(+), 61 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/tbf.cpp b/src/tbf.cpp index 8358b8f..2cc6053 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..0ab740d 100644 --- a/src/tbf_dl_fsm.c +++ b/src/tbf_dl_fsm.c @@ -321,29 +321,35 @@ 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: 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
  • ← Newer
  • 1
  • ...
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • ...
  • 198
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.