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

July 2023

  • 1 participants
  • 3051 discussions
[M] Change in osmo-bsc[master]: bsc (WIP): Make socket queue max. length configurable
by arehbein 24 Jul '23

24 Jul '23
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bsc/+/33892 to look at the new patch set (#2). Change subject: bsc (WIP): Make socket queue max. length configurable ...................................................................... bsc (WIP): Make socket queue max. length configurable Title refers to the maximum length of the osmo_wqueue used for the PCU socket connection. Related: OS#5774 Change-Id: Ic5f19f4613bccaf582997a4d02b689adee083a0b --- M include/osmocom/bsc/gsm_data.h M src/osmo-bsc/bsc_init.c M src/osmo-bsc/bsc_vty.c M src/osmo-bsc/pcu_sock.c 4 files changed, 46 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/92/33892/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/33892 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ic5f19f4613bccaf582997a4d02b689adee083a0b Gerrit-Change-Number: 33892 Gerrit-PatchSet: 2 Gerrit-Owner: arehbein <arehbein(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: S1AP_Emulation: initialize comp_ref member of S1apAssociationTable
by dexter 24 Jul '23

24 Jul '23
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33910 ) Change subject: S1AP_Emulation: initialize comp_ref member of S1apAssociationTable ...................................................................... S1AP_Emulation: initialize comp_ref member of S1apAssociationTable The comp_ref member in S1apAssociationTable is not initialized. When an item is delted from the S1apAssociationTable, comp_ref is set to null. Let's maintain a consistent state and also set comp_ref to null when the table is initialized. Related: OS#5760 Change-Id: If86a18a4a953665c1e2bf7f757880ba3ac6c0f83 --- M library/S1AP_Emulation.ttcn 1 file changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/10/33910/1 diff --git a/library/S1AP_Emulation.ttcn b/library/S1AP_Emulation.ttcn index 9b159d4..38c738b 100644 --- a/library/S1AP_Emulation.ttcn +++ b/library/S1AP_Emulation.ttcn @@ -274,6 +274,7 @@ S1apAssociationTable[i].cgi := omit; S1apAssociationTable[i].tai := omit; S1apAssociationTable[i].nus := valueof(t_NAS_UE_State(g_pars.role)); + S1apAssociationTable[i].comp_ref := null; } } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33910 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: If86a18a4a953665c1e2bf7f757880ba3ac6c0f83 Gerrit-Change-Number: 33910 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: S1AP_Emulation: fix incorrect comment
by dexter 24 Jul '23

24 Jul '23
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33909 ) Change subject: S1AP_Emulation: fix incorrect comment ...................................................................... S1AP_Emulation: fix incorrect comment Related: OS#5760 Change-Id: I1134ddf1f847dd297b13f0664099da6fdc8059bd --- M library/S1AP_Emulation.ttcn 1 file changed, 11 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/09/33909/1 diff --git a/library/S1AP_Emulation.ttcn b/library/S1AP_Emulation.ttcn index a907483..9b159d4 100644 --- a/library/S1AP_Emulation.ttcn +++ b/library/S1AP_Emulation.ttcn @@ -105,7 +105,7 @@ port S1AP_Conn_PT S1AP_CLIENT; /* currently tracked connections */ var AssociationData S1apAssociationTable[16]; - /* pending expected CRCX */ + /* pending expected S1AP Association (UE oriented) */ var ExpectData S1apExpectTable[8]; /* procedure based port to register for incoming connections */ port S1APEM_PROC_PT S1AP_PROC; -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33909 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I1134ddf1f847dd297b13f0664099da6fdc8059bd Gerrit-Change-Number: 33909 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: S1AP_Emulation: improve accessibility of unit-data
by dexter 24 Jul '23

24 Jul '23
Attention is currently required from: laforge. Hello Jenkins Builder, laforge, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33898 to look at the new patch set (#4). Change subject: S1AP_Emulation: improve accessibility of unit-data ...................................................................... S1AP_Emulation: improve accessibility of unit-data When S1AP unit-data is passed around, there is always the problem that it is routed to the MTC_CT. The reason for this is that S1AP_Emulation cannot determine a specific receiver component because unit-data does not contain any addressing fields that would identifiy a specific eNB or UE. Unfortunately it can be a huge problem when developing test fixtures that use unit-data from inside a ConnHdlr component. It is no problem to send unit-data using S1AP.send(), but it is impossible to receive unit-data through the same path. The solution that is proposed in this patch uses a mechanism that allows to create an expectation for a specific procedureCode. When the S1AP_Emulation sees a messages with the expected procedureCode, it will forward it to the ConnHdlr component. Related: OS#5760 Change-Id: I041b45b247e365b0d4ee8645c07dc5f26007af82 --- M library/S1AP_Emulation.ttcn 1 file changed, 109 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/98/33898/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33898 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I041b45b247e365b0d4ee8645c07dc5f26007af82 Gerrit-Change-Number: 33898 Gerrit-PatchSet: 4 Gerrit-Owner: dexter <pmaier(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-MessageType: newpatchset
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: S1AP_Emulation: improve accessibility of unit-data
by dexter 24 Jul '23

24 Jul '23
Attention is currently required from: laforge. Hello Jenkins Builder, laforge, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33898 to look at the new patch set (#3). Change subject: S1AP_Emulation: improve accessibility of unit-data ...................................................................... S1AP_Emulation: improve accessibility of unit-data When S1AP unit-data is passed around, there is always the problem that it is routed to the MTC_CT. The reason for this is that S1AP_Emulation cannot determine a specific receiver component because unit-data does not contain any addressing fields that would identifiy a specific eNB or UE. Unfortunately it can be a huge problem when developing test fixtures that use unit-data from inside a ConnHdlr component. It is no problem to send unit-data using S1AP.send(), but it is impossible to receive unit-data through the same path. The solution that is proposed in this patch uses a mechanism that allows to create an expectation for a specific procedureCode. When the S1AP_Emulation sees a messages with the expected procedureCode, it will forward it to the ConnHdlr component. Related: OS#5760 Change-Id: I041b45b247e365b0d4ee8645c07dc5f26007af82 --- M library/S1AP_Emulation.ttcn 1 file changed, 112 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/98/33898/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33898 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I041b45b247e365b0d4ee8645c07dc5f26007af82 Gerrit-Change-Number: 33898 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier(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-MessageType: newpatchset
1 0
0 0
[L] Change in osmocom-bb[master]: layer23: modem: implement GPRS-RR FSM
by fixeria 24 Jul '23

24 Jul '23
Attention is currently required from: pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/33901 ) Change subject: layer23: modem: implement GPRS-RR FSM ...................................................................... Patch Set 2: (1 comment) Patchset: PS2: > @fixeria I plan to merge this full patchset ASAP, we can then continue work on it. Fine with me. -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/33901 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I8a7d85df7b07d85ac86e0b7e340f6bbacc65e1bc Gerrit-Change-Number: 33901 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 24 Jul 2023 15:22:32 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[L] Change in osmocom-bb[master]: layer23: modem: implement GPRS-RR FSM
by pespin 24 Jul '23

24 Jul '23
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/33901 ) Change subject: layer23: modem: implement GPRS-RR FSM ...................................................................... Patch Set 2: (1 comment) Patchset: PS2: @fixeria I plan to merge this full patchset ASAP, we can then continue work on it. -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/33901 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I8a7d85df7b07d85ac86e0b7e340f6bbacc65e1bc Gerrit-Change-Number: 33901 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Mon, 24 Jul 2023 15:21:22 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmocom-bb[master]: layer23: modem: gmm: Update own TLLI copy though GMMRR-Assign.req hook
by pespin 24 Jul '23

24 Jul '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/33845 ) Change subject: layer23: modem: gmm: Update own TLLI copy though GMMRR-Assign.req hook ...................................................................... layer23: modem: gmm: Update own TLLI copy though GMMRR-Assign.req hook This is needed in order to provide updated TLLI when submitting new user data from the tundev to the SNDCP layer. Change-Id: I5c6a2c371ae6d65bf4fe23e665ec939da37112be --- M src/host/layer23/src/modem/gmm.c 1 file changed, 40 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/src/host/layer23/src/modem/gmm.c b/src/host/layer23/src/modem/gmm.c index 7b97894..5ea2b43 100644 --- a/src/host/layer23/src/modem/gmm.c +++ b/src/host/layer23/src/modem/gmm.c @@ -43,6 +43,7 @@ #include <osmocom/bb/common/logging.h> #include <osmocom/bb/common/apn.h> #include <osmocom/bb/common/ms.h> +#include <osmocom/bb/common/vty.h> #include <osmocom/bb/modem/gmm.h> #include <osmocom/bb/modem/sm.h> #include <osmocom/bb/modem/modem.h> @@ -131,18 +132,44 @@ { const char *pdu_name = osmo_gprs_gmm_prim_name(gmm_prim); int rc = 0; + uint32_t old_tlli, new_tlli; + struct osmocom_ms *ms, *ms_found = NULL; osmo_static_assert(sizeof(struct osmo_gprs_gmm_gmmrr_prim) == sizeof(struct osmo_gprs_rlcmac_gmmrr_prim), _gmmrr_prim_size); switch (gmm_prim->oph.sap) { case OSMO_GPRS_GMM_SAP_GMMRR: + OSMO_ASSERT(gmm_prim->oph.primitive == OSMO_GPRS_GMM_GMMRR_ASSIGN); + /* Update app TLLI reference. This usually happens as a result of a RAU ACCEPT */ + old_tlli = gmm_prim->gmmrr.tlli; + new_tlli = gmm_prim->gmmrr.assign_req.new_tlli; + llist_for_each_entry(ms, &ms_list, entity) { + if (old_tlli != ms->gmmlayer.tlli) + continue; + ms_found = ms; + break; + } + if (ms_found) { + if (new_tlli != OSMO_GPRS_GMM_TLLI_UNASSIGNED) { + LOGP(DGMM, LOGL_INFO, "%s(): Rx %s Update TLLI 0x%08x -> 0x%08x\n", + __func__, pdu_name, old_tlli, new_tlli); + ms_found->gmmlayer.tlli = new_tlli; + } else { + LOGP(DGMM, LOGL_ERROR, "%s(): Rx %s with TLLI=0x%08x is being released, GMM should be restarted?\n", + __func__, pdu_name, old_tlli); + } + } else { + if (old_tlli != OSMO_GPRS_GMM_TLLI_UNASSIGNED) + LOGP(DGMM, LOGL_ERROR, "%s(): Unexpected Rx %s with unknown TLLI=0x%08xn", + __func__, pdu_name, old_tlli); + } + /* Forward it to lower layers, pass ownership over to RLCMAC: */ /* Optimization: GMM-GMMRR-ASSIGN-REQ is 1-to-1 ABI compatible with RLCMAC-GMMRR-ASSIGN-REQ, we just need to adapt the header. See osmo_static_assert(_gmmrr_prim_size) above. */ - OSMO_ASSERT(gmm_prim->oph.primitive == OSMO_GPRS_GMM_GMMRR_ASSIGN); gmm_prim->oph.sap = OSMO_GPRS_RLCMAC_SAP_GMMRR; gmm_prim->oph.primitive = OSMO_GPRS_RLCMAC_GMMRR_ASSIGN; osmo_gprs_rlcmac_prim_upper_down((struct osmo_gprs_rlcmac_prim *)gmm_prim); -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/33845 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I5c6a2c371ae6d65bf4fe23e665ec939da37112be Gerrit-Change-Number: 33845 Gerrit-PatchSet: 1 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
[S] Change in libosmo-gprs[master]: rlcmac: Apply tx_cs requested by the network through PKT UL ACK/NACK
by pespin 24 Jul '23

24 Jul '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/33899 ) Change subject: rlcmac: Apply tx_cs requested by the network through PKT UL ACK/NACK ...................................................................... rlcmac: Apply tx_cs requested by the network through PKT UL ACK/NACK Recalculating CV when in Countdown Procedure will be implemented in a follow-up commit. Related: OS#6108 Change-Id: I1e7b28c2e5f1d77a962ec3070f3a027b8f66a69e --- M src/rlcmac/tbf_ul.c M tests/rlcmac/rlcmac_prim_test.c 2 files changed, 28 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/src/rlcmac/tbf_ul.c b/src/rlcmac/tbf_ul.c index 6957658..0fa98ae 100644 --- a/src/rlcmac/tbf_ul.c +++ b/src/rlcmac/tbf_ul.c @@ -234,6 +234,18 @@ return 0; } +static void gprs_rlcmac_ul_tbf_update_tx_cs(struct gprs_rlcmac_ul_tbf *ul_tbf, enum gprs_rlcmac_coding_scheme tx_cs) +{ + if (ul_tbf->tx_cs == tx_cs) + return; + + LOGPTBFUL(ul_tbf, LOGL_INFO, "Tx CS update: %s -> %s\n", + gprs_rlcmac_mcs_name(ul_tbf->tx_cs), gprs_rlcmac_mcs_name(tx_cs)); + ul_tbf->tx_cs = tx_cs; + + /* TODO: recalculate countdown_state, have to look a TS 44.060 specs on what to do exactly. */ +} + int gprs_rlcmac_ul_tbf_handle_pkt_ul_ack_nack(struct gprs_rlcmac_ul_tbf *ul_tbf, const RlcMacDownlink_t *dl_block) { @@ -276,6 +288,8 @@ "Received acknowledge of all blocks, but without final ack indication (don't worry)\n"); } + gprs_rlcmac_ul_tbf_update_tx_cs(ul_tbf, gprs->CHANNEL_CODING_COMMAND + GPRS_RLCMAC_CS_1); + return rc; } diff --git a/tests/rlcmac/rlcmac_prim_test.c b/tests/rlcmac/rlcmac_prim_test.c index 0c40737..10f148a 100644 --- a/tests/rlcmac/rlcmac_prim_test.c +++ b/tests/rlcmac/rlcmac_prim_test.c @@ -321,7 +321,7 @@ ack->UPLINK_TFI = ul_tfi; ack->UnionType = 0; /* GPRS */ - gprs->CHANNEL_CODING_COMMAND = cs; + gprs->CHANNEL_CODING_COMMAND = gprs_rlcmac_mcs_chan_code(cs); } static void ul_ack_nack_mark(Ack_Nack_Description_t *ack_desc, unsigned int idx, bool received) -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/33899 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I1e7b28c2e5f1d77a962ec3070f3a027b8f66a69e Gerrit-Change-Number: 33899 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in libosmo-gprs[master]: rlcmac: recalculate CV as needed when already in Countdown procedure
by pespin 24 Jul '23

24 Jul '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/33900 ) Change subject: rlcmac: recalculate CV as needed when already in Countdown procedure ...................................................................... rlcmac: recalculate CV as needed when already in Countdown procedure Getting out of contention resolution means we may have to update our calculated CV state because we are no longer sending TLLI. Same happens if a new tx CS is provided by the network, since different block size means different CV. In this commit only code paths for the state where already in Countdown Procedure are added. If TBF has to enter Countdown Procedure due the above mentioned changes, it will do so using regular path where a new RLC block is created. Related specs: TS 44.060 9.3.1 Related: OS#6018 Change-Id: I6ca88c005060ba1302d46717e45b0d9731d86d8d --- M include/osmocom/gprs/rlcmac/tbf_ul.h M src/rlcmac/tbf_ul.c M src/rlcmac/tbf_ul_fsm.c 3 files changed, 83 insertions(+), 16 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/include/osmocom/gprs/rlcmac/tbf_ul.h b/include/osmocom/gprs/rlcmac/tbf_ul.h index 660cf5a..fe9db64 100644 --- a/include/osmocom/gprs/rlcmac/tbf_ul.h +++ b/include/osmocom/gprs/rlcmac/tbf_ul.h @@ -52,6 +52,8 @@ struct gprs_rlcmac_ul_tbf *gprs_rlcmac_ul_tbf_alloc(struct gprs_rlcmac_entity *gre); void gprs_rlcmac_ul_tbf_free(struct gprs_rlcmac_ul_tbf *ul_tbf); +void gprs_rlcmac_ul_tbf_countdown_proc_update_cv(struct gprs_rlcmac_ul_tbf *ul_tbf); + bool gprs_rlcmac_ul_tbf_in_contention_resolution(const struct gprs_rlcmac_ul_tbf *ul_tbf); unsigned int gprs_rlcmac_ul_tbf_n3104_max(const struct gprs_rlcmac_ul_tbf *ul_tbf); bool gprs_rlcmac_ul_tbf_have_data(const struct gprs_rlcmac_ul_tbf *ul_tbf); diff --git a/src/rlcmac/tbf_ul.c b/src/rlcmac/tbf_ul.c index 0fa98ae..369be55 100644 --- a/src/rlcmac/tbf_ul.c +++ b/src/rlcmac/tbf_ul.c @@ -243,7 +243,13 @@ gprs_rlcmac_mcs_name(ul_tbf->tx_cs), gprs_rlcmac_mcs_name(tx_cs)); ul_tbf->tx_cs = tx_cs; - /* TODO: recalculate countdown_state, have to look a TS 44.060 specs on what to do exactly. */ + /* TS 44.060 9.3.1.2: If in Countdown Procedure state, CV needs to be + * recalculated since CS change means also block size change and hence + * the new CV != old CV (new CV may be greater or lesser than old CV). + * This means CV can go back to 15, but still be in Countdown Procedure, + * aka no new enqueued LLC data in the MS is to be transmitted until the + * current TBF finishes. */ + gprs_rlcmac_ul_tbf_countdown_proc_update_cv(ul_tbf); } int gprs_rlcmac_ul_tbf_handle_pkt_ul_ack_nack(struct gprs_rlcmac_ul_tbf *ul_tbf, @@ -517,7 +523,7 @@ static uint8_t gprs_rlcmac_ul_tbf_calculate_cv(const struct gprs_rlcmac_ul_tbf *ul_tbf) { struct blk_count_state st; - const struct gprs_rlcmac_llc_queue *q = ul_tbf->tbf.gre->llc_queue; + const struct gprs_rlcmac_llc_queue *q = gprs_rlcmac_ul_tbf_llc_queue(ul_tbf); unsigned int i, j; unsigned x; @@ -572,11 +578,22 @@ ul_tbf->tbf.gre->llc_queue = gprs_rlcmac_llc_queue_alloc(ul_tbf->tbf.gre); } -static void gprs_rlcmac_ul_tbf_check_countdown_proc(struct gprs_rlcmac_ul_tbf *ul_tbf, const struct gprs_rlcmac_rts_block_ind *bi) +/* Check if UL TBF needs to enter Countdown Procedure everytime a new RLC/MAC block is to be transmitted */ +static void gprs_rlcmac_ul_tbf_countdown_proc_check_enter(struct gprs_rlcmac_ul_tbf *ul_tbf, const struct gprs_rlcmac_rts_block_ind *bi) { - if (ul_tbf->countdown_proc.active) + if (ul_tbf->countdown_proc.active) { + /* This may happen if TBF entered Countdown Procedure state but + * later on due to CS change the CV incremented to more than BS_CV_MAX. + * In this case we cannot simply decrement the CV each time a + * new block is transmitted, but we rather need to keep + * calculating it here: + */ + if (ul_tbf->countdown_proc.cv == 15) + ul_tbf->countdown_proc.cv = gprs_rlcmac_ul_tbf_calculate_cv(ul_tbf); return; + } + /* Not (yet) in Countdown Procedure, check if we need to enter into it */ ul_tbf->countdown_proc.cv = gprs_rlcmac_ul_tbf_calculate_cv(ul_tbf); if (ul_tbf->countdown_proc.cv < 15) { if (gprs_rlcmac_ul_tbf_shall_keep_open(ul_tbf, bi)) { @@ -590,6 +607,18 @@ } } +/* Recalculate CV once in Countdown Procedure if conditions change (called by): + * - If contention resolution succeeds + * - If tx CS requested by network changes + */ +void gprs_rlcmac_ul_tbf_countdown_proc_update_cv(struct gprs_rlcmac_ul_tbf *ul_tbf) +{ + + if (!ul_tbf->countdown_proc.active) + return; + ul_tbf->countdown_proc.cv = gprs_rlcmac_ul_tbf_calculate_cv(ul_tbf); +} + static int create_new_bsn(struct gprs_rlcmac_ul_tbf *ul_tbf, const struct gprs_rlcmac_rts_block_ind *bi, enum gprs_rlcmac_coding_scheme cs) { const uint16_t bsn = gprs_rlcmac_rlc_ul_window_v_s(ul_tbf->ulw); @@ -600,7 +629,7 @@ int write_offset = 0; enum gpr_rlcmac_append_result ar; - gprs_rlcmac_ul_tbf_check_countdown_proc(ul_tbf, bi); + gprs_rlcmac_ul_tbf_countdown_proc_check_enter(ul_tbf, bi); if (!ul_tbf->llc_tx_msg || msgb_length(ul_tbf->llc_tx_msg) == 0) gprs_rlcmac_ul_tbf_schedule_next_llc_frame(ul_tbf); @@ -628,10 +657,17 @@ rdbi->data_len = block_data_len; rdbi->ti = gprs_rlcmac_ul_tbf_in_contention_resolution(ul_tbf); - rdbi->cv = ul_tbf->countdown_proc.cv--; + rdbi->cv = ul_tbf->countdown_proc.cv; rdbi->bsn = bsn; /* Block Sequence Number */ rdbi->e = 1; /* Extension bit, maybe set later (1: no extension) */ + /* Once we enter countdown procedure, simply decrement the counter to + * avoid recalculating all the time. */ + if (ul_tbf->countdown_proc.cv < 15) + ul_tbf->countdown_proc.cv--; + /* else: It will be updated in next call to + gprs_rlcmac_ul_tbf_countdown_proc_check_enter() above */ + if (rdbi->ti) { /* Append TLLI: */ if (gprs_rlcmac_mcs_is_gprs(cs)) diff --git a/src/rlcmac/tbf_ul_fsm.c b/src/rlcmac/tbf_ul_fsm.c index 2265aa4..7639d83 100644 --- a/src/rlcmac/tbf_ul_fsm.c +++ b/src/rlcmac/tbf_ul_fsm.c @@ -127,6 +127,20 @@ } } +static void _contention_resolution_succeeded(struct gprs_rlcmac_tbf_ul_fsm_ctx *ctx) +{ + LOGPFSML(ctx->fi, LOGL_INFO, "Contention resolution succeeded, stop T3166\n"); + OSMO_ASSERT(ctx->ul_tbf->ul_ass_fsm.ass_type == GPRS_RLCMAC_TBF_UL_ASS_TYPE_1PHASE); + OSMO_ASSERT(ctx->fi->T == 3166); + osmo_timer_del(&ctx->fi->timer); + ctx->fi->T = 0; + + /* TS 44.060 9.3.1.2: If in Countdown Procedure state, CV needs to be recalculated + * since TBF is no longer transmitting TLLI in the block, hence 4 more bytes per + * block are available. This means the new CV <= old CV. */ + gprs_rlcmac_ul_tbf_countdown_proc_update_cv(ctx->ul_tbf); +} + /* This one is triggered when packet access procedure fails, which can happen * either in WAIT_IMM_ASS (ImmAss timeout), FLOW (T3164) or FINISHED (T3164, T3166) */ static void st_new_on_enter(struct osmo_fsm_inst *fi, uint32_t prev_state) @@ -195,11 +209,7 @@ break; case GPRS_RLCMAC_TBF_UL_EV_RX_UL_ACK_NACK: if (gprs_rlcmac_ul_tbf_in_contention_resolution(ctx->ul_tbf)) { - LOGPFSML(ctx->fi, LOGL_INFO, "Contention resolution succeeded, stop T3166\n"); - OSMO_ASSERT(ctx->ul_tbf->ul_ass_fsm.ass_type == GPRS_RLCMAC_TBF_UL_ASS_TYPE_1PHASE); - OSMO_ASSERT(fi->T == 3166); - osmo_timer_del(&fi->timer); - fi->T = 0; + _contention_resolution_succeeded(ctx); } /* It's impossible we receive a correct final_ack here, since we didn't * sent last data (FSM would be in FINISHED state then) */ @@ -224,11 +234,7 @@ case GPRS_RLCMAC_TBF_UL_EV_RX_UL_ACK_NACK: ctx_ul_ack_nack = (struct tbf_ul_ass_ev_rx_ul_ack_nack *)data; if (gprs_rlcmac_ul_tbf_in_contention_resolution(ctx->ul_tbf)) { - LOGPFSML(ctx->fi, LOGL_INFO, "Contention resolution succeeded, stop T3166\n"); - OSMO_ASSERT(ctx->ul_tbf->ul_ass_fsm.ass_type == GPRS_RLCMAC_TBF_UL_ASS_TYPE_1PHASE); - OSMO_ASSERT(fi->T == 3166); - osmo_timer_del(&fi->timer); - fi->T = 0; + _contention_resolution_succeeded(ctx); } else if (fi->T == 3182 && osmo_timer_pending(&fi->timer)) { /* 9.3.3.3.2 "Upon reception of a PACKET UPLINK ACK/NACK message for this TBF * the mobile station shall stop timer T3182 for the TBF". -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/33900 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I6ca88c005060ba1302d46717e45b0d9731d86d8d Gerrit-Change-Number: 33900 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • ...
  • 306
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.