aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-06-13 21:45:33 +0700
committerfixeria <vyanitskiy@sysmocom.de>2020-06-15 10:42:03 +0000
commitae781bc5cd012818dd50ab5c1f79236422029003 (patch)
treea33c08e0185ba4f74590e7031e19b4453b2727ce /include
parent36c5ec4881f1d86a5124970c22f953e1020156d3 (diff)
osmo-bts-trx: introduce and use struct trx_dl_burst_req
This change is similar to what we did for Uplink bursts: - group all Downlink burst parameters into a single structure, - allocate it once and pass a pointer to lchan handlers, - pass a pointer to trx_if_send_burst(). Given that the structure is allocated and (zero-)initialized in trx_sched_fn(), we can get rid of some memset() calls in lchan handlers and thus improve the overall performance a bit. Change-Id: If3014e69746559963569b77561dbf7b163c68ffa
Diffstat (limited to 'include')
-rw-r--r--include/osmo-bts/scheduler.h11
-rw-r--r--include/osmo-bts/scheduler_backend.h37
2 files changed, 29 insertions, 19 deletions
diff --git a/include/osmo-bts/scheduler.h b/include/osmo-bts/scheduler.h
index 74102f32..a7bc6c72 100644
--- a/include/osmo-bts/scheduler.h
+++ b/include/osmo-bts/scheduler.h
@@ -250,6 +250,17 @@ struct trx_ul_burst_ind {
size_t burst_len;
};
+/*! DL burst request with the corresponding meta info */
+struct trx_dl_burst_req {
+ uint32_t fn; /*!< TDMA frame number */
+ uint8_t tn; /*!< TDMA timeslot number */
+ uint8_t att; /*!< Tx power attenuation */
+
+ /*! Burst hard-bits buffer */
+ ubit_t burst[EGPRS_BURST_LEN];
+ size_t burst_len;
+};
+
/*! Handle an UL burst received by PHY */
int trx_sched_ul_burst(struct l1sched_trx *l1t, struct trx_ul_burst_ind *bi);
diff --git a/include/osmo-bts/scheduler_backend.h b/include/osmo-bts/scheduler_backend.h
index cfbe7f25..be23c474 100644
--- a/include/osmo-bts/scheduler_backend.h
+++ b/include/osmo-bts/scheduler_backend.h
@@ -9,9 +9,8 @@
typedef int trx_sched_rts_func(struct l1sched_trx *l1t, uint8_t tn,
uint32_t fn, enum trx_chan_type chan);
-typedef ubit_t *trx_sched_dl_func(struct l1sched_trx *l1t, uint8_t tn,
- uint32_t fn, enum trx_chan_type chan,
- uint8_t bid, uint16_t *nbits);
+typedef int trx_sched_dl_func(struct l1sched_trx *l1t, enum trx_chan_type chan,
+ uint8_t bid, struct trx_dl_burst_req *br);
typedef int trx_sched_ul_func(struct l1sched_trx *l1t, enum trx_chan_type chan,
uint8_t bid, const struct trx_ul_burst_ind *bi);
@@ -56,20 +55,21 @@ int _sched_compose_tch_ind(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
int16_t ta_offs_256bits, uint16_t ber10k, float rssi,
uint8_t is_sub);
-ubit_t *tx_idle_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
- enum trx_chan_type chan, uint8_t bid, uint16_t *nbits);
-ubit_t *tx_fcch_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
- enum trx_chan_type chan, uint8_t bid, uint16_t *nbits);
-ubit_t *tx_sch_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
- enum trx_chan_type chan, uint8_t bid, uint16_t *nbits);
-ubit_t *tx_data_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
- enum trx_chan_type chan, uint8_t bid, uint16_t *nbits);
-ubit_t *tx_pdtch_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
- enum trx_chan_type chan, uint8_t bid, uint16_t *nbits);
-ubit_t *tx_tchf_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
- enum trx_chan_type chan, uint8_t bid, uint16_t *nbits);
-ubit_t *tx_tchh_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
- enum trx_chan_type chan, uint8_t bid, uint16_t *nbits);
+int tx_idle_fn(struct l1sched_trx *l1t, enum trx_chan_type chan,
+ uint8_t bid, struct trx_dl_burst_req *br);
+int tx_fcch_fn(struct l1sched_trx *l1t, enum trx_chan_type chan,
+ uint8_t bid, struct trx_dl_burst_req *br);
+int tx_sch_fn(struct l1sched_trx *l1t, enum trx_chan_type chan,
+ uint8_t bid, struct trx_dl_burst_req *br);
+int tx_data_fn(struct l1sched_trx *l1t, enum trx_chan_type chan,
+ uint8_t bid, struct trx_dl_burst_req *br);
+int tx_pdtch_fn(struct l1sched_trx *l1t, enum trx_chan_type chan,
+ uint8_t bid, struct trx_dl_burst_req *br);
+int tx_tchf_fn(struct l1sched_trx *l1t, enum trx_chan_type chan,
+ uint8_t bid, struct trx_dl_burst_req *br);
+int tx_tchh_fn(struct l1sched_trx *l1t, enum trx_chan_type chan,
+ uint8_t bid, struct trx_dl_burst_req *br);
+
int rx_rach_fn(struct l1sched_trx *l1t, enum trx_chan_type chan,
uint8_t bid, const struct trx_ul_burst_ind *bi);
int rx_data_fn(struct l1sched_trx *l1t, enum trx_chan_type chan,
@@ -81,7 +81,6 @@ int rx_tchf_fn(struct l1sched_trx *l1t, enum trx_chan_type chan,
int rx_tchh_fn(struct l1sched_trx *l1t, enum trx_chan_type chan,
uint8_t bid, const struct trx_ul_burst_ind *bi);
-const ubit_t *_sched_dl_burst(struct l1sched_trx *l1t, uint8_t tn,
- uint32_t fn, uint16_t *nbits);
+void _sched_dl_burst(struct l1sched_trx *l1t, struct trx_dl_burst_req *br);
int _sched_rts(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn);
void _sched_act_rach_det(struct l1sched_trx *l1t, uint8_t tn, uint8_t ss, int activate);