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

November 2022

  • 2 participants
  • 2503 discussions
Change in osmo-ttcn3-hacks[arehbein/wip]: WIP: ttcn3-dumpcap*.sh: Don't use lsof
by pespin 17 Nov '22

17 Nov '22
Attention is currently required from: arehbein. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30134 ) Change subject: WIP: ttcn3-dumpcap*.sh: Don't use lsof ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: > Ah I now see you merged it agains tyour own branch. […] btw you can find lot of info on how to use gerrit here: https://osmocom.org/projects/cellular-infrastructure/wiki/Gerrit -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30134 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: arehbein/wip Gerrit-Change-Id: Ie34eaa778f78b9685dd601d5e9898829caf0c7ca Gerrit-Change-Number: 30134 Gerrit-PatchSet: 1 Gerrit-Owner: arehbein <arehbein(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: arehbein <arehbein(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: arehbein <arehbein(a)sysmocom.de> Gerrit-Comment-Date: Thu, 17 Nov 2022 21:19:38 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: arehbein <arehbein(a)sysmocom.de> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in osmo-ttcn3-hacks[arehbein/ttcn3-dumpcap-changes]: WIP: dumpcap-start/stop: Make script fail, not hang on sudo prompt
by pespin 17 Nov '22

17 Nov '22
Attention is currently required from: arehbein. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30127 ) Change subject: WIP: dumpcap-start/stop: Make script fail, not hang on sudo prompt ...................................................................... Patch Set 1: (1 comment) File ttcn3-dumpcap-start.sh: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30127/comment/564f72c8_ec3a… PS1, Line 19: sudo -k > Thanks for your comments, this branch is a result of me playing around and getting familiar with the […] 'ok maybe look at this again later ' then submit it as private or WIP to gerrit UI, or to a private branch. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30127 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: arehbein/ttcn3-dumpcap-changes Gerrit-Change-Id: Id160384bf624a4eb0f419cb8ba07d8b69bb693f3 Gerrit-Change-Number: 30127 Gerrit-PatchSet: 1 Gerrit-Owner: arehbein <arehbein(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: arehbein <arehbein(a)sysmocom.de> Gerrit-Comment-Date: Thu, 17 Nov 2022 21:14:26 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: arehbein <arehbein(a)sysmocom.de> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in osmo-ttcn3-hacks[arehbein/wip]: WIP: ttcn3-dumpcap*.sh: Don't use lsof
by pespin 17 Nov '22

17 Nov '22
Attention is currently required from: arehbein. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30134 ) Change subject: WIP: ttcn3-dumpcap*.sh: Don't use lsof ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: > I haven't yet read anything about how WIP-branches are to be used here. […] Ah I now see you merged it agains tyour own branch. In any case, that's wrong, you shouldn't use the gerrit UI for that. First of all it's important to differentiate 2 use cases: * Patches you want to submit for review so that they end up merged in a public branch (ie master). * Your own private branches (WIP branches as backup or test against docker) The difference stated abose is important, because the first generates content in the gerrit UI (triggers emails, creates patches people can review, etc.) and the second doesn't. For the first use case (submitting patches) you use the gerrit specific branching system: git push origin HEAD:refs/for/master You can even submit a patch to gerrit for early review but mark it as "WIP" in gerrit UI to prevent it from being merged using the gerrit UI (for instance because you still have to do further testing or you are not sure something is 100% correct): git push origin HEAD:refs/for/master%wip For the second use case gerrit remote as any usual git server. For instance, let's say you are working on osmo-bts.git and you have your local branch "arehbein/foobar" (it's good practice to prefix your branches so that everybody know they are yours, and you are responsible from getting rid of them once you are done). Continuing the example, your "origin" remote is going to be probably this one: ssh://arehbein@gerrit.osmocom.org:29418/osmo-bts.git When you have something to push, you simply do: "git push origin arehbein/foobar" If the branch already exists in the remote, remember to pass "-f" to force push and hence overwrite it: "git push -f origin arehbein/foobar" -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30134 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: arehbein/wip Gerrit-Change-Id: Ie34eaa778f78b9685dd601d5e9898829caf0c7ca Gerrit-Change-Number: 30134 Gerrit-PatchSet: 1 Gerrit-Owner: arehbein <arehbein(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: arehbein <arehbein(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: arehbein <arehbein(a)sysmocom.de> Gerrit-Comment-Date: Thu, 17 Nov 2022 21:12:43 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: arehbein <arehbein(a)sysmocom.de> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in osmo-pcu[master]: tbf: Add tbf_as_{ul,dl}_tbf_const func helpers
by pespin 17 Nov '22

17 Nov '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30218 ) Change subject: tbf: Add tbf_as_{ul,dl}_tbf_const func helpers ...................................................................... tbf: Add tbf_as_{ul,dl}_tbf_const func helpers This way we can easily get the subclass from the parent if the pointer is const. Similar to what we already have for the opposite direction {ul,dl}_tbf_as_tbf_const(). Change-Id: I35e650d13ecf3a5020d136e7d8d99837786503e2 --- M src/tbf_dl.cpp M src/tbf_dl.h M src/tbf_ul.cpp M src/tbf_ul.h 4 files changed, 18 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/18/30218/1 diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index e088e65..5006675 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -1272,3 +1272,11 @@ else return NULL; } + +const struct gprs_rlcmac_dl_tbf *tbf_as_dl_tbf_const(const struct gprs_rlcmac_tbf *tbf) +{ + if (tbf && tbf->direction == GPRS_RLCMAC_DL_TBF) + return static_cast<const gprs_rlcmac_dl_tbf *>(tbf); + else + return NULL; +} diff --git a/src/tbf_dl.h b/src/tbf_dl.h index bfe9068..3a7c41d 100644 --- a/src/tbf_dl.h +++ b/src/tbf_dl.h @@ -130,6 +130,7 @@ int8_t use_trx, bool single_slot); struct gprs_rlcmac_dl_tbf *tbf_as_dl_tbf(struct gprs_rlcmac_tbf *tbf); +const struct gprs_rlcmac_dl_tbf *tbf_as_dl_tbf_const(const struct gprs_rlcmac_tbf *tbf); /* dispatch Unitdata.DL messages */ int dl_tbf_handle(struct gprs_rlcmac_bts *bts, const uint32_t tlli, const uint32_t old_tlli, diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 0fe3700..9bfda4f 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -729,6 +729,14 @@ return NULL; } +const struct gprs_rlcmac_ul_tbf *tbf_as_ul_tbf_const(const struct gprs_rlcmac_tbf *tbf) +{ + if (tbf && tbf->direction == GPRS_RLCMAC_UL_TBF) + return static_cast<const gprs_rlcmac_ul_tbf *>(tbf); + else + return NULL; +} + void tbf_usf_timeout(struct gprs_rlcmac_ul_tbf *tbf) { tbf->usf_timeout(); diff --git a/src/tbf_ul.h b/src/tbf_ul.h index 014b167..c45db44 100644 --- a/src/tbf_ul.h +++ b/src/tbf_ul.h @@ -136,6 +136,7 @@ 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); +const struct gprs_rlcmac_ul_tbf *tbf_as_ul_tbf_const(const struct gprs_rlcmac_tbf *tbf); void tbf_usf_timeout(struct gprs_rlcmac_ul_tbf *tbf); void ul_tbf_contention_resolution_start(struct gprs_rlcmac_ul_tbf *tbf); void ul_tbf_contention_resolution_success(struct gprs_rlcmac_ul_tbf *tbf); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30218 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I35e650d13ecf3a5020d136e7d8d99837786503e2 Gerrit-Change-Number: 30218 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-pcu[master]: Refactor tbf_is_tfi_assigned() to avoid accessing tbf->state_fsm
by pespin 17 Nov '22

17 Nov '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30219 ) Change subject: Refactor tbf_is_tfi_assigned() to avoid accessing tbf->state_fsm ...................................................................... Refactor tbf_is_tfi_assigned() to avoid accessing tbf->state_fsm The state_fsm field will be moved to subclass (DL_TBF/UL_TBF) in a follow up commit when splitting the tbf_fsm.c implementation per subclass. Rearrange a bit the code to access the using the subclass pointer in the only sublcass where it needs to be used (DL_TBF). Change-Id: I360485c73be8636565f89ba29796d84ac94fd94e --- M src/gprs_rlcmac_sched.cpp M src/tbf.cpp M src/tbf.h 3 files changed, 15 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/19/30219/1 diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp index 20b4f8e..1857c3c 100644 --- a/src/gprs_rlcmac_sched.cpp +++ b/src/gprs_rlcmac_sched.cpp @@ -57,7 +57,7 @@ if (tbf_ul_ass_rts(ul_tbf)) tbf_cand->ul_ass = ul_tbf; /* NACC ready to send. TFI assigned is needed to send messages */ - if (ul_tbf->is_tfi_assigned() && ms_nacc_rts(ul_tbf->ms())) + if (tbf_is_tfi_assigned(ul_tbf) && ms_nacc_rts(ul_tbf->ms())) tbf_cand->nacc = ul_tbf; /* FIXME: Is this supposed to be fair? The last TBF for each wins? Maybe use llist_add_tail and skip once we have all states? */ @@ -73,7 +73,7 @@ if (tbf_ul_ass_rts(dl_tbf)) tbf_cand->ul_ass = dl_tbf; /* NACC ready to send. TFI assigned is needed to send messages */ - if (dl_tbf->is_tfi_assigned() && ms_nacc_rts(dl_tbf->ms())) + if (tbf_is_tfi_assigned(dl_tbf) && ms_nacc_rts(dl_tbf->ms())) tbf_cand->nacc = dl_tbf; } } diff --git a/src/tbf.cpp b/src/tbf.cpp index 87e85f0..4aa4089 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -851,7 +851,19 @@ bool tbf_is_tfi_assigned(const struct gprs_rlcmac_tbf *tbf) { - return tbf->is_tfi_assigned(); + const struct gprs_rlcmac_dl_tbf *dl_tbf; + + /* The TBF is established: */ + if (tbf->state_fi->state > TBF_ST_ASSIGN) + return true; + + /* The DL TBF has been assigned by a IMM.ASS: */ + dl_tbf = tbf_as_dl_tbf_const(tbf); + if (tbf->state_fi->state == TBF_ST_ASSIGN && dl_tbf && + (dl_tbf->state_fsm.state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH))) + return true; + + return false; } uint8_t tbf_tfi(const struct gprs_rlcmac_tbf *tbf) diff --git a/src/tbf.h b/src/tbf.h index fedf312..b1ff221 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -200,7 +200,6 @@ bool is_tlli_valid() const; uint8_t tfi() const; - bool is_tfi_assigned() const; const char *imsi() const; uint8_t ta() const; @@ -315,16 +314,6 @@ return tlli() != GSM_RESERVED_TMSI; } -inline bool gprs_rlcmac_tbf::is_tfi_assigned() const -{ - /* The TBF is established or has been assigned by a IMM.ASS for - * download */ - return state_fi->state > TBF_ST_ASSIGN || - (direction == GPRS_RLCMAC_DL_TBF && - state_fi->state == TBF_ST_ASSIGN && - (state_fsm.state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH))); -} - inline uint8_t gprs_rlcmac_tbf::tfi() const { return m_tfi; -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30219 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I360485c73be8636565f89ba29796d84ac94fd94e Gerrit-Change-Number: 30219 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-pcu[master]: tbf_fsm: Move tbf_fsm_state_chg macro to .c file
by pespin 17 Nov '22

17 Nov '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30215 ) Change subject: tbf_fsm: Move tbf_fsm_state_chg macro to .c file ...................................................................... tbf_fsm: Move tbf_fsm_state_chg macro to .c file It is nowadays only used internally, hence it can be moved to the .c file to better describe its scope. Change-Id: I23cfa5b7efbeb6a58855099780749741c9c947e9 --- M src/tbf_fsm.c M src/tbf_fsm.h 2 files changed, 9 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/15/30215/1 diff --git a/src/tbf_fsm.c b/src/tbf_fsm.c index 6fe2a7a..c08fb88 100644 --- a/src/tbf_fsm.c +++ b/src/tbf_fsm.c @@ -38,6 +38,15 @@ [TBF_ST_RELEASING] = {}, }; +/* Transition to a state, using the T timer defined in tbf_fsm_timeouts. + * The actual timeout value is in turn obtained from conn->T_defs. + * Assumes local variable fi exists. */ +#define tbf_fsm_state_chg(fi, NEXT_STATE) \ + osmo_tdef_fsm_inst_state_chg(fi, NEXT_STATE, \ + tbf_fsm_timeouts, \ + the_pcu->T_defs, \ + -1) + const struct value_string tbf_fsm_event_names[] = { { TBF_EV_ASSIGN_ADD_CCCH, "ASSIGN_ADD_CCCH" }, { TBF_EV_ASSIGN_ADD_PACCH, "ASSIGN_ADD_PACCH" }, diff --git a/src/tbf_fsm.h b/src/tbf_fsm.h index 60f7849..f9f5ac7 100644 --- a/src/tbf_fsm.h +++ b/src/tbf_fsm.h @@ -56,14 +56,4 @@ unsigned int T_release; /* Timer to be used to end release: T3169 or T3195 */ }; -extern const struct osmo_tdef_state_timeout tbf_fsm_timeouts[32]; -/* Transition to a state, using the T timer defined in tbf_fsm_timeouts. - * The actual timeout value is in turn obtained from conn->T_defs. - * Assumes local variable fi exists. */ -#define tbf_fsm_state_chg(fi, NEXT_STATE) \ - osmo_tdef_fsm_inst_state_chg(fi, NEXT_STATE, \ - tbf_fsm_timeouts, \ - the_pcu->T_defs, \ - -1) - extern struct osmo_fsm tbf_fsm; -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30215 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I23cfa5b7efbeb6a58855099780749741c9c947e9 Gerrit-Change-Number: 30215 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-pcu[master]: tbf: Drop unused function
by pespin 17 Nov '22

17 Nov '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30217 ) Change subject: tbf: Drop unused function ...................................................................... tbf: Drop unused function Change-Id: I5d4b411585321d94fefdd01f22c62932d4a8f83a --- M src/tbf.h 1 file changed, 0 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/17/30217/1 diff --git a/src/tbf.h b/src/tbf.h index b2d8db6..fedf312 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -170,7 +170,6 @@ bool ul_ass_state_is(enum tbf_ul_ass_fsm_states rhs) const; void poll_sched_set(const char *file, int line); void poll_sched_unset(const char *file, int line); - bool check_n_clear(uint8_t state_flag); const char *state_name() const; const char *name(bool enclousure = true) const; @@ -306,16 +305,6 @@ return osmo_fsm_inst_state_name(state_fi); } -inline bool gprs_rlcmac_tbf::check_n_clear(uint8_t state_flag) -{ - if ((state_fsm.state_flags & (1 << state_flag))) { - state_fsm.state_flags &= ~(1 << state_flag); - return true; - } - - return false; -} - inline GprsMs *gprs_rlcmac_tbf::ms() const { return m_ms; -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30217 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I5d4b411585321d94fefdd01f22c62932d4a8f83a Gerrit-Change-Number: 30217 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-pcu[master]: tbf_fsm: Move osmo_fsm_inst fi out of struct tbf_fsm_ctx
by pespin 17 Nov '22

17 Nov '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30216 ) Change subject: tbf_fsm: Move osmo_fsm_inst fi out of struct tbf_fsm_ctx ...................................................................... tbf_fsm: Move osmo_fsm_inst fi out of struct tbf_fsm_ctx This is a preparatory step towards splitting tbf_fsm.c into tbf_ul_fsm.c and tbf_dl_fsm.c. In order to accomplish it, the struct tbf_fsm_ctx will also be duplicated (and each one will contain a explicit ul_tbf/dl_tbf pointer). Hence, a DL_TBF will have a struct tbf_dl_fsm_ctx and a UL_TBF will have a struct tbf_ul_fsm_ctx, since those hold implementation specific state. However, the FSM interface will be partly shared (events, states), and hence we want to keep the "fi" pointer into the "tbf" parent class so that it can be used regardless of the tbf direction type. Change-Id: I03e691ccf6a94431caa55653349158f5b85db017 --- M src/bts.cpp M src/pdch.cpp M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp M src/tbf_fsm.c M src/tbf_fsm.h M src/tbf_ul.cpp M tests/tbf/TbfTest.cpp 9 files changed, 39 insertions(+), 38 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/16/30216/1 diff --git a/src/bts.cpp b/src/bts.cpp index 31c2b0a..d7851a2 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -707,7 +707,7 @@ } LOGPTBFDL(dl_tbf, LOGL_DEBUG, "FN=%u Got IMM.ASS confirm\n", fn); - osmo_fsm_inst_dispatch(dl_tbf->state_fsm.fi, TBF_EV_ASSIGN_PCUIF_CNF, NULL); + osmo_fsm_inst_dispatch(dl_tbf->state_fi, TBF_EV_ASSIGN_PCUIF_CNF, NULL); return 0; } diff --git a/src/pdch.cpp b/src/pdch.cpp index e9b9852..0988af6 100644 --- a/src/pdch.cpp +++ b/src/pdch.cpp @@ -387,7 +387,7 @@ osmo_fsm_inst_dispatch(ul_tbf->ul_ack_fsm.fi, TBF_UL_ACK_EV_RX_CTRL_ACK, NULL); /* We only set polling on final UL ACK/NACK, something is wrong... */ if (tbf_state(tbf) == TBF_ST_FINISHED) - osmo_fsm_inst_dispatch(ul_tbf->state_fsm.fi, TBF_EV_FINAL_UL_ACK_CONFIRMED, (void*)false); + osmo_fsm_inst_dispatch(ul_tbf->state_fi, TBF_EV_FINAL_UL_ACK_CONFIRMED, (void*)false); /* ul_tbf is freed here! */ else LOGPTBFUL(ul_tbf, LOGL_ERROR, "Received POLL_UL_ACK for UL TBF in unexpected state!\n"); @@ -416,7 +416,7 @@ tbf->direction == new_tbf->direction) tbf_free(tbf); - osmo_fsm_inst_dispatch(new_tbf->state_fsm.fi, TBF_EV_ASSIGN_ACK_PACCH, NULL); + osmo_fsm_inst_dispatch(new_tbf->state_fi, TBF_EV_ASSIGN_ACK_PACCH, NULL); /* there might be LLC packets waiting in the queue, but the DL * TBF might have been released while the UL TBF has been * established */ @@ -447,7 +447,7 @@ tbf->direction == new_tbf->direction) tbf_free(tbf); - osmo_fsm_inst_dispatch(new_tbf->state_fsm.fi, TBF_EV_ASSIGN_ACK_PACCH, NULL); + osmo_fsm_inst_dispatch(new_tbf->state_fi, TBF_EV_ASSIGN_ACK_PACCH, NULL); return; case PDCH_ULC_POLL_CELL_CHG_CONTINUE: @@ -735,7 +735,7 @@ "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_fsm.fi, TBF_EV_FINAL_UL_ACK_CONFIRMED, (void*)true); + 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, diff --git a/src/tbf.cpp b/src/tbf.cpp index 39de56b..87e85f0 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -117,8 +117,8 @@ memset(&state_fsm, 0, sizeof(state_fsm)); state_fsm.tbf = this; - state_fsm.fi = osmo_fsm_inst_alloc(&tbf_fsm, this, &state_fsm, LOGL_INFO, NULL); - OSMO_ASSERT(state_fsm.fi); + state_fi = osmo_fsm_inst_alloc(&tbf_fsm, this, &state_fsm, LOGL_INFO, NULL); + OSMO_ASSERT(state_fi); memset(&ul_ass_fsm, 0, sizeof(ul_ass_fsm)); ul_ass_fsm.tbf = this; @@ -140,8 +140,8 @@ gprs_rlcmac_tbf::~gprs_rlcmac_tbf() { - osmo_fsm_inst_free(state_fsm.fi); - state_fsm.fi = NULL; + osmo_fsm_inst_free(state_fi); + state_fi = NULL; osmo_fsm_inst_free(ul_ass_fsm.fi); ul_ass_fsm.fi = NULL; @@ -538,7 +538,7 @@ if (state_is(TBF_ST_FINISHED)) { if (ul_tbf->n_inc(N3103)) { bts_do_rate_ctr_inc(bts, CTR_PUAN_POLL_FAILED); - osmo_fsm_inst_dispatch(this->state_fsm.fi, TBF_EV_MAX_N3103, NULL); + osmo_fsm_inst_dispatch(this->state_fi, TBF_EV_MAX_N3103, NULL); return; } } @@ -555,7 +555,7 @@ bts_do_rate_ctr_inc(bts, CTR_RLC_ASS_TIMEDOUT); bts_do_rate_ctr_inc(bts, CTR_PUA_POLL_TIMEDOUT); if (n_inc(N3105)) { - osmo_fsm_inst_dispatch(this->state_fsm.fi, TBF_EV_MAX_N3105, NULL); + osmo_fsm_inst_dispatch(this->state_fi, TBF_EV_MAX_N3105, NULL); bts_do_rate_ctr_inc(bts, CTR_RLC_ASS_FAILED); bts_do_rate_ctr_inc(bts, CTR_PUA_POLL_FAILED); return; @@ -574,7 +574,7 @@ bts_do_rate_ctr_inc(bts, CTR_RLC_ASS_TIMEDOUT); bts_do_rate_ctr_inc(bts, CTR_PDA_POLL_TIMEDOUT); if (n_inc(N3105)) { - osmo_fsm_inst_dispatch(this->state_fsm.fi, TBF_EV_MAX_N3105, NULL); + osmo_fsm_inst_dispatch(this->state_fi, TBF_EV_MAX_N3105, NULL); bts_do_rate_ctr_inc(bts, CTR_RLC_ASS_FAILED); bts_do_rate_ctr_inc(bts, CTR_PDA_POLL_FAILED); return; @@ -610,13 +610,13 @@ bts_do_rate_ctr_inc(bts, CTR_PDAN_POLL_TIMEDOUT); } if (dl_tbf->n_inc(N3105)) { - osmo_fsm_inst_dispatch(this->state_fsm.fi, TBF_EV_MAX_N3105, NULL); + osmo_fsm_inst_dispatch(this->state_fi, TBF_EV_MAX_N3105, NULL); bts_do_rate_ctr_inc(bts, CTR_PDAN_POLL_FAILED); bts_do_rate_ctr_inc(bts, CTR_RLC_ACK_FAILED); return; } /* resend IMM.ASS on CCCH on timeout */ - osmo_fsm_inst_dispatch(this->state_fsm.fi, TBF_EV_DL_ACKNACK_MISS, NULL); + osmo_fsm_inst_dispatch(this->state_fi, TBF_EV_DL_ACKNACK_MISS, NULL); break; default: @@ -700,7 +700,7 @@ { const char *buf = tbf->name(false); - osmo_fsm_inst_update_id(tbf->state_fsm.fi, buf); + osmo_fsm_inst_update_id(tbf->state_fi, buf); osmo_fsm_inst_update_id(tbf->ul_ass_fsm.fi, buf); osmo_fsm_inst_update_id(tbf->dl_ass_fsm.fi, buf); @@ -782,12 +782,12 @@ /* C API */ enum tbf_fsm_states tbf_state(const struct gprs_rlcmac_tbf *tbf) { - return (enum tbf_fsm_states)tbf->state_fsm.fi->state; + return (enum tbf_fsm_states)tbf->state_fi->state; } struct osmo_fsm_inst *tbf_state_fi(const struct gprs_rlcmac_tbf *tbf) { - return tbf->state_fsm.fi; + return tbf->state_fi; } struct osmo_fsm_inst *tbf_ul_ass_fi(const struct gprs_rlcmac_tbf *tbf) diff --git a/src/tbf.h b/src/tbf.h index 678607b..b2d8db6 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -257,6 +257,7 @@ time_t m_created_ts; struct rate_ctr_group *m_ctrs; + struct osmo_fsm_inst *state_fi; struct tbf_fsm_ctx state_fsm; struct tbf_ul_ass_fsm_ctx ul_ass_fsm; struct tbf_ul_ass_fsm_ctx dl_ass_fsm; @@ -302,7 +303,7 @@ inline const char *gprs_rlcmac_tbf::state_name() const { - return osmo_fsm_inst_state_name(state_fsm.fi); + return osmo_fsm_inst_state_name(state_fi); } inline bool gprs_rlcmac_tbf::check_n_clear(uint8_t state_flag) @@ -329,9 +330,9 @@ { /* The TBF is established or has been assigned by a IMM.ASS for * download */ - return state_fsm.fi->state > TBF_ST_ASSIGN || + return state_fi->state > TBF_ST_ASSIGN || (direction == GPRS_RLCMAC_DL_TBF && - state_fsm.fi->state == TBF_ST_ASSIGN && + state_fi->state == TBF_ST_ASSIGN && (state_fsm.state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH))); } diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index cc809da..e088e65 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -422,7 +422,7 @@ osmo_fsm_inst_dispatch(old_tbf->dl_ass_fsm.fi, TBF_DL_ASS_EV_SCHED_ASS, NULL); /* change state */ - osmo_fsm_inst_dispatch(tbf->state_fsm.fi, TBF_EV_ASSIGN_ADD_PACCH, NULL); + osmo_fsm_inst_dispatch(tbf->state_fi, TBF_EV_ASSIGN_ADD_PACCH, NULL); } @@ -436,7 +436,7 @@ LOGPTBFDL(tbf, LOGL_DEBUG, "Send downlink assignment on PCH, no TBF exist (IMSI=%s)\n", ms_imsi(ms)); /* change state */ - osmo_fsm_inst_dispatch(tbf->state_fsm.fi, TBF_EV_ASSIGN_ADD_CCCH, NULL); + osmo_fsm_inst_dispatch(tbf->state_fi, TBF_EV_ASSIGN_ADD_CCCH, NULL); /* send immediate assignment */ bts_snd_dl_ass(ms->bts, tbf); @@ -528,7 +528,7 @@ is_final = llc_queue_size(llc_queue()) == 0 && !keep_open(fn); if (is_final) { rdbi->cv = 0; - osmo_fsm_inst_dispatch(this->state_fsm.fi, TBF_EV_LAST_DL_DATA_SENT, NULL); + osmo_fsm_inst_dispatch(this->state_fi, TBF_EV_LAST_DL_DATA_SENT, NULL); } if (mcs_is_edge(cs)) { @@ -573,7 +573,7 @@ if (is_final) { request_dl_ack(); - osmo_fsm_inst_dispatch(this->state_fsm.fi, TBF_EV_LAST_DL_DATA_SENT, NULL); + osmo_fsm_inst_dispatch(this->state_fi, TBF_EV_LAST_DL_DATA_SENT, NULL); } /* dequeue next LLC frame, if any */ @@ -962,7 +962,7 @@ uint16_t received; int rc = 0; - osmo_fsm_inst_dispatch(this->state_fsm.fi, TBF_EV_FINAL_ACK_RECVD, NULL); + osmo_fsm_inst_dispatch(this->state_fi, TBF_EV_FINAL_ACK_RECVD, NULL); /* range V(A)..V(S)-1 */ received = m_window.count_unacked(); diff --git a/src/tbf_fsm.c b/src/tbf_fsm.c index c08fb88..4dcac17 100644 --- a/src/tbf_fsm.c +++ b/src/tbf_fsm.c @@ -417,20 +417,21 @@ } } -static void handle_timeout_X2002(struct tbf_fsm_ctx *ctx) +static void handle_timeout_X2002(struct osmo_fsm_inst *fi) { + struct tbf_fsm_ctx *ctx = (struct tbf_fsm_ctx *)fi->priv; struct gprs_rlcmac_dl_tbf *dl_tbf = tbf_as_dl_tbf(ctx->tbf); /* X2002 is used only for DL TBF */ OSMO_ASSERT(dl_tbf); - if (ctx->fi->state == TBF_ST_ASSIGN) { + 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(ctx->fi, TBF_EV_ASSIGN_READY_CCCH, NULL); + osmo_fsm_inst_dispatch(fi, TBF_EV_ASSIGN_READY_CCCH, NULL); return; } @@ -453,7 +454,7 @@ struct tbf_fsm_ctx *ctx = (struct tbf_fsm_ctx *)fi->priv; switch (fi->T) { case -2002: - handle_timeout_X2002(ctx); + handle_timeout_X2002(fi); break; case -2001: LOGPTBF(ctx->tbf, LOGL_NOTICE, "releasing due to PACCH assignment timeout.\n"); diff --git a/src/tbf_fsm.h b/src/tbf_fsm.h index f9f5ac7..c3c412a 100644 --- a/src/tbf_fsm.h +++ b/src/tbf_fsm.h @@ -50,7 +50,6 @@ }; struct tbf_fsm_ctx { - struct osmo_fsm_inst *fi; struct gprs_rlcmac_tbf* tbf; /* back pointer */ uint32_t state_flags; unsigned int T_release; /* Timer to be used to end release: T3169 or T3195 */ diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index d07998c..0fe3700 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -186,7 +186,7 @@ ms_attach_tbf(ms, ul_tbf); llist_add(tbf_trx_list((struct gprs_rlcmac_tbf *)ul_tbf), &trx->ul_tbfs); bts_do_rate_ctr_inc(ul_tbf->bts, CTR_TBF_UL_ALLOCATED); - osmo_fsm_inst_dispatch(ul_tbf->state_fsm.fi, TBF_EV_ASSIGN_ADD_PACCH, NULL); + 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; @@ -402,7 +402,7 @@ "Decoded premier TLLI=0x%08x of UL DATA TFI=%d.\n", new_tlli, rlc->tfi); ms_update_announced_tlli(ms(), new_tlli); - osmo_fsm_inst_dispatch(this->state_fsm.fi, TBF_EV_FIRST_UL_DATA_RECVD, NULL); + osmo_fsm_inst_dispatch(this->state_fi, TBF_EV_FIRST_UL_DATA_RECVD, NULL); } else if (new_tlli != GSM_RESERVED_TMSI && new_tlli != tlli()) { LOGPTBFUL(this, LOGL_NOTICE, "Decoded TLLI=%08x mismatch on UL DATA TFI=%d. (Ignoring due to contention resolution)\n", @@ -444,7 +444,7 @@ rdbi->bsn, rdbi->cv); if (rdbi->cv == 0) { LOGPTBFUL(this, LOGL_DEBUG, "Finished with UL TBF\n"); - osmo_fsm_inst_dispatch(this->state_fsm.fi, TBF_EV_LAST_UL_DATA_RECVD, NULL); + osmo_fsm_inst_dispatch(this->state_fi, TBF_EV_LAST_UL_DATA_RECVD, NULL); /* Reset N3103 counter. */ this->n_reset(N3103); } @@ -718,7 +718,7 @@ void gprs_rlcmac_ul_tbf::usf_timeout() { if (n_inc(N3101)) - osmo_fsm_inst_dispatch(this->state_fsm.fi, TBF_EV_MAX_N3101, NULL); + osmo_fsm_inst_dispatch(this->state_fi, TBF_EV_MAX_N3101, NULL); } 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 60e242c..f94c8de 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -91,7 +91,7 @@ { OSMO_ASSERT(tbf); if (tbf->state_is(TBF_ST_WAIT_RELEASE)) - OSMO_ASSERT(tbf->timers_pending(T3191) || osmo_timer_pending(&tbf->state_fsm.fi->timer)); + OSMO_ASSERT(tbf->timers_pending(T3191) || osmo_timer_pending(&tbf->state_fi->timer)); if (tbf->state_is(TBF_ST_RELEASING)) OSMO_ASSERT(tbf->timers_pending(T_MAX)); } @@ -216,8 +216,8 @@ /* "Establish" the DL TBF */ osmo_fsm_inst_dispatch(dl_tbf->dl_ass_fsm.fi, TBF_DL_ASS_EV_SCHED_ASS, NULL); - osmo_fsm_inst_dispatch(dl_tbf->state_fsm.fi, TBF_EV_ASSIGN_ADD_CCCH, NULL); - osmo_fsm_inst_dispatch(dl_tbf->state_fsm.fi, TBF_EV_ASSIGN_ACK_PACCH, NULL); + osmo_fsm_inst_dispatch(dl_tbf->state_fi, TBF_EV_ASSIGN_ADD_CCCH, NULL); + osmo_fsm_inst_dispatch(dl_tbf->state_fi, TBF_EV_ASSIGN_ACK_PACCH, NULL); check_tbf(dl_tbf); *trx_no_ = trx_no; @@ -593,7 +593,7 @@ * moves it to FLOW state. We set X2002 timeout to 0 here to get * immediate trigger through osmo_select_main() */ OSMO_ASSERT(osmo_tdef_set(the_pcu->T_defs, -2002, 0, OSMO_TDEF_MS) == 0); - osmo_fsm_inst_dispatch(ms_dl_tbf(ms)->state_fsm.fi, TBF_EV_ASSIGN_PCUIF_CNF, NULL); + osmo_fsm_inst_dispatch(ms_dl_tbf(ms)->state_fi, TBF_EV_ASSIGN_PCUIF_CNF, NULL); osmo_select_main(0); OSMO_ASSERT(ms_dl_tbf(ms)->state_is(TBF_ST_FLOW)); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30216 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I03e691ccf6a94431caa55653349158f5b85db017 Gerrit-Change-Number: 30216 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-pcu[master]: cosmetic: tbf_fsm.h: Fix whitespace
by pespin 17 Nov '22

17 Nov '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30214 ) Change subject: cosmetic: tbf_fsm.h: Fix whitespace ...................................................................... cosmetic: tbf_fsm.h: Fix whitespace Change-Id: Ica93494c386a006587deff08e9add6174cc42f70 --- M src/tbf_fsm.h 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/14/30214/1 diff --git a/src/tbf_fsm.h b/src/tbf_fsm.h index 0acd4e5..60f7849 100644 --- a/src/tbf_fsm.h +++ b/src/tbf_fsm.h @@ -41,7 +41,7 @@ }; enum tbf_fsm_states { - TBF_ST_NEW = 0, /* new created TBF */ + TBF_ST_NEW = 0, /* new created TBF */ TBF_ST_ASSIGN, /* wait for downlink assignment */ TBF_ST_FLOW, /* RLC/MAC flow, resource needed */ TBF_ST_FINISHED, /* flow finished, wait for release */ -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30214 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ica93494c386a006587deff08e9add6174cc42f70 Gerrit-Change-Number: 30214 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-pcu[master]: constify pdch_ulc_get_next_free_fn() parameter
by msuraev 17 Nov '22

17 Nov '22
msuraev has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30209 ) Change subject: constify pdch_ulc_get_next_free_fn() parameter ...................................................................... constify pdch_ulc_get_next_free_fn() parameter Change-Id: I91738f951f57bd171d8cbd66fe5e5c46e6fa953b --- M src/pdch_ul_controller.c M src/pdch_ul_controller.h 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/src/pdch_ul_controller.c b/src/pdch_ul_controller.c index 9cbe845..2ae553f 100644 --- a/src/pdch_ul_controller.c +++ b/src/pdch_ul_controller.c @@ -157,7 +157,7 @@ } /* Get next free (unreserved) FN which is not located in time before "start_fn" */ -uint32_t pdch_ulc_get_next_free_fn(struct pdch_ulc *ulc, uint32_t start_fn) +uint32_t pdch_ulc_get_next_free_fn(const struct pdch_ulc *ulc, uint32_t start_fn) { struct rb_node *node; struct pdch_ulc_node *it; diff --git a/src/pdch_ul_controller.h b/src/pdch_ul_controller.h index 9857c8f..a488e9b 100644 --- a/src/pdch_ul_controller.h +++ b/src/pdch_ul_controller.h @@ -84,7 +84,7 @@ bool pdch_ulc_fn_is_free(struct pdch_ulc *ulc, uint32_t fn); int pdch_ulc_get_next_free_rrbp_fn(struct pdch_ulc *ulc, uint32_t fn, uint32_t *poll_fn, unsigned int *rrbp); -uint32_t pdch_ulc_get_next_free_fn(struct pdch_ulc *ulc, uint32_t start_fn); +uint32_t pdch_ulc_get_next_free_fn(const struct pdch_ulc *ulc, uint32_t start_fn); struct pdch_ulc_node *pdch_ulc_get_node(struct pdch_ulc *ulc, uint32_t fn); struct pdch_ulc_node *pdch_ulc_pop_node(struct pdch_ulc *ulc, uint32_t fn); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30209 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I91738f951f57bd171d8cbd66fe5e5c46e6fa953b Gerrit-Change-Number: 30209 Gerrit-PatchSet: 2 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • ...
  • 251
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.