Commit Graph

7 Commits

Author SHA1 Message Date
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 e0a8488773 llc: remove unused reference to msgb address
This is probably a leftover from an old refactoring where the tv was
moved to MetaInfo (msg->cb[].

Change-Id: I7aceaf2d13a125c75925877c4344c0aeed326c79
2023-01-26 18:20:12 +01:00
Pau Espin 1111aa16e6 llc: Refactor code checking if PDU expired while dequeueing
The previous function name was misleading since it was checking already
for more stuff than pdu containing user data.
Rename the function and move all checks on PDU in there instead of
having it half in one place and half in the other.

Change-Id: Ia0738caa1ccab5f78c2d49db582bdce96f18600a
2023-01-26 15:10:29 +01:00
Pau Espin 0e435fa959 llc: Mark llc_is_user_data_frame() as static
It's only used once in the same file.

Change-Id: I8e38a946c87142a09e0b49ea3160df1d5772b587
2023-01-26 14:56:45 +01:00
Pau Espin 6b1e9515c9 llc_queue: Refactor to handle codel_state per prio queue internally
A CoDel state per prio queue is needed, otherwise the sojourn time state
is not properly reset when a high prio packet is dequeued.

If we have a global codel state shared for all prio queues of an MS, then
basically high prio (GMM) packets will "never" be dropped because they are
handled/dequeued way quicker, so it's sojourn time will be below the
threshold most probably, stopping the "dropping" state for the rest of
lower prio packets.

The handling of different codel states is moved from MS object to the
llc_queue, also offloading already loaded dl_tbf.cpp in the process.
This will also allow in the future setting different CoDel parameters
for different priority queues if needed.

Tests need to be adapted since now the CoDel and PDU lifetime are
incorporated into the llc_queue_dequeue(). Also because dequeue now also
accesses related MS fields.

Related: OS#5508
Change-Id: I2bce2e82ab6389d8a70130a5c26a966a316b0fa4
2022-04-05 11:16:17 +00:00
Pau Espin 5c598c76cd llc: schedule frames to MS based on SAPI priority
The CoDel state is still applied globally, which could cause higher prio
messages (GMM) to clear dropping state (since those are left for a
smaller period of time inside the queue).

CoDel state will be moved per prio-queue in a follow-up patch.

Related: OS#5508
Related: SYS#5908
Change-Id: Ie8bd91eeac4fa7487d4f11b808dea95737041c7e
2022-04-04 17:26:14 +02:00
Pau Espin 4f8384bfbb llc: Convert to C
There's no real reason (other than historical) why code in llc should be
kept as c++ code. Let's rewrite it as C so that it can be included by
existing C code without having to add C->C++ shim, ifdefs all around,
etc.
This simplifies code and easies modification/improvement of the related
objects.

Change-Id: I250680ba581167d7398b2f734769c756cbb61c48
2022-03-31 19:42:15 +02:00