Attention is currently required from: osmith.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/35318?usp=email )
Change subject: pcu_l1_if: signal BTS model via PCUIF
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/35318?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: osmith/1.4.0
Gerrit-Change-Id: I48eb75f65ab54fdec41ef913e24c1f18cd4a4047
Gerrit-Change-Number: 35318
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: Jenkins Builder
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 11 Dec 2023 10:26:16 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: neels, pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sip-connector/+/35308?usp=email )
Change subject: verbosely log MNCC and SDP
......................................................................
Patch Set 2:
(1 comment)
File src/mncc.c:
https://gerrit.osmocom.org/c/osmo-sip-connector/+/35308/comment/6cdfe9e2_74…
PS2, Line 1059: Log about the received MNCC message
> the cost of calling log_check_level() and the conditional is probably bigger than going through the […]
A static function used by only one function would most likely be inlined anyway...
In any case, not a merge blocker. Just an idea.
--
To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/35308?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-Change-Id: Ie923117929c6b79b1eb61e5a9f02a169edabc599
Gerrit-Change-Number: 35308
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 11 Dec 2023 10:20:16 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/35319?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
(cherry picked from commit 469584f136061261bb7b05006d674aca42e3b150)
---
M src/bts.h
M src/gprs_rlcmac_sched.cpp
M src/pcu_l1_if.cpp
3 files changed, 64 insertions(+), 9 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/19/35319/1
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 a71f321..be8030a 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -624,11 +624,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);
@@ -808,6 +807,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;
@@ -1026,6 +1046,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/+/35319?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: osmith/1.4.0
Gerrit-Change-Id: I7a08d8cc670fa14f7206ffffdbc22351f3668a17
Gerrit-Change-Number: 35319
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange