Commit Graph

11 Commits

Author SHA1 Message Date
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 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 61c0f7f158 rlcmac: tests: Validate Tx of second RLC/MAC block containing GMM Attach
Change-Id: I9a5870d2972c70233c6e8859bc6d694ff180b690
2023-02-20 12:31:25 +01:00
Pau Espin 4113903f63 rlcmac: Implement Tx of DL ACK/NACK
Measurement related functionality is not yet implemented and hence the
related fields cannot be filled in yet.

Related: OS#5500
Change-Id: I6ae2df07929fb6c4733e87b18cebe75a6f24f520
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 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 eeac4ad43c rlcmac: Introduce lower primitive layer API
This primitive API allows the application to drive the RLCMAC layer
based on a lower L1CTL interface.

* RACH req are requested to the lower layers by the RLCMAC through the
  RACH.req primitive.
* Received ImmAss, SI are fed to the RLC/MAC layer through CCCH_DATA.ind
* The RLCMAC registers DL and UL TBFs in the lower part (firwmare,
  L1CTL):
** The lower part will trigger PDCH_RTS.ind in every TS in the
  "(dl_slotmask|ul_slotmask)" superset, with the received USF. This
  allows UL uplink to transmit blocks when requested by USF, or UL/DL TBF
  to answer polls from PCU at a specific N+X FN (RRBP). This also allows
  the RLCMAC layer to update its GSM clock and trigger internall
  timeouts.
** The lower part will trigger PDCH_DATA.ind in every TS in the
  dl_slotmask if either a CTRL block is received or a data block
  matching the configured dl_tfi is received.
** Upon receival of PDCH_DATA.ind, the RLCMAC layer updates its FN clock
  and submits PDCH_DATA.req based on USF.

This commit only adds the primitive set and API to submit/receive them,
but doesn't really implement them yet internally.

Related: OS#5500
Change-Id: I3d97425ec75059ceae983de869419230e8c4df01
2023-02-13 10:37:30 +01:00