Commit Graph

2440 Commits

Author SHA1 Message Date
Philipp Maier c46b6f29f9 neigh_cache: make neigh_cache_lookup_entry static
The function neigh_cache_lookup_entry() is only used from within
neigh_cache.c. Let's make it static and move it, so that we do not need
the prototype declaration.

Change-Id: I1ea72ad9c79bfeaa06391cf8f62b284fbfea8efc
2023-07-03 12:49:03 +02:00
Pau Espin e4e53adc9c tbf_dl_fsm: Fix '{FLOW}: Event ASSIGN_PCUIF_CNF not permitted'
As seen during manual testing:
20230628140439674 DTBF tbf_dl.cpp:116 MS(IMSI-901700000015256:TLLI-0xd4d57c9d:TA-0:MSCLS-12-12) Allocating DL TBF
...
20230628140439674 DTBFDL tbf_dl.cpp:489 DL_TBF(DL:TFI-0-0-0:E:IMSI-901700000015256:TLLI-0xd4d57c9d){NEW}: Received Event ASSIGN_ADD_CCCH
20230628140439674 DTBFDL bts.cpp:1108 TBF(DL:TFI-0-0-0:E:IMSI-901700000015256:TLLI-0xd4d57c9d){ASSIGN} Tx CCCH (PCH) Immediate Assignment [PktDlAss=PDCH(bts=0,trx=0,ts=5)] TA=0
...
20230628140440238 DMS pdch.cpp:681 MS(IMSI-901700000015256:TLLI-0xd4d57c9d:TA-0:MSCLS-12-12:DL): + rcv_resource_request: now used by 2 (tbf,rcv_resource_request)
20230628140440238 DTBFDL pdch.cpp:738 TBF(DL:TFI-0-0-0:E:IMSI-901700000015256:TLLI-0xd4d57c9d){ASSIGN} Got PACKET RESOURCE REQ while DL-TBF pending, killing it
20230628140440238 DTBF tbf.cpp:271 TBF(DL:TFI-0-0-0:E:IMSI-901700000015256:TLLI-0xd4d57c9d){ASSIGN} free
...
20230628140440377 DTBFUL tbf_ul_fsm.c:169 UL_TBF(UL:TFI-0-0-0:E:IMSI-901700000015256:TLLI-0xd4d57c9d){ASSIGN}: state_chg to FLOW
20230628140440377 DTBF tbf_dl.cpp:116 MS(IMSI-901700000015256:TLLI-0xd4d57c9d:TA-0:MSCLS-12-12:UL) Allocating DL TBF
20230628140440377 DTBFDL tbf_dl.cpp:475 DL_TBF(DL:TFI-0-0-0:E:IMSI-901700000015256:TLLI-0xd4d57c9d){NEW}: Received Event ASSIGN_ADD_PACCH
20230628140440387 DTBF tbf_dl_ass_fsm.c:105 TBF(UL:TFI-0-0-0:E:IMSI-901700000015256:TLLI-0xd4d57c9d){FLOW} start Packet Downlink Assignment (PACCH) for TBF(DL:TFI-0-0-0:E:IMSI-901700000015256:TLLI-0xd4d57c9d){ASSIGN}
...
20230628140440816 DTBFDL bts.cpp:737 DL_TBF(DL:TFI-0-0-0:E:IMSI-901700000015256:TLLI-0xd4d57c9d){FLOW}: Received Event ASSIGN_PCUIF_CNF
20230628140440816 DTBFDL bts.cpp:737 DL_TBF(DL:TFI-0-0-0:E:IMSI-901700000015256:TLLI-0xd4d57c9d){FLOW}: Event ASSIGN_PCUIF_CNF not permitted

Change-Id: I042b0117552acae25c750e762f5cc254399da64f
2023-06-29 14:53:37 +02:00
Pau Espin 091fba7cd9 cosmetic: pdch.cpp: Drop wrong comment due to copy-paste error
Change-Id: I40f93473c86500f655a0a83c7816a065707e2ed9
2023-06-29 14:53:37 +02:00
Pau Espin 37c2f84d53 Reestore last LLC frames never completely acked when freeing DL TBF
Scenario: A DL TBF is assigned over PCH (CCCH) and we start transmitting
DL data blocks blindly after X2002, but at the same time the MS start
packet-access-procedure to request an UL TBF.
Right now osmo-pcu correctly detects the MS is available in PDCH and
re-assigns a DL TBF using PACCH, but the LLC frames it transmitted in
the old PCH-assigned DL TBF get lost when that older TBF is freed
(because the DL blocks were removed from the GprsMs llc_queue).

This issue is now more frequent since X2002 timer was added recently to
delay starting requesting USF for a UL TBF, hence the contention
resolution in general takes more time and hence the PACCH assignment of
the DL TBF takes more time too, so more DL data blocks are transmitted
to the DL TBF assigned over PCH during that time.

This patch improves the situation to at least recover the DL blocks
transmitted if the DL TBF is freed (due to MS merge trigger by scenario
mentioned above), where no DL ACK/NACK was ever received by the MS.

Ideal solution would be to have complete tracking of which LLC PDUs from
the llc_queues were completely ACKed at RLC/MAC level, but that really
requires a lot of work and major refactoring, which are left as a future
improvement.

Change-Id: I9be4035fb2cf2b3ee56e91dcc12cc8c24028b4aa
2023-06-29 14:53:09 +02:00
Pau Espin 11627ffaae tbf_dl_fsm: Ignore DL_ACKNACK_MISS events in WAIT_{RELEASE,REUSE_TFI} states
If in those states, we already left the FINISHED step which means we
already received a FinalACk previously, hence it means we are missing
requested retransmissions of the last DL ACK/NACK due to fn-advance
(several DL blocks in transit before receiving UL response).

Change-Id: Ib0f23a9cc3c614fe428b682e01502930cd2e478f
2023-06-29 14:46:40 +02:00
Pau Espin 747761f924 Avoid re-assigning DL TBF over PACCH upon duplicate FinalACKs received
Due to the fn-advance feature, we schedule DL blocks in advance, which
may make several retransmitted DL ACK/NACK [RRBP] be in flight, and
hence several of them may be answered by the MS.
When the first one is received, we attempt to initiate a PktDlAss over
PACCH if new DL data was received meanwhile from SGSN.
However, if we receive duplicates of that final PKT CTRL ACK, we don't
want to re-initiate it again, since it is already ongoing.

Related: OS#5471
Change-Id: Idc204aba61ad98f75853dcd46200f5dcc4139203
2023-06-29 14:42:33 +02:00
Pau Espin 6a12271b2e Avoid using UL TBF in RELEASE state to assign DL TBF over PACCH
In RELEASE state, the UL TBF is considered not available anymore, and we
are simply waiting in order to be able to reuse the allocated resources
(just in case it was still around). Hence, a UL TBF in that state should
not be selectable to initiate a DL TBF assignment over PACCH.

Related: OS#5472
Change-Id: Ia11f7802779cfeea15a71bddad9f7e0c6c1afb11
2023-06-29 14:42:33 +02:00
Pau Espin 5f3177eb41 tbf_ul_fsm: Delay moving ul_tbf to FLOW
Otherwise the scheduler selects the UL TBF for USF during that time, and
of course no one has that USF assigned yet, so no answer and that ends
up triggering MAX_N3101 on the UL TBF.

This is specially important when PCU is connected to the BSC, since the
amount of time for the ImmAss to be scheduled on the BTS and reach the
MS can be bigger.

Change-Id: I48babd70ca44f11110240cbcfbab43d0e3a0fb59
2023-06-29 14:42:33 +02:00
Pau Espin 061fbca2a9 tbf_ul: Avoid processing rx UL blocks for UL TBFs in RELEASING state
Change-Id: I1da9b665b9ed83a644ea798008d456d6298b7460
2023-06-29 14:42:27 +02:00
Pau Espin 28ccf7a284 ms_need_dl_tbf(): Fix state checks and document function
A new state TBF_ST_WAIT_REUSE_TFI was added lately in dl_tbf_fsm, which
allows differentiating the time where the MS is listening on PACCH
after having sent last DL ACK/NACK, and time where it should already be
in idle mode.
In the former, the ms_need_dl_tbf() should return false since the MS is
still ongoing in packet-active mode (and new data incoming from SGSN
will trigger new DL TBF assignment over PACCH as needed), while in the
later we want to start a new PCH assignment.

Fixes: 40a297f3b0
Change-Id: I96f311480d036859511c6ba825ccd36bdc71190b
2023-06-29 14:41:50 +02:00
Pau Espin 40a297f3b0 Differentiate between T3192 and T3193
T3192 on the MS side (boadcasted by the network on SI13) is used for the
MS to stay monitoring the PDCH of a DL TBF after sending PKT DL ACK/NACK
for the last DL data block (FinalAck=1).
T3193 is the counterpart in the network, defined as >T3192, which is
used to make sure the TFI is no longer used by the MS and hence can be
reused/re-assigned again.

Hence, we want to differentiate between those 2 timers, since the first
one gives us information on how late can we still tx PktDlAss on PACCH
on that DL TBF, while the later only provides info on when to free the
DL TBF in order to reuse the TFI.

Change-Id: I7421342461bf159d945651037e6fe690f88c6fae
2023-06-20 12:07:45 +02:00
Pau Espin 8c52bef6c6 pdch.cpp: Drop impossible code path
In that code path, new_tbf is an UPLINK_TBF. Uplink TBFs (tbf_ul_fsm.c)
don't use state TBF_ST_WAIT_RELEASE, hence that condition cannot ever be
true.

Change-Id: I379d4140326a46e94914152fe9b735de852ceda0
2023-06-20 09:27:10 +00:00
Pau Espin 556dc18109 cosmetic: tbf_fsm: Fix typo in comment
Change-Id: Iba0d438f9ce20a5a4e293b0b36565f182824a136
2023-06-20 09:27:10 +00:00
Pau Espin 95ec50c9e4 tbf_dl_fsm: Drop impossible event
When sending the last DL block, the FSM moves FLOW->FINISHED. Hence, it
is impossible to receive the FINAL_ACK in state flow, when we didn't yet
sent the last DL block (it's only possible if there's a bug in the MS).

TbfTest need to be adapted since they where acting wrong.

Change-Id: I3288743ff01ff84c3d345b6efb7c3fb6ca934791
2023-06-20 09:27:10 +00:00
Pau Espin ed94d4cbfa Store T3192 value received from SI13, do some sanity checks
Timer T3192 may be used in the future to know wheter a DL TBF assignment
can be sent on PACCH after the last DL TBF has finished (final ACK).

Change-Id: Ie5f6251ee773f56771f9a9507711a20e6282aac6
2023-06-20 09:27:10 +00:00
Pau Espin ac1495e7be bts: Use same default value for T3193 as set in osmo-bts/bsc
That timer is configured by value sent over PCUIF, hence better have it
to the same default value in osmo-bsc/osmo-bts.

Change-Id: I498f05ff4d232164690d177430e90eb99b4eea9d
2023-06-20 09:27:10 +00:00
Pau Espin e8ac8da62a 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 the Contention Resolution Success event.

Change-Id: I62ae91b494e4fd0ade3f4a3ba3817bcaedbdebf5
2023-06-20 07:17:52 +00:00
Philipp Maier dca3c906b0 pcu_l1_if: use correct SAPI in PCUIF message PCU_IF_MSG_DATA_CNF_DT
When we receive PCU_IF_MSG_DATA_CNF_DT, we check on PCU_IF_SAPI_PCH.
This is formally not correct, we should check on PCU_IF_SAPI_PCH_DT
instead.

(This patch will only affect osmo-bsc but not osmo-bts. The reason for
this is that osmo-bts still uses the older PCUIF v.10)

Depends: osmo-bsc.git Id5c799e625c56e57f7b51cd4fb57f5bea9c973d2
Change-Id: I0883b51fc232ec0267f1511c3a37c0bcd0967a08
2023-06-16 15:19:00 +02:00
Pau Espin 46db3c1db1 cosmetic: Improve comment
Change-Id: I8c963ba7421faf2b3dcab006ea629c4628d17b44
2023-06-13 17:25:01 +02:00
Pau Espin e5ba83d3f7 Change several log lines to start with capital letter
Change-Id: I98c59dd833b3d0ada5b1ffdba7a5fc2e8cbf6241
2023-06-13 17:20:38 +02:00
Pau Espin 93b16ae02b Move call to bts_snd_dl_ass() from tbf_dl.cpp to tbf_dl_fsm.c
It makes more sense to have it there, where it is transmitted with more
control depending on current state. Furthermore, it's
counterpart/continuation TBF_EV_ASSIGN_PCUIF_CNF logic is already there,
so it makes sense to have the whole logic together.

Change-Id: I8af39d3087ccf197321f0c71cb29b67adbe1f36e
2023-06-13 13:31:10 +02:00
Pau Espin 9c46591682 cosmetic: tbf_dl_fsm: Fix a couple comment typos
Change-Id: I1bcb199f3ba9564870b82ab67218ffbf72da4824
2023-06-13 13:31:10 +02:00
Pau Espin 83ff58d978 tests/tbf: Drop unneeded line re-setting CCCH ass type
Change-Id: I384753234651657c890faf1a4bdc1342e23e462b
2023-06-13 13:31:10 +02:00
Pau Espin 6d7167658e Move GPRS_RLCMAC_FLAG_DL_ACK from state_fsm to dl_tbf
That flag was still in state_fsm for historical reasons (refactoring
steps), but it's not really the best place for it, since it's really
specific to dl_tbf and to transmit of data and DL ACK/NACK not the
overall state of the TBF.

Change-Id: I12c28c1a52f363f2d17a8bc24bbdf379543fc7a6
2023-06-13 13:31:10 +02:00
Pau Espin bb34ffaaf7 Move GPRS_RLCMAC_FLAG_TO_DL_ACK from state_fsm to dl_tbf
That flag was still in state_fsm for historical reasons (refactoring
steps), but it's not really the best place for it, since it's really
specific to dl_tbf and to transmit of data and DL ACK/NACK not the
overall state of the TBF.

Change-Id: I6b44121bbe185b58f3a77be8c12b4ef1f3180a30
2023-06-13 13:30:45 +02:00
Pau Espin 40b8dd55f1 tbf_{ul,dl}_fsm.c: Rearrange code/logs in mod_ass_type()
First print what is going to be attempted, later alarm about the
possible error, finally early return.

Change-Id: I417e9689f60e7f5d3c8ef67543e56fea87c8eebd
2023-06-13 12:53:11 +02:00
Pau Espin d4075bd1b8 tbf_{ul,dl}_fsm: Abort on unexpected path
That path should not really happen. It happening would mean a totally wrong
code being used. Hence, just abort() to simplify the code.

Change-Id: Iaf65e909e45cc279e5be4b045c15174f910ffc12
2023-06-13 12:53:01 +02:00
Pau Espin c41fb6eb7c tbf_dl_fsm: Fix wrong lchan specified in log line
Change-Id: I30111989c85001b0d9b98bf6f19c2247ab144433
2023-06-12 18:11:41 +02:00
Pau Espin 84011ef86a Improve logging in bts_snd_dl_ass()
Change macro to LOGPTBFDL since it's assigning a DL TBF. Clarify and
join log lines.

Change-Id: Ic5e01289f97bc113ba0a376a535e0cce5bccc5d1
2023-06-12 18:05:42 +02:00
Pau Espin e656c210a1 Remove unused GPRS_RLCMAC_FLAG_TO_MASK
We are no longer making use of the 4 high bits in state_flags, so we can
safely drop masking them.

Change-Id: I1402310919578a09669530786296f34bf3b23ef2
2023-06-12 17:28:27 +02:00
Pau Espin 7a4428c3ad Abort UL TBF PACCH Ass based on T3168
It makes no sense to continue trying to assign the UL TBF over PACCH
after T3168 * 4 retrans time out.

This helps in releasing the TBF after we got rid of incorrect use of
N3015 in UL TBFs.

While at it, update tbf_ul_fsm to use T3168 instead of X2001, since it
really needs to match T3168. Ideally it would not even have a timer
itself and receive an event from tbf_ul_ass_fsm, but that's left as a
TODO (it was already before) and simply the timer is updated.

Change-Id: I87dff68dedd06b60501e7586d20faf02bb1f0c93
2023-06-12 16:24:10 +02:00
Pau Espin 906e7f4357 tbf_ul_fsm: Remove 3195 references, simplify T3169 set up as consequence
T3195 is triggered as consequence of N3105 reaching MAX, which only
occurs in DL TBFs. Hence, T3195 also only applies to DL TBFs.
The references to T3195 were there as a remains from time
where we had a single tbf_fsm for both UL and DL TBFs. It can now be
further simplified.

Change-Id: I07a43c13289d50707115187a3f22df21443a7b4a
2023-06-11 19:13:35 +00:00
Pau Espin d8ad8ffbe5 tbf_dl_fsm: Remove T3169 references, simplify T3195 set up as consequence
T3169 is triggered as consequence of N3101 and N3103 reaching MAX. Those
counters are related to UL TBF only, and hence T3169 also only applies
to UL TBFs. The references to T3169 were there as a remains from time
where we had a single tbf_fsm for both UL and DL TBFs. It can now be
further simplified.

Change-Id: I02f7654518da617ce6704d807d34761dbadecf07
2023-06-09 18:39:00 +02:00
Pau Espin 365728d579 Avoid using N3105 in UL TBFs
This counter is only used in DL TBFs as per TS 44.060.
section 13.4 "N3105":
"When the network after sending a RRBP field in the _downlink RLC data block_ ..."
(DL data blocks are only sent in DL TBFs).

section 8.1.2.1:
"If N3105 = N3105max, the network shall release the downlink TBF internally
and start timer T3195 for that TBF. When T3195 expires, the network may reuse
the TFI"

Change-Id: I4d4f4d4d3e6e0539ea8ec2395bed00d059b84e04
2023-06-09 18:38:28 +02:00
Pau Espin 89fbf87abf Avoid using N3103 in DL TBFs
N3103 counts retransmits of PACKET UPLINK ACK/NACK with FinalACK=1. As a
consequence, this counter only applies to UL TBFs.

Current code is only using it in UL TBF, but add an assert to clarify
and make sure it is not used unproperly in the future.

Change-Id: I026d6145249ef19694f673ec7b4928af9d401dd6
2023-06-09 18:38:28 +02:00
Pau Espin d8c38777a1 Avoid using N3101 in DL TBFs
TS 44.060 13.4 "N3101" clearly states this counter relates to UL TBFs,
since it only applies to TBFs for which USFs are set:
"When the network after setting USF for a given TBF, receives a valid data block of this TBF from
the mobile station in a block assigned for this USF, it will reset
counter N3101.  If PS Handover is not ongoing, the network will increment counter N3101 for each
USF for which no data is received for this TBF."

Furthermore, N3101 must only be reset for data blocks, so drop all rx
CTRL block patches on UL TBF resetting the counter.

Change-Id: I207f3906d13fc6feea2282e261f468a09db37d86
2023-06-09 18:38:28 +02:00
Pau Espin 74f6dd7a00 tbf_{ul,dl}_fsm: remove impossible dst state transitions
There's no code path triggering change to those states.

Change-Id: I05b3019e12ec37e11ac2561a94b2eacec8718755
2023-06-09 18:38:28 +02:00
Pau Espin 637bcdf80e tbf_{ul,dl}_fsm: Remove unneeded asserts
Those are leftovers from the time where we had a single tbf_fsm for both
UL and DL TBF.

Change-Id: I99359b8cb655b26ac2058f457423fdec178744ea
2023-06-09 18:38:11 +02:00
Pau Espin 49b144847f tbf_dl_fsm: Apply T3193 using FSM infrastructure instead of manually
Change-Id: Ic2a9d4b3c812c1533b2b7f97f27799b28b636c21
2023-06-09 16:44:35 +02:00
Pau Espin 08b6a00afd Log MS information in error message using usual MS API
Also, drop duplicated TRX+TS info which is already displayed as part of
LOGPDCH.

Change-Id: I66211f4fa8a139ddd109623d90a926a53f180cfd
2023-06-06 10:59:24 +00:00
Pau Espin 2549c1e696 Document pcu_lsb() function
While at it, fix a typo in the test output.

This function is nowadays only used in ms_current_pacch_slots(), which
is used only to print the PACCH TS (the first common UL & DL TS).

Change-Id: Id1d0b681f6866618f9f3a8c64d6a6c809ca50ea7
2023-06-03 12:46:26 +00:00
Pau Espin ba8918aae8 pcu_utils.h: Replace software based bitcount impl with gcc builtin
The cast for different types it's not really needed, simply use the
unsigned long long version to make sure we don't drop 1s, in any case
__builtin_popcountll() will be quicker than what we used to have.

Change-Id: I80ae72d34d53564fc3da1601ee48c8b2ffe79735
2023-06-03 12:46:26 +00:00
Pau Espin ab571af3f2 Use OSMO_UNLIKELY() in bts_rfn_to_fn()
That case should only happen under really rare conditions, like
receiving a RACH.ind before having received any DATA.ind.

Change-Id: I4c71f3481764b501a4441bc735a87725884a3e75
2023-06-02 14:37:05 +02:00
Pau Espin d0fd37c449 Move call to bts_set_current_frame_number() earlier in the code path
The FN time counter is not really PDCH specific, but to the whole BTS,
and all other calls t the bts_set_current_frame_number() are already
laced in pcu_l1_if.cpp; move it there.

Change-Id: If36f22a1067c904fa7fda87bed5062b6738f0dd1
2023-06-02 14:37:05 +02:00
Pau Espin 53eaf74ffa Use fn_valid() helper in pcu_rx_time_ind()
Change-Id: I5b1f1d4cd621d81fb99b87761a878af242227a10
2023-06-02 14:37:05 +02:00
Pau Espin fe8f4a4c87 Derive FN from RFN once and cache it in struct rach_ind_params
Change-Id: Iaefb9650dfc5083360a4a24b9c17fdbf3115e51f
2023-06-02 14:37:05 +02:00
Pau Espin bd461e62b5 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
2023-06-02 14:36:57 +02:00
Pau Espin 636d7fdb72 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
2023-05-31 20:51:26 +02:00
Pau Espin f09056de46 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
2023-05-31 20:49:56 +02:00
Pau Espin 33cb3d6175 Use always RFN when handling RACH indications
The previous code was really confusing, passing full FNs as RFNs under
certain external conditions, and then assuming the RFN input of
rfn_to_fn() function could actually be a FN.

As a result, we had a lot of code behaving slightly different depending
on whether the incomding FN from pcuif was filled in by a BSC or a BTS.
Avoid this b ehavior differentiation and always assume the most
restricted one, aka RFN.

Change-Id: Ib3b5702168195b595711cd0ff32c211b9aba429d
2023-05-31 20:49:56 +02:00