aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2024-05-08contrib: remove rpm spec fileHEADmasterOliver Smith3-232/+1
Related: https://osmocom.org/news/255 Related: OS#6446 Change-Id: Iff549b7695512c76514ed8915c4807c455e2bdcc
2024-03-23README.md: Improve formattingHarald Welte1-11/+10
Change-Id: Ide52989e241a1546e7ac2a46aa6c34e5e536e088
2024-03-23Add funding link to github mirrorHarald Welte1-0/+1
see https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/displaying-a-sponsor-button-in-your-repository Change-Id: I428cd9f4b1b15f5663756ca9e943c289f97ed8d9
2024-02-06tbf_ul: Clean and assert code path generating new UL data blockPau Espin Pedrol1-16/+19
Clarify the several paths when generating a new BSN (UL data block). The function create_new_bsn() is only called if there's some LLC frame ready to be transmitted and put in ul_tbf->llc_tx_msg, so the do while {} condition checking for no llc_tx_msg is guaranteed to only be run in the event some LLC frame chunks have been included in the UL RLC block. This fact allows simplifying the code and at the same time fix a Coverity CID regarding a code path which could not really happen. We now guard this case with an ASSERT. Related: Coverity CID#345063 Change-Id: I6d4ae377a60839f76295c0e7e6aaa1fe53e37315
2024-02-05rlcmac: refactor gprs_rlcmac_rlc_ul_window_move_window()Vadim Yanitskiy1-8/+6
* drop unused variable 'i' (fixes -Wunused-but-set-variable) * reduce nesting in the for-loop Change-Id: Ic0efd2f84a17d287b73261c102bca84e8274bb2a
2024-02-05rlcmac: Fix Last RLC block (CV=0) not encoding >1 LLC framesPau Espin Pedrol3-19/+15
Before this patch, the last RLC block (CV=0) would only be filled with up to 1 LLC frame, even if several LLC frames were enqueued and expected to be put in that RLC frame (CV calculation). Fixes the unit test provided in an earlier patch. Related: OS#6351 Change-Id: Id51f595f967b721a5ebe9d44b4e31b6ef9c1b4ae
2024-02-05tests: rlcmac: Reproduce bug encoding 2 llc frames in 1 rlc blockPau Espin Pedrol3-0/+148
Bug will be fixed in a follow-up patch. Related: OS#6351 Change-Id: I2f654bcefd6a2f192b9742873b8cb70a63bbfbd1
2024-02-05rlcmac: tbf_ul: Fix wrong parenthesis around macroPau Espin Pedrol1-3/+3
The logic doesn't seem to be affected by the fact that the parenthesis were wrong. Change-Id: I3f4aeff45c3fd5a007b050bd78283baaca2a18d7
2024-02-05rlcmac: Implement RLC_OCTET_COUNT in DL ACK/NACKPau Espin Pedrol4-2/+27
This helps debugging what's already in the MS tx queue when requesting a new UL TBF. Change-Id: Ie5f399fa0bffed8e39811075feba47a54054c8e5
2024-02-05Delay deleting UL TBF until last Pkt Ctrl Ack is fully transmittedPau Espin Pedrol7-18/+88
This in turn delays reconfiguring the lower layers (L1CTL-CFG_UL_TBF.req mask=0x0) until the last block has been transmited. Change-Id: Ic38b4207623ccbda3b77d4b0a47431c25de95034
2024-02-02rlcmac: add definition for OSMO_GPRS_RLCMAC_L1CTL_PDCH_DATA | CnfVadim Yanitskiy2-0/+22
Change-Id: I145b9586f83ae0235b4648916bd44996e8dc57f0
2024-02-02rlcmac: ul_tbf: Register UL ACK/NACK poll inside FSMPau Espin Pedrol6-27/+51
The poll is part of the FSM mechanism to get events to transit over the different states. Register it from within the FSM to have more fine grained control as well as have knowledge about the FN being reserved. This knowledge will be used ina follow up patch for the UL TBF to wait for the correct PKT CTRL ACK BLOCk.conf. Change-Id: Iaa8ad8052b9f3b52b05af2b7fc9cb8172f1b6bb7
2024-02-02rlcmac: Add new structure to allow passing FN+TN to TBF handling functionsPau Espin Pedrol4-49/+48
The different paths will be updated as required as needed in the future. Until now it was difficult while still valuable to have access to current FN+TS, even if only for logging. Follow up patch will use this info to be able to calculate poll FN from RRBP more deep in the stack (ul_tbf_fsm). Change-Id: Ifa09cd70c915aa3a2b799412cb02315aaebc0503
2024-02-01cosmetic: tbf_ul_fsm: add missing state to tdef_state_timeout arrayPau Espin Pedrol1-0/+1
Change-Id: I6e825a105de4a49329912db6c79aaebbfd3ddf9f
2024-01-26build: include README.md into the release tarballVadim Yanitskiy1-0/+1
Change-Id: If690f02753fdb7b27f303901cbb0d6c7b1a71f5b
2023-12-09llc: fix l3par check in gprs_llc_lle_generate_xid()Vadim Yanitskiy1-1/+1
A NULL pointer dereference is possible if this function is called with l3par being NULL, but l3par_len being greater than 0. Change-Id: I80c18a45a248b85901d455bfb17e81734fa5961d Fixes: CID#300602
2023-12-09llc: fix unsigned rc in gprs_llc_lle_tx_xid_resp()Vadim Yanitskiy1-2/+2
Change-Id: I724a1052fff2a43484c8bbf58b115d0769050191 Fixes: CID#300608
2023-10-17rlcmac: ul_tbf: Implement T3180Pau Espin Pedrol6-3/+155
Related: OS#6209 Change-Id: I350b277532d36ed7928b33ee3b77d98d083a3179
2023-10-17rlcmac: tests: Account for T3180 existance in test_ul_tbf_t3166_timeoutPau Espin Pedrol3-17/+82
Test test_ul_tbf_t3166_timeout needs to be modified in order to avoid triggering T3180 once it is implemented in a follow-up patch. Both T3180 and T3166 are armed at the same time, so modify the scenario to really scenify the case where T3166 matters: the MS keeps receiving USF indications but the PCU doesn't see them and hence never sends a PKT UL ACK/NACK. Related: OS#6209 Change-Id: Ib84ccfd89773913703e0ab3e09d0ce9eb123e994
2023-10-17rlcmac: tests: Account for T3180 existance in test_ul_tbf_t3182_timeoutPau Espin Pedrol2-5/+25
Test test_ul_tbf_t3182_timeout needs to be modified in order to avoid triggering T3180 once it is implemented in a follow-up patch. Both T3180 and T3182 are armed at the same time, so modify the scenario to really scenify the case where T3182 matters: the MS keeps receiving USF indications but the PCU doesn't see them and hence never sends a PKT UL ACK/NACK acking the last block. Related: OS#6209 Change-Id: I73b648bc04d863b9eb67093e5fa510ba88d712c8
2023-10-17rlcmac: Avoid re-arming T3182 in TBF Acknowledged modePau Espin Pedrol2-12/+14
Re-arming upon retransmission of block CV=0 is only described in the unacknowledged mode of operation. Change-Id: I532def7f87367b446b5370daf8c81f511e26eb5f
2023-10-17sm_ms_fsm: fix double timer_cb assignmentVadim Yanitskiy1-1/+0
sm_ms_fsm.c:287:14: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides] .timer_cb = sm_ms_fsm_timer_cb, ^~~~~~~~~~~~~~~~~~ sm_ms_fsm.c:284:14: note: previous initialization is here .timer_cb = sm_ms_fsm_timer_cb, ^~~~~~~~~~~~~~~~~~ Change-Id: Ic1bffe410a4ce5ddafe740185a5a894e056d7879
2023-10-06tbf_ul_fsm: Avoid freeing tbf after 4 CV=0 retrans in acknowledged modePau Espin Pedrol4-99/+64
The restriction to only to transmit last data block (CV=0) up to 4 times only applies in Unacknowledged mode of operation, which we don't support. Hence, simply comment it out so that it can be enabled if unacknowledge mode is ever supported. Related: OS#6208 Change-Id: Ie7cdb286b9c7255e3fbf9f936f103fab04acf96a
2023-10-05rlcmac: tbf_ul_ass_fsm: Fix logic delay starting timePau Espin Pedrol1-2/+2
The previous logic was wrongly written. We want: * If PKT UL ASS didn't have a tbf_starting_time but had an S/P+RRBP, it means we have to delay completing the FSM until we send the PKT CTRL ACK (next_blk) * If it contained tbf_starting_time, if it happens before next_blk, still wait until next_blk Change-Id: I60cdc0315e28f71843c51eba88acc78780c6ab43
2023-10-05rlcmac: tbf_ul_ass_fsm: Fix 'sba' field wrongly reset to truePau Espin Pedrol1-1/+1
Change-Id: Ibf0c60516c337f4428ff33afbfb65a39a37a3719
2023-10-04rlcmac: migrate from fn_cmp() to gsm0502_fncmp()Vadim Yanitskiy4-28/+16
Change-Id: I3030d00c6881713a088b1739b2b5ba77bac84e46 Depends: libosmocore.git I9590f2e836fc48650decf1564b6ab46306c4fe2d Depends: libosmocore.git Ie8bb9c49c6f81b8f4a1766547d6943f9880d1186
2023-10-04rlcmac: tbf_ul_ass_fsm: Fix state not reset after first UL-TBF re-assignmentPau Espin Pedrol1-1/+15
The FSM can be reused several times to assign a UL TBF over its lifespan, eg. if a DL TBF DL ACK/NACK is reuse to request allocation of a UL TBF several times. Some state like ctx->tbf_starting_time_exists was being left as =true during the initial run of the FSM, and as a result subsequent runs going through the check delaying completing after sending the PKT CTRL ACK. Change-Id: Iaddbd1e3924036be1cf6eed41367031d3e127f57
2023-10-03rlcmac: tbf_ul: Fix wrong field assignment (no bug in practice)Pau Espin Pedrol1-1/+1
Fixes following warning detected by clang: """ tbf_ul.c:1118:37: warning: implicit conversion from enumeration type 'enum gprs_rlcmac_rlc_egprs_ul_reseg_bsn_state' to different enumeration type 'enum gprs_rlcmac_rlc_egprs_dl_reseg_bsn_state' [-Wenum-conversion] blk->spb_status.block_status_dl = reseg_status; """ In practice it's not much of a problem since both fields are put together in a union, so it ends up in the same place in memory. Change-Id: Iccd57b74640754f2aebf81a149a633f141c6e38f
2023-09-26rlcmac: Fix compilation error 'rlcmac_prim may be used uninitialized'Pau Espin Pedrol1-1/+3
Change-Id: Ica93447bc1f2e60984be7c9c73b153b4eb508aaa
2023-09-23rlcmac: deal with RACH retransmissions (drop rach_req_ra)Vadim Yanitskiy5-54/+49
The RA value does change during RACH retransmissions, so we cannot expect a specific value in gprs_rlcmac_handle_ccch_imm_ass_ul_tbf() anymore. Offload checking it to the lower layers. * Rename submit_rach_req() to submit_packet_access_req(). * Get rid of gen_chan_req(), indicate only the access cause. Ideally, we should also rename the OSMO_GPRS_RLCMAC_L1CTL_RACH to something like OSMO_GPRS_RLCMAC_L1CTL_PKT_CHAN_ACCESS, but let's better do this separately. Change-Id: If0de3ed86b1e2897d70183f3b0f4fbfd7d2bda80 Related: osmocom-bb.git Iab6d9147f6e0aeb99239affacf318a3897fd6ffe Related: OS#5500, OS#6131
2023-09-05rlcmac: tbf_dl: Log with FN request of UL TBF through PKT DL ACK/NACKPau Espin Pedrol4-8/+15
Change-Id: Ib81f1003361ca6501ce5a0e16ab2cdafc8ed66d3
2023-09-05rlcmac: Log RTS.indPau Espin Pedrol2-0/+42
Change-Id: I678f2aaea419a0cb5dad58610784144538914cf5
2023-09-05tbf_ul_ass_fsm: Listen only on 1 TS for PKT UL ASS when assignment done from ↵Pau Espin Pedrol8-24/+31
DL TBF This also fixes a memcpy writing out of bounds reported by Coverity CID#323120 in gprs_rlcmac_tbf_ul_ass_start_from_dl_tbf_ack_nack(), due to the difference of size between struct gprs_rlcmac_ul_tbf_allocation and struct gprs_rlcmac_dl_tbf_allocation. While fixing it, actually properly implement passing of the 1 only interesting TS to the tbf_ul_ass_fsm at that point in time. Change-Id: I89b15982b73f00599183981142495d7b9befbb78
2023-09-04rlcmac: Several fixes and improvements to have 2phase access workingPau Espin Pedrol5-12/+85
Some solutions are not meant to be final ones, but some small workarounds to have the whole thing running until the lower layers are fixed/improved. Related: OS#5500 Change-Id: I94bd0de6917b004cba73d2fffc7cf69b3b5c305d
2023-08-24configure.ac: fix libtool issue with clang and sanitizerEric Wild1-0/+5
[this fix already exists in most of the other repos] As pointed out at https://github.com/libexpat/libexpat/issues/312 libtool does not play nice with clang sanitizer builds at all. For those builds LD shoud be set to clang too (and LDFLAGS needs the sanitizer flags as well), because the clang compiler driver knows how linking to the sanitizer libs works, but then at a later stage libtool fails to actually produce the shared libraries and the build fails. This is fixed by this patch. Addtionally LD_LIBRARY_PATH has no effect on conftest runs during configure time, so the rpath needs to be set to the asan library path to ensure the configure run does not fail due to a missing asan library, i.e.: SANS='-fsanitize=memory -fsanitize-recover=all -shared-libsan' export CC=clang-10 ASANPATH=$(dirname `$CC -print-file-name=libclang_rt.asan-x86_64.so`) export LDFLAGS="-Wl,-rpath,$ASANPATH $SANS $LDFLAGS" Change-Id: I577e7d7b07acf76e5d97dcce5da206d10f5e2aeb
2023-08-21rlcmac: Move FN related helper functions to private header inside libosmo-gprsPau Espin Pedrol2-14/+14
These may be handy in other tests or inside the library. Change-Id: I87393239b05a1c11498323139866aec9f6550f3b
2023-08-21tbf_ul_ass: Don't check USF during SingleBlock AllocationPau Espin Pedrol2-2/+9
Change-Id: Icc2c17dc1933ad95da1b6b050f38a769909b23e5
2023-08-21rlcmac: ul_tbf: Implement TBF_Starting time (phase1)Pau Espin Pedrol2-22/+43
This is unfortunately not yet working since lower layers are always sending hardcoded fn=0 and hence ctx->tbf_starting_time calculated in handle_imm_ass()->TBF_StartingTime_to_fn() is wrong. Related: OS#6130 Change-Id: If6b7766ee1ba6667db4e54e897f376f5b27ad73d
2023-08-21rlcmac: ul_tbf: Factor out function configuring TBF to lower layersPau Espin Pedrol4-36/+52
This code part will also be used by tbf_ul_ass_fsm.c to temporarily configure lower layers with ctx->phase1_alloc in order to receive RTS indications which the RLC/MAC uses to tick the FSM in state GPRS_RLCMAC_TBF_UL_ASS_ST_WAIT_TBF_STARTING_TIME1. Change-Id: I174327b25b726662a6b5902008e205ddb3de2fe0
2023-08-21rlcmac: l1ctl_prim: add 'start_rfn' field to cfg_{ul,dl}_tbf_reqVadim Yanitskiy2-0/+4
Change-Id: I27a7a896fe3839fa4f9b8cd9500c4ab7867bbaa0 Related: OS#5500
2023-08-21rlcmac: Fix Starting Time rfn->fn calculationPau Espin Pedrol7-7/+141
The Starting time contains a "frame number, FN modulo 42432", aka RFN. The translation to absolute FN was missing. Depends: libosmocore.git Change-Id Ib71e8da976f6cc84c3a4ab17b0a8c2101492e243 Change-Id: I00741289333853a8db472950ee2ac38dc2c74fd3
2023-08-13README.md: upade the list of librariesVadim Yanitskiy1-3/+7
Change-Id: I0572e9435330c15469f6609505867c21be9c3483
2023-07-31llc,sndcp: Add missing hex prefix to log line printing TLLIPau Espin Pedrol4-18/+18
Change-Id: I8d31ed7cf89555a1ec3cbd91a77cc00cc42b546f
2023-07-31rlcmac: rx pkt_uk_ack_nack: Use correct field containing UL TFIPau Espin Pedrol1-2/+3
Change-Id: If0bbd9989413a550243a6496bce16b6eb04508db
2023-07-31llc: Silently discard UI Dummy commandsPau Espin Pedrol1-0/+14
Change-Id: I807e140b96de7140d8f6922417f3eaf0eadeed84
2023-07-31llc: Log rx PDUs with invalid FCSPau Espin Pedrol1-2/+3
Change-Id: Ie52ced7e074a3d4451447551e1ac166397ee8a48
2023-07-31rlcmac: keep looking up GRE based on old TLLIPau Espin Pedrol4-1/+7
This is needed after RAU Update since the PCU may still be using the old TLLI to reference the MS for a while until it finds out about the TLLI update. Change-Id: I2653db3dac58342df02a1b4d0c76e69e0e8d583f
2023-07-31rlcmac: Fix OSMO_GPRS_RLCMAC_GMMRR_LLC_TRANSMITTED declared in wrong offsetPau Espin Pedrol1-1/+1
This enum should match osmo_gprs_gmm_gmmrr_prim_type, and I placed that osmocom-specific enum at the wrong place in the rlcmac counterpart. Change-Id: I3f198c756866417f8f975373f84fd3ec4da608fa
2023-07-31gmm: Several fixes for radio_prioPau Espin Pedrol3-12/+14
The "Radio Priority" received in GMM Attach Accept are for SMS and TOM8 SAPs only. For GMM/SM unitdata transferred to LLC, use highest radio_prio=1. Change-Id: Ie583c433547fb5ecbb6b6077c39a157961f73cfc
2023-07-31llc: Fix potential null ptr dereference in LL-Xid.IndPau Espin Pedrol1-2/+7
Closes: Coverity CID#322365 Change-Id: Icc65af3ea9a44a5daf80e47717564f6adf37444b