This simplifies the array handling in the LLC queue, and moves param
checking to the rx rlcmac_prim path instead of deep in the llc_queue
enqueuing code.
This commit also fixes the RADIO_PRIORITY field in the Channel Request
Description section of PKT DL ACK/NCK, since
gprs_rlcmac_llc_queue_highest_radio_prio_pending() now returns the enum
normalized 0..3 as expected by the field format (before it was returning
1..4).
Change-Id: If2d1946522bc4a1c19d65acb23605f1a3f05ab45
Ported from open5gs.git/lib/gtp/v1/types.{c,h} 5764f7267d16a8ea6aeedc6c227552575915def5,
for which I was the author too.
The ARP extra byte field at the start of the IE val which is introduced in the
GTP variant is dropped when porting to SM, since it's not present there
(and offsets/sizes are adjusted).
The QoS code is moved is moved into a common/ directory where a new
libosmo-gprs-common.la private static library is created.
This is done in order to be able to resuse the QoS dec/enc code in
several libraries since it's actually planned to use it in SNDCP and SM
layers.
The most natural place to add the APIs is SM, and that's where the
public API to accees the enc/dec is provided, since the user app will
have to use them in the SM SAP.
However, the SNDCP will also have to decode the QoS recived by SM
through the SNSM SAP, and we don't really want libosmo-gprs-sndcp depend
on libosmo-gprs-sm. This way libosmo-gprs-sndcp will be able to use the
private APIs directly in a follow-up commit.
Change-Id: I6c0676e55bb1f0f424f41d8d04d4f5e5bf376f4f
LLC is only expected to signal new values if SNDCP XID params are
received, or if the default N201 values change.
Change-Id: I68f54d329b326895ed8f010cf50f20fa30948d30
Getting out of contention resolution means we may have to update our
calculated CV state because we are no longer sending TLLI.
Same happens if a new tx CS is provided by the network, since different
block size means different CV.
In this commit only code paths for the state where already in Countdown
Procedure are added. If TBF has to enter Countdown Procedure due the
above mentioned changes, it will do so using regular path where a new
RLC block is created.
Related specs: TS 44.060 9.3.1
Related: OS#6018
Change-Id: I6ca88c005060ba1302d46717e45b0d9731d86d8d
Recalculating CV when in Countdown Procedure will be implemented in a
follow-up commit.
Related: OS#6108
Change-Id: I1e7b28c2e5f1d77a962ec3070f3a027b8f66a69e
Discarding a packet through CoDel during Countdown procedure may end up
in the transmitted CV=14..0 being incorrect, since we are not really yet
recalculating them once we enter Countdown procedure.
Hence, to make it simpler for now, avoid dropping packets when in
Countdown procedure to avoid having to recalculate them.
Change-Id: I311302b5282767dc806b1dfe053994f175390b69
This clarifies the logic behind selecting the proper queue, and it will
be used further in the future, for instance when recalculating CV once
already in Countdown procedure.
Change-Id: Icceaf53048e9662176385b2976e2bc8e3387df71
This allows gathering more information on the state of the queue and
helps in understanding possible bugs on the CV calculation algo.
Related: OS#6108
Change-Id: I97f4977944a6f82abc7b39c4e578de9d8e152740
Problem this patch is fixing:
The current RLCMAC window code ported from osmo-pcu is never
invalidating the BSNs which have been received after they are not
needed.
As a result, when the DL TBF keeps sending data for a long time, and
finally BSN wraps around 127->0, when this implementation receives the
BSN=0, it will find it is already received and hence will discard it,
and then keep asking for BSN=0 nevertheless in PKT DL ACK, causing an
endless loop where PCU stays submitting the same block forever.
Explanation of the solution:
The V(N) array contains the status of the previous WS (64 in GPRS) data
blocks. This array is used to construct the RRB signaled to the peer
during PKT DL ACK/NACK messages together with the SSN (start sequence
number), which in our case is mainly V(R), aka one block higher than the
highest received block in the rx window.
Hence, whenever PKT DL ACK/NACK is transmitted, it contains an RRB
ranging [V(R)-1,...V(R)-WS)] mod SNS (SNS=128 in GPRS).
The receive window is basically [V(Q) <= BSN < V(R)] mod SNS, as is of
size 64.
The V(R) is increased whenever a highest new block arrives which is in the
receive window (guaranteeing it will be increased to at most V(Q)+64.
Since we are only announcing state of blocks from V(R)..V(R)-WS, and
blocks received which are before that BSN are dropped since don't fall
inside the rx window, we can securely mark as invalid those blocks
falling behind V(R)-WS whenever we increase V(R).
Related: OS#6102
Change-Id: I962111995e741a7e9c230b2dd4904c2fa9a828e9
We want to do mod sns on the BSN, not on the boolean returned by
gprs_rlcmac_rlc_v_n_is_received().
This is a typo which occurred while porting the code from osmo-pcu.git
void gprs_rlc_ul_window::update_rbb(char *rbb), where the following line
is used:
"""
if (m_v_n.is_received((ssn()-1-i) & mod_sns()))
"""
Change-Id: I37c8fd5c2528f035f077c3e05105f913922ffd84
Caught by ASan during test run. This can happen if
gprs_rlcmac_ul_tbf_schedule_next_llc_frame() finds no more llc frames to
submit during the loop iteration.
Change-Id: I5bd6dd6c6b7dc4b911af7bc119cf85eb810959a0
TS 24.007, TS 24.008, TS 44.064 nor TS 44.065 explain how the TLLI
update happening during GMM RAU propagates to the SNDCP layer.
GMM only has interfaces towards LLC and GRR, and uses LLGMM-Assign.Req
and GMMRR-Assign.req to update the TLLI in the respective layers.
This patch adds a new primitive in the LL interface (LLC->SNDCP)
LL-Assign.ind to propagate the LLGM-Assign.req received from
GMM towards SNDCP, so that it can use the new TLLI in order to address
the specific MS.
Change-Id: Icb858f5397414b6d4183c21f13d35c0166ca7635
TS 24.007 and TS 24.008 seem to lack providing an explicit way to pass
information between GMM and SM (GMMSM interface) when a RAU process
happens in GMM (rx RAU Accept).
This lack of primitive can easily be spotted by looking at TS 24.007
Appending C.15, or even better, at the 3rd page of "C.16(cont’d)" around
the "STOP Trams" timer, where the info is magically available in SM when
being received at GMM.
Change-Id: I81e207d44d88f18f0ee13fb413827606a6f830bc
The TLLI was wrong (I tooked the one from the Attach Accept msg instead
of RAU accept message defined above).
Change-Id: I2f7d61c72febad24fde285578e20485a23b8e175
This can be used for users receiving the GMMRR_ASSIGN_REQ primitive to
find out if it's a creation, update or deletion of a TLLI.
Change-Id: I881b1370b283ceee98c035ed42b91f7e12611979
This is used by lower layer L1CTL to notify the upper layer RLCMAC when
it's prepared to use CCCH.
Change-Id: I4cfb1e2db217a97b7a1dc8849cd13d58e4034c56
This even is triggered by the GSM itself due to internal timeouts as a
consequence of lower layers not resolving the request (with accept or
reject events).
Change-Id: Ic1072629595e75c411b421e71f6ffac5dd41da3b
TS 44.018 3.5.2.1.4:
"The one phase packet access procedure is completed at a successful
contention resolution. The mobile station has entered the packet transfer
mode. Timer T3141 is stopped on the network side. Timer T3164 is stopped
on the mobile station side."
Change-Id: Ic7420a42e2e81effdde587d7e49acd66b404354c
This will be needed in follow-up patches for the MS to trigger actions
when TBFs are freed (like going back to IDLE mode, or start
packet-access-procedure).
Change-Id: I72959e27f2f62c84218d740cfb9e396d70562929
* Send the PDCH_ESTABLISH.req on receipt of RR IMM ASS,
* Sending of PDCH_RELEASE.req is to be implemented.
Change-Id: I2568c58646ce7511367275ac96cd55e7fdd7ec18
Related: OS#5500
In the test more PDUs are submited in LLC in order to avoid trigger
max_retrans=4 for last block, which would trigger beforehand in that
case.
Change-Id: Ia83173afdbb25df18c7cead7857fe1b39a1ce82f