Commit Graph

19 Commits

Author SHA1 Message Date
Vadim Yanitskiy da3360390c rlcmac: ignore PACKET_DOWNLINK_DUMMY_CONTROL_BLOCK
It's expected to receive dummy DL blocks when listening to PDCH,
so do not spam the logging with errors:

  DRLCMAC ERROR rlcmac.c:392 TS=7 FN=3035694080
    Rx Pkt DL Dummy Ctrl Block NOT SUPPORTED! ignoring

Change-Id: I6a40e2795adc71b9312d39c96b01aba9a258da42
Related: OS#5500
2023-03-07 16:47:27 +01:00
Pau Espin fe52a342aa rlcmac: Fix several ptr bugs looking up ul tbf upon rx PktUlAss
Related: Coverity CID#310957
Change-Id: I0b031761dbbc93c1c06ba94967e91180062613fd
2023-03-07 15:22:56 +01:00
Pau Espin 9a212cc2b6 rlcmac: dl_tbf: Improve logic requesting a new UL TBF
Change-Id: I702872ba32a410bb5f09943af3cdadca482562db
2023-03-06 07:59:03 +00:00
Pau Espin 294b886be6 rlcmac: Implement T3182
Related: OS#550
Change-Id: I4fe9523af1b53c826ccfdd8700bab2a9e1413662
2023-02-21 19:44:43 +01:00
Pau Espin 46a4f3ed66 rlcmac: Implement T3168 (Pkt Res Req timeout 2phase access)
Change-Id: Ibf011ca94e50542b67353cd8f7f74c5be955af34
2023-02-21 17:27:46 +01:00
Pau Espin 96fe992644 rlcmac: Fix null ptr access in dl_tbf object
Fixes: Coverity CID#310022
Change-Id: I3817d9e77a440682fa2c538e0fbee295ffdbcfff
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 dfe49c5f44 rlcmac: Handle SI13 from L1CTL
Change-Id: Ifaddf0e6e5cad7ea25672804c83c254579874813
2023-02-20 12:31:25 +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 8c2734fa43 rlcmac: Implement Rx of UL ACK/NACK
Related: OS#5500
Change-Id: I5e3d8e77042d3ad1618e6b62bc1a377a93239580
2023-02-20 12:31:25 +01:00
Pau Espin cccba723b4 rlcmac: Introduce initial poll answer infrastructure
This commit imports pdch_ul_controller.{c,h} from osmo-pcu.git
d8cea3c618dbd2a343e6c012e5545006d44fc244 and adapts it to be of use on
the MS side.

Related: OS#5500
Change-Id: I9d38a8de4240e65585cc8bbe3c044473af5a83e5
2023-02-20 12:31:25 +01:00
Pau Espin f4f69fbde0 rlcmac: Implement initial DL rx data path
This code imports code from osmo-pcu.git
d8cea3c618dbd2a343e6c012e5545006d44fc244 (heavy modified to adapt to
current code base).

With this patch the RLCMAC layer is already capable of decoding RLC/MAC
GPRS data blocks and submit them as LLC frames to the upper layer.

Related: OS#5500
Change-Id: Ie7535606916c0800c0e1bd9555be022c81ea257d
2023-02-20 12:31:25 +01:00
Pau Espin b1ec9a1973 rlcmac: Introduce DL TBF creation through PCH ImmAss
This patch only introduces the gprs_rlcmac_dl_tbf subclass and
allocates/frees it based on PCH ImmAss, and adds initial paths for
received blocks. It also provides a unit test to showcase the scenario.

Change-Id: I7f98e3456ef35d80becdad3481afeb771457b0ef
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 60bd08e44d rlcmac: Make sure entities are freed if lib is re-initialized
This allows proper memory cleanup of the whole library everytime we want
to run a new unit test in the same proces.

Change-Id: I568e2f783a575ae457f0845eca34951ae9822eeb
2023-02-13 10:44:30 +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
Pau Espin 134840b003 rlcmac: Enqueue LLC PDUs based on RadioPriority and SAPI
llc_queue and codel code has been taken from osmo-pcu.git
6a5b1b1f3ef83f87a9df1d4511e22f59039e11ed and have been refactored to fit
in libosmo-gprs (removed llc_pdu structs, reworked struct types being
enqueued, etc.). Support for queues based on radio_prio has also been
added.

Related: OS#5500
Change-Id: Icdaa046fb6a71367f10beee16dcf9a5b7b61022e
2023-01-30 17:56:09 +01:00
Pau Espin 1b25684110 rlcmac: Introduce primitives for SAPs towards higher layers
The GRR primitives and types are kept 1-to-1 ABI compatible
to those at libosmo-gprs-llc so that they can be forwarded as pointers.
Still, we want to keep the types duplicated in order to avoid having to
depend one library on another, since the forwarding of one layer to the
other is done by the app and can use whatever it wishes on either side.

Related: OS#5500
Change-Id: I1870fa6a264612c5a669bfb832e6e8c0a892cb74
2023-01-25 23:37:09 +01:00