lists.osmocom.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
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
List overview
Download
gerrit-log
December 2022
----- 2025 -----
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
gerrit-log@lists.osmocom.org
1 participants
1979 discussions
Start a n
N
ew thread
Change in osmo-pcu[master]: encoding::write_immediate_assignment(): Constify tbf param
by pespin
pespin has posted comments on this change. (
https://gerrit.osmocom.org/c/osmo-pcu/+/30540
) Change subject: encoding::write_immediate_assignment(): Constify tbf param ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit
https://gerrit.osmocom.org/c/osmo-pcu/+/30540
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ic0b6e81dbeb44f200065dba92cadc33fa52ae75d Gerrit-Change-Number: 30540 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 12 Dec 2022 20:46:35 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
2 years, 6 months
1
0
0
0
Change in osmo-pcu[master]: Pass pdch ptr to tbf_compute_priority
by pespin
pespin has posted comments on this change. (
https://gerrit.osmocom.org/c/osmo-pcu/+/30538
) Change subject: Pass pdch ptr to tbf_compute_priority ...................................................................... Patch Set 1: Verified+1 -- To view, visit
https://gerrit.osmocom.org/c/osmo-pcu/+/30538
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Idbac59343c4bac3214ecd8a14c201b4e42c74557 Gerrit-Change-Number: 30538 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 12 Dec 2022 20:46:19 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
2 years, 6 months
1
0
0
0
Change in osmo-pcu[master]: Pass gprs_rlcmac_pdch to tbf_is_control_ts
by pespin
pespin has posted comments on this change. (
https://gerrit.osmocom.org/c/osmo-pcu/+/30537
) Change subject: Pass gprs_rlcmac_pdch to tbf_is_control_ts ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit
https://gerrit.osmocom.org/c/osmo-pcu/+/30537
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ib1a62b6e7b465253ee7cba63bf5e277f8aa8eaea Gerrit-Change-Number: 30537 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-Comment-Date: Mon, 12 Dec 2022 20:46:15 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
2 years, 6 months
1
0
0
0
Change in osmo-pcu[master]: Pass pdch ptr to tbf_compute_priority
by pespin
pespin has posted comments on this change. (
https://gerrit.osmocom.org/c/osmo-pcu/+/30538
) Change subject: Pass pdch ptr to tbf_compute_priority ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit
https://gerrit.osmocom.org/c/osmo-pcu/+/30538
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Idbac59343c4bac3214ecd8a14c201b4e42c74557 Gerrit-Change-Number: 30538 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 12 Dec 2022 20:45:47 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
2 years, 6 months
1
0
0
0
Change in osmo-pcu[master]: pdch_ulc_get_node(): assert if ulc pointer is null
by pespin
pespin has posted comments on this change. (
https://gerrit.osmocom.org/c/osmo-pcu/+/30535
) Change subject: pdch_ulc_get_node(): assert if ulc pointer is null ...................................................................... Patch Set 1: Verified+1 -- To view, visit
https://gerrit.osmocom.org/c/osmo-pcu/+/30535
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I2689ceaf39009c5e708d5c72e41744658681c917 Gerrit-Change-Number: 30535 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 12 Dec 2022 20:45:37 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
2 years, 6 months
1
0
0
0
Change in osmo-pcu[master]: sched: Pass pdch to *_create_rlcmac_msg() functions
by Jenkins Builder
Jenkins Builder has posted comments on this change. (
https://gerrit.osmocom.org/c/osmo-pcu/+/30565
) Change subject: sched: Pass pdch to *_create_rlcmac_msg() functions ...................................................................... Patch Set 1: (4 comments) File src/tbf_dl_ass_fsm.h: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-1853):
https://gerrit.osmocom.org/c/osmo-pcu/+/30565/comment/481ad474_d79896a1
PS1, Line 65: struct msgb *tbf_dl_ass_create_rlcmac_msg(const struct gprs_rlcmac_tbf* tbf, "foo* bar" should be "foo *bar" File src/tbf_dl_ass_fsm.c: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-1853):
https://gerrit.osmocom.org/c/osmo-pcu/+/30565/comment/266ebeb8_ecc31fe7
PS1, Line 236: struct msgb *tbf_dl_ass_create_rlcmac_msg(const struct gprs_rlcmac_tbf* tbf, "foo* bar" should be "foo *bar" File src/tbf_ul_ass_fsm.h: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-1853):
https://gerrit.osmocom.org/c/osmo-pcu/+/30565/comment/65e84fc9_1db16207
PS1, Line 68: struct msgb *tbf_ul_ass_create_rlcmac_msg(const struct gprs_rlcmac_tbf* tbf, "foo* bar" should be "foo *bar" File src/tbf_ul_ass_fsm.c: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-1853):
https://gerrit.osmocom.org/c/osmo-pcu/+/30565/comment/915891d9_8fe68871
PS1, Line 329: struct msgb *tbf_ul_ass_create_rlcmac_msg(const struct gprs_rlcmac_tbf* tbf, "foo* bar" should be "foo *bar" -- To view, visit
https://gerrit.osmocom.org/c/osmo-pcu/+/30565
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ic31a7360a29e61f70bb1338ddab6f5f31aa8b26e Gerrit-Change-Number: 30565 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Mon, 12 Dec 2022 20:45:16 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
2 years, 6 months
1
0
0
0
Change in osmo-pcu[master]: Move first_common_ts from gprs_rlcmac_tbf to GprsMs
by pespin
pespin has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-pcu/+/30566
) Change subject: Move first_common_ts from gprs_rlcmac_tbf to GprsMs ...................................................................... Move first_common_ts from gprs_rlcmac_tbf to GprsMs The field contains a common value between the 2 active TBFs of the MS, so it makes no sense to have them duplicated on each TBF. It can be sanely stored in the MS object. Change-Id: I8df01a99ccbfaf7a442ade5000ee282bd638fbba --- M src/gprs_ms.c M src/gprs_ms.h M src/gprs_rlcmac_ts_alloc.cpp M src/pcu_vty_functions.cpp M src/tbf.cpp M src/tbf.h M src/tbf_ul.cpp M tests/alloc/AllocTest.cpp 8 files changed, 33 insertions(+), 40 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/66/30566/1 diff --git a/src/gprs_ms.c b/src/gprs_ms.c index 933953e..c9eaf97 100644 --- a/src/gprs_ms.c +++ b/src/gprs_ms.c @@ -120,6 +120,7 @@ ms->current_cs_ul = UNKNOWN; ms->current_cs_dl = UNKNOWN; ms->is_idle = true; + ms->first_common_ts = TBF_TS_UNSET; INIT_LLIST_HEAD(&ms->list); INIT_LLIST_HEAD(&ms->old_tbfs); @@ -383,6 +384,7 @@ if (!ms->dl_tbf && !ms->ul_tbf) { ms_set_reserved_slots(ms, NULL, 0, 0); + ms->first_common_ts = TBF_TS_UNSET; if (ms_tlli(ms) != 0) ms_release_timer_start(ms); @@ -918,15 +920,15 @@ return cs; } -int ms_first_common_ts(const struct GprsMs *ms) +int8_t ms_first_common_ts(const struct GprsMs *ms) { - if (ms->dl_tbf) - return tbf_first_common_ts(dl_tbf_as_tbf(ms->dl_tbf)); + return ms->first_common_ts; +} - if (ms->ul_tbf) - return tbf_first_common_ts(ul_tbf_as_tbf(ms->ul_tbf)); - - return -1; +void ms_set_first_common_ts(struct GprsMs *ms, uint8_t first_common_ts) +{ + OSMO_ASSERT(first_common_ts < 8); + ms->first_common_ts = first_common_ts; } uint8_t ms_dl_slots(const struct GprsMs *ms) diff --git a/src/gprs_ms.h b/src/gprs_ms.h index 4ff261c..00baffa 100644 --- a/src/gprs_ms.h +++ b/src/gprs_ms.h @@ -64,6 +64,8 @@ struct gprs_rlcmac_ul_tbf *ul_tbf; struct gprs_rlcmac_dl_tbf *dl_tbf; struct llist_head old_tbfs; /* list of gprs_rlcmac_tbf */ + /* first TS where the phone can send and receive simultaniously, 0..7 or TBF_TS_UNSET (-1): */ + int8_t first_common_ts; uint32_t tlli; uint32_t new_ul_tlli; @@ -101,7 +103,8 @@ struct GprsMs *ms_alloc(struct gprs_rlcmac_bts *bts, uint32_t tlli); -int ms_first_common_ts(const struct GprsMs *ms); +int8_t ms_first_common_ts(const struct GprsMs *ms); +void ms_set_first_common_ts(struct GprsMs *ms, uint8_t first_common_ts); void ms_set_reserved_slots(struct GprsMs *ms, struct gprs_rlcmac_trx *trx, uint8_t ul_slots, uint8_t dl_slots); struct GprsMs *ms_ref(struct GprsMs *ms); diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp index b5757a7..026ad6e 100644 --- a/src/gprs_rlcmac_ts_alloc.cpp +++ b/src/gprs_rlcmac_ts_alloc.cpp @@ -411,8 +411,9 @@ tbf->trx = trx; /* the only one TS is the common TS */ - tbf->first_ts = tbf->first_common_ts = ts; + tbf->first_ts = ts; ms_set_reserved_slots(ms, trx, 1 << ts, 1 << ts); + ms_set_first_common_ts(ms, ts); tbf->upgrade_to_multislot = false; bts_do_rate_ctr_inc(bts, CTR_TBF_ALLOC_ALGO_A); @@ -945,9 +946,8 @@ /* Step 4: Update MS and TBF and really allocate the resources */ update_ms_reserved_slots(trx, ms, reserved_ul_slots, reserved_dl_slots, ul_slots, dl_slots); - + ms_set_first_common_ts(ms, first_common_ts); tbf->trx = trx; - tbf->first_common_ts = first_common_ts; tbf->first_ts = first_ts; if (tbf->direction == GPRS_RLCMAC_DL_TBF) diff --git a/src/pcu_vty_functions.cpp b/src/pcu_vty_functions.cpp index 76baffe..e35e817 100644 --- a/src/pcu_vty_functions.cpp +++ b/src/pcu_vty_functions.cpp @@ -54,21 +54,22 @@ gprs_rlcmac_ul_tbf *ul_tbf = tbf_as_ul_tbf(tbf); gprs_rlcmac_dl_tbf *dl_tbf = tbf_as_dl_tbf(tbf); uint32_t state_flags = tbf_state_flags(tbf); + struct GprsMs *ms = tbf_ms(tbf); vty_out(vty, "TBF: TFI=%d TLLI=0x%08x (%s) TA=%u DIR=%s IMSI=%s%s", tbf->tfi(), tbf->tlli(), tbf->is_tlli_valid() ? "valid" : "invalid", tbf->ta(), tbf->direction == GPRS_RLCMAC_UL_TBF ? "UL" : "DL", tbf->imsi(), VTY_NEWLINE); - vty_out(vty, " created=%lu state=%s flags=%08x [CCCH:%u, PACCH:%u] 1st_TS=%d 1st_cTS=%d ctrl_TS=%d MS_CLASS=%d/%d%s", + vty_out(vty, " created=%lu state=%s flags=%08x [CCCH:%u, PACCH:%u] 1st_TS=%d 1st_cTS=%" PRId8 " ctrl_TS=%d MS_CLASS=%d/%d%s", tbf->created_ts(), tbf->state_name(), state_flags, state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH), state_flags & (1 << GPRS_RLCMAC_FLAG_PACCH), tbf->first_ts, - tbf->first_common_ts, tbf->control_ts, + ms_first_common_ts(ms), tbf->control_ts, tbf->ms_class(), - ms_egprs_ms_class(tbf->ms()), + ms_egprs_ms_class(ms), VTY_NEWLINE); vty_out(vty, " TS_alloc="); for (int i = 0; i < 8; i++) { diff --git a/src/tbf.cpp b/src/tbf.cpp index 3d9d453..7483d49 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -91,7 +91,6 @@ direction(dir), trx(NULL), first_ts(TBF_TS_UNSET), - first_common_ts(TBF_TS_UNSET), control_ts(TBF_TS_UNSET), fT(0), num_fT_exp(0), @@ -308,13 +307,14 @@ void tbf_assign_control_ts(struct gprs_rlcmac_tbf *tbf) { + int8_t first_common_ts = ms_first_common_ts(tbf_ms(tbf)); if (tbf->control_ts == TBF_TS_UNSET) LOGPTBF(tbf, LOGL_INFO, "Setting Control TS %d\n", - tbf->first_common_ts); - else if (tbf->control_ts != tbf->first_common_ts) + first_common_ts); + else if (tbf->control_ts != first_common_ts) LOGPTBF(tbf, LOGL_INFO, "Changing Control TS %d -> %d\n", - tbf->control_ts, tbf->first_common_ts); - tbf->control_ts = tbf->first_common_ts; + tbf->control_ts, first_common_ts); + tbf->control_ts = first_common_ts; } void gprs_rlcmac_tbf::n_reset(enum tbf_counters n) @@ -738,7 +738,8 @@ if (direction == GPRS_RLCMAC_DL_TBF) { if (control_ts < 8) slots |= 1 << control_ts; - if (first_common_ts < 8) + int8_t first_common_ts = ms_first_common_ts(tbf_ms(this)); + if (first_common_ts != TBF_TS_UNSET) slots |= 1 << first_common_ts; return slots; @@ -825,11 +826,6 @@ return &tbf->m_llc; } -uint8_t tbf_first_common_ts(const struct gprs_rlcmac_tbf *tbf) -{ - return tbf->first_common_ts; -} - uint8_t tbf_dl_slots(const struct gprs_rlcmac_tbf *tbf) { return tbf->dl_slots(); diff --git a/src/tbf.h b/src/tbf.h index 211b8a7..d4d52f9 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -134,7 +134,6 @@ bool tbf_timers_pending(struct gprs_rlcmac_tbf *tbf, enum tbf_timers t); void tbf_free(struct gprs_rlcmac_tbf *tbf); struct gprs_llc *tbf_llc(struct gprs_rlcmac_tbf *tbf); -uint8_t tbf_first_common_ts(const struct gprs_rlcmac_tbf *tbf); uint8_t tbf_dl_slots(const struct gprs_rlcmac_tbf *tbf); uint8_t tbf_ul_slots(const struct gprs_rlcmac_tbf *tbf); bool tbf_is_tfi_assigned(const struct gprs_rlcmac_tbf *tbf); @@ -220,8 +219,6 @@ enum gprs_rlcmac_tbf_direction direction; struct gprs_rlcmac_trx *trx; uint8_t first_ts; /* first TS used by TBF */ - uint8_t first_common_ts; /* first TS where the phone can send and - receive simultaniously */ uint8_t control_ts; /* timeslot control messages and polling */ struct gprs_rlcmac_pdch *pdch[8]; /* list of PDCHs allocated to TBF */ diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 43cd4f6..e4e4f79 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -167,7 +167,7 @@ ul_tbf->trx = trx; /* The only one TS is the common, control TS */ ul_tbf->first_ts = ts; - ul_tbf->first_common_ts = ts; + ms_set_first_common_ts(ms, ts); tbf_assign_control_ts(ul_tbf); ul_tbf->m_ctrs = rate_ctr_group_alloc(ul_tbf, &tbf_ctrg_desc, next_tbf_ctr_group_id++); ul_tbf->m_ul_egprs_ctrs = rate_ctr_group_alloc(ul_tbf, diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp index 379e69a..3316702 100644 --- a/tests/alloc/AllocTest.cpp +++ b/tests/alloc/AllocTest.cpp @@ -176,12 +176,13 @@ { if (!verbose) return; + const struct GprsMs *ms = tbf_ms(tbf); for (size_t i = 0; i < ARRAY_SIZE(tbf->pdch); ++i) if (tbf->pdch[i]) printf("PDCH[%zu] is used for %s\n", i, dir); printf("PDCH[%d] is control_ts for %s\n", tbf->control_ts, dir); - printf("PDCH[%d] is first common for %s\n", tbf->first_common_ts, dir); + printf("PDCH[%d] is first common for %s\n", ms_first_common_ts(ms), dir); } #define ENABLE_PDCH(ts_no, enable_flag, trx) \ @@ -237,8 +238,6 @@ dump_assignment(dl_tbf, "DL", verbose); - OSMO_ASSERT(dl_tbf->first_common_ts == ul_tbf->first_common_ts); - check_tfi_usage(bts); tbf_free(dl_tbf); @@ -284,12 +283,9 @@ dump_assignment(ul_tbf, "UL", verbose); - OSMO_ASSERT(dl_tbf->first_common_ts == ul_tbf->first_common_ts); - /* now update the dl_tbf */ dl_tbf->update(); dump_assignment(dl_tbf, "DL", verbose); - OSMO_ASSERT(dl_tbf->first_common_ts == ul_tbf->first_common_ts); check_tfi_usage(bts); @@ -334,8 +330,6 @@ dump_assignment(dl_tbf, "DL", true); - OSMO_ASSERT(dl_tbf->first_common_ts == ul_tbf->first_common_ts); - check_tfi_usage(bts); tbf_free(dl_tbf); @@ -575,13 +569,13 @@ trx = ms_current_trx(ms); OSMO_ASSERT(ul_tbf || dl_tbf); - + OSMO_ASSERT(ms_first_common_ts(ms) != TBF_TS_UNSET); if (ul_tbf) { - ul_slots = 1 << ul_tbf->first_common_ts; + ul_slots = 1 << (uint8_t)ms_first_common_ts(ms); tfi = ul_tbf->tfi(); dir = GPRS_RLCMAC_UL_TBF; } else { - ul_slots = 1 << dl_tbf->first_common_ts; + ul_slots = 1 << (uint8_t)ms_first_common_ts(ms); tfi = dl_tbf->tfi(); dir = GPRS_RLCMAC_DL_TBF; } -- To view, visit
https://gerrit.osmocom.org/c/osmo-pcu/+/30566
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I8df01a99ccbfaf7a442ade5000ee282bd638fbba Gerrit-Change-Number: 30566 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
2 years, 6 months
1
0
0
0
Change in osmo-pcu[master]: sched: Pass pdch to *_create_rlcmac_msg() functions
by pespin
pespin has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-pcu/+/30565
) Change subject: sched: Pass pdch to *_create_rlcmac_msg() functions ...................................................................... sched: Pass pdch to *_create_rlcmac_msg() functions The pdch pointer contains more info than just timeslot number. For instance, it contains information about the TRX owning the TS. Change-Id: Ic31a7360a29e61f70bb1338ddab6f5f31aa8b26e --- M src/gprs_ms.c M src/gprs_ms.h M src/gprs_rlcmac_sched.cpp M src/nacc_fsm.c M src/nacc_fsm.h M src/tbf_dl_ass_fsm.c M src/tbf_dl_ass_fsm.h M src/tbf_ul_ack_fsm.c M src/tbf_ul_ack_fsm.h M src/tbf_ul_ass_fsm.c M src/tbf_ul_ass_fsm.h M tests/tbf/TbfTest.cpp 12 files changed, 60 insertions(+), 50 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/65/30565/1 diff --git a/src/gprs_ms.c b/src/gprs_ms.c index edb6fba..933953e 100644 --- a/src/gprs_ms.c +++ b/src/gprs_ms.c @@ -1059,15 +1059,16 @@ return false; } -struct msgb *ms_nacc_create_rlcmac_msg(struct GprsMs *ms, struct gprs_rlcmac_tbf *tbf, uint32_t fn, uint8_t ts) +struct msgb *ms_nacc_create_rlcmac_msg(struct GprsMs *ms, struct gprs_rlcmac_tbf *tbf, + const struct gprs_rlcmac_pdch *pdch, uint32_t fn) { int rc; struct nacc_ev_create_rlcmac_msg_ctx data_ctx; data_ctx = (struct nacc_ev_create_rlcmac_msg_ctx) { .tbf = tbf, + .pdch = pdch, .fn = fn, - .ts = ts, .msg = NULL, }; diff --git a/src/gprs_ms.h b/src/gprs_ms.h index 41ef2ad..4ff261c 100644 --- a/src/gprs_ms.h +++ b/src/gprs_ms.h @@ -143,7 +143,8 @@ int ms_nacc_start(struct GprsMs *ms, Packet_Cell_Change_Notification_t *notif); bool ms_nacc_rts(const struct GprsMs *ms); -struct msgb *ms_nacc_create_rlcmac_msg(struct GprsMs *ms, struct gprs_rlcmac_tbf *tbf, uint32_t fn, uint8_t ts); +struct msgb *ms_nacc_create_rlcmac_msg(struct GprsMs *ms, struct gprs_rlcmac_tbf *tbf, + const struct gprs_rlcmac_pdch *pdch, uint32_t fn); 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); diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp index a201b92..87a3733 100644 --- a/src/gprs_rlcmac_sched.cpp +++ b/src/gprs_rlcmac_sched.cpp @@ -139,7 +139,6 @@ tbfs->dl_ass, tbfs->ul_ack, tbfs->nacc }; - uint8_t ts = pdch->ts_no; /* Send Packet Application Information first (ETWS primary notifications) */ msg = sched_app_info(tbfs->dl_ass); @@ -156,15 +155,15 @@ * received, thus preventing the others from being processed. */ if (tbf == tbfs->ul_ass && tbf->ul_ass_state_is(TBF_UL_ASS_SEND_ASS_REJ)) - msg = tbf_ul_ass_create_rlcmac_msg(tbfs->ul_ass, fn, ts); + msg = tbf_ul_ass_create_rlcmac_msg(tbfs->ul_ass, pdch, fn); else if (tbf == tbfs->ul_ass && tbf->direction == GPRS_RLCMAC_DL_TBF) - msg = tbf_ul_ass_create_rlcmac_msg(tbfs->ul_ass, fn, ts); + msg = tbf_ul_ass_create_rlcmac_msg(tbfs->ul_ass, pdch, fn); else if (tbf == tbfs->dl_ass && tbf->direction == GPRS_RLCMAC_UL_TBF) - msg = tbf_dl_ass_create_rlcmac_msg(tbfs->dl_ass, fn, ts); + msg = tbf_dl_ass_create_rlcmac_msg(tbfs->dl_ass, pdch, fn); else if (tbf == tbfs->ul_ack) - msg = tbf_ul_ack_create_rlcmac_msg(tbfs->ul_ack, fn, ts); + msg = tbf_ul_ack_create_rlcmac_msg(tbfs->ul_ack, pdch, fn); else if (tbf == tbfs->nacc) { - msg = ms_nacc_create_rlcmac_msg(tbf->ms(), tbf, fn, ts); + msg = ms_nacc_create_rlcmac_msg(tbf->ms(), tbf, pdch, fn); } if (!msg) { @@ -185,10 +184,10 @@ */ if (tbfs->dl_ass) { tbf = tbfs->dl_ass; - msg = tbf_dl_ass_create_rlcmac_msg(tbfs->dl_ass, fn, ts); + msg = tbf_dl_ass_create_rlcmac_msg(tbfs->dl_ass, pdch, fn); } else if (tbfs->ul_ass) { tbf = tbfs->ul_ass; - msg = tbf_ul_ass_create_rlcmac_msg(tbfs->ul_ass, fn, ts); + msg = tbf_ul_ass_create_rlcmac_msg(tbfs->ul_ass, pdch, fn); } } diff --git a/src/nacc_fsm.c b/src/nacc_fsm.c index 864f196..004b120 100644 --- a/src/nacc_fsm.c +++ b/src/nacc_fsm.c @@ -168,7 +168,7 @@ struct GprsMs *ms = tbf_ms(tbf); unsigned int rrbp; - rc = tbf_check_polling(tbf, data->fn, data->ts, new_poll_fn, &rrbp); + rc = tbf_check_polling(tbf, data->fn, data->pdch->ts_no, new_poll_fn, &rrbp); if (rc < 0) { LOGP(DTBF, LOGL_ERROR, "Failed registering poll for Pkt Cell Chg Continue (%d)\n", rc); return NULL; @@ -202,10 +202,10 @@ LOGP(DNACC, LOGL_DEBUG, "------------------------- TX : Packet Cell Change Continue -------------------------\n"); rate_ctr_inc(rate_ctr_group_get_ctr(bts_rate_counters(ms->bts), CTR_PKT_CELL_CHG_CONTINUE)); talloc_free(mac_control_block); - tbf_set_polling(tbf, *new_poll_fn, data->ts, PDCH_ULC_POLL_CELL_CHG_CONTINUE); + tbf_set_polling(tbf, *new_poll_fn, data->pdch->ts_no, PDCH_ULC_POLL_CELL_CHG_CONTINUE); LOGPTBF(tbf, LOGL_DEBUG, "Scheduled 'Packet Cell Change Continue' polling on PACCH (FN=%d, TS=%d)\n", - *new_poll_fn, data->ts); + *new_poll_fn, data->pdch->ts_no); return msg; free_ret: @@ -608,7 +608,7 @@ data_ctx = (struct nacc_ev_create_rlcmac_msg_ctx *)data; data_ctx->msg = create_packet_cell_chg_continue(ctx, data_ctx, &ctx->continue_poll_fn); if (data_ctx->msg) { - ctx->continue_poll_ts = data_ctx->ts; + ctx->continue_poll_ts = data_ctx->pdch->ts_no; nacc_fsm_state_chg(fi, NACC_ST_WAIT_CELL_CHG_CONTINUE_ACK); } break; diff --git a/src/nacc_fsm.h b/src/nacc_fsm.h index b67ba11..c051637 100644 --- a/src/nacc_fsm.h +++ b/src/nacc_fsm.h @@ -60,8 +60,8 @@ /* passed as data in NACC_EV_CREATE_RLCMAC_MSG */ struct nacc_ev_create_rlcmac_msg_ctx { struct gprs_rlcmac_tbf *tbf; /* target tbf to create messages for */ + const struct gprs_rlcmac_pdch *pdch; /* TS where the created DL ctrl block is to be sent */ uint32_t fn; /* FN where the created DL ctrl block is to be sent */ - uint8_t ts; /* TS where the created DL ctrl block is to be sent */ struct msgb *msg; /* to be filled by FSM during event processing */ }; diff --git a/src/tbf_dl_ass_fsm.c b/src/tbf_dl_ass_fsm.c index d4dafe2..99e77e1 100644 --- a/src/tbf_dl_ass_fsm.c +++ b/src/tbf_dl_ass_fsm.c @@ -59,9 +59,9 @@ bool old_tfi_is_valid = tbf_is_tfi_assigned(ctx->tbf); /* We only use this function in control TS (PACCH) so that MS can always answer the poll */ - OSMO_ASSERT(tbf_is_control_ts(ctx->tbf, &tbf_get_trx(ctx->tbf)->pdch[d->ts])); + OSMO_ASSERT(tbf_is_control_ts(ctx->tbf, d->pdch)); - rc = tbf_check_polling(ctx->tbf, d->fn, d->ts, &new_poll_fn, &rrbp); + rc = tbf_check_polling(ctx->tbf, d->fn, d->pdch->ts_no, &new_poll_fn, &rrbp); if (rc < 0) return NULL; @@ -113,9 +113,9 @@ LOGP(DTBF, LOGL_DEBUG, "------------------------- TX : Packet Downlink Assignment -------------------------\n"); bts_do_rate_ctr_inc(ms->bts, CTR_PKT_DL_ASSIGNMENT); - tbf_set_polling(ctx->tbf, new_poll_fn, d->ts, PDCH_ULC_POLL_DL_ASS); + tbf_set_polling(ctx->tbf, new_poll_fn, d->pdch->ts_no, PDCH_ULC_POLL_DL_ASS); LOGPTBF(ctx->tbf, LOGL_INFO, "Scheduled DL Assignment polling on PACCH (FN=%d, TS=%d)\n", - new_poll_fn, d->ts); + new_poll_fn, d->pdch->ts_no); talloc_free(mac_control_block); return msg; @@ -233,12 +233,14 @@ } -struct msgb *tbf_dl_ass_create_rlcmac_msg(const struct gprs_rlcmac_tbf* tbf, uint32_t fn, uint8_t ts) +struct msgb *tbf_dl_ass_create_rlcmac_msg(const struct gprs_rlcmac_tbf* tbf, + const struct gprs_rlcmac_pdch *pdch, + uint32_t fn) { int rc; struct tbf_dl_ass_ev_create_rlcmac_msg_ctx data_ctx = { + .pdch = pdch, .fn = fn, - .ts = ts, .msg = NULL, }; diff --git a/src/tbf_dl_ass_fsm.h b/src/tbf_dl_ass_fsm.h index dc5f9b2..36e01af 100644 --- a/src/tbf_dl_ass_fsm.h +++ b/src/tbf_dl_ass_fsm.h @@ -56,11 +56,13 @@ /* passed as data in TBF_DL_ASS_EV_CREATE_RLCMAC_MSG */ struct tbf_dl_ass_ev_create_rlcmac_msg_ctx { + const struct gprs_rlcmac_pdch *pdch; /* TS where the created DL ctrl block is to be sent */ uint32_t fn; /* FN where the created DL ctrl block is to be sent */ - uint8_t ts; /* TS where the created DL ctrl block is to be sent */ struct msgb *msg; /* to be filled by FSM during event processing */ }; -struct msgb *tbf_dl_ass_create_rlcmac_msg(const struct gprs_rlcmac_tbf* tbf, uint32_t fn, uint8_t ts); +struct msgb *tbf_dl_ass_create_rlcmac_msg(const struct gprs_rlcmac_tbf* tbf, + const struct gprs_rlcmac_pdch *pdch, + uint32_t fn); bool tbf_dl_ass_rts(const struct gprs_rlcmac_tbf* tbf, const struct gprs_rlcmac_pdch *pdch); diff --git a/src/tbf_ul_ack_fsm.c b/src/tbf_ul_ack_fsm.c index 1421c68..9501190 100644 --- a/src/tbf_ul_ack_fsm.c +++ b/src/tbf_ul_ack_fsm.c @@ -59,7 +59,7 @@ struct GprsMs *ms = tbf_ms(ul_tbf_as_tbf(tbf)); if (final) { - rc = tbf_check_polling(ul_tbf_as_tbf(tbf), d->fn, d->ts, &new_poll_fn, &rrbp); + rc = tbf_check_polling(ul_tbf_as_tbf(tbf), d->fn, d->pdch->ts_no, &new_poll_fn, &rrbp); if (rc < 0) return NULL; } @@ -93,10 +93,10 @@ osmo_fsm_inst_dispatch(tbf_state_fi(ul_tbf_as_tbf(ctx->tbf)), TBF_EV_CONTENTION_RESOLUTION_MS_SUCCESS, NULL); if (final) { - tbf_set_polling(ul_tbf_as_tbf(tbf), new_poll_fn, d->ts, PDCH_ULC_POLL_UL_ACK); + tbf_set_polling(ul_tbf_as_tbf(tbf), new_poll_fn, d->pdch->ts_no, PDCH_ULC_POLL_UL_ACK); LOGPTBFUL(tbf, LOGL_DEBUG, "Scheduled UL Acknowledgement polling on PACCH (FN=%d, TS=%d)\n", - new_poll_fn, d->ts); + new_poll_fn, d->pdch->ts_no); } return msg; @@ -221,12 +221,14 @@ } -struct msgb *tbf_ul_ack_create_rlcmac_msg(const struct gprs_rlcmac_ul_tbf *ul_tbf, uint32_t fn, uint8_t ts) +struct msgb *tbf_ul_ack_create_rlcmac_msg(const struct gprs_rlcmac_ul_tbf *ul_tbf, + const struct gprs_rlcmac_pdch *pdch, + uint32_t fn) { int rc; struct tbf_ul_ack_ev_create_rlcmac_msg_ctx data_ctx = { + .pdch = pdch, .fn = fn, - .ts = ts, .msg = NULL, }; diff --git a/src/tbf_ul_ack_fsm.h b/src/tbf_ul_ack_fsm.h index e06728e..d0005eb 100644 --- a/src/tbf_ul_ack_fsm.h +++ b/src/tbf_ul_ack_fsm.h @@ -57,13 +57,15 @@ /* passed as data in TBF_UL_ACK_EV_CREATE_RLCMAC_MSG */ struct tbf_ul_ack_ev_create_rlcmac_msg_ctx { + const struct gprs_rlcmac_pdch *pdch; /* TS where the created DL ctrl block is to be sent */ uint32_t fn; /* FN where the created DL ctrl block is to be sent */ - uint8_t ts; /* TS where the created DL ctrl block is to be sent */ struct msgb *msg; /* to be filled by FSM during event processing */ }; -struct msgb *tbf_ul_ack_create_rlcmac_msg(const struct gprs_rlcmac_ul_tbf *ul_tbf, uint32_t fn, uint8_t ts); +struct msgb *tbf_ul_ack_create_rlcmac_msg(const struct gprs_rlcmac_ul_tbf *ul_tbf, + const struct gprs_rlcmac_pdch *pdch, + uint32_t fn); bool tbf_ul_ack_rts(const struct gprs_rlcmac_ul_tbf *ul_tbf, const struct gprs_rlcmac_pdch *pdch); bool tbf_ul_ack_waiting_cnf_final_ack(const struct gprs_rlcmac_ul_tbf *ul_tbf); bool tbf_ul_ack_exp_ctrl_ack(const struct gprs_rlcmac_ul_tbf *ul_tbf, uint32_t fn, uint8_t ts); diff --git a/src/tbf_ul_ass_fsm.c b/src/tbf_ul_ass_fsm.c index cff17bc..4433338 100644 --- a/src/tbf_ul_ass_fsm.c +++ b/src/tbf_ul_ass_fsm.c @@ -83,7 +83,7 @@ unsigned int rrbp; uint32_t new_poll_fn; - rc = tbf_check_polling(ctx->tbf, d->fn, d->ts, &new_poll_fn, &rrbp); + rc = tbf_check_polling(ctx->tbf, d->fn, d->pdch->ts_no, &new_poll_fn, &rrbp); if (rc < 0) return NULL; @@ -128,9 +128,9 @@ LOGP(DTBF, LOGL_DEBUG, "------------------------- TX : Packet Uplink Assignment -------------------------\n"); bts_do_rate_ctr_inc(ms->bts, CTR_PKT_UL_ASSIGNMENT); - tbf_set_polling(ctx->tbf, new_poll_fn, d->ts, PDCH_ULC_POLL_UL_ASS); + tbf_set_polling(ctx->tbf, new_poll_fn, d->pdch->ts_no, PDCH_ULC_POLL_UL_ASS); LOGPTBF(ctx->tbf, LOGL_INFO, "Scheduled UL Assignment polling on PACCH (FN=%d, TS=%d)\n", - new_poll_fn, d->ts); + new_poll_fn, d->pdch->ts_no); talloc_free(mac_control_block); return msg; @@ -326,12 +326,14 @@ } -struct msgb *tbf_ul_ass_create_rlcmac_msg(const struct gprs_rlcmac_tbf* tbf, uint32_t fn, uint8_t ts) +struct msgb *tbf_ul_ass_create_rlcmac_msg(const struct gprs_rlcmac_tbf* tbf, + const struct gprs_rlcmac_pdch *pdch, + uint32_t fn) { int rc; struct tbf_ul_ass_ev_create_rlcmac_msg_ctx data_ctx = { + .pdch = pdch, .fn = fn, - .ts = ts, .msg = NULL, }; diff --git a/src/tbf_ul_ass_fsm.h b/src/tbf_ul_ass_fsm.h index 9b0de38..4c7518d 100644 --- a/src/tbf_ul_ass_fsm.h +++ b/src/tbf_ul_ass_fsm.h @@ -59,11 +59,13 @@ /* passed as data in TBF_UL_ASS_EV_CREATE_RLCMAC_MSG */ struct tbf_ul_ass_ev_create_rlcmac_msg_ctx { + const struct gprs_rlcmac_pdch *pdch; /* TS where the created DL ctrl block is to be sent */ uint32_t fn; /* FN where the created DL ctrl block is to be sent */ - uint8_t ts; /* TS where the created DL ctrl block is to be sent */ struct msgb *msg; /* to be filled by FSM during event processing */ }; -struct msgb *tbf_ul_ass_create_rlcmac_msg(const struct gprs_rlcmac_tbf* tbf, uint32_t fn, uint8_t ts); +struct msgb *tbf_ul_ass_create_rlcmac_msg(const struct gprs_rlcmac_tbf* tbf, + const struct gprs_rlcmac_pdch *pdch, + uint32_t fn); bool tbf_ul_ass_rts(const struct gprs_rlcmac_tbf* tbf, const struct gprs_rlcmac_pdch *pdch); diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index f94c8de..79d0f63 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -831,7 +831,7 @@ pdch->rcv_block(data_msg, 42, *fn, &meas); osmo_fsm_inst_dispatch(ul_tbf->ul_ack_fsm.fi, TBF_UL_ACK_EV_SCHED_ACK, NULL); - struct msgb *msg1 = tbf_ul_ack_create_rlcmac_msg(ul_tbf, *fn, ts_no); + struct msgb *msg1 = tbf_ul_ack_create_rlcmac_msg(ul_tbf, pdch, *fn); static uint8_t exp1[] = { 0x40, 0x24, 0x01, 0x0b, 0x3e, 0x24, 0x46, 0x68, 0x9c, 0x70, 0x87, 0xb0, 0x06, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b @@ -859,7 +859,7 @@ pdch->rcv_block(data_msg, 42, *fn, &meas); osmo_fsm_inst_dispatch(ul_tbf->ul_ack_fsm.fi, TBF_UL_ACK_EV_SCHED_ACK, NULL); - msg1 = tbf_ul_ack_create_rlcmac_msg(ul_tbf, *fn, ts_no); + msg1 = tbf_ul_ack_create_rlcmac_msg(ul_tbf, pdch, *fn); static uint8_t exp2[] = { 0x40, 0x24, 0x01, 0x0b, 0x3e, 0x24, 0x46, 0x68, 0x9c, 0x70, 0x88, 0xb0, 0x06, 0x8b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b @@ -1380,7 +1380,7 @@ GprsMs *ms; uint8_t trx_no = 0; int tfi = 0; - struct gprs_rlcmac_pdch *pdch; + struct gprs_rlcmac_pdch *pdch = &bts->trx[trx_no].pdch[ts_no]; /* send fake data with cv=0*/ struct gprs_rlc_ul_header_egprs_3 *hdr3 = NULL; @@ -1410,11 +1410,10 @@ data[5] = 0x0; data[6] = 0x2b; data[7] = 0x2b; - pdch = &bts->trx[trx_no].pdch[ts_no]; pdch->rcv_block(&data[0], sizeof(data), *fn, &meas); } osmo_fsm_inst_dispatch(ul_tbf->ul_ack_fsm.fi, TBF_UL_ACK_EV_SCHED_ACK, NULL); - tbf_ul_ack_create_rlcmac_msg(ul_tbf, *fn, ts_no); + tbf_ul_ack_create_rlcmac_msg(ul_tbf, pdch, *fn); memset(data, 0x2b, sizeof(data)); hdr3 = (struct gprs_rlc_ul_header_egprs_3 *)data; hdr3->r = 0; @@ -1461,7 +1460,7 @@ GprsMs *ms; uint8_t trx_no = 0; int tfi = 0; - struct gprs_rlcmac_pdch *pdch; + struct gprs_rlcmac_pdch *pdch = &bts->trx[trx_no].pdch[ts_no]; check_tbf(ul_tbf); /* send fake data with cv=0*/ @@ -1493,11 +1492,10 @@ data[5] = 0x0; data[6] = 0x2b; data[7] = 0x2b; - pdch = &bts->trx[trx_no].pdch[ts_no]; pdch->rcv_block(&data[0], sizeof(data), *fn, &meas); } osmo_fsm_inst_dispatch(ul_tbf->ul_ack_fsm.fi, TBF_UL_ACK_EV_SCHED_ACK, NULL); - tbf_ul_ack_create_rlcmac_msg(ul_tbf, *fn, ts_no); + tbf_ul_ack_create_rlcmac_msg(ul_tbf, pdch, *fn); memset(data, 0x2b, sizeof(data)); hdr3 = (struct gprs_rlc_ul_header_egprs_3 *)data; hdr3->r = 0; @@ -1522,7 +1520,7 @@ pdch = &bts->trx[trx_no].pdch[ts_no]; pdch->rcv_block(&data[0], sizeof(data), *fn, &meas); osmo_fsm_inst_dispatch(ul_tbf->ul_ack_fsm.fi, TBF_UL_ACK_EV_SCHED_ACK, NULL); - tbf_ul_ack_create_rlcmac_msg(ul_tbf, *fn, ts_no); + tbf_ul_ack_create_rlcmac_msg(ul_tbf, pdch, *fn); request_dl_rlc_block(ul_tbf, fn); @@ -1545,7 +1543,7 @@ uint8_t trx_no = 0; int tfi = 0; gprs_rlcmac_ul_tbf *ul_tbf; - struct gprs_rlcmac_pdch *pdch; + struct gprs_rlcmac_pdch *pdch = &bts->trx[trx_no].pdch[ts_no]; /* check the TBF */ ul_tbf = bts_ul_tbf_by_tfi(bts, tfi, trx_no, ts_no); @@ -1581,11 +1579,10 @@ data[5] = 0x0; data[6] = 0x2b; data[7] = 0x2b; - pdch = &bts->trx[trx_no].pdch[ts_no]; pdch->rcv_block(&data[0], sizeof(data), *fn, &meas); } osmo_fsm_inst_dispatch(ul_tbf->ul_ack_fsm.fi, TBF_UL_ACK_EV_SCHED_ACK, NULL); - tbf_ul_ack_create_rlcmac_msg(ul_tbf, *fn, ts_no); + tbf_ul_ack_create_rlcmac_msg(ul_tbf, pdch, *fn); memset(data, 0x2b, sizeof(data)); hdr3 = (struct gprs_rlc_ul_header_egprs_3 *)data; hdr3->r = 0; -- To view, visit
https://gerrit.osmocom.org/c/osmo-pcu/+/30565
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ic31a7360a29e61f70bb1338ddab6f5f31aa8b26e Gerrit-Change-Number: 30565 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
2 years, 6 months
1
0
0
0
Change in osmo-pcu[master]: Move control_ts explicit checks out of the scheduler implementation
by pespin
pespin has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-pcu/+/30564
) Change subject: Move control_ts explicit checks out of the scheduler implementation ...................................................................... Move control_ts explicit checks out of the scheduler implementation Let each subsystem handle that internally. Change-Id: Ifaf7dde651d56942779d84aa9135fc8c974b6f26 --- M src/gprs_rlcmac_sched.cpp M src/nacc_fsm.c M src/nacc_fsm.h M src/tbf_dl_ass_fsm.c M src/tbf_dl_ass_fsm.h M src/tbf_ul_ack_fsm.c M src/tbf_ul_ack_fsm.h M src/tbf_ul_ass_fsm.c M src/tbf_ul_ass_fsm.h 9 files changed, 46 insertions(+), 24 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/64/30564/1 diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp index f641013..a201b92 100644 --- a/src/gprs_rlcmac_sched.cpp +++ b/src/gprs_rlcmac_sched.cpp @@ -28,6 +28,7 @@ extern "C" { #include <osmocom/core/gsmtap.h> + #include "nacc_fsm.h" } struct tbf_sched_candidates { @@ -47,17 +48,13 @@ llist_for_each_entry(pos, &pdch->trx->ul_tbfs, list) { ul_tbf = tbf_as_ul_tbf((struct gprs_rlcmac_tbf *)pos->entry); OSMO_ASSERT(ul_tbf); - /* this trx, this ts */ - if (!tbf_is_control_ts(ul_tbf, pdch)) - continue; - if (tbf_ul_ack_rts(ul_tbf)) + if (tbf_ul_ack_rts(ul_tbf, pdch)) tbf_cand->ul_ack = ul_tbf; - if (tbf_dl_ass_rts(ul_tbf)) + if (tbf_dl_ass_rts(ul_tbf, pdch)) tbf_cand->dl_ass = ul_tbf; - if (tbf_ul_ass_rts(ul_tbf)) + if (tbf_ul_ass_rts(ul_tbf, pdch)) tbf_cand->ul_ass = ul_tbf; - /* NACC ready to send. TFI assigned is needed to send messages */ - if (tbf_is_tfi_assigned(ul_tbf) && ms_nacc_rts(ul_tbf->ms())) + if (tbf_nacc_rts(ul_tbf, pdch)) 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? */ @@ -65,15 +62,11 @@ llist_for_each_entry(pos, &pdch->trx->dl_tbfs, list) { dl_tbf = tbf_as_dl_tbf((struct gprs_rlcmac_tbf *)pos->entry); OSMO_ASSERT(dl_tbf); - /* this trx, this ts */ - if (!tbf_is_control_ts(dl_tbf, pdch)) - continue; - if (tbf_dl_ass_rts(dl_tbf)) + if (tbf_dl_ass_rts(dl_tbf, pdch)) tbf_cand->dl_ass = dl_tbf; - if (tbf_ul_ass_rts(dl_tbf)) + if (tbf_ul_ass_rts(dl_tbf, pdch)) tbf_cand->ul_ass = dl_tbf; - /* NACC ready to send. TFI assigned is needed to send messages */ - if (tbf_is_tfi_assigned(dl_tbf) && ms_nacc_rts(dl_tbf->ms())) + if (tbf_nacc_rts(dl_tbf, pdch)) tbf_cand->nacc = dl_tbf; } } diff --git a/src/nacc_fsm.c b/src/nacc_fsm.c index 25e7cd8..864f196 100644 --- a/src/nacc_fsm.c +++ b/src/nacc_fsm.c @@ -900,3 +900,11 @@ ctx->continue_poll_fn == fn && ctx->continue_poll_ts == ts; } + +bool tbf_nacc_rts(const struct gprs_rlcmac_tbf *tbf, const struct gprs_rlcmac_pdch *pdch) +{ + if (!tbf_is_control_ts(tbf, pdch)) + return false; + + return tbf_is_tfi_assigned(tbf) && ms_nacc_rts(tbf_ms(tbf)); +} \ No newline at end of file diff --git a/src/nacc_fsm.h b/src/nacc_fsm.h index b33dafa..b67ba11 100644 --- a/src/nacc_fsm.h +++ b/src/nacc_fsm.h @@ -22,6 +22,7 @@ struct GprsMs; struct gprs_rlcmac_tbf; +struct gprs_rlcmac_pdch; enum nacc_fsm_event { NACC_EV_RX_CELL_CHG_NOTIFICATION, /* data: Packet_Cell_Change_Notification_t* */ @@ -73,3 +74,5 @@ const struct osmo_cell_global_id_ps *cgi_ps); bool nacc_fsm_exp_ctrl_ack(const struct nacc_fsm_ctx *ctx, uint32_t fn, uint8_t ts); + +bool tbf_nacc_rts(const struct gprs_rlcmac_tbf *tbf, const struct gprs_rlcmac_pdch *pdch); diff --git a/src/tbf_dl_ass_fsm.c b/src/tbf_dl_ass_fsm.c index fe959cc..d4dafe2 100644 --- a/src/tbf_dl_ass_fsm.c +++ b/src/tbf_dl_ass_fsm.c @@ -248,9 +248,14 @@ return data_ctx.msg; } -bool tbf_dl_ass_rts(const struct gprs_rlcmac_tbf *tbf) +bool tbf_dl_ass_rts(const struct gprs_rlcmac_tbf *tbf, const struct gprs_rlcmac_pdch *pdch) { - struct osmo_fsm_inst *fi = tbf_dl_ass_fi(tbf); + struct osmo_fsm_inst *fi; + + if (!tbf_is_control_ts(tbf, pdch)) + return false; + + fi = tbf_dl_ass_fi(tbf); if (fi->state != TBF_DL_ASS_SEND_ASS) return false; diff --git a/src/tbf_dl_ass_fsm.h b/src/tbf_dl_ass_fsm.h index a259c03..dc5f9b2 100644 --- a/src/tbf_dl_ass_fsm.h +++ b/src/tbf_dl_ass_fsm.h @@ -21,6 +21,7 @@ #include <gprs_pcu.h> struct gprs_rlcmac_tbf; +struct gprs_rlcmac_pdch; enum tbf_dl_ass_fsm_event { TBF_DL_ASS_EV_SCHED_ASS, /* Tx Uplink Assignment is pending */ @@ -62,4 +63,4 @@ struct msgb *tbf_dl_ass_create_rlcmac_msg(const struct gprs_rlcmac_tbf* tbf, uint32_t fn, uint8_t ts); -bool tbf_dl_ass_rts(const struct gprs_rlcmac_tbf* tbf); +bool tbf_dl_ass_rts(const struct gprs_rlcmac_tbf* tbf, const struct gprs_rlcmac_pdch *pdch); diff --git a/src/tbf_ul_ack_fsm.c b/src/tbf_ul_ack_fsm.c index f6e7a0d..1421c68 100644 --- a/src/tbf_ul_ack_fsm.c +++ b/src/tbf_ul_ack_fsm.c @@ -236,9 +236,14 @@ return data_ctx.msg; } -bool tbf_ul_ack_rts(const struct gprs_rlcmac_ul_tbf *ul_tbf) +bool tbf_ul_ack_rts(const struct gprs_rlcmac_ul_tbf *ul_tbf, const struct gprs_rlcmac_pdch *pdch) { - struct osmo_fsm_inst *fi = tbf_ul_ack_fi(ul_tbf); + struct osmo_fsm_inst *fi; + + if (!tbf_is_control_ts(ul_tbf_as_tbf_const(ul_tbf), pdch)) + return false; + + fi = tbf_ul_ack_fi(ul_tbf); return fi->state == TBF_UL_ACK_ST_SCHED_UL_ACK; } diff --git a/src/tbf_ul_ack_fsm.h b/src/tbf_ul_ack_fsm.h index f25972e..e06728e 100644 --- a/src/tbf_ul_ack_fsm.h +++ b/src/tbf_ul_ack_fsm.h @@ -22,6 +22,7 @@ struct gprs_rlcmac_tbf; struct gprs_rlcmac_ul_tbf; +struct gprs_rlcmac_pdch; enum tbf_ul_ack_fsm_event { TBF_UL_ACK_EV_SCHED_ACK, /* Tx UL ACK/NACK is pending */ @@ -63,6 +64,6 @@ struct msgb *tbf_ul_ack_create_rlcmac_msg(const struct gprs_rlcmac_ul_tbf *ul_tbf, uint32_t fn, uint8_t ts); -bool tbf_ul_ack_rts(const struct gprs_rlcmac_ul_tbf *ul_tbf); +bool tbf_ul_ack_rts(const struct gprs_rlcmac_ul_tbf *ul_tbf, const struct gprs_rlcmac_pdch *pdch); bool tbf_ul_ack_waiting_cnf_final_ack(const struct gprs_rlcmac_ul_tbf *ul_tbf); bool tbf_ul_ack_exp_ctrl_ack(const struct gprs_rlcmac_ul_tbf *ul_tbf, uint32_t fn, uint8_t ts); diff --git a/src/tbf_ul_ass_fsm.c b/src/tbf_ul_ass_fsm.c index 932a91f..cff17bc 100644 --- a/src/tbf_ul_ass_fsm.c +++ b/src/tbf_ul_ass_fsm.c @@ -341,8 +341,13 @@ return data_ctx.msg; } -bool tbf_ul_ass_rts(const struct gprs_rlcmac_tbf* tbf) +bool tbf_ul_ass_rts(const struct gprs_rlcmac_tbf *tbf, const struct gprs_rlcmac_pdch *pdch) { - struct osmo_fsm_inst *fi = tbf_ul_ass_fi(tbf); + struct osmo_fsm_inst *fi; + + if (!tbf_is_control_ts(tbf, pdch)) + return false; + + fi = tbf_ul_ass_fi(tbf); return fi->state == TBF_UL_ASS_SEND_ASS || fi->state == TBF_UL_ASS_SEND_ASS_REJ; } diff --git a/src/tbf_ul_ass_fsm.h b/src/tbf_ul_ass_fsm.h index 8a612f2..9b0de38 100644 --- a/src/tbf_ul_ass_fsm.h +++ b/src/tbf_ul_ass_fsm.h @@ -21,6 +21,7 @@ #include <gprs_pcu.h> struct gprs_rlcmac_tbf; +struct gprs_rlcmac_pdch; enum tbf_ul_ass_fsm_event { TBF_UL_ASS_EV_SCHED_ASS, /* Tx Uplink Assignment is pending */ @@ -65,4 +66,4 @@ struct msgb *tbf_ul_ass_create_rlcmac_msg(const struct gprs_rlcmac_tbf* tbf, uint32_t fn, uint8_t ts); -bool tbf_ul_ass_rts(const struct gprs_rlcmac_tbf* tbf); +bool tbf_ul_ass_rts(const struct gprs_rlcmac_tbf* tbf, const struct gprs_rlcmac_pdch *pdch); -- To view, visit
https://gerrit.osmocom.org/c/osmo-pcu/+/30564
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ifaf7dde651d56942779d84aa9135fc8c974b6f26 Gerrit-Change-Number: 30564 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
2 years, 6 months
1
0
0
0
Change in osmocom-bb[master]: trxcon: fix distcheck: add missing trxcon_fsm.h to noinst_HEADERS
by fixeria
fixeria has submitted this change. (
https://gerrit.osmocom.org/c/osmocom-bb/+/30563
) Change subject: trxcon: fix distcheck: add missing trxcon_fsm.h to noinst_HEADERS ...................................................................... trxcon: fix distcheck: add missing trxcon_fsm.h to noinst_HEADERS Change-Id: Ib64b15c8ad700a7df71513469df454c74322b998 Fixes: 6fc090593dfcfe6747910d7639d6e973b631cc71 --- M src/host/trxcon/include/osmocom/bb/trxcon/Makefile.am 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/Makefile.am b/src/host/trxcon/include/osmocom/bb/trxcon/Makefile.am index 1310a43..bd9324a 100644 --- a/src/host/trxcon/include/osmocom/bb/trxcon/Makefile.am +++ b/src/host/trxcon/include/osmocom/bb/trxcon/Makefile.am @@ -6,4 +6,5 @@ trx_if.h \ logging.h \ trxcon.h \ + trxcon_fsm.h \ $(NULL) -- To view, visit
https://gerrit.osmocom.org/c/osmocom-bb/+/30563
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ib64b15c8ad700a7df71513469df454c74322b998 Gerrit-Change-Number: 30563 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
2 years, 6 months
1
0
0
0
← Newer
1
...
113
114
115
116
117
118
119
...
198
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
Results per page:
10
25
50
100
200