Attention is currently required from: pespin, fixeria.
dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/31558 )
Change subject: pcu_l1_if_phy: add header file for struct gsmtap_inst
......................................................................
Patch Set 2:
(1 comment)
File src/pcu_l1_if_phy.h:
https://gerrit.osmocom.org/c/osmo-pcu/+/31558/comment/839c0ed5_7f6728b7
PS2, Line 4: #include <osmocom/core/gsmtap_util.h>
> I find it more correct to add the header here since this declaration is provided by some external de […]
Ack
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/31558
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I9b859c4f7906f31547549d4ff7751fb720519270
Gerrit-Change-Number: 31558
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 27 Feb 2023 16:44:59 +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
Attention is currently required from: fixeria, dexter.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/31558 )
Change subject: pcu_l1_if_phy: add header file for struct gsmtap_inst
......................................................................
Patch Set 2: Code-Review+1
(1 comment)
File src/pcu_l1_if_phy.h:
https://gerrit.osmocom.org/c/osmo-pcu/+/31558/comment/aec2dbea_a9ee014c
PS2, Line 4: #include <osmocom/core/gsmtap_util.h>
> It would be enough to add a forward declaration.
I find it more correct to add the header here since this declaration is provided by some external dependency.
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/31558
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I9b859c4f7906f31547549d4ff7751fb720519270
Gerrit-Change-Number: 31558
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 27 Feb 2023 16:31:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/31572 )
Change subject: modem: route L1CTL prims to/from libosmo-gprs-rlcmac
......................................................................
Patch Set 1:
(1 comment)
File src/host/layer23/src/modem/rlcmac.c:
https://gerrit.osmocom.org/c/osmocom-bb/+/31572/comment/68b97d29_f24f8d3f
PS1, Line 173: rlcmac_prim_l1ctl_alloc
> ... which alone takes almost the entire line on my screen
Ok, this is not entirely true. It's more like 1/3 of the line (I use big font).
But still, passing multiple arguments to it looks like a mess.
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/31572
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I38e9a686f8edc3fe55f961d75e68602c33bbbaaf
Gerrit-Change-Number: 31572
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 27 Feb 2023 16:11:30 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: pespin, fixeria.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/31572 )
Change subject: modem: route L1CTL prims to/from libosmo-gprs-rlcmac
......................................................................
Patch Set 1:
(1 comment)
File src/host/layer23/src/modem/rlcmac.c:
https://gerrit.osmocom.org/c/osmocom-bb/+/31572/comment/b9cae462_25034a49
PS1, Line 173: rlcmac_prim_l1ctl_alloc
@pespin: I would like to be able to allocate RLCMAC_L1CTL primitives like this, instead of using functions like osmo_gprs_rlcmac_prim_alloc_l1ctl_pdch_data_ind(). One problem is that it's quite a long symbol name, which alone takes almost the entire line on my screen, so passing it several arguments would make it completely unreadable. The benefits of letting the user fill-in the prim structure are:
* readability, as I already said above;
* extensibility: once we add more fields, there would be no need to add `osmo_gprs_rlcmac_prim_alloc_l1ctl_pdch_data_ind{1,2,3,...}()`;
* consistency with other osmo-API, like the L1SAP code.
Would it be possible to expose `[osmo_gprs_]rlcmac_prim_l1ctl_alloc()`?
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/31572
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I38e9a686f8edc3fe55f961d75e68602c33bbbaaf
Gerrit-Change-Number: 31572
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 27 Feb 2023 16:08:47 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/31574 )
Change subject: pcu_l1_if_phy: add new PHY API function to initialize PHY
......................................................................
pcu_l1_if_phy: add new PHY API function to initialize PHY
The PHY implementations we currently have do not require any
initialization that has to run directly on startup. This will change
when we introduce support for the E1 based Ericsson RBS CCU. Then we
will have to perform at least one elarly initialization (VTY config
file). So lets add an API function for PHY initialization now.
Related: OS#5198
Change-Id: Ibf2a3a058c826f6ee5b740eee72d5be94d460517
---
M src/osmo-bts-litecell15/lc15_l1_if.c
M src/osmo-bts-oc2g/oc2g_l1_if.c
M src/osmo-bts-sysmo/sysmo_l1_if.c
M src/pcu_l1_if_phy.h
M src/pcu_main.cpp
5 files changed, 39 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/74/31574/1
diff --git a/src/osmo-bts-litecell15/lc15_l1_if.c b/src/osmo-bts-litecell15/lc15_l1_if.c
index 580cdf0..043a3ba 100644
--- a/src/osmo-bts-litecell15/lc15_l1_if.c
+++ b/src/osmo-bts-litecell15/lc15_l1_if.c
@@ -404,3 +404,8 @@
talloc_free(fl1h);
return 0;
}
+
+int l1if_init(void)
+{
+ return 0;
+}
diff --git a/src/osmo-bts-oc2g/oc2g_l1_if.c b/src/osmo-bts-oc2g/oc2g_l1_if.c
index 48005a2..c827d72 100644
--- a/src/osmo-bts-oc2g/oc2g_l1_if.c
+++ b/src/osmo-bts-oc2g/oc2g_l1_if.c
@@ -409,3 +409,8 @@
talloc_free(fl1h);
return 0;
}
+
+int l1if_init(void)
+{
+ return 0;
+}
diff --git a/src/osmo-bts-sysmo/sysmo_l1_if.c b/src/osmo-bts-sysmo/sysmo_l1_if.c
index 18378b6..348497f 100644
--- a/src/osmo-bts-sysmo/sysmo_l1_if.c
+++ b/src/osmo-bts-sysmo/sysmo_l1_if.c
@@ -386,3 +386,8 @@
talloc_free(fl1h);
return 0;
}
+
+int l1if_init(void)
+{
+ return 0;
+}
diff --git a/src/pcu_l1_if_phy.h b/src/pcu_l1_if_phy.h
index 318d0aa..297883b 100644
--- a/src/pcu_l1_if_phy.h
+++ b/src/pcu_l1_if_phy.h
@@ -3,6 +3,7 @@
#include <stdint.h>
#include <osmocom/core/gsmtap_util.h>
+int l1if_init(void);
void *l1if_open_pdch(uint8_t trx_no, uint32_t hlayer1, struct gsmtap_inst *gsmtap);
int l1if_connect_pdch(void *obj, uint8_t ts);
int l1if_pdch_req(void *obj, uint8_t ts, int is_ptcch, uint32_t fn, uint16_t arfcn, uint8_t block_nr, uint8_t *data,
diff --git a/src/pcu_main.cpp b/src/pcu_main.cpp
index 901ee6c..ec7bddd 100644
--- a/src/pcu_main.cpp
+++ b/src/pcu_main.cpp
@@ -33,6 +33,7 @@
extern "C" {
#include "pcu_vty.h"
#include "coding_scheme.h"
+#include "pcu_l1_if_phy.h"
#include <osmocom/gprs/gprs_bssgp.h>
#include <osmocom/gprs/gprs_ns2.h>
#include <osmocom/vty/telnet_interface.h>
@@ -250,6 +251,12 @@
osmo_cpu_sched_vty_init(tall_pcu_ctx);
logging_vty_add_deprecated_subsys(tall_pcu_ctx, "bssgp");
+#ifdef ENABLE_DIRECT_PHY
+ rc = l1if_init();
+ if (rc < 0)
+ return -EINVAL;
+#endif
+
handle_options(argc, argv);
if ((!!spoof_mcc) + (!!spoof_mnc) == 1) {
fprintf(stderr, "--mcc and --mnc must be specified "
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/31574
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ibf2a3a058c826f6ee5b740eee72d5be94d460517
Gerrit-Change-Number: 31574
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: osmith.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31556
to look at the new patch set (#2).
Change subject: library/RSL_Types: RSL_SpeechAlgo: support CSD
......................................................................
library/RSL_Types: RSL_SpeechAlgo: support CSD
Add data rates from 3GPP TS 48.058 § 9.3.6 octet 6 to the enum, and
rename it from RSL_SpeechAlgo to RSL_SpeechAlgoDataRate so it's clear
that it contains both.
Rename RSL_CMOD_SP_GSM3 to RSL_CMOD_SP_GSM3_DT_NT1 and
RSL_CMOD_SP_GSM4 to RSL_CMOD_SP_GSM4_DT_NT8 because their values are
shared between a speech and a data entry.
Related: OS#4393
Change-Id: Ief2d95c7e9d71afb26fa74da755294226c8e158d
---
M bsc/BSC_Tests.ttcn
M bts/BTS_Tests.ttcn
M bts/BTS_Tests_VAMOS.ttcn
M bts/BTS_Tests_perf.ttcn
M library/RSL_Types.ttcn
5 files changed, 71 insertions(+), 37 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/56/31556/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31556
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ief2d95c7e9d71afb26fa74da755294226c8e158d
Gerrit-Change-Number: 31556
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: pespin.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-gprs/+/31537
to look at the new patch set (#2).
Change subject: tbf_dl: Fix state_fsm instance not freed
......................................................................
tbf_dl: Fix state_fsm instance not freed
Change-Id: I2f89810dd346cee904dcff0b598e229bd5f84a9f
---
M src/rlcmac/tbf_dl.c
M tests/rlcmac/rlcmac_prim_test.err
2 files changed, 11 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/37/31537/2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/31537
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: I2f89810dd346cee904dcff0b598e229bd5f84a9f
Gerrit-Change-Number: 31537
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: pespin, dexter.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/31558 )
Change subject: pcu_l1_if_phy: add header file for struct gsmtap_inst
......................................................................
Patch Set 2:
(1 comment)
File src/pcu_l1_if_phy.h:
https://gerrit.osmocom.org/c/osmo-pcu/+/31558/comment/4ff0ef29_5c0884d1
PS2, Line 4: #include <osmocom/core/gsmtap_util.h>
It would be enough to add a forward declaration.
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/31558
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I9b859c4f7906f31547549d4ff7751fb720519270
Gerrit-Change-Number: 31558
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 27 Feb 2023 14:47:52 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
dexter has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/31361 )
Change subject: pcu_l1_if: use only the term "direct PHY access"
......................................................................
pcu_l1_if: use only the term "direct PHY access"
The log messages and code comments sometimes refer to the direct PHY
access feature as "direct DSP access". Lets use only the term "direct
PHY access"
Change-Id: I121ad85cd8581c40f390dbaad0d6a028d68b095e
---
M src/pcu_l1_if.cpp
1 file changed, 16 insertions(+), 3 deletions(-)
Approvals:
Jenkins Builder: Verified
dexter: Looks good to me, approved
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index 62f02d9..fdee83d 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -610,7 +610,7 @@
return rc;
}
-/* C -> C++ adapter for direct DSP access code (e.g. osmo-bts-sysmo) */
+/* C -> C++ adapter for direct PHY access code (e.g. osmo-bts-sysmo) */
extern "C" int pcu_rx_rach_ind_ptcch(struct gprs_rlcmac_bts *bts, uint8_t trx_nr, uint8_t ts_nr, uint32_t fn, int16_t qta)
{
struct rach_ind_params rip = {
@@ -869,11 +869,11 @@
the_pcu->gsmtap);
if (!bts->trx[trx_nr].fl1h) {
LOGP(DL1IF, LOGL_FATAL, "Failed to open direct "
- "DSP access for PDCH.\n");
+ "PHY access for PDCH.\n");
exit(0);
}
#else
- LOGP(DL1IF, LOGL_FATAL, "Compiled without direct DSP "
+ LOGP(DL1IF, LOGL_FATAL, "Compiled without direct PHY "
"access for PDCH, but enabled at "
"BTS. Please deactivate it!\n");
exit(0);
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/31361
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I121ad85cd8581c40f390dbaad0d6a028d68b095e
Gerrit-Change-Number: 31361
Gerrit-PatchSet: 5
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: dexter.
Hello Jenkins Builder, neels, pespin, msuraev,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-pcu/+/31361
to look at the new patch set (#5).
Change subject: pcu_l1_if: use only the term "direct PHY access"
......................................................................
pcu_l1_if: use only the term "direct PHY access"
The log messages and code comments sometimes refer to the direct PHY
access feature as "direct DSP access". Lets use only the term "direct
PHY access"
Change-Id: I121ad85cd8581c40f390dbaad0d6a028d68b095e
---
M src/pcu_l1_if.cpp
1 file changed, 16 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/61/31361/5
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/31361
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I121ad85cd8581c40f390dbaad0d6a028d68b095e
Gerrit-Change-Number: 31361
Gerrit-PatchSet: 5
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newpatchset
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31540 )
Change subject: Cosmetic: codec_pref: tweak comments
......................................................................
Cosmetic: codec_pref: tweak comments
Remove "Helper function for match_codec_pref()" at the beginning of the
descriptions of these functions, looks like a leftover from before this
was moved to its own c file. Remove a duplicated "received" in a
comment.
Change-Id: I30f0744db9aebf2f05077fef840097c332b9dafd
---
M src/osmo-bsc/codec_pref.c
1 file changed, 23 insertions(+), 12 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/40/31540/1
diff --git a/src/osmo-bsc/codec_pref.c b/src/osmo-bsc/codec_pref.c
index 3824e14..a64425a 100644
--- a/src/osmo-bsc/codec_pref.c
+++ b/src/osmo-bsc/codec_pref.c
@@ -61,8 +61,7 @@
return 0;
}
-/* Helper function for match_codec_pref(), looks up a matching chan mode for
- * a given permitted speech value */
+/* Look up a matching chan mode for a given permitted speech value */
static enum gsm48_chan_mode gsm88_to_chan_mode(enum gsm0808_permitted_speech speech)
{
switch (speech) {
@@ -88,8 +87,7 @@
}
}
-/* Helper function for match_codec_pref(), looks up a matching permitted speech
- * value for a given msc audio codec pref */
+/* Look up a matching permitted speech value for a given msc audio codec pref */
static enum gsm0808_permitted_speech audio_support_to_gsm88(const struct gsm_audio_support *audio)
{
if (audio->hr) {
@@ -125,10 +123,9 @@
}
}
-/* Helper function for match_codec_pref(), tests if a given audio support
- * matches one of the permitted speech settings of the channel type element.
- * The matched permitted speech value is then also compared against the
- * speech codec list. (optional, only relevant for AoIP) */
+/* Test if a given audio support matches one of the permitted speech settings
+ * of the channel type element. The matched permitted speech value is then also
+ * compared against the speech codec list. (optional, only relevant for AoIP) */
static bool test_codec_pref(const struct gsm0808_speech_codec **sc_match,
const struct gsm0808_speech_codec_list *scl,
const struct gsm0808_channel_type *ct,
@@ -177,8 +174,8 @@
return false;
}
-/* Helper function to check if the given permitted speech value is supported
- * by the BTS. (vty option bts->codec-support). */
+/* Check if the given permitted speech value is supported by the BTS
+ * (vty option bts->codec-support). */
static bool test_codec_support_bts(const struct gsm_bts *bts, uint8_t perm_spch)
{
struct gsm_bts_trx *trx;
@@ -308,8 +305,8 @@
return 0;
}
-/*! Match the codec preferences from local config with a received codec preferences IEs received from the
- * MSC and the BTS' codec configuration.
+/*! Match the codec preferences from local config with codec preference IEs
+ * received from the MSC and the BTS' codec configuration.
* \param[out] ch_mode_rate resulting codec and rate information
* \param[in] ct GSM 08.08 channel type received from MSC.
* \param[in] scl GSM 08.08 speech codec list received from MSC (optional).
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31540
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I30f0744db9aebf2f05077fef840097c332b9dafd
Gerrit-Change-Number: 31540
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31539 )
Change subject: Cosmetic: fix various typos
......................................................................
Cosmetic: fix various typos
Change-Id: I9225e733e3afa8171f24253e21eaffc654f689af
---
M src/osmo-bsc/assignment_fsm.c
M src/osmo-bsc/codec_pref.c
2 files changed, 11 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/39/31539/1
diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c
index e2213d4..d382f10 100644
--- a/src/osmo-bsc/assignment_fsm.c
+++ b/src/osmo-bsc/assignment_fsm.c
@@ -389,7 +389,7 @@
return 0;
}
-/* Check if the incoming assignment requests requires a voice stream or not,
+/* Check if the incoming assignment request requires a voice stream or not,
* we will look at the preferred and the alternate channel mode and also make
* sure that both are consistent. */
static int check_requires_voice_stream(struct gsm_subscriber_connection *conn)
diff --git a/src/osmo-bsc/codec_pref.c b/src/osmo-bsc/codec_pref.c
index 9b4b37f..3824e14 100644
--- a/src/osmo-bsc/codec_pref.c
+++ b/src/osmo-bsc/codec_pref.c
@@ -376,7 +376,7 @@
break;
}
- /* Exit without result, in case no match can be deteched */
+ /* Exit without result, in case no match can be detected */
if (!match) {
ch_mode_rate->chan_mode = GSM48_CMODE_SIGN;
ch_mode_rate->chan_rate = CH_RATE_SDCCH;
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31539
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I9225e733e3afa8171f24253e21eaffc654f689af
Gerrit-Change-Number: 31539
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31551 )
Change subject: assignment_fsm: chan mode check: support CSD
......................................................................
assignment_fsm: chan mode check: support CSD
Replace check_requires_voice_stream, which used to iterate over
ch_mode_rate_list and verify that all entries are either for speech or
signalling. Instead verify in check_chan_mode_rate_against_ch_indctr,
that all entries of ch_mode_rate_list have a chan_mode that matches the
ch_indctr (data, speech, signalling; called "speech / data indicator" in
3GPP TS 48.008 § 3.2.2.11).
This ensures that all of them are either data, speech or signalling and
not mixed.
Related: OS#4393
Change-Id: Iee5cbfee84d7f2ad59ee2d5a19891a2b59bbafff
---
M include/osmocom/bsc/gsm_data.h
M src/osmo-bsc/assignment_fsm.c
M src/osmo-bsc/osmo_bsc_bssap.c
3 files changed, 49 insertions(+), 32 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/51/31551/1
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 8c4dcce..b77a16e 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -163,6 +163,9 @@
/* The TSC to use if 'use' is true, otherwise automatically determine the TSC value to use. Valid range is 0 to
* 7, as described in 3GPP TS 45.002. */
struct optional_val tsc;
+
+ /* The "speech / data indicator" from 3GPP TS 48.008 § 3.2.2.11 Channel Type (speech/data/signalling). */
+ enum gsm0808_chan_indicator ch_indctr;
};
/* State of an ongoing Assignment, while the assignment_fsm is still busy. This serves as state separation to keep the
diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c
index d382f10..d23d726 100644
--- a/src/osmo-bsc/assignment_fsm.c
+++ b/src/osmo-bsc/assignment_fsm.c
@@ -369,62 +369,53 @@
OSMO_ASSERT(osmo_fsm_register(&assignment_fsm) == 0);
}
-static int check_requires_voice(bool *requires_voice, enum gsm48_chan_mode chan_mode)
+static int chan_mode_to_ch_indctr(enum gsm48_chan_mode chan_mode)
{
- *requires_voice = false;
-
switch (gsm48_chan_mode_to_non_vamos(chan_mode)) {
+ case GSM48_CMODE_DATA_14k5:
+ case GSM48_CMODE_DATA_12k0:
+ case GSM48_CMODE_DATA_6k0:
+ case GSM48_CMODE_DATA_3k6:
+ return GSM0808_CHAN_DATA;
case GSM48_CMODE_SPEECH_V1:
case GSM48_CMODE_SPEECH_EFR:
case GSM48_CMODE_SPEECH_AMR:
- *requires_voice = true;
- break;
+ return GSM0808_CHAN_SPEECH;
case GSM48_CMODE_SIGN:
- *requires_voice = false;
- break;
+ return GSM0808_CHAN_SIGN;
default:
return -EINVAL;
}
-
- return 0;
}
-/* Check if the incoming assignment request requires a voice stream or not,
- * we will look at the preferred and the alternate channel mode and also make
- * sure that both are consistent. */
-static int check_requires_voice_stream(struct gsm_subscriber_connection *conn)
+/* Check if the incoming assignment request has a channel mode that is
+ * inconsistent with ch_indctr, e.g. GSM48_CMODE_DATA_14k5 and
+ * GSM0808_CHAN_SPEECH */
+static int check_chan_mode_rate_against_ch_indctr(struct gsm_subscriber_connection *conn)
{
- bool requires_voice_pref = false, requires_voice_alt;
struct assignment_request *req = &conn->assignment.req;
struct osmo_fsm_inst *fi = conn->fi;
- int i, rc;
-
- /* When the assignment request indicates that there is an alternate
- * rate available (e.g. "Full or Half rate channel, Half rate
- * preferred..."), then both must be either voice or either signalling,
- * a mismatch is not permitted */
+ int i;
+ uint8_t ch_indctr;
for (i = 0; i < req->n_ch_mode_rate; i++) {
- rc = check_requires_voice(&requires_voice_alt, req->ch_mode_rate_list[i].chan_mode);
- if (rc < 0) {
+ ch_indctr = chan_mode_to_ch_indctr(req->ch_mode_rate_list[i].chan_mode);
+ if (ch_indctr < 0) {
assignment_fail(GSM0808_CAUSE_REQ_CODEC_TYPE_OR_CONFIG_NOT_SUPP,
"Channel mode not supported (prev level %d): %s", i,
gsm48_chan_mode_name(req->ch_mode_rate_list[i].chan_mode));
return -EINVAL;
}
- if (i==0)
- requires_voice_pref = requires_voice_alt;
- else if (requires_voice_alt != requires_voice_pref) {
+ if (ch_indctr != req->ch_indctr) {
assignment_fail(GSM0808_CAUSE_REQ_CODEC_TYPE_OR_CONFIG_NOT_SUPP,
- "Requested a mix of Signalling and non-Signalling channel modes: %s != %s",
- gsm48_chan_mode_name(req->ch_mode_rate_list[0].chan_mode),
- gsm48_chan_mode_name(req->ch_mode_rate_list[i].chan_mode));
+ "Channel mode %s has ch_indctr %d, channel type has ch_indctr %d",
+ gsm48_chan_mode_name(req->ch_mode_rate_list[i].chan_mode),
+ ch_indctr, req->ch_indctr);
return -EINVAL;
}
}
- conn->assignment.requires_voice_stream = requires_voice_pref;
return 0;
}
@@ -470,6 +461,8 @@
.present = (tsc >= 0),
.val = tsc,
},
+
+ .ch_indctr = chan_mode_to_ch_indctr(lchan->current_ch_mode_rate.chan_mode),
};
if (to_lchan)
@@ -528,10 +521,9 @@
assignment_count(CTR_ASSIGNMENT_ATTEMPTED);
- /* Check if we need a voice stream. If yes, set the appropriate struct
- * members in conn */
- if (check_requires_voice_stream(conn) < 0)
+ if (check_chan_mode_rate_against_ch_indctr(conn) < 0)
return;
+ conn->assignment.requires_voice_stream = (req->ch_indctr != GSM0808_CHAN_SIGN);
if (!req->target_lchan && reuse_existing_lchan(conn)) {
/* The already existing lchan is suitable for this mode */
diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index 5226cbc..48f0b87 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -1135,6 +1135,8 @@
goto reject;
}
+ req.ch_indctr = ct.ch_indctr;
+
return osmo_fsm_inst_dispatch(conn->fi, GSCON_EV_ASSIGNMENT_START, &req);
reject:
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31551
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Iee5cbfee84d7f2ad59ee2d5a19891a2b59bbafff
Gerrit-Change-Number: 31551
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange