spec reference: 3GPP TS 48.018 "5.2.15 NM-LLC-DISCARDED.req", "5.3.13 NM-LLC-DISCARDED.ind", "10.4.3 LLC-DISCARDED"
3GPP TS 48.018 8.2.2:
BSSGP UNITDATA PDUs queued within the BSS that are not transferred across the radio interface before the PDU Lifetime expires shall be locally deleted from the BSS. The local deletion of BSSGP UNITDATA PDUs in the BSS shall be signalled to the SGSN by the transmission of a LLC-DISCARDED PDU.
For each FLOW-CONTROL PDU received by an SGSN, a confirmation shall always be sent across the Gb interface by the SGSN.
osmo-pcu.git documentation:
doc/manuals/gb/bssgp.adoc
63:| 10.4.3 | 0x2c | LLC-DISCARDED
355:(LLC-DISCARDED) is not implemented by OsmoPCU - see for <<not_impl>>
So to me it looks like we we don't send LLC-DISCARDED whenever the MS/TBF is freed. Actually, we probably don't see it neither when we drop messages due to PDU lifetime expiration.
We seem to be supporting some sort of pdu expiration already internally:
src/tbf_dl.cpp
215: struct timespec expire_time;
223: gprs_llc_queue::calc_pdu_lifetime(bts, pdu_delay_csec, &expire_time);
Some if those are even being tested in tests/llc/LlcTest.cpp.
So it's probably a matter of start by adding/extending unit tests like LlcTest.cpp to make sure the related BSSGP message is sent to the SGSN.
Also it can probably be done in TTCN3 by submitting some DL data and then avoid sending sany RTS through PCUIF (hence data is never requested and eventually expires). Then we should check if we receive the message on BSGGP port.
By the way, under some circumstances it could be that we need to send a SUSPEND instead (7.4 "SUSPEND procedure"), but we already do it (#4761).
I'm fine with osmith taking care of it, feel free to assign as you want.