[M] Change in osmo-bsc[master]: Support (optional) indication of NCH position in SI1 rest octets

2023-05-07 Thread laforge
Attention is currently required from: jolly, laforge.

Hello Jenkins Builder, jolly,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-bsc/+/32655

to look at the new patch set (#2).

Change subject: Support (optional) indication of NCH position in SI1 rest octets
..

Support (optional) indication of NCH position in SI1 rest octets

This adds the vty commands and respective logic to allow the user to
specify the NCH (notification channel) position in the SI1 rests octets.

Change-Id: Iefde0af44a663f22462a54d68a58caa560eceb2f
Related: OS#5781
Requires: libosmocore.git I24a0095ac6eee0197f9d9ef9895c7795df6cdc49
---
M include/osmocom/bsc/bts.h
M src/osmo-bsc/bts_vty.c
M src/osmo-bsc/osmo_bsc_main.c
M src/osmo-bsc/system_information.c
4 files changed, 91 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/55/32655/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/32655
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Iefde0af44a663f22462a54d68a58caa560eceb2f
Gerrit-Change-Number: 32655
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly 
Gerrit-Attention: jolly 
Gerrit-Attention: laforge 
Gerrit-MessageType: newpatchset


[S] Change in osmo-bsc[master]: timeslot_fsm: Avoid error messages about TS_EV_OML_READY not permitted

2023-05-07 Thread laforge
laforge has abandoned this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/32071 )

Change subject: timeslot_fsm: Avoid error messages about TS_EV_OML_READY not 
permitted
..


Abandoned
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/32071
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Idd1f541d66abbf2a1d136df42a6fe277eeb9482d
Gerrit-Change-Number: 32071
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-MessageType: abandon


[M] Change in osmo-bsc[master]: Support (optional) indication of NCH position in SI1 rest octets

2023-05-07 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/32655 )


Change subject: Support (optional) indication of NCH position in SI1 rest octets
..

Support (optional) indication of NCH position in SI1 rest octets

This adds the vty commands and respective logic to allow the user to
specify the NCH (notification channel) position in the SI1 rests octets.

Change-Id: Iefde0af44a663f22462a54d68a58caa560eceb2f
Related: OS#5781
Requires: libosmocore.git I24a0095ac6eee0197f9d9ef9895c7795df6cdc49
---
M include/osmocom/bsc/bts.h
M src/osmo-bsc/bts_vty.c
M src/osmo-bsc/system_information.c
3 files changed, 81 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/55/32655/1

diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h
index d6bf758..a2b84c6 100644
--- a/include/osmocom/bsc/bts.h
+++ b/include/osmocom/bsc/bts.h
@@ -568,6 +568,11 @@
uint16_t scramble_list[MAX_EARFCN_LIST];
} data;
} si_common;
+   /* NCH (Notification Channel) related parameters */
+   struct {
+   uint8_t num_blocks; /* NCH number of CCCH blocks (0 = no 
NCH) */
+   uint8_t first_block;/* NCH first block number */
+   } nch;
bool early_classmark_allowed;
bool early_classmark_allowed_3g;
/* for testing only: Have an infinitely long radio link timeout */
diff --git a/src/osmo-bsc/bts_vty.c b/src/osmo-bsc/bts_vty.c
index e37cfd4..547e7ef 100644
--- a/src/osmo-bsc/bts_vty.c
+++ b/src/osmo-bsc/bts_vty.c
@@ -1107,6 +1107,47 @@
return CMD_SUCCESS;
 }

+DEFUN_USRATTR(cfg_bts_nch_position,
+ cfg_bts_nch_position_cmd,
+ X(BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK),
+ "nch-position num-blocks <1-7> first-block <0-6>",
+ "NCH (Notification Channel) position within CCCH"
+ "Number of blocks reserved for NCH\n"
+ "First block reserved for NCH\n")
+{
+   struct gsm_bts *bts = vty->index;
+   int num_blocks = atoi(argv[0]);
+   int first_block = atoi(argv[1]);
+
+   if (osmo_gsm48_si1ro_nch_pos_encode(num_blocks, first_block)) {
+   vty_out(vty, "num-blocks %u first-block %u is not permitted by 
3GPP TS 44.010 Table 10.5.2.32.1b%s",
+   num_blocks, first_block, VTY_NEWLINE);
+   return CMD_WARNING;
+   }
+
+   /* TODO: when to check MAX_AG_BLKS_RES must be >= NUM_BLOCKS here? */
+   /* TODO: when to check for combined CCCH constraints? */
+
+   bts->nch.num_blocks = num_blocks;
+   bts->nch.first_block = first_block;
+
+   return CMD_SUCCESS;
+}
+
+DEFUN_USRATTR(cfg_bts_no_nch_position,
+ cfg_bts_no_nch_position_cmd,
+ X(BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK),
+ "no nch-position",
+ NO_STR "Disable NCH in this BTS\n")
+{
+   struct gsm_bts *bts = vty->index;
+
+   bts->nch.num_blocks = 0;
+   bts->nch.first_block = 0;
+
+   return CMD_SUCCESS;
+}
+
 DEFUN_USRATTR(cfg_bts_cell_barred,
  cfg_bts_cell_barred_cmd,
  X(BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK),
@@ -4405,6 +4446,12 @@
bts->si_common.chan_desc.bs_pa_mfrms + 2, VTY_NEWLINE);
vty_out(vty, "  channel-description bs-ag-blks-res %u%s",
bts->si_common.chan_desc.bs_ag_blks_res, VTY_NEWLINE);
+   if (bts->nch.num_blocks) {
+   vty_out(vty, "  nch-position num-blocks %u first-block %u%s",
+   bts->nch.num_blocks, bts->nch.first_block, VTY_NEWLINE);
+   } else {
+   vty_out(vty, "  no nch-position%s", VTY_NEWLINE);
+   }

if (bts->ccch_load_ind_thresh != 10)
vty_out(vty, "  ccch load-indication-threshold %u%s",
@@ -4851,6 +4898,8 @@
install_element(BTS_NODE, _bts_interf_meas_level_bounds_cmd);
install_element(BTS_NODE, _bts_srvcc_fast_return_cmd);
install_element(BTS_NODE, _bts_immediate_assignment_cmd);
+   install_element(BTS_NODE, _bts_nch_position_cmd);
+   install_element(BTS_NODE, _bts_no_nch_position_cmd);

neighbor_ident_vty_init();
/* See also handover commands added on bts level from handover_vty.c */
diff --git a/src/osmo-bsc/system_information.c 
b/src/osmo-bsc/system_information.c
index 6e82c56..35fce68 100644
--- a/src/osmo-bsc/system_information.c
+++ b/src/osmo-bsc/system_information.c
@@ -771,7 +771,19 @@
 * SI1 Rest Octets (10.5.2.32), contains NCH position and band
 * indicator but that is not in the 04.08.
 */
-   rc = osmo_gsm48_rest_octets_si1_encode(si1->rest_octets, NULL, 
is_dcs_net(bts));
+   if (bts->nch.num_blocks) {
+   rc = osmo_gsm48_si1ro_nch_pos_encode(bts->nch.num_blocks, 
bts->nch.first_block);
+   if (rc < 0) {
+   LOGP(DRR, 

[S] Change in osmo-bsc[master]: nanoBTS: print [supported] versions of MOs

2023-05-07 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/32653 )


Change subject: nanoBTS: print [supported] versions of MOs
..

nanoBTS: print [supported] versions of MOs

ip.access has the concept of MO versions.  We've always received
that information, but never used it in any way.  Start by logging it.

The first byte is the default version, the other bytes describe the
optional other versions supported by the BTS. One could switch to
such an alternate version by a Set Attributes before OPSTART.

Change-Id: I9aefcae31dc9139e90161b4690e77d4958021d45
---
M src/osmo-bsc/bts_ipaccess_nanobts.c
1 file changed, 33 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/53/32653/1

diff --git a/src/osmo-bsc/bts_ipaccess_nanobts.c 
b/src/osmo-bsc/bts_ipaccess_nanobts.c
index 8669d64..21e9c1c 100644
--- a/src/osmo-bsc/bts_ipaccess_nanobts.c
+++ b/src/osmo-bsc/bts_ipaccess_nanobts.c
@@ -195,12 +195,29 @@
 /* Callback function to be called every time we receive a 12.21 SW activated 
report */
 static int sw_activ_rep(struct msgb *mb)
 {
+   struct abis_om_hdr *oh = msgb_l2(mb);
struct abis_om_fom_hdr *foh = msgb_l3(mb);
struct e1inp_sign_link *sign_link = mb->dst;
struct gsm_bts *bts = sign_link->trx->bts;
struct gsm_bts_trx *trx;
struct gsm_gprs_nsvc *nsvc;
struct gsm_bts_trx_ts *ts;
+   struct tlv_parsed tp;
+
+   /* we don't care about the results.  Even in erroneous cases, the 'tp' 
is zero-initialised */
+   abis_nm_tlv_parse(, bts, foh->data, oh->length - sizeof(*foh));
+
+   if (TLVP_PRES_LEN(, NM_ATT_IPACC_OBJ_VERSION, 1)) {
+   const uint8_t *versions = TLVP_VAL(, 
NM_ATT_IPACC_OBJ_VERSION);
+   char buf[256];
+   struct osmo_strbuf sb = { .buf = buf, .len = sizeof(buf) };
+   unsigned int i;
+
+   for (i = 0; i < TLVP_LEN(, NM_ATT_IPACC_OBJ_VERSION); i++)
+   OSMO_STRBUF_APPEND(sb, snprintf, "%u ", versions[i]);
+
+   LOGPFOH(DNM, LOGL_INFO, foh, "Object Versions supported: %s\n", 
buf);
+   }

if (!is_ipa_abisip_bts(bts))
return 0;

--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/32653
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I9aefcae31dc9139e90161b4690e77d4958021d45
Gerrit-Change-Number: 32653
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


[S] Change in osmo-bsc[master]: nanobts: Request "supported features" attribute from BTS and BB_TRANSC

2023-05-07 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/32652 )


Change subject: nanobts: Request "supported features" attribute from BTS and 
BB_TRANSC
..

nanobts: Request "supported features" attribute from BTS and BB_TRANSC

The nanoBTS feature reporting works significantly different from what
osmo-bts implements.  They have a "Supported Features" IE in potentially
each of their MOs, and within this have nested IEs expressing respective
feature sets.

Let's start by requesting those for at least those MOs where we already
implement a GET ATTRIBUTES call in the FSM.

Change-Id: I15116044fb354ec0a0682c62078fbfa907b318f3
---
M src/osmo-bsc/nm_bb_transc_fsm.c
M src/osmo-bsc/nm_bts_fsm.c
2 files changed, 19 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/52/32652/1

diff --git a/src/osmo-bsc/nm_bb_transc_fsm.c b/src/osmo-bsc/nm_bb_transc_fsm.c
index 3302918..e430534 100644
--- a/src/osmo-bsc/nm_bb_transc_fsm.c
+++ b/src/osmo-bsc/nm_bb_transc_fsm.c
@@ -113,7 +113,7 @@
if (!bb_transc->mo.get_attr_sent && 
!bb_transc->mo.get_attr_rep_received) {
bb_transc->mo.get_attr_sent = true;
/* N. B: we rely on attribute order when parsing response in 
abis_nm_rx_get_attr_resp() */
-   const uint8_t trx_attr[] = { NM_ATT_MANUF_STATE, 
NM_ATT_SW_CONFIG, };
+   const uint8_t trx_attr[] = { NM_ATT_MANUF_STATE, 
NM_ATT_SW_CONFIG, NM_ATT_IPACC_SUPP_FEATURES };
/* we should not request more attributes than we're ready to 
handle */
OSMO_ASSERT(sizeof(trx_attr) < MAX_BTS_ATTR);
abis_nm_get_attr(trx->bts, NM_OC_BASEB_TRANSC, 0, trx->nr, 0xff,
diff --git a/src/osmo-bsc/nm_bts_fsm.c b/src/osmo-bsc/nm_bts_fsm.c
index ea9fa5c..6460522 100644
--- a/src/osmo-bsc/nm_bts_fsm.c
+++ b/src/osmo-bsc/nm_bts_fsm.c
@@ -100,7 +100,7 @@
if (!bts->mo.get_attr_sent && !bts->mo.get_attr_rep_received) {
bts->mo.get_attr_sent = true;
/* N. B: we rely on attribute order when parsing response in 
abis_nm_rx_get_attr_resp() */
-   const uint8_t bts_attr[] = { NM_ATT_MANUF_ID, NM_ATT_SW_CONFIG, 
};
+   const uint8_t bts_attr[] = { NM_ATT_MANUF_ID, NM_ATT_SW_CONFIG, 
NM_ATT_IPACC_SUPP_FEATURES};
/* we should not request more attributes than we're ready to 
handle */
OSMO_ASSERT(sizeof(bts_attr) < MAX_BTS_ATTR);
abis_nm_get_attr(bts, NM_OC_BTS, 0, 0xff, 0xff,

--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/32652
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I15116044fb354ec0a0682c62078fbfa907b318f3
Gerrit-Change-Number: 32652
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


[S] Change in osmo-bsc[master]: Add -Werror=implicit-int -Werror=int-conversion -Werror=old-style-def...

2023-05-07 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/32654 )


Change subject: Add -Werror=implicit-int -Werror=int-conversion 
-Werror=old-style-definition
..

Add -Werror=implicit-int -Werror=int-conversion -Werror=old-style-definition

... if --enable-werror is used

Change-Id: Ifa99336e5d88db214054c6d4b26cc96d00f5ca99
---
M configure.ac
1 file changed, 12 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/54/32654/1

diff --git a/configure.ac b/configure.ac
index ebcb839..df1aacb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -96,6 +96,7 @@
 then
WERROR_FLAGS="-Werror"
WERROR_FLAGS+=" -Wno-error=deprecated 
-Wno-error=deprecated-declarations"
+   WERROR_FLAGS+=" -Werror=implicit-int -Werror=int-conversion 
-Werror=old-style-definition"
WERROR_FLAGS+=" -Wno-error=cpp" # "#warning"
CFLAGS="$CFLAGS $WERROR_FLAGS"
CPPFLAGS="$CPPFLAGS $WERROR_FLAGS"

--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/32654
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ifa99336e5d88db214054c6d4b26cc96d00f5ca99
Gerrit-Change-Number: 32654
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


[M] Change in libosmocore[master]: Add osmo_gsm48_si1ro_nch_pos_{encode,decode} functions

2023-05-07 Thread laforge
Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/libosmocore/+/32650

to look at the new patch set (#2).

Change subject: Add osmo_gsm48_si1ro_nch_pos_{encode,decode} functions
..

Add osmo_gsm48_si1ro_nch_pos_{encode,decode} functions

These functions encode/decode the NCH position field within the SI1
rest octets.  This is used within ASCI (VBS/VGCS).

Change-Id: I24a0095ac6eee0197f9d9ef9895c7795df6cdc49
Related: OS#5781
---
M include/osmocom/gsm/gsm48_rest_octets.h
M src/gsm/gsm48_rest_octets.c
M src/gsm/libosmogsm.map
3 files changed, 94 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/50/32650/2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/32650
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I24a0095ac6eee0197f9d9ef9895c7795df6cdc49
Gerrit-Change-Number: 32650
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset


[S] Change in osmocom-bb[master]: trxcon/l1sched: allocate primitives of fixed size (64 + 64)

2023-05-07 Thread laforge
Attention is currently required from: osmith, fixeria, msuraev.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/32628 )

Change subject: trxcon/l1sched: allocate primitives of fixed size (64 + 64)
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/32628
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Ica87b147e11744a69dcd7c056376dcf6b98f9ca6
Gerrit-Change-Number: 32628
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-CC: msuraev 
Gerrit-Attention: osmith 
Gerrit-Attention: fixeria 
Gerrit-Attention: msuraev 
Gerrit-Comment-Date: Mon, 08 May 2023 04:41:07 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-iuh[master]: Move testdir src/tests/ -> tests/

2023-05-07 Thread laforge
Attention is currently required from: neels, pespin.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-iuh/+/32609 )

Change subject: Move testdir src/tests/ -> tests/
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/32609
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: Ib9ca59d1dffbbb13fcb9ae2e597b3f114f77524e
Gerrit-Change-Number: 32609
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Attention: neels 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Mon, 08 May 2023 04:40:11 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-bsc[master]: test case fixup: Add missing (void) empty argument list specification

2023-05-07 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/32651 )


Change subject: test case fixup: Add missing (void) empty argument list 
specification
..

test case fixup: Add missing (void) empty argument list specification

Change-Id: Idf7b044424f59f3069adda90ed336d01dac0118b
---
M tests/abis/abis_test.c
M tests/gsm0408/gsm0408_test.c
M tests/handover/handover_test.c
M tests/subscr/bsc_subscr_test.c
4 files changed, 15 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/51/32651/1

diff --git a/tests/abis/abis_test.c b/tests/abis/abis_test.c
index a48154b..10642fa 100644
--- a/tests/abis/abis_test.c
+++ b/tests/abis/abis_test.c
@@ -136,7 +136,7 @@
},
 };

-static void test_abis_nm_ipaccess_cgi()
+static void test_abis_nm_ipaccess_cgi(void)
 {
int i;
bool pass = true;
diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c
index 999ee80..a39f8c2 100644
--- a/tests/gsm0408/gsm0408_test.c
+++ b/tests/gsm0408/gsm0408_test.c
@@ -405,7 +405,7 @@
},
 };

-static void test_gsm48_ra_id_by_bts()
+static void test_gsm48_ra_id_by_bts(void)
 {
int i;
bool pass = true;
@@ -440,7 +440,7 @@
OSMO_ASSERT(pass);
 }

-static void test_gsm48_multirate_config()
+static void test_gsm48_multirate_config(void)
 {
struct gsm48_multi_rate_conf *gsm48_ie;
struct amr_multirate_conf mr;
diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index b0b5863..174e9e1 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -112,7 +112,7 @@
osmo_timers_update();
 }

-void fake_time_start()
+void fake_time_start(void)
 {
struct timespec *clock_override;

@@ -1522,7 +1522,7 @@
return CMD_SUCCESS;
 }

-static void ho_test_vty_init()
+static void ho_test_vty_init(void)
 {
install_element(CONFIG_NODE, _n_bts_cmd);
install_element(CONFIG_NODE, _bts_cmd);
diff --git a/tests/subscr/bsc_subscr_test.c b/tests/subscr/bsc_subscr_test.c
index 2a0e1eb..37a6164 100644
--- a/tests/subscr/bsc_subscr_test.c
+++ b/tests/subscr/bsc_subscr_test.c
@@ -126,7 +126,7 @@
.num_cat = ARRAY_SIZE(log_categories),
 };

-int main()
+int main(int argc, char **argv)
 {
void *ctx = talloc_named_const(NULL, 0, "bsc_subscr_test");
printf("Testing BSC subscriber core code.\n");

--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/32651
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Idf7b044424f59f3069adda90ed336d01dac0118b
Gerrit-Change-Number: 32651
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


[M] Change in osmo-bsc[master]: cosmetic: Rename is_ipaccess_bts() to is_ipa_abisip_bts()

2023-05-07 Thread laforge
Attention is currently required from: laforge.

Hello Jenkins Builder, pespin, fixeria,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-bsc/+/32179

to look at the new patch set (#3).

Change subject: cosmetic: Rename is_ipaccess_bts() to is_ipa_abisip_bts()
..

cosmetic: Rename is_ipaccess_bts() to is_ipa_abisip_bts()

This function is used to check if the BTS is using the IPA Abis-IP
transport, and not whether its manufacturer/vendor is ip.access.

Let's use a less confusing name.

Change-Id: I202c58341c1536489064d2671c0842c6f70b5429
---
M include/osmocom/bsc/bts.h
M src/osmo-bsc/abis_rsl.c
M src/osmo-bsc/bsc_ctrl.c
M src/osmo-bsc/bsc_rf_ctrl.c
M src/osmo-bsc/bsc_subscr_conn_fsm.c
M src/osmo-bsc/bsc_vty.c
M src/osmo-bsc/bts.c
M src/osmo-bsc/bts_ctrl.c
M src/osmo-bsc/bts_ipaccess_nanobts.c
M src/osmo-bsc/bts_siemens_bs11.c
M src/osmo-bsc/bts_trx.c
M src/osmo-bsc/bts_trx_vty.c
M src/osmo-bsc/bts_vty.c
M src/osmo-bsc/lchan_rtp_fsm.c
M src/osmo-bsc/osmo_bsc_main.c
M src/osmo-bsc/system_information.c
16 files changed, 54 insertions(+), 40 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/79/32179/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/32179
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I202c58341c1536489064d2671c0842c6f70b5429
Gerrit-Change-Number: 32179
Gerrit-PatchSet: 3
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-MessageType: newpatchset


[M] Change in libosmocore[master]: Add osmo_gsm48_si1ro_nch_pos_{encode,decode} functions

2023-05-07 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/32650 )


Change subject: Add osmo_gsm48_si1ro_nch_pos_{encode,decode} functions
..

Add osmo_gsm48_si1ro_nch_pos_{encode,decode} functions

These functions encode/decode the NCH position field within the SI1
rest octets.  This is used within ASCI (VBS/VGCS).

Change-Id: I24a0095ac6eee0197f9d9ef9895c7795df6cdc49
Related: OS#5781
---
M src/gsm/gsm48_rest_octets.c
M src/gsm/libosmogsm.map
2 files changed, 91 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/50/32650/1

diff --git a/src/gsm/gsm48_rest_octets.c b/src/gsm/gsm48_rest_octets.c
index 77fd349..b63c63f 100644
--- a/src/gsm/gsm48_rest_octets.c
+++ b/src/gsm/gsm48_rest_octets.c
@@ -59,6 +59,82 @@
return bv.data_len;
 }

+struct nch_pos {
+   uint8_t num_blocks;
+   uint8_t first_block;
+};
+
+/* 3GPP TS 44.010 Table 10.5.2.32.1b */
+static const struct nch_pos si1ro_nch_positions[] = {
+   [0x00] = {1,  0},
+   [0x01] = {1,  1},
+   [0x02] = {1,  2},
+   [0x03] = {1,  3},
+   [0x04] = {1,  4},
+   [0x05] = {1,  5},
+   [0x06] = {1,  6},
+
+   [0x07] = {2,  0},
+   [0x08] = {2,  1},
+   [0x08] = {2,  2},
+   [0x0a] = {2,  3},
+   [0x0b] = {2,  4},
+   [0x0c] = {2,  5},
+
+   [0x0d] = {3,  0},
+   [0x0e] = {3,  1},
+   [0x0f] = {3,  2},
+   [0x10] = {3,  3},
+   [0x11] = {3,  4},
+
+   [0x12] = {4,  0},
+   [0x13] = {4,  1},
+   [0x14] = {4,  2},
+   [0x15] = {4,  3},
+
+   [0x16] = {5,  0},
+   [0x17] = {5,  1},
+   [0x18] = {5,  2},
+
+   [0x19] = {6,  0},
+   [0x1a] = {6,  1},
+
+   [0x1b] = {7,  0},
+};
+
+/*! Decode the 5-bit 'NCH position' field within SI1 Rest Octets.
+ *  \param[in] value 5-bit value from SI1 rest octets
+ *  \param[out] num_blocks Number of CCCH used for NCH
+ *  \param[out] first_block First CCCH block used for NCH
+ *  \returns 0 on success; negative in case of error */
+int osmo_gsm48_si1ro_nch_pos_decode(uint8_t value, uint8_t *num_blocks, 
uint8_t *first_block)
+{
+   if (value >= ARRAY_SIZE(si1ro_nch_positions))
+   return -EINVAL;
+
+   *num_blocks = si1ro_nch_positions[value].num_blocks;
+   *first_block = si1ro_nch_positions[value].first_block;
+
+   return 0;
+}
+
+/*! Encode the 5-bit 'NCH position' field within SI1 Rest Octets.
+ *  \param[in] num_blocks Number of CCCH used for NCH
+ *  \param[in] first_block First CCCH block used for NCH
+ *  \returns 5-bit value for SI1 rest octets on success; negative in case of 
error */
+int osmo_gsm48_si1ro_nch_pos_encode(uint8_t num_blocks, uint8_t first_block)
+{
+   unsigned int i;
+
+   for (i = 0; i < ARRAY_SIZE(si1ro_nch_positions); i++) {
+   if (si1ro_nch_positions[i].num_blocks == num_blocks &&
+   si1ro_nch_positions[i].first_block == first_block) {
+   return i;
+   }
+   }
+   return -EINVAL;
+}
+
 /* Append Repeated E-UTRAN Neighbour Cell to bitvec: see 3GPP TS 44.018 Table 
10.5.2.33b.1 */
 static inline bool append_eutran_neib_cell(struct bitvec *bv, const struct 
osmo_earfcn_si2q *e, size_t *e_offset,
   uint8_t budget)
diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map
index 0018e1c..003d6e8 100644
--- a/src/gsm/libosmogsm.map
+++ b/src/gsm/libosmogsm.map
@@ -336,6 +336,8 @@
 osmo_gsm48_rest_octets_si13_encode;
 osmo_gsm48_rest_octets_si3_decode;
 osmo_gsm48_rest_octets_si4_decode;
+osmo_gsm48_si1ro_nch_pos_encode;
+osmo_gsm48_si1ro_nch_pos_decode;
 gsm48_rr_short_pd_msg_name;
 gsm48_rr_msg_name;
 gsm48_cc_state_name;

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/32650
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I24a0095ac6eee0197f9d9ef9895c7795df6cdc49
Gerrit-Change-Number: 32650
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


[S] Change in osmo-iuh[master]: Move testdir src/tests/ -> tests/

2023-05-07 Thread fixeria
Attention is currently required from: neels, pespin.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-iuh/+/32609 )

Change subject: Move testdir src/tests/ -> tests/
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/32609
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: Ib9ca59d1dffbbb13fcb9ae2e597b3f114f77524e
Gerrit-Change-Number: 32609
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: neels 
Gerrit-Attention: neels 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Sun, 07 May 2023 22:18:25 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in libosmocore[master]: gpsr_ns2_udp: Use osmo_io_fd instead of osmo_fd

2023-05-07 Thread fixeria
Attention is currently required from: laforge, daniel, lynxis lazus.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/30936 )

Change subject: gpsr_ns2_udp: Use osmo_io_fd instead of osmo_fd
..


Patch Set 13:

(1 comment)

File src/gb/gprs_ns2_udp.c:

https://gerrit.osmocom.org/c/libosmocore/+/30936/comment/5a8cb8dc_dc1a2a80
PS13, Line 38: #include "osmocom/core/osmo_io.h"
move above please, also `<>`



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30936
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id776d2d9f35c304620f3d5b94492148dd987f5a0
Gerrit-Change-Number: 30936
Gerrit-PatchSet: 13
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-CC: fixeria 
Gerrit-Attention: laforge 
Gerrit-Attention: daniel 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Sun, 07 May 2023 22:15:13 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[M] Change in libosmocore[master]: tests: Add initial osmo_io tests

2023-05-07 Thread fixeria
Attention is currently required from: laforge, pespin, daniel.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/32181 )

Change subject: tests: Add initial osmo_io tests
..


Patch Set 10:

(1 comment)

File tests/osmo_io/osmo_io_test.c:

https://gerrit.osmocom.org/c/libosmocore/+/32181/comment/306f5af3_34315bf7
PS10, Line 37: #include "osmocom/core/msgb.h"
for the sake of consistency, can we move this above to other imports and use 
`<>`?



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/32181
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ia67629e53f4d2e5784177250d58e268fdfcaa0c2
Gerrit-Change-Number: 32181
Gerrit-PatchSet: 10
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: fixeria 
Gerrit-CC: pespin 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Attention: daniel 
Gerrit-Comment-Date: Sun, 07 May 2023 22:12:27 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[XL] Change in libosmocore[master]: Add osmo_io with initial poll backend

2023-05-07 Thread fixeria
Attention is currently required from: osmith, Hoernchen, neels, laforge, daniel.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/30934 )

Change subject: Add osmo_io with initial poll backend
..


Patch Set 14:

(6 comments)

File src/core/osmo_io.c:

https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/5f8e6f97_4bec484d
PS14, Line 150: msg = iofd->pending;
use `msg = iofd_msgb_pending(iofd)` here?


https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/d2ae9a37_d45f3a58
PS14, Line 324: flags
`sendto_flags`


https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/e3c76b19_80f9ef5b
PS14, Line 516: underlyiny
typo: underlying


File src/core/osmo_io_internal.h:

https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/8220d3f6_846c09cc
PS14, Line 40:  /*! flags to guard closing/freeing of iofd */
Not saying this needs to be done, but IMO a bitmask would be a better fit here 
because adding new flags would not require adding new fields and thus breaking 
ABI.


File src/core/osmo_io_poll.c:

https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/96c515c9_320de74b
PS14, Line 44: inline
Do we really need to force inlining here? Given that this function is used only 
once, compilers will likely inline it anyway...


https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/3a82b046_20ac5f35
PS14, Line 175: struct iofd_backend_ops iofd_poll_ops = {
const?



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30934
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I50d73cf550d6ce8154bf827bf47408131cf5b0a0
Gerrit-Change-Number: 30934
Gerrit-PatchSet: 14
Gerrit-Owner: daniel 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-Attention: osmith 
Gerrit-Attention: Hoernchen 
Gerrit-Attention: neels 
Gerrit-Attention: laforge 
Gerrit-Attention: daniel 
Gerrit-Comment-Date: Sun, 07 May 2023 22:06:36 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in osmo-bts[master]: PCU IF: Update NSE timer field

2023-05-07 Thread arehbein
Attention is currently required from: pespin, fixeria, dexter.

arehbein has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/31885 )

Change subject: PCU IF: Update NSE timer field
..


Patch Set 1:

(2 comments)

File include/osmo-bts/pcuif_proto.h:

https://gerrit.osmocom.org/c/osmo-bts/+/31885/comment/61c50f6f_4d3c53f7
PS1, Line 156: PCU_IF_NUM_NSE_TIMERS
> I found all the 7 timers communicated in the definition of the static array  
> `gprs_ns_timer_strs` in […]
Ah, I just read your other comment below. This has become OS#5991 
https://osmocom.org/issues/5991


File src/common/pcu_sock.c:

https://gerrit.osmocom.org/c/osmo-bts/+/31885/comment/4070bd43_a29a8853
PS1, Line 274: imer
What exactly are you referring to when you write

 > clarifying the existing timers with defines, etc.

(short example)?



--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/31885
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I7385574ef4bd4529d2e7e3d2000b7a1551ef1fcb
Gerrit-Change-Number: 31885
Gerrit-PatchSet: 1
Gerrit-Owner: arehbein 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: fixeria 
Gerrit-CC: pespin 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Sun, 07 May 2023 20:34:05 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: arehbein 
Comment-In-Reply-To: pespin 
Comment-In-Reply-To: fixeria 
Comment-In-Reply-To: dexter 
Gerrit-MessageType: comment


[S] Change in osmo-bts[master]: PCU IF: Update NSE timer field

2023-05-07 Thread arehbein
Attention is currently required from: pespin, fixeria, dexter.

arehbein has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/31885 )

Change subject: PCU IF: Update NSE timer field
..


Patch Set 1:

(1 comment)

File include/osmo-bts/pcuif_proto.h:

https://gerrit.osmocom.org/c/osmo-bts/+/31885/comment/e643ad4c_ab571988
PS1, Line 156: PCU_IF_NUM_NSE_TIMERS
> First of all and before going onto next matters:  […]
I found all the 7 timers communicated in the definition of the static array  
`gprs_ns_timer_strs` in libosmocore/src/gb/gprs_ns_vty.c: 55, plus an 8th timer 
tsns-prov. So I thought why not add it while I'm at it.

It's been a couple of weeks but we addressed this together with Daniel/you had 
a chat about it on libera and it is indeed used by the PCU (just adding this 
here for anyone else reading this); and the question was do we want this to be 
configurable through the BSC as well (currently it's only configurable in the 
PCU via vty).

Not entirely sure right now how the above mentions array in libosmocore relates 
to all of this/haven't checked that.



-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/31885
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I7385574ef4bd4529d2e7e3d2000b7a1551ef1fcb
Gerrit-Change-Number: 31885
Gerrit-PatchSet: 1
Gerrit-Owner: arehbein 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: fixeria 
Gerrit-CC: pespin 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Sun, 07 May 2023 20:29:10 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: arehbein 
Comment-In-Reply-To: pespin 
Comment-In-Reply-To: fixeria 
Comment-In-Reply-To: dexter 
Gerrit-MessageType: comment


[S] Change in libosmocore[master]: core: Check return value of osmo_fd_register()

2023-05-07 Thread arehbein
arehbein has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/32649 )


Change subject: core: Check return value of osmo_fd_register()
..

core: Check return value of osmo_fd_register()

Change-Id: I15bb456c42d5033c9cf4c0937df22fa02b6a6086
---
M src/core/tun.c
1 file changed, 13 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/49/32649/1

diff --git a/src/core/tun.c b/src/core/tun.c
index 4c9dec1..4fa3a7e 100644
--- a/src/core/tun.c
+++ b/src/core/tun.c
@@ -399,7 +399,10 @@
if (rc < 0)
goto err_close_tun;

-   osmo_fd_register(>wqueue.bfd);
+   rc = osmo_fd_register(>wqueue.bfd);
+   if (rc < 0)
+   goto err_close_tun;
+
tundev->opened = true;
return 0;


--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/32649
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I15bb456c42d5033c9cf4c0937df22fa02b6a6086
Gerrit-Change-Number: 32649
Gerrit-PatchSet: 1
Gerrit-Owner: arehbein 
Gerrit-MessageType: newchange


[M] Change in osmo-ttcn3-hacks[master]: sgsn: Add TC_attach_timeout_after_pdp_act

2023-05-07 Thread arehbein
Attention is currently required from: laforge, pespin, lynxis lazus.

arehbein has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31199 )

Change subject: sgsn: Add TC_attach_timeout_after_pdp_act
..


Patch Set 3:

(1 comment)

File sgsn/SGSN_Tests.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31199/comment/d8d143f6_c557207a
PS1, Line 1037: 
attach_req.msgs.gprs_mm.attachRequest.msNetworkCapability.msNetworkCapabilityV.revisionLevelIndicatior
 := '1'B;
> So there are two topics: […]
I've uploaded a patch at 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32648/1 , hope it does what was 
asked for. I ran all the SGSN tests along with the change as well, nothing that 
didn't fail already on the current Jenkins build failed.



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31199
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: Ib3e3c021707b707811388616e28d7d7cc22f7b53
Gerrit-Change-Number: 31199
Gerrit-PatchSet: 3
Gerrit-Owner: arehbein 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: lynxis lazus 
Gerrit-CC: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Sun, 07 May 2023 19:47:58 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: arehbein 
Comment-In-Reply-To: laforge 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[M] Change in osmo-ttcn3-hacks[master]: sgsn: Add TC_attach_timeout_after_pdp_act

2023-05-07 Thread arehbein
Attention is currently required from: arehbein, pespin, lynxis lazus.

Hello Jenkins Builder, fixeria, lynxis lazus,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31199

to look at the new patch set (#3).

Change subject: sgsn: Add TC_attach_timeout_after_pdp_act
..

sgsn: Add TC_attach_timeout_after_pdp_act

Related: OS#4221
Change-Id: Ib3e3c021707b707811388616e28d7d7cc22f7b53
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 70 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/99/31199/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31199
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: Ib3e3c021707b707811388616e28d7d7cc22f7b53
Gerrit-Change-Number: 31199
Gerrit-PatchSet: 3
Gerrit-Owner: arehbein 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: lynxis lazus 
Gerrit-CC: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: arehbein 
Gerrit-Attention: pespin 
Gerrit-Attention: lynxis lazus 
Gerrit-MessageType: newpatchset


[S] Change in osmo-ttcn3-hacks[master]: library: Define 'solSACapability' as '0'

2023-05-07 Thread arehbein
arehbein has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32648 )


Change subject: library: Define 'solSACapability' as '0'
..

library: Define 'solSACapability' as '0'

"according to a comment in f_gmm_attach() there's an encoder problem if it's 
omit.  This sounds like the ts_GMM_ATTACH_REQ()
should be changed to define solSACapability as '0' insteads of omit.  At that 
point none of the users of ts_GMM_ATTACH_REQ
will need to manually modify it anymore."
(quote: hwelte on Gerrit 
(https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31199/comments/17ed155d_cc58810a))

Related: OS#4221
Change-Id: I9eaa39274456e5cc0a1cf025bf956970efc4a51f
---
M library/L3_Templates.ttcn
1 file changed, 16 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/48/32648/1

diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn
index 610d410..156bdb2 100644
--- a/library/L3_Templates.ttcn
+++ b/library/L3_Templates.ttcn
@@ -2209,7 +2209,7 @@
smCapabilitiesviaGPRSChannels := '0'B,
ucs2Support := '1'B,
ssScreeningIndicator := '01'B,
-   solSACapability := omit,
+   solSACapability := '0'B,
revisionLevelIndicatior := omit,
pFCFeatureMode := omit,
extendedGEAbits := omit,

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32648
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: I9eaa39274456e5cc0a1cf025bf956970efc4a51f
Gerrit-Change-Number: 32648
Gerrit-PatchSet: 1
Gerrit-Owner: arehbein 
Gerrit-MessageType: newchange


[M] Change in osmo-ttcn3-hacks[master]: GSM_RR_Types: Add support for VBS/VGCS related L3 RR messages

2023-05-07 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32647 )


Change subject: GSM_RR_Types: Add support for VBS/VGCS related L3 RR messages
..

GSM_RR_Types: Add support for VBS/VGCS related L3 RR messages

This adds support for the VBS/VGCS related L3 RR messages to
GsmRrL3Union / GsmRrL3Message.  Only those with proper L3 header
and classic "tabular" syntax are supported so far, no CSN.1 messages
with short L2 header for SACCH.

Change-Id: I79ca7ee2b94bb370cd7162cfd9db436049998041
---
M library/GSM_RR_Types.ttcn
1 file changed, 121 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/47/32647/1

diff --git a/library/GSM_RR_Types.ttcn b/library/GSM_RR_Types.ttcn
index d41e035..6742b42 100644
--- a/library/GSM_RR_Types.ttcn
+++ b/library/GSM_RR_Types.ttcn
@@ -83,8 +83,16 @@
EXTENDED_MEASUREMENT_REPORT ('00110110'B),
EXTENDED_MEASUREMENT_ORDER  ('00110111'B),
GPRS_SUSPENSION_REQUEST ('00110100'B),
-   //MBMS_ANNOUNCEMENT ('00010110'B), duplicate?
-   //SERVICE_INFORMATION   ('00110110'B), duplicate?
+   //MBMS_ANNOUNCEMENT ('00010110'B), duplicate, DL 
only
+   //SERVICE_INFORMATION   ('00110110'B), duplicate, DL 
only
+
+   VGCS_UPLINK_GRANT   ('1001'B),
+   UPLINK_RELEASE  ('1110'B),
+   UPLINK_BUSY ('00101010'B),
+   TALKER_INDICATION   ('00010001'B),
+   PRIORITY_UPLINK_REQUEST ('01100110'B),
+   DATA_INDICATION ('01100111'B),
+   DATA_INDICATION2('01101000'B),

APPLICATION_INFORMATION ('00111000'B),

@@ -111,8 +119,8 @@
CDMA2000_CLASSMARK_CHANGE   ('01100010'B),
INTERSYS_TO_UTRAN_HO_CMD('01100011'B),
INTERSYS_TO_CDMA2000_HO_CMD ('01100100'B),
-   GERAN_IU_MODE_CLASSMARK_CHG ('01100101'B),
-   INTERSYS_TO_EUTRAN_HO_CMD   ('01100110'B)
+   GERAN_IU_MODE_CLASSMARK_CHG ('01100101'B)
+   //INTERSYS_TO_EUTRAN_HO_CMD ('01100110'B) duplicate, DL only
} with { variant "FIELDLENGTH(8)" };

/* Table 10.4.2 of Section 10.4 / 3GPP TS 44.018 */
@@ -577,6 +585,86 @@
RestOctets  rest_octets
} with { variant "" };

+   /* 9.1.44 */
+   type record TalkerIndication {
+   MsClassmark2LV  cm2,
+   MobileIdentityLVmi,
+   CipheringKeySeqNr   cksn
+   } with { variant "" };
+
+   /* 9.1.44a */
+   type record PriorityUplinkRequest {
+   OCT1est_cause,
+   OCT4token,
+   OCT4reduced_gcr,
+   MobileIdentityLVmi
+   } with { variant "" };
+
+   /* 9.1.44b */
+   type record DataIndication {
+   GsmTmsi tmsi,
+   OCT9app_data,
+   OCT1data_id
+   } with { variant "" };
+
+   /* 9.1.44c */
+   type record DataIndication2 {
+   GsmTmsi tmsi,
+   OCT4reduced_gcr,
+   OCT9app_data,
+   OCT1data_id
+   } with { variant "" };
+
+   /* 9.1.46 */
+   type record UplinkBusy {
+   TalkerPrioEmergIndTLV   prio optional,
+   TokenTV token optional,
+   TalkerIdentityTLV   talker_id optional,
+   UplinkAccessIndTV   ul_access_ind optional
+   } with { variant "" };
+
+   /* 9.1.48 */
+   type record UplinkRelease {
+   RR_Causecause
+   } with { variant "" };
+
+   /* 9.1.49 */
+   type record VgcsUplinkGrant {
+   RequestReferencereq_ref,
+   TimingAdvance   ta
+   } with { variant "" };
+
+
+   /* 10.5.2.64 */
+   type record TalkerPrioEmergIndTLV {
+   OCT1iei ('31'O),
+   uint8_t len,
+   boolean es,
+   BIT3spare,
+   boolean uai_rach,
+   uint3_t priority
+   } with { variant (len) "LENGTHTO(es,spare,uai_rach,priority)" };
+
+   /* 10.5.2.66 */
+   type record TokenTV {
+   OCT1iei ('32'O),
+   OCT4token
+   } with { variant "" };
+
+   /* 10.5.2.66 */
+   

[S] Change in libosmo-gprs[master]: sm: Fix APN IE content not transmitted in Act PDP Ctx Req

2023-05-07 Thread fixeria
Attention is currently required from: laforge, pespin.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-gprs/+/32644 )

Change subject: sm: Fix APN IE content not transmitted in Act PDP Ctx Req
..


Patch Set 1:

(1 comment)

File src/sm/sm_pdu.c:

https://gerrit.osmocom.org/c/libosmo-gprs/+/32644/comment/d65c78bd_87fdc48f
PS1, Line 208:  rc = osmo_apn_from_str(msg->tail, msgb_tailroom(msg), sme->apn);
 :  if (rc < 0)
 :  return -EINVAL;
 :  *l = rc;
 :  msgb_put(msg, *l);
> IMHO this is highly unusual: passing a pointer to msg->tail and storing some 
> data before doing the msgb_put.  All the "legacy" code that I recall does the 
> msgb_put() first.  It would at that point ASSERT if we ever overrun 
> msgb_tailroom, before anything is memcpying over it.

I would not say it's highly unusual, but rather a common practice in cases when 
you don't know how much to `msgb_put()` before calling a buffer filling 
function, e.g. `read()` or `recv()`.

Below are grep results for all my local repositories (39 matches total):

```
$ ./gits do grep "msg->tail, msgb_tailroom" | grep "msgb_tailroom[(]" | wc -l
13
$ ./gits do grep "msg->data, msgb_tailroom" | grep "msgb_tailroom[(]" | wc -l
9
$ ./gits do grep "msgb_data(msg), msgb_tailroom" | grep "msgb_tailroom[(]" | wc 
-l
17
```



--
To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32644
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: I70be2ff5e7e0fea5e93d7b9963064c38a0382f30
Gerrit-Change-Number: 32644
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-CC: laforge 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Sun, 07 May 2023 06:22:24 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Gerrit-MessageType: comment