Commit Graph

12 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 27900b3a2d trxcon: introduce and use struct 'trxcon_inst'
trxcon consists of the following three main components:

* the L1 TDMA scheduler (libl1sched),
* L1 interface (TRXC/TRXD over UDP),
* L2 interface (L1CTL).

In [1] and [2] the L1 scheduler was abstracted out from both L1
and L2 interfaces and separated into a library, so it does not
use the TRXC/TRXD nor L1CTL related API directly.

This change is the next step towards the goal of having all three
components abstracted from each other.  Moreover, this patch brings
us closer to another goal of being able to support multiple L1CTL
connections (each having its own scheduler).

The idea is to give both L1 and L2 interfaces access to the
'trxcon_inst' structure, which basically groups all three components
mentioned above into a single piece.  The end goal is to eliminate
direct interaction between the interfaces, and the scheduler, so that
one could easily replace TRXC/TRXD and/or L1CTL with something else.

Change-Id: I23319951c56577085e1092669b5534f9d6bda48d
Related: [1] I31f77976a7a225ef292fe6dcd583513aec97ed44
Related: [2] I001fb7bc2663eea308b5a8882746ed9863f2c2f8
2022-07-21 17:37:36 +07:00
Vadim Yanitskiy e1740e2fc8 trxcon: use 'unsigned int tn' for timeslot number
Timeslot Number can never be negative, so let's use unsigned.
Rename the counter to 'tn' for consistency with other projects.

Change-Id: I93b5a91341e7f79ced0591e13250632ba5e5adef
2022-07-21 17:35:12 +07:00
Vadim Yanitskiy 682341738d trxcon: cosmetic: use ARRAY_SIZE() whenever appropriate
Change-Id: I2a246bad8d11ed45fbf849de961713ab96907d83
2022-07-18 20:34:02 +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 9523cdd4d3 trxcon: send proper slot type in TRXC SETSLOT messages
Change-Id: I42f5620b50beb7df0a3463d70c1f48d041006371
Related: OS#5599
2022-07-12 19:29:13 +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 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