This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
fixeria gerrit-no-reply at lists.osmocom.orgfixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/24440 )
Change subject: [VAMOS] osmo-bts-trx: schedule bursts on 'shadow' timeslots
......................................................................
[VAMOS] osmo-bts-trx: schedule bursts on 'shadow' timeslots
Change-Id: I3e0bdf8c03273f66991aa1764029ab1dd3528d7e
Related: SYS#4895, OS#4941
---
M include/osmo-bts/scheduler.h
M src/common/scheduler.c
M src/osmo-bts-trx/main.c
M src/osmo-bts-trx/scheduler_trx.c
M src/osmo-bts-trx/trx_if.c
5 files changed, 67 insertions(+), 17 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/40/24440/1
diff --git a/include/osmo-bts/scheduler.h b/include/osmo-bts/scheduler.h
index 9093229..e7d27ac 100644
--- a/include/osmo-bts/scheduler.h
+++ b/include/osmo-bts/scheduler.h
@@ -71,6 +71,7 @@
enum trx_mod_type {
TRX_MOD_T_GMSK,
TRX_MOD_T_8PSK,
+ TRX_MOD_T_AQPSK,
};
/* A set of measurements belonging to one Uplink burst */
diff --git a/src/common/scheduler.c b/src/common/scheduler.c
index 75cf6bd..91e5067 100644
--- a/src/common/scheduler.c
+++ b/src/common/scheduler.c
@@ -606,32 +606,49 @@
* init / exit
*/
+static void trx_sched_init_ts(struct gsm_bts_trx_ts *ts,
+ const unsigned int rate_ctr_idx)
+{
+ struct l1sched_ts *l1ts;
+ unsigned int i;
+
+ l1ts = talloc_zero(ts->trx, struct l1sched_ts);
+ OSMO_ASSERT(l1ts != NULL);
+
+ /* Link both structures */
+ ts->priv = l1ts;
+ l1ts->ts = ts;
+
+ l1ts->ctrs = rate_ctr_group_alloc(ts->trx,
+ &l1sched_ts_ctrg_desc,
+ rate_ctr_idx);
+ INIT_LLIST_HEAD(&l1ts->dl_prims);
+
+ for (i = 0; i < ARRAY_SIZE(l1ts->chan_state); i++) {
+ struct l1sched_chan_state *chan_state;
+ chan_state = &l1ts->chan_state[i];
+ chan_state->active = false;
+ }
+}
+
void trx_sched_init(struct gsm_bts_trx *trx)
{
- unsigned int tn, i;
+ unsigned int tn;
OSMO_ASSERT(trx != NULL);
LOGPTRX(trx, DL1C, LOGL_DEBUG, "Init scheduler structures\n");
+ /* Allocate shadow timeslots */
+ gsm_bts_trx_init_shadow_ts(trx);
+
for (tn = 0; tn < ARRAY_SIZE(trx->ts); tn++) {
- struct l1sched_ts *l1ts;
+ unsigned int rate_ctr_idx = trx->nr * 100 + tn;
+ struct gsm_bts_trx_ts *ts = &trx->ts[tn];
- l1ts = talloc_zero(trx, struct l1sched_ts);
- OSMO_ASSERT(l1ts != NULL);
-
- trx->ts[tn].priv = l1ts;
- l1ts->ts = &trx->ts[tn];
-
- l1ts->mf_index = 0;
- l1ts->ctrs = rate_ctr_group_alloc(trx, &l1sched_ts_ctrg_desc, (trx->nr + 1) * 10 + tn);
- INIT_LLIST_HEAD(&l1ts->dl_prims);
-
- for (i = 0; i < ARRAY_SIZE(l1ts->chan_state); i++) {
- struct l1sched_chan_state *chan_state;
- chan_state = &l1ts->chan_state[i];
- chan_state->active = false;
- }
+ /* Init primary and shadow timeslots */
+ trx_sched_init_ts(ts, rate_ctr_idx);
+ trx_sched_init_ts(ts->vamos.peer, rate_ctr_idx + 10);
}
}
diff --git a/src/osmo-bts-trx/main.c b/src/osmo-bts-trx/main.c
index 6ec8dfc..7134939 100644
--- a/src/osmo-bts-trx/main.c
+++ b/src/osmo-bts-trx/main.c
@@ -146,6 +146,7 @@
osmo_bts_set_feature(bts->features, BTS_FEAT_HOPPING);
osmo_bts_set_feature(bts->features, BTS_FEAT_ACCH_REP);
osmo_bts_set_feature(bts->features, BTS_FEAT_MULTI_TSC);
+ osmo_bts_set_feature(bts->features, BTS_FEAT_VAMOS);
bts_internal_flag_set(bts, BTS_INTERNAL_FLAG_MEAS_PAYLOAD_COMB);
diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c
index fa5c719..1e099c0 100644
--- a/src/osmo-bts-trx/scheduler_trx.c
+++ b/src/osmo-bts-trx/scheduler_trx.c
@@ -149,6 +149,33 @@
}
}
+/* schedule one frame for a shadow TRX/TS */
+static void trx_sched_shadow_ts(const struct gsm_bts_trx_ts *ts,
+ struct trx_dl_burst_req *br)
+{
+ struct l1sched_ts *l1ts = ts->priv;
+ struct trx_dl_burst_req sbr = {
+ .trx_num = br->trx_num,
+ .fn = br->fn,
+ .tn = br->tn,
+ };
+
+ _sched_dl_burst(l1ts, &sbr);
+
+ if (br->burst_len != 0 && sbr.burst_len != 0) /* both present */
+ memcpy(br->burst + GSM_BURST_LEN, sbr.burst, GSM_BURST_LEN);
+ else if (br->burst_len == 0) /* V0 burst is missing, use dummy bits */
+ memcpy(br->burst, _sched_dummy_burst, GSM_BURST_LEN);
+ else if (sbr.burst_len == 0) /* V1 burst is missing, use dummy bits */
+ memcpy(br->burst + GSM_BURST_LEN, _sched_dummy_burst, GSM_BURST_LEN);
+ else /* nothing to send at all */
+ return;
+
+ /* FIXME: SCPIR is hard-coded to 0 */
+ br->burst_len = 2 * GSM_BURST_LEN;
+ br->mod = TRX_MOD_T_AQPSK;
+}
+
/* schedule all frames of all TRX for given FN */
static void bts_sched_fn(struct gsm_bts *bts, const uint32_t fn)
{
@@ -195,6 +222,9 @@
/* get burst for FN */
_sched_dl_burst(l1ts, br);
+
+ if (ts->vamos.peer != NULL)
+ trx_sched_shadow_ts(ts->vamos.peer, br);
}
}
diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c
index c10a15f..bcca807 100644
--- a/src/osmo-bts-trx/trx_if.c
+++ b/src/osmo-bts-trx/trx_if.c
@@ -755,6 +755,7 @@
static const uint8_t trx_data_mod_val[] = {
[TRX_MOD_T_GMSK] = 0x00, /* .00xx... */
[TRX_MOD_T_8PSK] = 0x20, /* .010x... */
+ [TRX_MOD_T_AQPSK] = 0x60, /* .11xx... */
};
/* Header dissector for TRXDv0 (and part of TRXDv1) */
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/24440
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I3e0bdf8c03273f66991aa1764029ab1dd3528d7e
Gerrit-Change-Number: 24440
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210527/c005113e/attachment.htm>