Commit Graph

13 Commits

Author SHA1 Message Date
Vadim Yanitskiy 8f9e9806e6 trxcon: make l1sched logging configurable, use trxcon->fi as prefix
This change makes it possible to configure l1sched related logging:

* l1sched_logging_init() allows to configure logging categories for
  common and data messages (by default, DLGLOBAL is used);
* struct l1sched_cfg allows to configure a logging prefix to be
  used in l1sched messges (by default, 'l1sched[0x%p] is used)'.

Let's use osmo_fsm_inst_name(trxcon->fi) as the logging prefix.

Change-Id: I26da1a506b02502a3a6a887533c35fb09c13c429
Related: OS#5599, OS#3761
2022-07-26 00:46:43 +07:00
Vadim Yanitskiy a986c466f0 trxcon: move osmocom/bb/{trxcon->l1sched}/l1sched.h
Change-Id: I41348b738cce9954afafa0952da050306838b908
Related: OS#5599, OS#3761
2022-07-23 16:30:26 +07:00
Vadim Yanitskiy c4aa60317d trxcon: cosmetic: s/ts_list/ts/ in struct l1sched_state
Change-Id: I182b2a3ae1dcb1671aaaed9394cdfea34f7966a9
2022-07-18 20:34:01 +07:00
Vadim Yanitskiy 8428b1ea0a trxcon: abstract out the scheduler API from L1CTL/TRXD/TRXC
Change-Id: I31f77976a7a225ef292fe6dcd583513aec97ed44
Related: OS#5599, OS#3761
2022-07-12 19:29:13 +07:00
Vadim Yanitskiy f5804d7631 trxcon: use abstract API for RACH primitives
Using L1CTL specific structures as the primitive payload was a
beautiful hack in the early days of trxcon.  But since we're
going to separate the scheduler into an interface independent
library, we have to introduce and use an abstract API.

Change-Id: I84597d44ea7d74b8840a919ecb09988ba1980a73
Related: OS#5599, OS#3761
2022-07-12 03:03:17 +07:00
Vadim Yanitskiy bac9387bba trxcon: allocate a prim in l1sched_prim_push()
Make l1sched_prim_alloc() private and call it from l1sched_prim_push().
This makes the API more convinient, because both functions are always
used together.

Change-Id: Ia9c0170fb06efcef569e987b57ab9ab7f7c7e847
Related: OS#5599, OS#3761
2022-07-12 03:03:17 +07:00
Vadim Yanitskiy b1125910c1 trxcon: fix uint8_t used for length in l1sched_prim_alloc()
Using uint8_t makes it impossible to allocate primitives with payload
of size 255 - sizeof(struct l1sched_ts_prim) and greater.

Change-Id: Ic19b8433118798f57500119f1caf10e117e5db19
Related: OS#5599, OS#3761
2022-07-12 03:03:17 +07:00
Vadim Yanitskiy 8abb8026c2 trxcon: return prim pointer from l1sched_prim_alloc()
Returning prim pointer is more convinient from the API point of view.

Change-Id: I0fa41cf55e90d191d032bca1754941cca763b03e
Related: OS#5599, OS#3761
2022-07-12 03:02:31 +07:00
Vadim Yanitskiy 98b5895200 trxcon: rename l1sched_prim_init() to l1sched_prim_alloc()
The current function name is confusing, because l1sched_prim_init()
is not only initializing a primitive, but also allocating it on heap.
Let's use '_alloc' instead of '_init' to reflect that.

Change-Id: Ie1bebb6829ba9f640455685fcd7309b6aa442ef0
Related: OS#5599, OS#3761
2022-07-12 02:55:22 +07:00
Vadim Yanitskiy eff2d52e75 trxcon: merge 'sched_trx.h' and 'scheduler.h' into 'l1sched.h'
Change-Id: Ide1e3ccdf32fdc255acc943e0c0936d15cf0c680
Related: OS#5599, OS#3761
2022-07-11 05:12:16 +07:00
Vadim Yanitskiy 38373ee20f trxcon: use 'l1sched_' prefix for scheduler API
Change-Id: I370aa5084a4e3eb94168b96df94dbbee606adaab
Related: OS#5599, OS#3761
2022-07-11 05:12:16 +07:00
Vadim Yanitskiy f73db50f6b trxcon: rename 'enum trx_lchan_type' and its items
Change-Id: I76a7d9fed3d6ab47725fceb803aa16ddbfd2e1a2
Related: OS#5599, OS#3761
2022-07-09 23:56:18 +07:00
Vadim Yanitskiy 259314abae trxcon: group *.c files into 'src' directory
Change-Id: I1a3703e48507cd51cd8198f13b993f54c44bc41e
Related: OS#5599, OS#3761
2022-07-04 17:41:09 +07:00