laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/35096?usp=email )
Change subject: gprs_rlcmac_sched: fix condition for generating dummy blocks on idle
......................................................................
gprs_rlcmac_sched: fix condition for generating dummy blocks on idle
When a PDCH is idle, then the gaps are filled with dummy blocks. OsmoPCU
supports generating the dummy blocks locally, so that a continous stream of
PDCH blocks is sent to L1. However, some BTS models (the OsmoTRX based models
in particular) are able to generate the idle blocks locally. In this case the
PCU should leave the genration of the dummy blocks to the BTS in order to
save processing time and load on the PCUIF interface.
In gprs_rlcmac_sched we already have a flag to skip idle frames in case we do
not use the so called "direct phy access". A similar mechanism also exists in
pcu_l1_if.cpp in function pcu_rx_rts_req_ptcch().
Unfortunately this check is not implemented correctly. The flag gets set when
the ENABLE_DIRECT_PHY define constant is set. However, this does not say
anything about whether the BTS model supports the generation of idle blocks or
not. The define constant is intended to be used to disable direct phy related
code in on platforms where no direct phy code is used or cannot be used. We
must instead check the BTS model (bts->bts_model) in order to decide whether
this particular BTS type requires the generation of dummy blocks or not.
Related: OS#6191
Change-Id: I7a08d8cc670fa14f7206ffffdbc22351f3668a17
---
M src/bts.h
M src/gprs_rlcmac_sched.cpp
M src/pcu_l1_if.cpp
3 files changed, 63 insertions(+), 9 deletions(-)
Approvals:
daniel: Looks good to me, but someone else must approve
Jenkins Builder: Verified
fixeria: Looks good to me, approved
diff --git a/src/bts.h b/src/bts.h
index 1d88cb5..86c161b 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -278,6 +278,11 @@
/* BTS hardware model, see pcuif_proto.h */
uint8_t bts_model;
+
+ /* When the PDCH is idle, the timeslot is expected to transmit dummy blocks. Some BTS models will generate
+ * those dummy blocks automatically when no data is transmitted. In contrast, other BTS models may require a
+ * continuous stream of PDCH blocks that already has the gaps filled with dummy blocks. */
+ bool gen_idle_blocks;
};
struct paging_req_cs {
diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp
index 314fd58..12b9e50 100644
--- a/src/gprs_rlcmac_sched.cpp
+++ b/src/gprs_rlcmac_sched.cpp
@@ -487,11 +487,10 @@
const unsigned num_tbfs = pdch->num_tbfs(GPRS_RLCMAC_DL_TBF)
+ pdch->num_tbfs(GPRS_RLCMAC_UL_TBF);
bool skip_idle = (num_tbfs == 0);
-#ifdef ENABLE_DIRECT_PHY
- /* In DIRECT_PHY mode we want to always submit something to L1 in
- * TRX0, since BTS is not preparing dummy bursts on idle TS for us */
- skip_idle = skip_idle && trx != 0;
-#endif
+
+ if (bts->gen_idle_blocks)
+ skip_idle = skip_idle && trx != 0;
+
if (!skip_idle && (msg = sched_dummy())) {
/* increase counter */
gsmtap_cat = PCU_GSMTAP_C_DL_DUMMY;
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index e391829..07082d3 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -551,11 +551,10 @@
const unsigned num_tbfs = pdch->num_tbfs(GPRS_RLCMAC_DL_TBF)
+ pdch->num_tbfs(GPRS_RLCMAC_UL_TBF);
bool skip_idle = (num_tbfs == 0);
-#ifdef ENABLE_DIRECT_PHY
- /* In DIRECT_PHY mode we want to always submit something to L1 in
- * TRX0, since BTS is not preparing dummy bursts on idle TS for us: */
+
+ if (bts->gen_idle_blocks)
skip_idle = skip_idle && trx != 0;
-#endif
+
if (skip_idle) {
pcu_l1if_tx_ptcch(bts, trx, ts, bts->trx[trx].arfcn, fn, block_nr,
NULL, 0);
@@ -735,6 +734,27 @@
{ 0, NULL }
};
+static bool decide_gen_idle_blocks(struct gprs_rlcmac_bts *bts)
+{
+ switch (bts->bts_model) {
+ case PCU_IF_BTS_MODEL_UNSPEC:
+ case PCU_IF_BTS_MODEL_LC15:
+ case PCU_IF_BTS_MODEL_OC2G:
+ case PCU_IF_BTS_MODEL_OCTPHY:
+ case PCU_IF_BTS_MODEL_SYSMO:
+ case PCU_IF_BTS_MODEL_RBS:
+ /* The BTS models above do not generate dummy blocks by themselves, so OsmoPCU must fill the idle gaps in the
+ * stream of generated PDCH blocks with dummy blocks. */
+ return true;
+ case PCU_IF_BTS_MODEL_TRX:
+ /* The BTS models above generate dummy blocks by themselves, so OsmoBTS will only generate PDCH bloks that
+ * actually contain data. On idle, no blocks are generated. */
+ return false;
+ default:
+ return false;
+ }
+}
+
static int pcu_rx_info_ind(struct gprs_rlcmac_bts *bts, const struct gsm_pcu_if_info_ind *info_ind)
{
struct gprs_bssgp_pcu *pcu;
@@ -946,6 +966,7 @@
LOGP(DL1IF, LOGL_INFO, "BTS model: %s\n", get_value_string(gsm_pcuif_bts_model_names, info_ind->bts_model));
bts->bts_model = info_ind->bts_model;
+ bts->gen_idle_blocks = decide_gen_idle_blocks(bts);
bts->active = true;
return rc;
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/35096?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I7a08d8cc670fa14f7206ffffdbc22351f3668a17
Gerrit-Change-Number: 35096
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/35127?usp=email )
Change subject: osmo-trx-uhd: Make sure HOME environment variable is set
......................................................................
osmo-trx-uhd: Make sure HOME environment variable is set
It turns out that uhd versions >= 4.0.0.0 *require* that either the
HOME or the XDG_CONFIG_HOME variables are set, and otherwise will
terminate the program.
Change-Id: I1816013c507da28719590f063da0a397da656a10
Closes: OS#6269
---
M contrib/systemd/osmo-trx-uhd.service
1 file changed, 15 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, approved
daniel: Looks good to me, but someone else must approve
osmith: Looks good to me, but someone else must approve
diff --git a/contrib/systemd/osmo-trx-uhd.service b/contrib/systemd/osmo-trx-uhd.service
index 34ba74a..6c5c2de 100644
--- a/contrib/systemd/osmo-trx-uhd.service
+++ b/contrib/systemd/osmo-trx-uhd.service
@@ -8,6 +8,7 @@
Restart=always
StateDirectory=osmocom
WorkingDirectory=%S/osmocom
+Environment=HOME=%h
ExecStart=/usr/bin/osmo-trx-uhd -C /etc/osmocom/osmo-trx-uhd.cfg
RestartSec=2
# CPU scheduling policy:
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/35127?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I1816013c507da28719590f063da0a397da656a10
Gerrit-Change-Number: 35127
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: jolly.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/35130?usp=email )
Change subject: LAPDm: Enable flag to prevent sending two subsequent REJ frame
......................................................................
Patch Set 1:
(2 comments)
Commit Message:
https://gerrit.osmocom.org/c/osmocom-bb/+/35130/comment/53b38d38_04f87860
PS1, Line 9: required required
add a flag to prevent writing two subsequent `required`? ;)
https://gerrit.osmocom.org/c/osmocom-bb/+/35130/comment/a1d39d39_cfbb9c6a
PS1, Line 47: the TTCN3 test case
Is this relevant to osmocom-bb? Which TTCN-3 testcase exactly?
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/35130?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Iaa1645fb1970fe513d71bc1b03f7c5eac62f35d7
Gerrit-Change-Number: 35130
Gerrit-PatchSet: 1
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Comment-Date: Fri, 24 Nov 2023 20:36:25 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: falconia, jolly.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/35132?usp=email )
Change subject: Transmit invalid AMR speech blocks instead of dummy FACCH
......................................................................
Patch Set 1:
(5 comments)
File src/osmo-bts-trx/sched_lchan_tchf.c:
https://gerrit.osmocom.org/c/osmo-bts/+/35132/comment/28b4f113_24e5f2f4
PS1, Line 550: FIXME: someone who knows AMR needs to look at this problem
: * and decide what is the correct BTS Tx behavior for frame
: * gaps in TCH/AFS. See OS#6049.
This block can now be removed?
https://gerrit.osmocom.org/c/osmo-bts/+/35132/comment/a3bd575a_53d5a890
PS1, Line 571: goto send_burst
Similarly to how it's done below for `gsm0503_tch_fr_encode()`, let's check the returned value. Old version of `gsm0503_tch_afs_encode()` preceding your libosmocore patch (I82ce2adf995a4b42d1f378c5819f88d773b9104a) would return -1 and leave the burst buffer unpopulated. In this case we should fall-back to generating dummy FACCH.
File src/osmo-bts-trx/sched_lchan_tchh.c:
https://gerrit.osmocom.org/c/osmo-bts/+/35132/comment/97317e92_2e7d5d18
PS1, Line 453: TCH/HS
Mention TCH/AHS here? Or add a separate bullet point, like you did in `tx_tchf_fn()`?
https://gerrit.osmocom.org/c/osmo-bts/+/35132/comment/0c4be259_75680d62
PS1, Line 462: FIXME: someone who knows AMR needs to look at this problem
: * and decide what is the correct BTS Tx behavior for frame
: * gaps in TCH/AHS. See OS#6049.
Likewise, can be removed.
https://gerrit.osmocom.org/c/osmo-bts/+/35132/comment/f91355a8_c1dcc480
PS1, Line 474: gsm0503_tch_ahs_encode
Same here, we need to check returned value.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/35132?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I056f379715c91ad968f198e112d363a9009dc1c3
Gerrit-Change-Number: 35132
Gerrit-PatchSet: 1
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: falconia <falcon(a)freecalypso.org>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: falconia <falcon(a)freecalypso.org>
Gerrit-Comment-Date: Fri, 24 Nov 2023 20:25:24 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
daniel has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/35126?usp=email )
Change subject: scripts/obs: Add -M/--no-meta option to avoid depending on osmocom-*
......................................................................
scripts/obs: Add -M/--no-meta option to avoid depending on osmocom-*
This is useful for testing one-off dev packages
Change-Id: Id18c75de559c9ba29efd38d8510f2db3206c4209
---
M scripts/obs/lib/__init__.py
M scripts/obs/lib/srcpkg.py
2 files changed, 15 insertions(+), 1 deletion(-)
Approvals:
fixeria: Looks good to me, approved
osmith: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/scripts/obs/lib/__init__.py b/scripts/obs/lib/__init__.py
index 226015a..5292dc5 100644
--- a/scripts/obs/lib/__init__.py
+++ b/scripts/obs/lib/__init__.py
@@ -63,6 +63,9 @@
parser.add_argument("-p", "--conflict-pkgname", nargs="?",
help="name of the meta-package to depend on (default:"
" osmocom-$feed)")
+ parser.add_argument("-M", "--no-meta", action="store_true",
+ help="Don't depend on the meta package (helpful when"
+ " building one-off packages for development)")
parser.add_argument("-v", "--verbose", action="store_true",
help="always print shell commands and their output,"
" instead of only printing them on error")
diff --git a/scripts/obs/lib/srcpkg.py b/scripts/obs/lib/srcpkg.py
index 05a705f..aef7732 100644
--- a/scripts/obs/lib/srcpkg.py
+++ b/scripts/obs/lib/srcpkg.py
@@ -185,7 +185,7 @@
print(f"{project}: building source package {version_epoch}")
write_tarball_version(project, version_epoch)
- if project in lib.config.projects_osmocom:
+ if project in lib.config.projects_osmocom and not lib.args.no_meta:
metapkg = lib.args.conflict_pkgname or f"osmocom-{feed}"
lib.debian.control_add_depend(project, metapkg, conflict_version)
if has_rpm_spec:
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35126?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: Id18c75de559c9ba29efd38d8510f2db3206c4209
Gerrit-Change-Number: 35126
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: merged