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 libosmocore[master]: rate_ctr: convert to timerfd
by laforge 04 Dec '22

04 Dec '22
Attention is currently required from: pespin, msuraev. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/30302 ) Change subject: rate_ctr: convert to timerfd ...................................................................... Patch Set 7: (1 comment) File src/rate_ctr.c: https://gerrit.osmocom.org/c/libosmocore/+/30302/comment/9d986381_b5f10c89 PS7, Line 365: } w won't this have an overflow issue? what if tmier_ticks + expire count wraps the 64bit value and ends up a low integer value? Then timer_ticks will be greater than next and it will not execute this loop ever. I think the safer choice is to really iterate 'expire_count' times? -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30302 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I2525fd691caa380a862d305cfcb4fa3cc50b70d0 Gerrit-Change-Number: 30302 Gerrit-PatchSet: 7 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: msuraev <msuraev(a)sysmocom.de> Gerrit-Comment-Date: Sun, 04 Dec 2022 10:05:18 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
Change in libosmocore[master]: jenkins_arm.sh: disable external tests
by laforge 04 Dec '22

04 Dec '22
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/30441 ) Change subject: jenkins_arm.sh: disable external tests ...................................................................... jenkins_arm.sh: disable external tests We don not run 'make check' at all so configuring with external tests support is pointless. Related: OS#5671 Change-Id: If96756a85ab3b01a786838a4882884efe33f968b --- M contrib/jenkins_arm.sh 1 file changed, 0 insertions(+), 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/contrib/jenkins_arm.sh b/contrib/jenkins_arm.sh index e7df37d..8793415 100755 --- a/contrib/jenkins_arm.sh +++ b/contrib/jenkins_arm.sh @@ -21,7 +21,6 @@ --disable-libsctp \ --disable-libusb \ --disable-libmnl \ - --enable-external-tests \ CFLAGS="-Os -ffunction-sections -fdata-sections -nostartfiles -nodefaultlibs $WERROR_FLAGS" $MAKE $PARALLEL_MAKE -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30441 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: If96756a85ab3b01a786838a4882884efe33f968b Gerrit-Change-Number: 30441 Gerrit-PatchSet: 4 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in libosmocore[master]: vty: fix doc typo
by laforge 04 Dec '22

04 Dec '22
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/30445 ) Change subject: vty: fix doc typo ...................................................................... vty: fix doc typo Change-Id: I9f1112fc27dfe967b4a007648ddda1050e9bd9fa --- M src/vty/telnet_interface.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/vty/telnet_interface.c b/src/vty/telnet_interface.c index 374578c..132cd2e 100644 --- a/src/vty/telnet_interface.c +++ b/src/vty/telnet_interface.c @@ -104,7 +104,7 @@ /*! Initializes telnet based VTY interface using the configured bind addr/port. * \param[in] tall_ctx \ref talloc context * \param[in] priv private data to be passed to callback - * \param[in] default_port TCP port number to bind to if not explicitely configured + * \param[in] default_port TCP port number to bind to if not explicitly configured */ int telnet_init_default(void *tall_ctx, void *priv, int default_port) { -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30445 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I9f1112fc27dfe967b4a007648ddda1050e9bd9fa Gerrit-Change-Number: 30445 Gerrit-PatchSet: 3 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
Change in libosmocore[master]: vty: fix doc typo
by laforge 04 Dec '22

04 Dec '22
Attention is currently required from: msuraev. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/30445 ) Change subject: vty: fix doc typo ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30445 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I9f1112fc27dfe967b4a007648ddda1050e9bd9fa Gerrit-Change-Number: 30445 Gerrit-PatchSet: 2 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: msuraev <msuraev(a)sysmocom.de> Gerrit-Comment-Date: Sun, 04 Dec 2022 10:03:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in libosmocore[master]: jenkins_arm.sh: disable external tests
by laforge 04 Dec '22

04 Dec '22
Attention is currently required from: osmith, msuraev. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/30441 ) Change subject: jenkins_arm.sh: disable external tests ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30441 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: If96756a85ab3b01a786838a4882884efe33f968b Gerrit-Change-Number: 30441 Gerrit-PatchSet: 3 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: msuraev <msuraev(a)sysmocom.de> Gerrit-Comment-Date: Sun, 04 Dec 2022 10:02:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in libosmocore[master]: osmo-stat-dummy: add rate counters and statsd tester
by fixeria 04 Dec '22

04 Dec '22
Attention is currently required from: laforge, pespin, msuraev. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/30301 ) Change subject: osmo-stat-dummy: add rate counters and statsd tester ...................................................................... Patch Set 17: (1 comment) Patchset: PS17: The osmo-stat-dummy.cfg should most likely go to 'doc/examples/'. Can you explain what osmo-stat-dummy.html is for? -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30301 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ibd8b17aa3ba9ceb527c6231310f01d736fb542a7 Gerrit-Change-Number: 30301 Gerrit-PatchSet: 17 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: msuraev <msuraev(a)sysmocom.de> Gerrit-Comment-Date: Sun, 04 Dec 2022 00:00:53 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
Change in libosmocore[master]: telnet_init_dynif: don't allow negative port
by fixeria 03 Dec '22

03 Dec '22
Attention is currently required from: msuraev. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/30443 ) Change subject: telnet_init_dynif: don't allow negative port ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30443 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I24f957641f2d8e230ccceb331a719496df0fdb1f Gerrit-Change-Number: 30443 Gerrit-PatchSet: 3 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: msuraev <msuraev(a)sysmocom.de> Gerrit-Comment-Date: Sat, 03 Dec 2022 23:53:08 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in libosmocore[master]: telnet_init_dynif: propagate error
by fixeria 03 Dec '22

03 Dec '22
Attention is currently required from: msuraev. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/30442 ) Change subject: telnet_init_dynif: propagate error ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30442 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ib09f4315b3868ec031ecbced8a63069e7c2de7da Gerrit-Change-Number: 30442 Gerrit-PatchSet: 3 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: msuraev <msuraev(a)sysmocom.de> Gerrit-Comment-Date: Sat, 03 Dec 2022 23:52:14 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in libosmocore[master]: rate_ctr: convert to timerfd
by fixeria 03 Dec '22

03 Dec '22
Attention is currently required from: laforge, pespin, msuraev. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/30302 ) Change subject: rate_ctr: convert to timerfd ...................................................................... Patch Set 7: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30302 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I2525fd691caa380a862d305cfcb4fa3cc50b70d0 Gerrit-Change-Number: 30302 Gerrit-PatchSet: 7 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: msuraev <msuraev(a)sysmocom.de> Gerrit-Comment-Date: Sat, 03 Dec 2022 23:46:43 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-pcu[master]: pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI
by pespin 03 Dec '22

03 Dec '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30293 ) Change subject: pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI ...................................................................... pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI This patch refactors rcv_resource_request() in several ways: * Move the ID_TYPE=DL/UL_TFI handling at the start of the function, so that the function is split in 2 sections: First section gathers a GprsMS object from the ID_TYPE in the PktResReq. Second section handles the packet for the GprsMS based on the expectd ULC slot. * Initial handling of PktResReq when transmitted by the MS on the UL-TBF as an answer to USF. This case is basically the one where the MS wishes to change some parameters of the currently active UL-TBF. In order to do so, for now simply delete the current TBF and re-create a new one to triger the PktUlAss which is expected by the MS. This behavior is not entirely correct since in this case the MS is expected to keep using actively the old TBF until the PktUlAss is received, so in this case ideally we should be keeping the TBF object and simply upgrading it and using itself to trigger a PktUlAss in its ul_tbf->ul_ass_fsm. Doing this however requires far more work, so it can be done later as an incremental step fix. The current behavior is alreday better than the previous one, since the MS has been tested to be PKT_CTRL_ACKing the PKT_UL_ASS and continuing to use the new TBF. Related: OS#4947 Change-Id: Ie6b1b438d26cd977f88ddb4eff6b3041e0739d92 --- M src/pdch.cpp 1 file changed, 169 insertions(+), 142 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/src/pdch.cpp b/src/pdch.cpp index 0988af6..75afc88 100644 --- a/src/pdch.cpp +++ b/src/pdch.cpp @@ -644,10 +644,16 @@ void gprs_rlcmac_pdch::rcv_resource_request(Packet_Resource_Request_t *request, uint32_t fn, struct pcu_l1_meas *meas) { - struct gprs_rlcmac_sba *sba; int rc; struct gprs_rlcmac_bts *bts = trx->bts; struct pdch_ulc_node *item; + char buf[128]; + struct GprsMs *ms = NULL; + struct gprs_rlcmac_sba *sba; + struct gprs_rlcmac_dl_tbf *dl_tbf = NULL; + struct gprs_rlcmac_ul_tbf *ul_tbf = NULL; + struct gprs_rlcmac_ul_tbf *new_ul_tbf = NULL; + if (!(item = pdch_ulc_get_node(ulc, fn))) { LOGPDCH(this, DRLCMAC, LOGL_NOTICE, "FN=%u PKT RESOURCE REQ: " @@ -655,169 +661,190 @@ return; } - if (request->ID.UnionType) { - struct gprs_rlcmac_ul_tbf *ul_tbf = NULL; - struct gprs_rlcmac_dl_tbf *dl_tbf = NULL; + /* First gather MS from TLLI/DL_TFI/UL_TFI:*/ + if (request->ID.UnionType) { /* ID_TYPE = TLLI */ uint32_t tlli = request->ID.u.TLLI; - - GprsMs *ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI); + ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI); if (!ms) { ms = bts_alloc_ms(bts, 0, 0); /* ms class updated later */ ms_set_tlli(ms, tlli); } - - /* Keep the ms, even if it gets idle temporarily */ - ms_ref(ms); - - switch (item->type) { - case PDCH_ULC_NODE_TBF_USF: - /* Is it actually valid for an MS to send a PKT Res Req during USF? */ - ul_tbf = item->tbf_usf.ul_tbf; - LOGPDCH(this, DRLCMAC, LOGL_NOTICE, "FN=%u PKT RESOURCE REQ: " - "Unexpectedly received, waiting USF of %s\n", - fn, tbf_name(item->tbf_usf.ul_tbf)); - /* Ignore it, let common path expire related ULC entry */ - goto return_unref; - case PDCH_ULC_NODE_SBA: - sba = item->sba.sba; - LOGPDCH(this, DRLCMAC, LOGL_DEBUG, "FN=%u PKT RESOURCE REQ: " - "MS requests UL TBF throguh SBA\n", fn); - ms_set_ta(ms, sba->ta); - sba_free(sba); - /* If MS identified by TLLI sent us a PktResReq through SBA, it means it came - * from CCCH, so it's for sure not using previous UL - * TBF; drop it if it still exits on our end: */ - if ((ul_tbf = ms_ul_tbf(ms))) { - /* Get rid of previous finished UL TBF before providing a new one */ - LOGPTBFUL(ul_tbf, LOGL_NOTICE, - "Got PACKET RESOURCE REQ while TBF not finished, killing pending UL TBF\n"); - tbf_free(ul_tbf); - ul_tbf = NULL; - } - /* Similarly, it is for sure not using any DL-TBF. We - * still may have some because we were trying to assign a - * DL-TBF over CCCH when the MS proactively requested for a - * UL-TBF. In that case we'll need to re-assigna new DL-TBF through PACCH when contention resolution is done: */ - if ((dl_tbf = ms_dl_tbf(ms))) { - /* Get rid of previous finished UL TBF before providing a new one */ - LOGPTBFDL(dl_tbf, LOGL_NOTICE, - "Got PACKET RESOURCE REQ while DL-TBF pending, killing it\n"); - tbf_free(dl_tbf); - dl_tbf = NULL; - } - break; - case PDCH_ULC_NODE_TBF_POLL: - if (item->tbf_poll.poll_tbf->direction != GPRS_RLCMAC_UL_TBF) { - LOGPDCH(this, DRLCMAC, LOGL_NOTICE, "FN=%u PKT RESOURCE REQ: " - "Unexpectedly received for DL TBF %s\n", fn, - tbf_name(item->tbf_poll.poll_tbf)); - /* let common path expire the poll */ - goto return_unref; - } - ul_tbf = tbf_as_ul_tbf(item->tbf_poll.poll_tbf); - if (item->tbf_poll.reason != PDCH_ULC_POLL_UL_ACK) { - LOGPDCH(this, DRLCMAC, LOGL_NOTICE, "FN=%u PKT RESOURCE REQ: " - "Unexpectedly received, waiting for poll reason %d\n", - fn, item->tbf_poll.reason); - /* let common path expire the poll */ - goto return_unref; - } - if (ul_tbf != ms_ul_tbf(ms)) { - LOGPDCH(this, DRLCMAC, LOGL_NOTICE, "FN=%u PKT RESOURCE REQ: " - "Unexpected TLLI 0x%08x received vs exp 0x%08x\n", - fn, tlli, ul_tbf->tlli()); - /* let common path expire the poll */ - goto return_unref; - } - /* 3GPP TS 44.060 $ 9.3.3.3 */ - LOGPTBFUL(ul_tbf, LOGL_DEBUG, "FN=%u PKT RESOURCE REQ: " - "MS requests reuse of finished UL TBF in RRBP " - "block of final UL ACK/NACK\n", fn); - ul_tbf->n_reset(N3103); - pdch_ulc_release_node(ulc, item); - rc = osmo_fsm_inst_dispatch(ul_tbf->state_fi, TBF_EV_FINAL_UL_ACK_CONFIRMED, (void*)true); - if (rc) { - /* FSM failed handling, get rid of previous finished UL TBF before providing a new one */ - LOGPTBFUL(ul_tbf, LOGL_NOTICE, - "Got PACKET RESOURCE REQ while TBF not finished, killing pending UL TBF\n"); - tbf_free(ul_tbf); - } /* else: ul_tbf has been freed by state_fsm */ - ul_tbf = NULL; - break; - default: - OSMO_ASSERT(0); - } - - /* Here ul_tbf is NULL: - * - SBA case: no previous TBF) and in - * - POLL case: PktResReq is a final ACk confirmation and ul_tbf was freed - */ - - if (request->Exist_MS_Radio_Access_capability2) { - uint8_t ms_class, egprs_ms_class; - ms_class = get_ms_class_by_capability(&request->MS_Radio_Access_capability2); - egprs_ms_class = get_egprs_ms_class_by_capability(&request->MS_Radio_Access_capability2); - if (ms_class) - ms_set_ms_class(ms, ms_class); - if (egprs_ms_class) - ms_set_egprs_ms_class(ms, egprs_ms_class); - } - - /* get measurements */ - get_meas(meas, request); - ms_update_l1_meas(ms, meas); - - ul_tbf = ms_new_ul_tbf_assigned_pacch(ms, trx_no()); - if (!ul_tbf) { - handle_tbf_reject(bts, ms, trx_no(), ts_no); - goto return_unref; - } - - /* Set control TS to the TS where this PktResReq was received, - * which in practice happens to be the control_ts from the - * previous UL-TBF or SBA. When CTRL ACK is received as RRBP of the Pkt - * UL Ass scheduled below, then TBF_EV_ASSIGN_ACK_PACCH will be - * sent to tbf_fsm which will call tbf_assign_control_ts(), - * effectively setting back control_ts to - * tbf->initial_common_ts. */ - LOGPTBF(ul_tbf, LOGL_INFO, "change control TS %d -> %d until assignment is complete.\n", - ul_tbf->control_ts, ts_no); - - ul_tbf->control_ts = ts_no; - /* schedule uplink assignment */ - osmo_fsm_inst_dispatch(ul_tbf->ul_ass_fsm.fi, TBF_UL_ASS_EV_SCHED_ASS, NULL); -return_unref: - ms_unref(ms); - return; - } - - if (request->ID.u.Global_TFI.UnionType) { - struct gprs_rlcmac_dl_tbf *dl_tbf; + } else if (request->ID.u.Global_TFI.UnionType) { /* ID_TYPE = DL_TFI */ int8_t tfi = request->ID.u.Global_TFI.u.DOWNLINK_TFI; dl_tbf = bts_dl_tbf_by_tfi(bts, tfi, trx_no(), ts_no); if (!dl_tbf) { LOGP(DRLCMAC, LOGL_NOTICE, "PACKET RESOURCE REQ unknown downlink TFI=%d\n", tfi); return; } - LOGPTBFDL(dl_tbf, LOGL_ERROR, - "RX: [PCU <- BTS] FIXME: Packet resource request\n"); - /* Reset N3101 counter: */ dl_tbf->n_reset(N3101); - } else { - struct gprs_rlcmac_ul_tbf *ul_tbf; + ms = tbf_ms(dl_tbf_as_tbf(dl_tbf)); + dl_tbf = NULL; + } else { /* ID_TYPE = UL_TFI */ int8_t tfi = request->ID.u.Global_TFI.u.UPLINK_TFI; ul_tbf = bts_ul_tbf_by_tfi(bts, tfi, trx_no(), ts_no); if (!ul_tbf) { LOGP(DRLCMAC, LOGL_NOTICE, "PACKET RESOURCE REQ unknown uplink TFI=%d\n", tfi); return; } - LOGPTBFUL(ul_tbf, LOGL_ERROR, - "RX: [PCU <- BTS] FIXME: Packet resource request\n"); - /* Reset N3101 counter: */ ul_tbf->n_reset(N3101); + ms = tbf_ms(ul_tbf_as_tbf(ul_tbf)); + ul_tbf = NULL; } + + + /* Here ms is available (non-null). Keep the ms, even if it gets idle + * temporarily, in order to avoid it being freed if we free any of its + * resources (TBF). */ + OSMO_ASSERT(ms); + ms_ref(ms); + + + switch (item->type) { + case PDCH_ULC_NODE_TBF_USF: + /* TS 44.060 to 8.1.1.1.2: An MS can send a PKT Res Req during USF, for instance to change its Radio Priority. */ + ul_tbf = item->tbf_usf.ul_tbf; + if (tbf_ms(ul_tbf_as_tbf(ul_tbf)) != ms) { + LOGPDCH(this, DRLCMAC, LOGL_NOTICE, "FN=%u PKT RESOURCE REQ: " + "Received from unexpected %s vs exp %s\n", fn, + ms_name_buf(ms, buf, sizeof(buf)), ms_name(tbf_ms(ul_tbf_as_tbf(ul_tbf)))); + /* let common path expire the poll */ + goto return_unref; + } + LOGPDCH(this, DRLCMAC, LOGL_NOTICE, "FN=%u PKT RESOURCE REQ: " + "MS requests UL TBF upgrade through USF of %s\n", + fn, tbf_name(item->tbf_usf.ul_tbf)); + pdch_ulc_release_node(ulc, item); + /* FIXME OS#4947: Currenty we free the UL TBF and create a new one below in order to trigger the Pkt UL Ass. + * We should instead keep the same UL TBF working and upgrading it (modify ul_tbf->ul_ass_fsm.fi to + * handle the PktUlAss + PktCtrlAck). + * This is required by spec, and MS are know to continue using the TBF (due to delay in between DL and + * UL scheduling). + * TS 44.060 to 8.1.1.1.2: + * "If the mobile station or the network does not support multiple TBF procedures, then after the + * transmission of the PACKET RESOURCE REQUEST message with the reason for changing PFI, the radio + * priority or peak throughput class of an assigned uplink TBF the mobile station continue to use the + * currently assigned uplink TBF assuming that the requested radio priority or peak throughput class is + * already assigned to that TBF." + */ + tbf_free(ul_tbf); + ul_tbf = NULL; + break; + case PDCH_ULC_NODE_SBA: + sba = item->sba.sba; + LOGPDCH(this, DRLCMAC, LOGL_DEBUG, "FN=%u PKT RESOURCE REQ: " + "MS requests UL TBF throguh SBA\n", fn); + ms_set_ta(ms, sba->ta); + sba_free(sba); + /* If MS identified by TLLI sent us a PktResReq through SBA, it means it came + * from CCCH, so it's for sure not using previous UL BF; drop it if it still + * exits on our end: + */ + if ((ul_tbf = ms_ul_tbf(ms))) { + /* Get rid of previous finished UL TBF before providing a new one */ + LOGPTBFUL(ul_tbf, LOGL_NOTICE, + "Got PACKET RESOURCE REQ while TBF not finished, killing pending UL TBF\n"); + tbf_free(ul_tbf); + ul_tbf = NULL; + } + /* Similarly, it is for sure not using any DL-TBF. We still may have some because + * we were trying to assign a DL-TBF over CCCH when the MS proactively requested + * for a UL-TBF. In that case we'll need to re-assigna new DL-TBF through PACCH when + * contention resolution is done: + */ + if ((dl_tbf = ms_dl_tbf(ms))) { + /* Get rid of previous finished UL TBF before providing a new one */ + LOGPTBFDL(dl_tbf, LOGL_NOTICE, + "Got PACKET RESOURCE REQ while DL-TBF pending, killing it\n"); + tbf_free(dl_tbf); + dl_tbf = NULL; + } + break; + case PDCH_ULC_NODE_TBF_POLL: + if (item->tbf_poll.poll_tbf->direction != GPRS_RLCMAC_UL_TBF) { + LOGPDCH(this, DRLCMAC, LOGL_NOTICE, "FN=%u PKT RESOURCE REQ: " + "Unexpectedly received for DL TBF %s\n", fn, + tbf_name(item->tbf_poll.poll_tbf)); + /* let common path expire the poll */ + goto return_unref; + } + ul_tbf = tbf_as_ul_tbf(item->tbf_poll.poll_tbf); + if (item->tbf_poll.reason != PDCH_ULC_POLL_UL_ACK) { + LOGPDCH(this, DRLCMAC, LOGL_NOTICE, "FN=%u PKT RESOURCE REQ: " + "Unexpectedly received, waiting for poll reason %d\n", + fn, item->tbf_poll.reason); + /* let common path expire the poll */ + goto return_unref; + } + if (tbf_ms(ul_tbf_as_tbf(ul_tbf)) != ms) { + LOGPDCH(this, DRLCMAC, LOGL_NOTICE, "FN=%u PKT RESOURCE REQ: " + "Received from unexpected %s vs exp %s\n", fn, + ms_name_buf(ms, buf, sizeof(buf)), ms_name(tbf_ms(ul_tbf_as_tbf(ul_tbf)))); + /* let common path expire the poll */ + goto return_unref; + } + /* 3GPP TS 44.060 $ 9.3.3.3 */ + LOGPTBFUL(ul_tbf, LOGL_DEBUG, "FN=%u PKT RESOURCE REQ: " + "MS requests reuse of finished UL TBF in RRBP " + "block of final UL ACK/NACK\n", fn); + ul_tbf->n_reset(N3103); + pdch_ulc_release_node(ulc, item); + rc = osmo_fsm_inst_dispatch(ul_tbf->state_fi, TBF_EV_FINAL_UL_ACK_CONFIRMED, (void*)true); + if (rc) { + /* FSM failed handling, get rid of previous finished UL TBF before providing a new one */ + LOGPTBFUL(ul_tbf, LOGL_NOTICE, + "Got PACKET RESOURCE REQ while TBF not finished, killing pending UL TBF\n"); + tbf_free(ul_tbf); + } /* else: ul_tbf has been freed by state_fsm */ + ul_tbf = NULL; + break; + default: + OSMO_ASSERT(0); + } + + /* Here ul_tbf is NULL: + * - USF case: Previous TBF is explicitly freed (FIXME: this is incorrect, old TBF should be kept in this case) + * - SBA case: no previous TBF + * - POLL case: PktResReq is a final ACk confirmation and ul_tbf was freed + */ + + if (request->Exist_MS_Radio_Access_capability2) { + uint8_t ms_class, egprs_ms_class; + ms_class = get_ms_class_by_capability(&request->MS_Radio_Access_capability2); + egprs_ms_class = get_egprs_ms_class_by_capability(&request->MS_Radio_Access_capability2); + if (ms_class) + ms_set_ms_class(ms, ms_class); + if (egprs_ms_class) + ms_set_egprs_ms_class(ms, egprs_ms_class); + } + + /* get measurements */ + get_meas(meas, request); + ms_update_l1_meas(ms, meas); + + 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); + goto return_unref; + } + + /* Set control TS to the TS where this PktResReq was received, + * which in practice happens to be the control_ts from the + * previous UL-TBF or SBA. When CTRL ACK is received as RRBP of the Pkt + * UL Ass scheduled below, then TBF_EV_ASSIGN_ACK_PACCH will be + * sent to tbf_fsm which will call tbf_assign_control_ts(), + * effectively setting back control_ts to tbf->initial_common_ts. + */ + LOGPTBF(new_ul_tbf, LOGL_INFO, "change control TS %d -> %d until assignment is complete.\n", + new_ul_tbf->control_ts, ts_no); + + new_ul_tbf->control_ts = ts_no; + /* schedule uplink assignment */ + osmo_fsm_inst_dispatch(new_ul_tbf->ul_ass_fsm.fi, TBF_UL_ASS_EV_SCHED_ASS, NULL); +return_unref: + ms_unref(ms); + return; } void gprs_rlcmac_pdch::rcv_measurement_report(Packet_Measurement_Report_t *report, uint32_t fn) -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30293 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ie6b1b438d26cd977f88ddb4eff6b3041e0739d92 Gerrit-Change-Number: 30293 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: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • ...
  • 198
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.