Commit Graph

12 Commits

Author SHA1 Message Date
Pau Espin 4da257390f rlcmac: ul_tbf: Submit event FIST_UL_DATA_SENT before LAST_UL_DATA_SENT
If there's only 1 block to be sent, the LAST_UL_DATA_SENT was being sent
before the FIRST_UL_DATA_SENT one, which created problems in the FSM
(when adding more logic later).

Furthermroe, this change also makes it send retransmission events, which
makes it similar for both FIRST and LAST events. This will also be
needed for T3182.

Change-Id: I701dbe00ff2af62c45d862a9211b5b1120f3efa3
2023-02-21 17:27:46 +01:00
Pau Espin 5daf94b203 rlcmac: ul_tbf: Answer Pkt Ul Ack/Nack poll with Pkt Ctrl Ack
Related: OS#5500
Change-Id: I833d0f189c06d093ce9bd4c36c37024cf5cb6446
2023-02-21 17:27:43 +01:00
Pau Espin bf1f5f3613 rlcmac: ul_tbf: Append TLLI when in contention resolution
Change-Id: I4023f21930e93c8cc10befc92f917139b656175a
2023-02-21 17:11:04 +01:00
Pau Espin a9da84ac9f rlcmac: Implement N3104
Related: OS#5500
Change-Id: Ia8c35aad7a537ab76447187847f8cee8c379352c
2023-02-21 17:11:00 +01:00
Pau Espin 7ff9597b43 rlcmac: tbf_ul: Allow sending UL data if in state FINISHED
This can happen for instance if MS sent al the data but PCU didn't
receive it all (some it was lost) so it can still keep asking the MS to
submit data. In this case, the MS shall attempt retransmit of some
unacked data.

Change-Id: I2333a0a432c0c6f223bc1043ddb0d9c34842a5a3
2023-02-20 13:28:55 +01:00
Pau Espin 175d251fb7 rlcmac: Implement T3166
Change-Id: I58dd757cbb5d8279fdf7fbdfb6f38ec0119c6156
2023-02-20 12:31:25 +01:00
Pau Espin 6a90da108a rlcmac: Implement T3164
Change-Id: I1a3d7b552b36b84d84ca27572ce313265810fd3d
2023-02-20 12:31:25 +01:00
Pau Espin b9e06c9955 rlcmac: tbf_*: Unlink the freeing tbf from its gre
Change-Id: I2079c4440a05f4b44c9b7bece383c69e84198302
2023-02-20 12:31:25 +01:00
Pau Espin b853424a28 rlcmac: tbf_ul: Fix wrong function called looking up msg size
Change-Id: I9d5afee36a633c311b5657181d0de7cbddd593e0
2023-02-20 12:31:25 +01:00
Pau Espin 8c2734fa43 rlcmac: Implement Rx of UL ACK/NACK
Related: OS#5500
Change-Id: I5e3d8e77042d3ad1618e6b62bc1a377a93239580
2023-02-20 12:31:25 +01:00
Pau Espin e8ad79e3a8 rlcmac: Initial ul_tbf data support
This is basically an import of relevant code from osmo-pcu.git
08523c2286dfe27402f8e2eb4b98da5a529c7915 which allows encoding LLC
frames into RLC/MAC uplink data blocks.

A 1-to-1 import was not possible for several reasons:
* osmo-pcu uses C++ in some places
* osmo-pcu implements encoding of DL data blocks, not UL data blocks
* Some osmo-pcu code is still not really polished and stuff is still
  mixed (for instance rlc_window(_ul).c/h were split into their own
  files here).
Hence this was not a "copy all files and leave as they are" import, but
rather looking at the encode path starting on osmo-pcu.git scheduler and
see which code had to be pulled in to encode the RLC/MAC blocks.

Due to the slightly different requerirements for UL and DL blocks, it is
well possible that further work in needed in order to have the code
produce correct blocks. This is only a first step to pull in all code so
that stuff can be fixed in smallish incremental steps.

Related: OS#5500
Change-Id: I0a01d79d16bbfc63aa88e6bb0f432f3772645730
2023-02-13 10:51:07 +01:00
Pau Espin 0984044e1c rlcmac: Initial implementation of UL TBF assignment and scheduler
This patch is another step towards a working RLC/MAC implementation. It adds:
* An initial data model with MS (gprs_rlcmac_entity) and ul_tbf.
* A UL_TBF state FSM from initial to FLOW status
* A UL_TBF assignemnt FSM, covering both 1phase and 2phase assignments.
* Triggering of UL_TBF allocation and assignment FSM when new LLC data
  is pushed from upper layers.
* A scheduler generating some ctrl messages (PktResReq and UlDummyCtrlBlk)
  when indicated by the network.

This patch is pushed as a WIP state since it already contains a
considerable amount of code and lots of new files, which can be
used/extended at a later point, making parallel contribution easier.

Related: OS#5500
Change-Id: I420c57a9d0b63f9c2805a7c2ae8ce85532a48eef
2023-02-13 10:43:29 +01:00