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

June 2023

  • 1 participants
  • 2480 discussions
[S] Change in osmo-pcu[master]: Use OSMO_UNLIKELY() in bts_rfn_to_fn()
by fixeria 02 Jun '23

02 Jun '23
Attention is currently required from: pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/33157 ) Change subject: Use OSMO_UNLIKELY() in bts_rfn_to_fn() ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/33157 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I4c71f3481764b501a4441bc735a87725884a3e75 Gerrit-Change-Number: 33157 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 02 Jun 2023 14:34:43 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-pcu[master]: Move call to bts_set_current_frame_number() earlier in the code path
by fixeria 02 Jun '23

02 Jun '23
Attention is currently required from: pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/33154 ) Change subject: Move call to bts_set_current_frame_number() earlier in the code path ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/33154 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: If36f22a1067c904fa7fda87bed5062b6738f0dd1 Gerrit-Change-Number: 33154 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 02 Jun 2023 14:34:35 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-pcu[master]: Use fn_valid() helper in pcu_rx_time_ind()
by pespin 02 Jun '23

02 Jun '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/33138 ) Change subject: Use fn_valid() helper in pcu_rx_time_ind() ...................................................................... Use fn_valid() helper in pcu_rx_time_ind() Change-Id: I5b1f1d4cd621d81fb99b87761a878af242227a10 --- M src/pcu_l1_if.cpp 1 file changed, 10 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp index e675d86..3f881cf 100644 --- a/src/pcu_l1_if.cpp +++ b/src/pcu_l1_if.cpp @@ -1036,10 +1036,8 @@ static int pcu_rx_time_ind(struct gprs_rlcmac_bts *bts, struct gsm_pcu_if_time_ind *time_ind) { - uint8_t fn13 = time_ind->fn % 13; - /* omit frame numbers not starting at a MAC block */ - if (fn13 != 0 && fn13 != 4 && fn13 != 8) + if (!fn_valid(time_ind->fn)) return 0; LOGP(DL1IF, LOGL_DEBUG, "Time indication received: %d\n", time_ind->fn % 52); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/33138 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I5b1f1d4cd621d81fb99b87761a878af242227a10 Gerrit-Change-Number: 33138 Gerrit-PatchSet: 2 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-MessageType: merged
1 0
0 0
[S] Change in osmo-pcu[master]: Use fn_valid() helper in pcu_rx_time_ind()
by fixeria 02 Jun '23

02 Jun '23
Attention is currently required from: pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/33138 ) Change subject: Use fn_valid() helper in pcu_rx_time_ind() ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/33138 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I5b1f1d4cd621d81fb99b87761a878af242227a10 Gerrit-Change-Number: 33138 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 02 Jun 2023 13:47:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: Fixes for I949f731de794b22292b01d0ddf9a75a9e7e7e71d
by jolly 02 Jun '23

02 Jun '23
jolly has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33149 ) Change subject: Fixes for I949f731de794b22292b01d0ddf9a75a9e7e7e71d ...................................................................... Abandoned Removed from branch. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33149 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: I147454b10c8f3127172ae84dd31003a7d299f24c Gerrit-Change-Number: 33149 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: abandon
1 0
0 0
[M] Change in osmo-pcu[master]: Fix DL_TBF PACCH ass done on UL_TBF already scheduled to tx last PKT ...
by pespin 02 Jun '23

02 Jun '23
Attention is currently required from: fixeria. Hello Jenkins Builder, fixeria, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-pcu/+/32339 to look at the new patch set (#3). Change subject: Fix DL_TBF PACCH ass done on UL_TBF already scheduled to tx last PKT CTRL ACK ...................................................................... Fix DL_TBF PACCH ass done on UL_TBF already scheduled to tx last PKT CTRL ACK Dispatching TBF_EV_CONTENTION_RESOLUTION_MS_SUCCESS means the UL TBF is able to be used to assign DL TBFs over PACCH. However, there's an extra implicit restriction: if the PCU already sent the final UL ACK/NACK to that UL TBF, then whatever message sent after it cannot be reliably answered, since the MS will go back to idle state after issues the PKT CTRL ACK for that final UL ACK/NACK. This condition is already being checked in contention_resolution_success()(): """ if (ms_need_dl_tbf(ms()) && !tbf_ul_ack_waiting_cnf_final_ack(this)) ms_new_dl_tbf_assigned_on_pacch(ms(), this); """ Since we are considering the UL TBF to have done contention resolution when we transmit the *first* UL ACK/NACK, it mans we are doing both things on the same code path iif the *first* UL ACK/NACK is at the same time the *final* UL ACK for that UL TBF. This can happen if the UL TBF is only sending 1 block, which will have CV=0. This can usually happen during GMM Attach Request. In this scenario, with current code goes into a situation where first the TBF_EV_CONTENTION_RESOLUTION_MS_SUCCESS is triggered and *afterwards* the UL_ACK/NACK state is updated. As a result, the code snippet check above (!tbf_ul_ack_waiting_cnf_final_ack()) will be true and the DL TBF be assigned, but afterwards in the same code path it figures out the final ack happens. In order to fix this, first update the ACK/NACK state and only afterwards trigger he Contention Resolution Success event. Change-Id: I62ae91b494e4fd0ade3f4a3ba3817bcaedbdebf5 --- M src/tbf_ul_ack_fsm.c M tests/tbf/TbfTest.err 2 files changed, 64 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/39/32339/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/32339 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I62ae91b494e4fd0ade3f4a3ba3817bcaedbdebf5 Gerrit-Change-Number: 32339 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[M] Change in osmo-pcu[master]: encoding: pass RFN to write_immediate_assignment(_reject)()
by pespin 02 Jun '23

02 Jun '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/33123 ) Change subject: encoding: pass RFN to write_immediate_assignment(_reject)() ...................................................................... encoding: pass RFN to write_immediate_assignment(_reject)() Those function don't really require the full FN, hence let's pass only the required information. This makes the implementation here less dependent on how/if we are able to calculate full FNs based on RFN: We get an RFN, and we have to encode so that the RFN can be derived again, so feels less cumbersome having to go through RFN->FN->RFN which may only cause possible issues if there's some FN timing bug. 3GPP TS 44.018 10.5.2.30 Request Reference: "The purpose of the Request Reference information element is to provide the random access information used in the channel request and the frame number, FN modulo 42432" 3GPP TS 44.018 10.5.2.38 Starting Time: "The purpose of the Starting Time information element is to provide the start TDMA frame number, FN modulo 42432." Change-Id: If9b758434c00f2a3868534d5be84946809c989a9 --- M src/bts.cpp M src/encoding.cpp M src/encoding.h M tests/types/TypesTest.cpp 4 files changed, 55 insertions(+), 31 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/src/bts.cpp b/src/bts.cpp index 640405f..8be87be 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -1022,7 +1022,7 @@ trx->trx_no, trx->arfcn & ~ARFCN_FLAG_MASK, pdch->ts_no, ta, pdch->tsc, tbf ? tbf->tfi() : -1, usf); plen = Encoding::write_immediate_assignment(pdch, tbf, bv, - false, rip->ra, Fn, ta, usf, false, sb_fn, + false, rip->ra, rip->rfn, ta, usf, false, fn2rfn(sb_fn), bts_get_ms_pwr_alpha(bts), bts->pcu->vty.gamma, -1, rip->burst_type); bts_do_rate_ctr_inc(bts, CTR_IMMEDIATE_ASSIGN_UL_TBF); @@ -1038,7 +1038,7 @@ send_imm_ass_rej: LOGP(DRLCMAC, LOGL_DEBUG, "Tx Immediate Assignment Reject on AGCH\n"); plen = Encoding::write_immediate_assignment_reject( - bv, rip->ra, Fn, rip->burst_type, + bv, rip->ra, rip->rfn, rip->burst_type, (uint8_t)osmo_tdef_get(bts->T_defs_bts, 3142, OSMO_TDEF_S, -1)); bts_do_rate_ctr_inc(bts, CTR_IMMEDIATE_ASSIGN_REJ); if (plen >= 0) @@ -1118,7 +1118,7 @@ tbf->trx->trx_no, tbf->trx->arfcn, pdch->ts_no, tbf->ta()); plen = Encoding::write_immediate_assignment(pdch, tbf, immediate_assignment, true, 125, - GSM_TDMA_FN_SUM(pdch->last_rts_fn, 21216), + fn2rfn(GSM_TDMA_FN_SUM(pdch->last_rts_fn, 21216)), tbf->ta(), 7, false, 0, bts_get_ms_pwr_alpha(bts), bts->pcu->vty.gamma, -1, GSM_L1_BURST_TYPE_ACCESS_0); diff --git a/src/encoding.cpp b/src/encoding.cpp index 6b626cc..5695666 100644 --- a/src/encoding.cpp +++ b/src/encoding.cpp @@ -63,22 +63,22 @@ } /* TBF_STARTING_TIME -- same as 3GPP TS 44.018 ยง10.5.2.38 Starting Time without tag: */ -static int write_tbf_start_time(bitvec *dest, uint32_t fn) +static int write_tbf_start_time(bitvec *dest, uint16_t rfn) { int rc; /* Set values according to 3GPP TS 44.018 Table 10.5.2.38.1 */ /* T1' */ - rc = bitvec_set_u64(dest, (fn / (26 * 51)) % 32, 5, false); + rc = bitvec_set_u64(dest, (rfn / (26 * 51)) % 32, 5, false); CHECK(rc); /* T3 */ - rc = bitvec_set_u64(dest, fn % 51, 6, false); + rc = bitvec_set_u64(dest, rfn % 51, 6, false); CHECK(rc); /* T2 */ - rc = bitvec_set_u64(dest, fn % 26, 5, false); + rc = bitvec_set_u64(dest, rfn % 26, 5, false); CHECK(rc); return rc; @@ -180,7 +180,7 @@ } static int write_ia_rest_downlink(const gprs_rlcmac_dl_tbf *tbf, bitvec * dest, bool polling, bool ta_valid, - uint32_t fn, uint8_t alpha, uint8_t gamma, int8_t ta_idx) + uint16_t rfn, uint8_t alpha, uint8_t gamma, int8_t ta_idx) { int rc = 0; @@ -213,7 +213,7 @@ if (polling) { SET_1(dest); - rc = write_tbf_start_time(dest, fn); + rc = write_tbf_start_time(dest, rfn); CHECK(rc); } else SET_0(dest); @@ -235,7 +235,7 @@ } /* 3GPP TS 44.018 Table 10.5.2.16.1 < Packet Uplink Assignment > -- Single Block Allocation */ -static int write_ia_rest_uplink_sba(bitvec *dest, uint32_t fn, uint8_t alpha, uint8_t gamma) +static int write_ia_rest_uplink_sba(bitvec *dest, uint32_t rfn, uint8_t alpha, uint8_t gamma) { int rc = 0; @@ -248,7 +248,7 @@ SET_0(dest); SET_1(dest); - rc = write_tbf_start_time(dest, fn); + rc = write_tbf_start_time(dest, rfn); CHECK(rc); /* No P0 nor PR_MODE */ @@ -292,7 +292,7 @@ return rc; } -static int write_ia_rest_egprs_uplink_mba(bitvec * dest, uint32_t fn, uint8_t alpha, uint8_t gamma) +static int write_ia_rest_egprs_uplink_mba(bitvec * dest, uint32_t rfn, uint8_t alpha, uint8_t gamma) { int rc = 0; @@ -301,7 +301,7 @@ rc = write_alpha_gamma(dest, alpha, gamma); CHECK(rc); - rc = write_tbf_start_time(dest, fn); + rc = write_tbf_start_time(dest, rfn); CHECK(rc); SET_0(dest); /* NUMBER OF RADIO BLOCKS ALLOCATED: */ @@ -358,7 +358,7 @@ * see GSM 44.018, 9.1.20 + 10.5.2.30 */ int Encoding::write_immediate_assignment_reject(bitvec *dest, uint16_t ra, - uint32_t ref_fn, enum ph_burst_type burst_type, uint8_t t3142) + uint16_t ref_rfn, enum ph_burst_type burst_type, uint8_t t3142) { unsigned wp = 0; int plen; @@ -394,9 +394,9 @@ } bitvec_write_field(dest, &wp, - (ref_fn / (26 * 51)) % 32, 5); // T1' - bitvec_write_field(dest, &wp, ref_fn % 51, 6); // T3 - bitvec_write_field(dest, &wp, ref_fn % 26, 5); // T2 + (ref_rfn / (26 * 51)) % 32, 5); // T1' + bitvec_write_field(dest, &wp, ref_rfn % 51, 6); // T3 + bitvec_write_field(dest, &wp, ref_rfn % 26, 5); // T2 /* 10.5.2.43 Wait Indication */ bitvec_write_field(dest, &wp, t3142, 8); @@ -437,8 +437,8 @@ const struct gprs_rlcmac_pdch *pdch, const struct gprs_rlcmac_tbf *tbf, bitvec * dest, bool downlink, uint16_t ra, - uint32_t ref_fn, uint8_t ta, - uint8_t usf, bool polling, uint32_t fn, uint8_t alpha, + uint16_t ref_rfn, uint8_t ta, + uint8_t usf, bool polling, uint16_t rfn, uint8_t alpha, uint8_t gamma, int8_t ta_idx, enum ph_burst_type burst_type) { unsigned wp = 0; @@ -480,9 +480,9 @@ bitvec_write_field(dest, &wp, ra, 8); /* RACH value */ } - bitvec_write_field(dest, &wp, (ref_fn / (26 * 51)) % 32, 5); // T1' - bitvec_write_field(dest, &wp, ref_fn % 51, 6); // T3 - bitvec_write_field(dest, &wp, ref_fn % 26, 5); // T2 + bitvec_write_field(dest, &wp, (ref_rfn / (26 * 51)) % 32, 5); // T1' + bitvec_write_field(dest, &wp, ref_rfn % 51, 6); // T3 + bitvec_write_field(dest, &wp, ref_rfn % 26, 5); // T2 // 10.5.2.40 Timing Advance bitvec_write_field(dest, &wp, 0x0, 2); // spare @@ -508,7 +508,7 @@ if (downlink) { OSMO_ASSERT(tbf_as_dl_tbf_const(tbf) != NULL); - rc = write_ia_rest_downlink(tbf_as_dl_tbf_const(tbf), dest, polling, gsm48_ta_is_valid(ta), fn, alpha, gamma, + rc = write_ia_rest_downlink(tbf_as_dl_tbf_const(tbf), dest, polling, gsm48_ta_is_valid(ta), rfn, alpha, gamma, ta_idx); } else if (((burst_type == GSM_L1_BURST_TYPE_ACCESS_1) || (burst_type == GSM_L1_BURST_TYPE_ACCESS_2))) { SET_L(dest); SET_H(dest); // "LH" @@ -521,7 +521,7 @@ if (tbf_as_ul_tbf_const(tbf) != NULL) rc = write_ia_rest_egprs_uplink_sba(tbf_as_ul_tbf_const(tbf), dest, usf, alpha, gamma, ta_idx); else - rc = write_ia_rest_egprs_uplink_mba(dest, fn, alpha, gamma); + rc = write_ia_rest_egprs_uplink_mba(dest, rfn, alpha, gamma); } else { OSMO_ASSERT(!tbf || !tbf->is_egprs_enabled()); @@ -531,7 +531,7 @@ if (tbf_as_ul_tbf_const(tbf) != NULL) rc = write_ia_rest_uplink_mba(tbf_as_ul_tbf_const(tbf), dest, usf, alpha, gamma, ta_idx); else - rc = write_ia_rest_uplink_sba(dest, fn, alpha, gamma); + rc = write_ia_rest_uplink_sba(dest, rfn, alpha, gamma); } if (rc < 0) { diff --git a/src/encoding.h b/src/encoding.h index ae4d57f..89f6964 100644 --- a/src/encoding.h +++ b/src/encoding.h @@ -46,15 +46,15 @@ const struct gprs_rlcmac_pdch *pdch, const struct gprs_rlcmac_tbf *tbf, bitvec * dest, bool downlink, uint16_t ra, - uint32_t ref_fn, uint8_t ta, + uint16_t ref_rfn, uint8_t ta, uint8_t usf, bool polling, - uint32_t fn, uint8_t alpha, uint8_t gamma, + uint16_t rfn, uint8_t alpha, uint8_t gamma, int8_t ta_idx, enum ph_burst_type burst_type); static int write_immediate_assignment_reject( bitvec *dest, uint16_t ra, - uint32_t ref_fn, + uint16_t ref_rfn, enum ph_burst_type burst_type, uint8_t t3142 ); diff --git a/tests/types/TypesTest.cpp b/tests/types/TypesTest.cpp index 871e0d1..c6a2fbf 100644 --- a/tests/types/TypesTest.cpp +++ b/tests/types/TypesTest.cpp @@ -753,7 +753,7 @@ struct msgb *m = msgb_alloc(80, "test"); bool poll = true; uint16_t ra = 13; - uint32_t ref_fn = 24, fn = 11; + uint32_t ref_rfn = 24, rfn = 11; int8_t ta_idx = 0; /* HACK: tbf can be NULL, so we cannot use tbf->trx here */ @@ -766,8 +766,8 @@ bitvec_unhex(immediate_assignment, DUMMY_VEC); plen = Encoding::write_immediate_assignment(&trx.pdch[5], tbf, immediate_assignment, - dl, ra, ref_fn, ta, usf, - poll, fn, alpha, gamma, ta_idx, bt); + dl, ra, ref_rfn, ta, usf, + poll, rfn, alpha, gamma, ta_idx, bt); printf("[%u] %s Immediate Assignment <%s>:\n\t%s\n", plen, dl ? "DL" : "UL", kind, osmo_hexdump(immediate_assignment->data, sz)); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/33123 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: If9b758434c00f2a3868534d5be84946809c989a9 Gerrit-Change-Number: 33123 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-pcu[master]: Derive FN from RFN once and cache it in struct rach_ind_params
by pespin 02 Jun '23

02 Jun '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/33121 ) ( 2 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: Derive FN from RFN once and cache it in struct rach_ind_params ...................................................................... Derive FN from RFN once and cache it in struct rach_ind_params Change-Id: Iaefb9650dfc5083360a4a24b9c17fdbf3115e51f --- M src/bts.cpp M src/bts.h M src/pcu_l1_if.cpp M tests/tbf/TbfTest.cpp 4 files changed, 15 insertions(+), 4 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/bts.cpp b/src/bts.cpp index 8be87be..5160fd5 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -531,7 +531,7 @@ } bts_send_gsmtap_meas(bts, categ, true, rip->trx_nr, rip->ts_nr, channel, - bts_rfn_to_fn(bts, rip->rfn), ra_buf, + rip->fn, ra_buf, rip->is_11bit ? 2 : 1, &meas); } @@ -943,15 +943,13 @@ if (rip->is_11bit) bts_do_rate_ctr_inc(bts, CTR_RACH_REQUESTS_11BIT); - /* Determine full frame number */ - uint32_t Fn = bts_rfn_to_fn(bts, rip->rfn); uint8_t ta = qta2ta(rip->qta); bts_send_gsmtap_rach(bts, PCU_GSMTAP_C_UL_RACH, GSMTAP_CHANNEL_RACH, rip); LOGP(DRLCMAC, LOGL_DEBUG, "MS requests Uplink resource on CCCH/RACH: " "ra=0x%02x (%d bit) Fn=%u qta=%d\n", rip->ra, - rip->is_11bit ? 11 : 8, Fn, rip->qta); + rip->is_11bit ? 11 : 8, rip->fn, rip->qta); /* Parse [EGPRS Packet] Channel Request from RACH.ind */ rc = parse_rach_ind(rip, &chan_req); diff --git a/src/bts.h b/src/bts.h index 7a67f76..9a18cf3 100644 --- a/src/bts.h +++ b/src/bts.h @@ -197,6 +197,7 @@ uint8_t trx_nr; uint8_t ts_nr; uint16_t rfn; + uint32_t fn; int16_t qta; }; diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp index cda7af7..e675d86 100644 --- a/src/pcu_l1_if.cpp +++ b/src/pcu_l1_if.cpp @@ -631,6 +631,7 @@ .trx_nr = trx_nr, .ts_nr = ts_nr, .rfn = fn2rfn(fn), + .fn = fn, .qta = qta, }; @@ -670,6 +671,7 @@ .trx_nr = rach_ind->trx_nr, .ts_nr = rach_ind->ts_nr, .rfn = rfn, + .fn = bts_rfn_to_fn(bts, rfn), .qta = rach_ind->qta, }; diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index ae8b56f..bb36f9e 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -81,6 +81,7 @@ .trx_nr = 0, .ts_nr = 0, .rfn = fn2rfn(Fn), + .fn = Fn, .qta = qta, }; -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/33121 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Iaefb9650dfc5083360a4a24b9c17fdbf3115e51f Gerrit-Change-Number: 33121 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-pcu[master]: Error trying to obtain FN from RFN if curr_fn not known
by pespin 02 Jun '23

02 Jun '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/33120 ) Change subject: Error trying to obtain FN from RFN if curr_fn not known ...................................................................... Error trying to obtain FN from RFN if curr_fn not known This may happen if a RACH.ind is received before any DATA.ind has been received. With usual osmo-bts-trx or osmo-bts-sysmo, this shouldn't happen nowadays, but it is still a problem with osmo-bts-virtual, where lower layers don't submit NOPE.ind in the absence of data, and hence it won't sent DATA.ind to osmo-pcu all the time. This change helps in showcasing confusing scenarios where the RFN generated in the Imm Ass was wrong. Change-Id: I29b7ba828fe890f90e35686bbb04d4abfe56b955 --- M src/bts.cpp 1 file changed, 30 insertions(+), 4 deletions(-) Approvals: fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/src/bts.cpp b/src/bts.cpp index 8d6f156..6cac93f 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -740,20 +740,27 @@ /* Determine the full frame number from a relative frame number */ uint32_t bts_rfn_to_fn(const struct gprs_rlcmac_bts *bts, uint32_t rfn) { - uint32_t m_cur_rfn; + uint32_t m_cur_fn, m_cur_rfn; uint32_t fn_rounded; /* Ensure that all following calculations are performed with the * relative frame number */ OSMO_ASSERT(rfn < RFN_MODULUS); + m_cur_fn = bts_current_frame_number(bts); + if (m_cur_fn == FN_UNSET) { + LOGP(DRLCMAC, LOGL_ERROR, "Unable to calculate full FN from RFN %u: Current FN not known!\n", + rfn); + return rfn; + } + /* Compute an internal relative frame number from the full internal frame number */ - m_cur_rfn = fn2rfn(bts->cur_fn); + m_cur_rfn = fn2rfn(m_cur_fn); /* Compute a "rounded" version of the internal frame number, which * exactly fits in the RFN_MODULUS raster */ - fn_rounded = GSM_TDMA_FN_SUB(bts->cur_fn, m_cur_rfn); + fn_rounded = GSM_TDMA_FN_SUB(m_cur_fn, m_cur_rfn); /* If the delta between the internal and the external relative frame * number exceeds a certain limit, we need to assume that the incoming @@ -762,7 +769,7 @@ if (GSM_TDMA_FN_DIFF(rfn, m_cur_rfn) > RFN_THRESHOLD) { LOGP(DRLCMAC, LOGL_DEBUG, "Race condition between rfn (%u) and m_cur_fn (%u) detected: rfn belongs to the previous modulus %u cycle, wrapping...\n", - rfn, bts->cur_fn, RFN_MODULUS); + rfn, m_cur_fn, RFN_MODULUS); if (fn_rounded < RFN_MODULUS) { LOGP(DRLCMAC, LOGL_DEBUG, "Cornercase detected: wrapping crosses %u border\n", -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/33120 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I29b7ba828fe890f90e35686bbb04d4abfe56b955 Gerrit-Change-Number: 33120 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-pcu[master]: bts: use RFN directly to calculate fn416
by pespin 02 Jun '23

02 Jun '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/33122 ) Change subject: bts: use RFN directly to calculate fn416 ...................................................................... bts: use RFN directly to calculate fn416 RFN_MODULUS (42432) used to calculate is a multiple of 416: 416 * 102 = 42432 Hence, (X % 42432) % 416 == X % 416. So, there's no need to derive the full FN. Change-Id: If7a6a15c373a068bcc757d27937dd6eeac2e0bae --- M src/bts.cpp 1 file changed, 16 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved laforge: Looks good to me, approved diff --git a/src/bts.cpp b/src/bts.cpp index 6cac93f..640405f 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -1058,7 +1058,7 @@ int bts_rcv_ptcch_rach(struct gprs_rlcmac_bts *bts, const struct rach_ind_params *rip) { - uint32_t fn416 = bts_rfn_to_fn(bts, rip->rfn) % 416; + uint16_t fn416 = rip->rfn % 416; struct gprs_rlcmac_pdch *pdch; uint8_t ss; -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/33122 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: If7a6a15c373a068bcc757d27937dd6eeac2e0bae Gerrit-Change-Number: 33122 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
  • ← Newer
  • 1
  • ...
  • 225
  • 226
  • 227
  • 228
  • 229
  • 230
  • 231
  • ...
  • 248
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.