Change in libosmocore[master]: [RFC] fix gsm0808_sc_cfg <-> gsm48_mr_cfg conversion

2022-10-26 Thread neels
Attention is currently required from: laforge, pespin, dexter.
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/29475 )

Change subject: [RFC] fix gsm0808_sc_cfg <-> gsm48_mr_cfg conversion
..


Patch Set 2:

(2 comments)

File src/gsm/gsm0808_utils.c:

https://gerrit.osmocom.org/c/libosmocore/+/29475/comment/fffb715d_f470169e
PS2, Line 1612: if (s_modes && ((s_modes & modes) == s_modes))
> can it happen that s_modes is 0 here?
it is possible, for example some modes are disabled for HR,
and some are completely disabled for GSM.
This check makes sure we don't set an S bit when s_modes is empty.


https://gerrit.osmocom.org/c/libosmocore/+/29475/comment/3706a808_7492bb4c
PS2, Line 1635: if (!(s15_s0 & s_bit))
> don't you need to "s15_s0 & (1

Change in osmo-ttcn3-hacks[master]: BSC: extend TC_ho_meas_rep_multi_band for ARFCN=0

2022-10-26 Thread fixeria
Attention is currently required from: osmith.
fixeria has restored this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29858 )

Change subject: BSC: extend TC_ho_meas_rep_multi_band for ARFCN=0
..


Restored
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29858
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: Ia8f94d72651061427afc9e34f678544f89d0149b
Gerrit-Change-Number: 29858
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: fixeria 
Gerrit-Attention: osmith 
Gerrit-MessageType: restore


Change in osmo-ttcn3-hacks[master]: BSC: add TC_ho_meas_rep_multi_band

2022-10-26 Thread fixeria
Attention is currently required from: osmith, neels.
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29837 )

Change subject: BSC: add TC_ho_meas_rep_multi_band
..


Patch Set 6:

(1 comment)

Patchset:

PS6:
Sorry for breaking in here. I was experimenting with your patches, and decided 
to push a rebased version as there was a merge conflict due to my recent change.



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29837
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: I4fe6bb9e4b5a69ea6204585ebdf1f157a68a8286
Gerrit-Change-Number: 29837
Gerrit-PatchSet: 6
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels 
Gerrit-CC: fixeria 
Gerrit-CC: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: neels 
Gerrit-Comment-Date: Wed, 26 Oct 2022 21:48:31 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: BSC: add TC_ho_meas_rep_multi_band

2022-10-26 Thread fixeria
Attention is currently required from: neels, fixeria.
fixeria has uploaded a new patch set (#6) to the change originally created by 
osmith. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29837 )

Change subject: BSC: add TC_ho_meas_rep_multi_band
..

BSC: add TC_ho_meas_rep_multi_band

Related: OS#5717
Related: osmo-bsc Ic5e4f0531e08685460948b102367825588d839ba
Change-Id: I4fe6bb9e4b5a69ea6204585ebdf1f157a68a8286
---
M bsc/BSC_Tests.ttcn
M library/BSSMAP_Templates.ttcn
2 files changed, 97 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/37/29837/6
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29837
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: I4fe6bb9e4b5a69ea6204585ebdf1f157a68a8286
Gerrit-Change-Number: 29837
Gerrit-PatchSet: 6
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels 
Gerrit-CC: fixeria 
Gerrit-CC: pespin 
Gerrit-Attention: neels 
Gerrit-Attention: fixeria 
Gerrit-MessageType: newpatchset


Change in osmo-ttcn3-hacks[master]: BSC: add TC_ho_meas_rep_multi_band

2022-10-26 Thread fixeria
Attention is currently required from: neels, fixeria.
fixeria has uploaded a new patch set (#5) to the change originally created by 
osmith. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29837 )

Change subject: BSC: add TC_ho_meas_rep_multi_band
..

BSC: add TC_ho_meas_rep_multi_band

Related: OS#5717
Related: osmo-bsc Ic5e4f0531e08685460948b102367825588d839ba
Change-Id: I4fe6bb9e4b5a69ea6204585ebdf1f157a68a8286
---
M bsc/BSC_Tests.ttcn
M library/BSSMAP_Templates.ttcn
2 files changed, 96 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/37/29837/5
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29837
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: I4fe6bb9e4b5a69ea6204585ebdf1f157a68a8286
Gerrit-Change-Number: 29837
Gerrit-PatchSet: 5
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels 
Gerrit-CC: fixeria 
Gerrit-CC: pespin 
Gerrit-Attention: neels 
Gerrit-Attention: fixeria 
Gerrit-MessageType: newpatchset


Change in osmo-ttcn3-hacks[master]: msc: test auth options, and fall-back to no-auth

2022-10-26 Thread fixeria
Attention is currently required from: neels.
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29692 )

Change subject: msc: test auth options, and fall-back to no-auth
..


Patch Set 3:

(1 comment)

File msc/MSC_Tests.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29692/comment/7fbfeddb_ecf6a120
PS2, Line 6875: kc_support := '01'O,
> did you think about using a template here to spare some lines?
Agreeing with Pau, this would also make this list of testcases easier to read.
Neels: would you mind submitting a patch?



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29692
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: I8e3b02ca83e56ef5349d85f08407509e19fa353c
Gerrit-Change-Number: 29692
Gerrit-PatchSet: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-CC: fixeria 
Gerrit-Attention: neels 
Gerrit-Comment-Date: Wed, 26 Oct 2022 20:13:17 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-pcu[master]: Move LLC enqueuing and retransmit timer to MS object

2022-10-26 Thread pespin
Attention is currently required from: pespin.
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-pcu/+/29884

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

Change subject: Move LLC enqueuing and retransmit timer to MS object
..

Move LLC enqueuing and retransmit timer to MS object

The LLC queue is already in the MS object. The LLC timer and most
of the logic to enqueue its data is independent from the TBF.

Change-Id: I56b89fcac838d8eb732b629734d5e458e9c806d1
---
M src/gprs_ms.c
M src/gprs_ms.h
M src/tbf.cpp
M src/tbf.h
M src/tbf_dl.cpp
M src/tbf_dl.h
M tests/tbf/TbfTest.cpp
M tests/tbf/TbfTest.err
8 files changed, 216 insertions(+), 202 deletions(-)


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I56b89fcac838d8eb732b629734d5e458e9c806d1
Gerrit-Change-Number: 29884
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


Change in osmo-pcu[master]: Rename tbf_alloc_dl_tbf() -> dl_tbf_alloc()

2022-10-26 Thread pespin
pespin has uploaded a new patch set (#3). ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/29886 )

Change subject: Rename tbf_alloc_dl_tbf() -> dl_tbf_alloc()
..

Rename tbf_alloc_dl_tbf() -> dl_tbf_alloc()

Rename it so that it follows the usual prefix for the type it allocates.

Change-Id: I7d30a85fefaa61d100fbd51af4601a3cf7de2159
---
M src/tbf.cpp
M src/tbf_dl.cpp
M src/tbf_dl.h
M tests/alloc/AllocTest.cpp
M tests/app_info/AppInfoTest.cpp
M tests/tbf/TbfTest.cpp
M tests/types/TypesTest.cpp
M tests/ulc/PdchUlcTest.cpp
8 files changed, 20 insertions(+), 20 deletions(-)


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I7d30a85fefaa61d100fbd51af4601a3cf7de2159
Gerrit-Change-Number: 29886
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-MessageType: newpatchset


Change in osmo-pcu[master]: tbf_ul_ack_fsm: Pass ul_tbf instead of generic tbf

2022-10-26 Thread pespin
pespin has uploaded a new patch set (#3). ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/29885 )

Change subject: tbf_ul_ack_fsm: Pass ul_tbf instead of generic tbf
..

tbf_ul_ack_fsm: Pass ul_tbf instead of generic tbf

The UL_ACK_NACK FSM is only used in Uplink TBFs.

Change-Id: Ic9893d274f4b6fafc75a615f7d6dcb9433b94ace
---
M src/tbf_ul_ack_fsm.c
M src/tbf_ul_ack_fsm.h
2 files changed, 12 insertions(+), 14 deletions(-)


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ic9893d274f4b6fafc75a615f7d6dcb9433b94ace
Gerrit-Change-Number: 29885
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-CC: Jenkins Builder
Gerrit-MessageType: newpatchset


Change in osmo-pcu[master]: tbf_ul_ack_fsm: Pass ul_tbf instead of generic tbf

2022-10-26 Thread pespin
pespin has uploaded a new patch set (#2). ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/29885 )

Change subject: tbf_ul_ack_fsm: Pass ul_tbf instead of generic tbf
..

tbf_ul_ack_fsm: Pass ul_tbf instead of generic tbf

The UL_ACK_NACK FSM is only used in Uplink TBFs.

Change-Id: Ic9893d274f4b6fafc75a615f7d6dcb9433b94ace
---
M src/tbf_ul_ack_fsm.c
M src/tbf_ul_ack_fsm.h
2 files changed, 12 insertions(+), 14 deletions(-)


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ic9893d274f4b6fafc75a615f7d6dcb9433b94ace
Gerrit-Change-Number: 29885
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-CC: Jenkins Builder
Gerrit-MessageType: newpatchset


Change in osmo-pcu[master]: Rename tbf_alloc_dl_tbf() -> dl_tbf_alloc()

2022-10-26 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/29886 )


Change subject: Rename tbf_alloc_dl_tbf() -> dl_tbf_alloc()
..

Rename tbf_alloc_dl_tbf() -> dl_tbf_alloc()

Rename it so that it follows the usual prefix for the type it allocates.

Change-Id: I7d30a85fefaa61d100fbd51af4601a3cf7de2159
---
M src/tbf.cpp
M src/tbf_dl.cpp
M src/tbf_dl.h
M tests/alloc/AllocTest.cpp
M tests/app_info/AppInfoTest.cpp
M tests/tbf/TbfTest.cpp
M tests/types/TypesTest.cpp
M tests/ulc/PdchUlcTest.cpp
8 files changed, 20 insertions(+), 20 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/86/29886/1

diff --git a/src/tbf.cpp b/src/tbf.cpp
index 71b4780..4c37338 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -694,7 +694,7 @@

bts_do_rate_ctr_inc(bts, CTR_TBF_REUSED);

-   new_tbf = tbf_alloc_dl_tbf(bts, ms(),
+   new_tbf = dl_tbf_alloc(bts, ms(),
this->trx->trx_no, false);

if (!new_tbf) {
diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index 6d02c8e..3a5a2e7 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -106,7 +106,7 @@
return 0;
 }

-struct gprs_rlcmac_dl_tbf *tbf_alloc_dl_tbf(struct gprs_rlcmac_bts *bts, 
GprsMs *ms, int8_t use_trx, bool single_slot)
+struct gprs_rlcmac_dl_tbf *dl_tbf_alloc(struct gprs_rlcmac_bts *bts, GprsMs 
*ms, int8_t use_trx, bool single_slot)
 {
struct gprs_rlcmac_dl_tbf *tbf;
int rc;
@@ -210,7 +210,7 @@
// Create new TBF (any TRX)
 /* FIXME: Copy and paste with alloc_ul_tbf */
/* set number of downlink slots according to multislot class */
-   dl_tbf = tbf_alloc_dl_tbf(bts, ms, use_trx, ss);
+   dl_tbf = dl_tbf_alloc(bts, ms, use_trx, ss);

if (!dl_tbf) {
LOGPMS(ms, DTBF, LOGL_NOTICE, "No PDCH resource\n");
diff --git a/src/tbf_dl.h b/src/tbf_dl.h
index 5920672..1ed3fb2 100644
--- a/src/tbf_dl.h
+++ b/src/tbf_dl.h
@@ -118,7 +118,7 @@
return m_window.ws();
 }

-struct gprs_rlcmac_dl_tbf *tbf_alloc_dl_tbf(struct gprs_rlcmac_bts *bts, 
GprsMs *ms,
+struct gprs_rlcmac_dl_tbf *dl_tbf_alloc(struct gprs_rlcmac_bts *bts, GprsMs 
*ms,
int8_t use_trx, bool single_slot);

 #else /* ifdef __cplusplus */
diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp
index b5d4b95..5e1f06d 100644
--- a/tests/alloc/AllocTest.cpp
+++ b/tests/alloc/AllocTest.cpp
@@ -48,7 +48,7 @@
if (dir == GPRS_RLCMAC_UL_TBF)
return tbf_alloc_ul_tbf(bts, ms, use_trx, single_slot);
else
-   return tbf_alloc_dl_tbf(bts, ms, use_trx, single_slot);
+   return dl_tbf_alloc(bts, ms, use_trx, single_slot);
 }

 static void check_tfi_usage(struct gprs_rlcmac_bts *bts)
@@ -231,7 +231,7 @@
dump_assignment(ul_tbf, "UL", verbose);

/* assume final ack has not been sent */
-   dl_tbf = tbf_alloc_dl_tbf(bts, ms, ms_current_trx(ms)->trx_no, false);
+   dl_tbf = dl_tbf_alloc(bts, ms, ms_current_trx(ms)->trx_no, false);
if (!dl_tbf)
return false;

@@ -265,7 +265,7 @@
ms = bts_alloc_ms(bts, ms_class, 0);
/* Avoid delaying free to avoid tons of to-be-freed ms objects queuing 
*/
ms_set_timeout(ms, 0);
-   dl_tbf = tbf_alloc_dl_tbf(bts, ms, -1, true);
+   dl_tbf = dl_tbf_alloc(bts, ms, -1, true);
if (!dl_tbf)
return false;

@@ -328,7 +328,7 @@
dump_assignment(ul_tbf, "UL", true);

/* assume final ack has not been sent */
-   dl_tbf = tbf_alloc_dl_tbf(bts, ms, trx_no, false);
+   dl_tbf = dl_tbf_alloc(bts, ms, trx_no, false);
if (!dl_tbf)
return false;

@@ -487,7 +487,7 @@
case TEST_MODE_DL_AND_UL:
if (ms_dl_tbf(old_ms))
tbf_free(ms_dl_tbf(old_ms));
-   tbf = tbf_alloc_dl_tbf(bts, old_ms, trx_no, false);
+   tbf = dl_tbf_alloc(bts, old_ms, trx_no, false);
if (tbf == NULL) {
OSMO_ASSERT(trx_no != -1 || 
bts_all_pdch_allocated(bts));
ms_unref(old_ms);
@@ -772,7 +772,7 @@
trx->pdch[7].enable();

ms = bts_alloc_ms(bts, ms_class, egprs_ms_class);
-   dl_tbf1 = tbf_alloc_dl_tbf(bts, ms, 0, false);
+   dl_tbf1 = dl_tbf_alloc(bts, ms, 0, false);
OSMO_ASSERT(dl_tbf1);

for (int i = 0; i < 8; i++) {
@@ -783,7 +783,7 @@
printf("TBF1: numTs(%d)\n", numTs1);

ms = bts_alloc_ms(bts, ms_class, egprs_ms_class);
-   dl_tbf2 = tbf_alloc_dl_tbf(bts, ms, 0, false);
+   dl_tbf2 = dl_tbf_alloc(bts, ms, 0, false);
OSMO_ASSERT(dl_tbf2);

for (int i = 0; i < 8; i++) {
diff --git a/tests/app_info/AppInfoTest.cpp b/tests/app_info/AppInfoTest.cpp
index 9530d09..6806f20 100644
--- a/tests/app_info/AppInfoTest.cpp
+++ b/tests/app_info/AppInfoTest.cpp
@@ -88,9 +88,9 @@

Change in osmo-pcu[master]: tbf_ul_ack_fsm: Pass ul_tbf instead of generic tbf

2022-10-26 Thread Jenkins Builder
Jenkins Builder has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/29885 )

Change subject: tbf_ul_ack_fsm: Pass ul_tbf instead of generic tbf
..


Patch Set 1:

(2 comments)

File src/tbf_ul_ack_fsm.c:

Robot Comment from checkpatch (run ID jenkins-gerrit-lint-461):
https://gerrit.osmocom.org/c/osmo-pcu/+/29885/comment/adb8bb03_608d4d22
PS1, Line 234: bool tbf_ul_ack_rts(const struct gprs_rlcmac_ul_tbf* ul_tbf)
"foo* bar" should be "foo *bar"


Robot Comment from checkpatch (run ID jenkins-gerrit-lint-461):
https://gerrit.osmocom.org/c/osmo-pcu/+/29885/comment/c747ef57_153e7296
PS1, Line 241: bool tbf_ul_ack_waiting_cnf_final_ack(const struct 
gprs_rlcmac_ul_tbf* ul_tbf)
"foo* bar" should be "foo *bar"



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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ic9893d274f4b6fafc75a615f7d6dcb9433b94ace
Gerrit-Change-Number: 29885
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Wed, 26 Oct 2022 18:18:47 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-pcu[master]: tbf_ul_ack_fsm: Pass ul_tbf instead of generic tbf

2022-10-26 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/29885 )


Change subject: tbf_ul_ack_fsm: Pass ul_tbf instead of generic tbf
..

tbf_ul_ack_fsm: Pass ul_tbf instead of generic tbf

The UL_ACK_NACK FSM is only used in Uplink TBFs.

Change-Id: Ic9893d274f4b6fafc75a615f7d6dcb9433b94ace
---
M src/tbf_ul_ack_fsm.c
M src/tbf_ul_ack_fsm.h
2 files changed, 12 insertions(+), 14 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/85/29885/1

diff --git a/src/tbf_ul_ack_fsm.c b/src/tbf_ul_ack_fsm.c
index 364ef00..6b5868c 100644
--- a/src/tbf_ul_ack_fsm.c
+++ b/src/tbf_ul_ack_fsm.c
@@ -216,7 +216,7 @@
 }


-struct msgb *tbf_ul_ack_create_rlcmac_msg(const struct gprs_rlcmac_tbf *tbf, 
uint32_t fn, uint8_t ts)
+struct msgb *tbf_ul_ack_create_rlcmac_msg(const struct gprs_rlcmac_ul_tbf 
*ul_tbf, uint32_t fn, uint8_t ts)
 {
int rc;
struct tbf_ul_ack_ev_create_rlcmac_msg_ctx data_ctx = {
@@ -224,31 +224,29 @@
.ts = ts,
.msg = NULL,
};
-   OSMO_ASSERT(tbf_direction(tbf) == GPRS_RLCMAC_UL_TBF);

-   rc = osmo_fsm_inst_dispatch(tbf_ul_ack_fi((const struct 
gprs_rlcmac_ul_tbf *)tbf), TBF_UL_ACK_EV_CREATE_RLCMAC_MSG, &data_ctx);
+   rc = osmo_fsm_inst_dispatch(tbf_ul_ack_fi(ul_tbf), 
TBF_UL_ACK_EV_CREATE_RLCMAC_MSG, &data_ctx);
if (rc != 0 || !data_ctx.msg)
return NULL;
return data_ctx.msg;
 }

-bool tbf_ul_ack_rts(const struct gprs_rlcmac_tbf *tbf)
+bool tbf_ul_ack_rts(const struct gprs_rlcmac_ul_tbf* ul_tbf)
 {
-   struct osmo_fsm_inst *fi = tbf_ul_ack_fi((const struct 
gprs_rlcmac_ul_tbf *)tbf);
+   struct osmo_fsm_inst *fi = tbf_ul_ack_fi(ul_tbf);
return fi->state == TBF_UL_ACK_ST_SCHED_UL_ACK;
 }

 /* Did we already send the Final ACK and we are waiting for its confirmation 
(CTRL ACK) ? */
-bool tbf_ul_ack_waiting_cnf_final_ack(const struct gprs_rlcmac_tbf* tbf)
+bool tbf_ul_ack_waiting_cnf_final_ack(const struct gprs_rlcmac_ul_tbf* ul_tbf)
 {
-   OSMO_ASSERT(tbf_direction(tbf) == GPRS_RLCMAC_UL_TBF);
-   struct osmo_fsm_inst *fi = tbf_ul_ack_fi((const struct 
gprs_rlcmac_ul_tbf *)tbf);
+   struct osmo_fsm_inst *fi = tbf_ul_ack_fi(ul_tbf);
return fi->state == TBF_UL_ACK_ST_WAIT_ACK;
 }

-bool tbf_ul_ack_exp_ctrl_ack(const struct gprs_rlcmac_tbf *tbf, uint32_t fn, 
uint8_t ts)
+bool tbf_ul_ack_exp_ctrl_ack(const struct gprs_rlcmac_ul_tbf *ul_tbf, uint32_t 
fn, uint8_t ts)
 {
-   struct osmo_fsm_inst *fi = tbf_ul_ack_fi((const struct 
gprs_rlcmac_ul_tbf *)tbf);
+   struct osmo_fsm_inst *fi = tbf_ul_ack_fi(ul_tbf);
return fi->state == TBF_UL_ACK_ST_WAIT_ACK;
/* FIXME: validate FN and TS match: && ctx->poll_fn = fn && 
ctx->poll_ts == ts */
 }
diff --git a/src/tbf_ul_ack_fsm.h b/src/tbf_ul_ack_fsm.h
index d2e9332..f25972e 100644
--- a/src/tbf_ul_ack_fsm.h
+++ b/src/tbf_ul_ack_fsm.h
@@ -62,7 +62,7 @@
 };


-struct msgb *tbf_ul_ack_create_rlcmac_msg(const struct gprs_rlcmac_tbf *tbf, 
uint32_t fn, uint8_t ts);
-bool tbf_ul_ack_rts(const struct gprs_rlcmac_tbf *tbf);
-bool tbf_ul_ack_waiting_cnf_final_ack(const struct gprs_rlcmac_tbf *tbf);
-bool tbf_ul_ack_exp_ctrl_ack(const struct gprs_rlcmac_tbf *tbf, uint32_t fn, 
uint8_t ts);
+struct msgb *tbf_ul_ack_create_rlcmac_msg(const struct gprs_rlcmac_ul_tbf 
*ul_tbf, uint32_t fn, uint8_t ts);
+bool tbf_ul_ack_rts(const struct gprs_rlcmac_ul_tbf *ul_tbf);
+bool tbf_ul_ack_waiting_cnf_final_ack(const struct gprs_rlcmac_ul_tbf *ul_tbf);
+bool tbf_ul_ack_exp_ctrl_ack(const struct gprs_rlcmac_ul_tbf *ul_tbf, uint32_t 
fn, uint8_t ts);

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ic9893d274f4b6fafc75a615f7d6dcb9433b94ace
Gerrit-Change-Number: 29885
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


Change in osmo-pcu[master]: Move LLC enqueuing and retransmit timer to MS object

2022-10-26 Thread pespin
pespin has uploaded a new patch set (#2). ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/29884 )

Change subject: Move LLC enqueuing and retransmit timer to MS object
..

Move LLC enqueuing and retransmit timer to MS object

The LLC queue is already in the MS object. The LLC timer and most
of the logic to enqueu its data is independent from the TBF.

Change-Id: I56b89fcac838d8eb732b629734d5e458e9c806d1
---
M src/gprs_ms.c
M src/gprs_ms.h
M src/tbf.cpp
M src/tbf.h
M src/tbf_dl.cpp
M src/tbf_dl.h
M tests/tbf/TbfTest.cpp
M tests/tbf/TbfTest.err
8 files changed, 216 insertions(+), 202 deletions(-)


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I56b89fcac838d8eb732b629734d5e458e9c806d1
Gerrit-Change-Number: 29884
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-CC: Jenkins Builder
Gerrit-MessageType: newpatchset


Change in osmo-pcu[master]: Move LLC enqueuing and retransmit timer to MS object

2022-10-26 Thread Jenkins Builder
Jenkins Builder has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/29884 )

Change subject: Move LLC enqueuing and retransmit timer to MS object
..


Patch Set 1:

(1 comment)

File src/gprs_ms.c:

Robot Comment from checkpatch (run ID jenkins-gerrit-lint-459):
https://gerrit.osmocom.org/c/osmo-pcu/+/29884/comment/7f4b2ea5_d978fff4
PS1, Line 1050: }
adding a line without newline at end of file



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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I56b89fcac838d8eb732b629734d5e458e9c806d1
Gerrit-Change-Number: 29884
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Wed, 26 Oct 2022 17:45:27 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-bsc[master]: vty: Fix and deprecate typo in cmd 'amr-payload bandwith-efficient'

2022-10-26 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/29876 )

Change subject: vty: Fix and deprecate typo in cmd 'amr-payload 
bandwith-efficient'
..

vty: Fix and deprecate typo in cmd 'amr-payload bandwith-efficient'

Related: OS#6161
Change-Id: Iefbadea374974587a421ec981e246b87c7b5de59
---
M src/osmo-bsc/bsc_vty.c
M src/osmo-bsc/lchan_rtp_fsm.c
2 files changed, 16 insertions(+), 4 deletions(-)

Approvals:
  fixeria: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index 11fcfad..a20cdfb 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -2524,7 +2524,7 @@
if (msc->amr_octet_aligned)
vty_out(vty, " amr-payload octet-aligned%s", VTY_NEWLINE);
else
-   vty_out(vty, " amr-payload bandwith-efficient%s", VTY_NEWLINE);
+   vty_out(vty, " amr-payload bandwidth-efficient%s", VTY_NEWLINE);
 }

 static void msc_write_nri(struct vty *vty, struct bsc_msc_data *msc, bool 
verbose);
@@ -3212,7 +3212,7 @@
 DEFUN_USRATTR(cfg_net_msc_amr_octet_align,
  cfg_net_msc_amr_octet_align_cmd,
  X(BSC_VTY_ATTR_NEW_LCHAN),
- "amr-payload (octet-aligned|bandwith-efficient",
+ "amr-payload (octet-aligned|bandwidth-efficient)",
  "Set AMR payload framing mode\n"
  "payload fields aligned on octet boundaries\n"
  "payload fields packed (AoIP)\n")
@@ -3221,11 +3221,22 @@

if (strcmp(argv[0], "octet-aligned") == 0)
data->amr_octet_aligned = true;
-   else if (strcmp(argv[0], "bandwith-efficient") == 0)
+   else if (strcmp(argv[0], "bandwidth-efficient") == 0)
data->amr_octet_aligned = false;
+   else {
+   data->amr_octet_aligned = false;
+   vty_out(vty, "%% Command 'amr-payload': Option 
'bandwith-efficient' "
+"containing typo is deprecated, use 
'bandwidth-efficient' instead!%s",
+VTY_NEWLINE);
+   }

return CMD_SUCCESS;
 }
+ALIAS_DEPRECATED(cfg_net_msc_amr_octet_align,
+cfg_net_msc_amr_octet_align_deprecated_cmd,
+"amr-payload bandwith-efficient",
+"Set AMR payload framing mode\n"
+"payload fields packed (AoIP)\n");

 DEFUN_ATTR(cfg_msc_nri_add, cfg_msc_nri_add_cmd,
   "nri add <0-32767> [<0-32767>]",
@@ -3527,6 +3538,7 @@
install_element(MSC_NODE, &cfg_net_msc_amr_5_15_cmd);
install_element(MSC_NODE, &cfg_net_msc_amr_4_75_cmd);
install_element(MSC_NODE, &cfg_net_msc_amr_octet_align_cmd);
+   install_element(MSC_NODE, &cfg_net_msc_amr_octet_align_deprecated_cmd);
install_element(MSC_NODE, &cfg_net_msc_lcls_mode_cmd);
install_element(MSC_NODE, &cfg_net_msc_lcls_mismtch_cmd);
install_element(MSC_NODE, &cfg_msc_cs7_bsc_addr_cmd);
diff --git a/src/osmo-bsc/lchan_rtp_fsm.c b/src/osmo-bsc/lchan_rtp_fsm.c
index b788e99..466b168 100644
--- a/src/osmo-bsc/lchan_rtp_fsm.c
+++ b/src/osmo-bsc/lchan_rtp_fsm.c
@@ -919,7 +919,7 @@
if (bss_side && verb_info->codecs[0] == CODEC_AMR_8000_1) {
/* FIXME: At the moment all BTSs we support are using the
 * octet-aligned payload format. However, in the future
-* we may support BTSs that are using bandwith-efficient
+* we may support BTSs that are using bandwidth-efficient
 * format. In this case we will have to add functionality
 * that distinguishes by the BTS model which mode to use. */
verb_info->param.amr_octet_aligned = true;

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Iefbadea374974587a421ec981e246b87c7b5de59
Gerrit-Change-Number: 29876
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-MessageType: merged


Change in osmo-mgw[master]: Improve logging on AMR OA<->BWE conversion failure

2022-10-26 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/29877 )

Change subject: Improve logging on AMR OA<->BWE conversion failure
..

Improve logging on AMR OA<->BWE conversion failure

Change-Id: I7c7dd10650c1d249c723d6781585b343004bd64d
---
M src/libosmo-mgcp/mgcp_network.c
1 file changed, 9 insertions(+), 4 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, but someone else must approve
  osmith: Looks good to me, approved



diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c
index 72d97fd..d93e695 100644
--- a/src/libosmo-mgcp/mgcp_network.c
+++ b/src/libosmo-mgcp/mgcp_network.c
@@ -737,6 +737,7 @@
struct rtp_hdr *rtp_hdr;
unsigned int payload_len;
int rc;
+   bool orig_is_oa;

if (msgb_length(msg) < sizeof(struct rtp_hdr)) {
LOGPENDP(endp, DRTP, LOGL_ERROR, "AMR RTP packet too short (%d 
< %zu)\n", msgb_length(msg), sizeof(struct rtp_hdr));
@@ -744,10 +745,10 @@
}

rtp_hdr = (struct rtp_hdr *)msgb_data(msg);
-
payload_len = msgb_length(msg) - sizeof(struct rtp_hdr);
+   orig_is_oa = osmo_amr_is_oa(rtp_hdr->data, payload_len);

-   if (osmo_amr_is_oa(rtp_hdr->data, payload_len)) {
+   if (orig_is_oa) {
if (!target_is_oa)
/* Input data is oa an target format is bwe
 * ==> convert */
@@ -769,7 +770,10 @@
}
if (rc < 0) {
LOGPENDP(endp, DRTP, LOGL_ERROR,
-"AMR RTP packet conversion failed\n");
+"RTP AMR packet conversion %s->%s failed: %s\n",
+orig_is_oa ? "OA" : "BWE",
+target_is_oa ? "OA" : "BWE",
+osmo_hexdump(rtp_hdr->data, payload_len));
return -EINVAL;
}

@@ -1226,7 +1230,8 @@

conn_dst->end.codec->param.amr_octet_aligned);
if (rc < 0) {
LOGPENDP(endp, DRTP, LOGL_ERROR,
-"Error in AMR octet-aligned 
<-> bandwidth-efficient mode conversion\n");
+"Error in AMR octet-aligned 
<-> bandwidth-efficient mode conversion (target=%s)\n",
+
conn_dst->end.codec->param.amr_octet_aligned ? "octet-aligned" : 
"bandwidth-efficient");
break;
}
} else if (rtp_end->rfc5993_hr_convert &&

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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I7c7dd10650c1d249c723d6781585b343004bd64d
Gerrit-Change-Number: 29877
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-msc[master]: vlr: auth_fsm: rename AUTH_RES to AUTH_SUCCESS

2022-10-26 Thread pespin
Attention is currently required from: neels.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/29883 )

Change subject: vlr: auth_fsm: rename AUTH_RES to AUTH_SUCCESS
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I7124a3591fcf36cee06d7488eeb94f9b85af5dc2
Gerrit-Change-Number: 29883
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: neels 
Gerrit-Comment-Date: Wed, 26 Oct 2022 16:43:17 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-msc[master]: vlr: implement fallback to no-auth

2022-10-26 Thread pespin
Attention is currently required from: neels.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/29699 )

Change subject: vlr: implement fallback to no-auth
..


Patch Set 2: Code-Review+1


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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I5feda196fa481dd8a46b0e4721c64b7c6600f0d1
Gerrit-Change-Number: 29699
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: neels 
Gerrit-Comment-Date: Wed, 26 Oct 2022 16:43:01 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-msc[master]: msc_a,vlr: rename ciphering_required to try_ciphering

2022-10-26 Thread pespin
Attention is currently required from: neels.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/29694 )

Change subject: msc_a,vlr: rename ciphering_required to try_ciphering
..


Patch Set 2: Code-Review+1


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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ia55085e3b36feb275bcf92fc91a4be7d1c24a6b9
Gerrit-Change-Number: 29694
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: neels 
Gerrit-Comment-Date: Wed, 26 Oct 2022 16:41:59 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-msc[master]: msc_a,vlr: add ciphering_required (accurately named)

2022-10-26 Thread pespin
Attention is currently required from: neels.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/29695 )

Change subject: msc_a,vlr: add ciphering_required (accurately named)
..


Patch Set 2: Code-Review+1

(1 comment)

File src/libvlr/vlr_access_req_fsm.c:

https://gerrit.osmocom.org/c/osmo-msc/+/29695/comment/9aa56d34_5288d995
PS2, Line 650:  if (ciphering_required)
In case of assertion having the string  "(!try_ciphering && 
ciphering_required)" like I suggested is much more informative IMHO, but fine 
anyway.



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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I52090c5f5db997030da7c2ed9beca9c51f55f4cf
Gerrit-Change-Number: 29695
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-CC: msuraev 
Gerrit-Attention: neels 
Gerrit-Comment-Date: Wed, 26 Oct 2022 16:41:21 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-msc[master]: libosmonetify SMPP

2022-10-26 Thread pespin
Attention is currently required from: msuraev.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/28849 )

Change subject: libosmonetify SMPP
..


Patch Set 49:

(17 comments)

File src/libsmpputil/smpp_msc.c:

https://gerrit.osmocom.org/c/osmo-msc/+/28849/comment/7ebe887b_ad124956
PS49, Line 847: if (!g_smsc->link) {
why is this check added now?


File src/libsmpputil/smpp_smsc.c:

https://gerrit.osmocom.org/c/osmo-msc/+/28849/comment/17cecaf8_e7993d7b
PS49, Line 166: acl->esme = NULL;
Nice bug here setting to null before calling put on it. Better submit a patch 
preior to this one just fixing this.


https://gerrit.osmocom.org/c/osmo-msc/+/28849/comment/827d4d94_8a9fb4fe
PS49, Line 238: if (esme->use < 0)
how can use be negative?


https://gerrit.osmocom.org/c/osmo-msc/+/28849/comment/f2536112_0b0eb65f
PS49, Line 347: osmo_stream_srv_send(esme->srv, msg);
not return value to  check?


https://gerrit.osmocom.org/c/osmo-msc/+/28849/comment/b572a5a8_fa3652fe
PS49, Line 760: uint32_t smpp_size = esme->read_msg ? 
esme->read_msg->cb[0] : 0;
you are casting unsigned long to "uint32_t". Better keep unsigned long?


https://gerrit.osmocom.org/c/osmo-msc/+/28849/comment/13927ea8_da495010
PS49, Line 772: rc = osmo_stream_srv_recv(conn, esme->read_msg); /* N. 
B: the data will be appended to previously received (if any) */
move the commend in the line above better.


https://gerrit.osmocom.org/c/osmo-msc/+/28849/comment/4f744e45_a7e2c84e
PS49, Line 775: msgb_reset(esme->read_msg);
does msgb_reset also clear esme->read_msg->cb[0]? we need to ensure it is 0 
here.


https://gerrit.osmocom.org/c/osmo-msc/+/28849/comment/17cf7e74_3916a0a6
PS49, Line 791: return -EBADF;
why are you returning -EBADF here if the fd is not closed? This is wrong.


https://gerrit.osmocom.org/c/osmo-msc/+/28849/comment/ccc7f6e3_f2d1eb1a
PS49, Line 799: /* check that we can receive expected amount of data */
This whole block can be moved under the "esme->read_msg->cb[0] = smpp_size;" 
statement above, then it is only checked once instead of each time we receive 
data and the code is clear.


https://gerrit.osmocom.org/c/osmo-msc/+/28849/comment/9a159fd7_4a7055a7
PS49, Line 803: LOGPESME(esme, LOGL_ERROR, "unable to 
reallocate %u bytes for message buffer\n", smpp_size);
unable to resize message buffer to %u bytes.


https://gerrit.osmocom.org/c/osmo-msc/+/28849/comment/fddefff1_066f7386
PS49, Line 825: static int esme_link_read_cb(struct osmo_stream_srv *conn)
Do we really need a second level callback function? Why not merging this 
function and the one above and have a goto path for the error paths as we 
usually do?
I was first confused because you were returning  -EBADF in the read callback 
function above.


https://gerrit.osmocom.org/c/osmo-msc/+/28849/comment/86f1073a_4fa4d24e
PS49, Line 843: default:
wrong indentation.


https://gerrit.osmocom.org/c/osmo-msc/+/28849/comment/d6084949_932b6847
PS49, Line 851: static int esme_link_close_cb(struct osmo_stream_srv *conn)
I foresee some problems with this and esme_destroy. I'll look at it closly when 
you fix the other stuff.


https://gerrit.osmocom.org/c/osmo-msc/+/28849/comment/9fe1950c_2c4962e0
PS49, Line 949: osmo_stream_srv_link_set_addr(smsc->link, bind_addr ? 
bind_addr : "0.0.0.0");
This should be improve in a follow up patch to probably pass NULL instead of 
"0.0.0.0" in order to support IPv6.


https://gerrit.osmocom.org/c/osmo-msc/+/28849/comment/98f9e91f_48ea9cfa
PS49, Line 985: osmo_stream_srv_link_close(smsc->link);
you most probably want to set sms->link=NULL here from code I saw above.


File src/libsmpputil/smpp_vty.c:

https://gerrit.osmocom.org/c/osmo-msc/+/28849/comment/1998658e_38c5f2af
PS49, Line 83:  bool is_running = smsc->link;
Idea: You can probably add an smsc_is_running() API or whatever which checks 
this internally.


https://gerrit.osmocom.org/c/osmo-msc/+/28849/comment/b1a08b27_fc25b615
PS49, Line 190: vty_out(vty, " local-tcp-port %u%s", 
smsc->listen_port ? smsc->listen_port : SMPP_PORT, VTY_NEWLINE);
I wonder why do we want to have listen_port set to 0 at any time, why not set 
it to SMPP_PORT by default?



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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Idc2e60af1010783e555e61b114ae61f55a89d890
Gerrit-Change-Number: 28849
Gerrit-PatchSet: 49
Gerrit-Owner: msuraev 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-Attention: msuraev 
Gerrit-Comment-Date: Wed, 26 Oct 2022 16:39:14 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-msc[master]: vlr: auth_fsm: rename AUTH_RES to AUTH_SUCCESS

2022-10-26 Thread neels
neels has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/29883 )


Change subject: vlr: auth_fsm: rename AUTH_RES to AUTH_SUCCESS
..

vlr: auth_fsm: rename AUTH_RES to AUTH_SUCCESS

Previous patch added the AUTH_FAILURE event, which means that the
AUTH_RES event now only signals success. Reflect that in the name.

No functional change.

Related: OS#4830
Change-Id: I7124a3591fcf36cee06d7488eeb94f9b85af5dc2
---
M include/osmocom/msc/vlr.h
M src/libvlr/vlr_lu_fsm.c
M tests/msc_vlr/msc_vlr_test_authen_reuse.err
M tests/msc_vlr/msc_vlr_test_call.err
M tests/msc_vlr/msc_vlr_test_gsm_authen.err
M tests/msc_vlr/msc_vlr_test_gsm_ciph.err
M tests/msc_vlr/msc_vlr_test_hlr_reject.err
M tests/msc_vlr/msc_vlr_test_ms_timeout.err
M tests/msc_vlr/msc_vlr_test_umts_authen.err
9 files changed, 44 insertions(+), 44 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/83/29883/1

diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h
index 2517693..bfafd45 100644
--- a/include/osmocom/msc/vlr.h
+++ b/include/osmocom/msc/vlr.h
@@ -67,7 +67,7 @@
VLR_ULA_E_UPDATE_LA,/* Initial trigger (LU from MS) */
VLR_ULA_E_SEND_ID_ACK,  /* Result of Send-ID from PVLR */
VLR_ULA_E_SEND_ID_NACK, /* Result of Send-ID from PVLR */
-   VLR_ULA_E_AUTH_RES, /* Successful result of auth procedure */
+   VLR_ULA_E_AUTH_SUCCESS, /* Successful result of auth procedure */
VLR_ULA_E_AUTH_FAILURE, /* Auth procedure failed */
VLR_ULA_E_CIPH_RES, /* Result of Ciphering Mode Command */
VLR_ULA_E_ID_IMSI,  /* IMSI received from MS */
diff --git a/src/libvlr/vlr_lu_fsm.c b/src/libvlr/vlr_lu_fsm.c
index a48040e..04831d9 100644
--- a/src/libvlr/vlr_lu_fsm.c
+++ b/src/libvlr/vlr_lu_fsm.c
@@ -642,7 +642,7 @@
OSMO_VALUE_STRING(VLR_ULA_E_UPDATE_LA),
OSMO_VALUE_STRING(VLR_ULA_E_SEND_ID_ACK),
OSMO_VALUE_STRING(VLR_ULA_E_SEND_ID_NACK),
-   OSMO_VALUE_STRING(VLR_ULA_E_AUTH_RES),
+   OSMO_VALUE_STRING(VLR_ULA_E_AUTH_SUCCESS),
OSMO_VALUE_STRING(VLR_ULA_E_AUTH_FAILURE),
OSMO_VALUE_STRING(VLR_ULA_E_CIPH_RES),
OSMO_VALUE_STRING(VLR_ULA_E_ID_IMSI),
@@ -912,7 +912,7 @@
LU_TIMEOUT_LONG, 0);
vsub->auth_fsm = auth_fsm_start(lfp->vsub,
fi,
-   VLR_ULA_E_AUTH_RES,
+   VLR_ULA_E_AUTH_SUCCESS,
VLR_ULA_E_AUTH_FAILURE,
lfp->is_r99,
lfp->is_utran);
@@ -1149,7 +1149,7 @@
lfp->upd_hlr_vlr_fsm = NULL;

switch (event) {
-   case VLR_ULA_E_AUTH_RES:
+   case VLR_ULA_E_AUTH_SUCCESS:
/* Result == Pass */
vlr_loc_upd_post_auth(fi);
return;
@@ -1375,7 +1375,7 @@
.action = lu_fsm_wait_pvlr,
},
[VLR_ULA_S_WAIT_AUTH] = {
-   .in_event_mask = S(VLR_ULA_E_AUTH_RES) |
+   .in_event_mask = S(VLR_ULA_E_AUTH_SUCCESS) |
 S(VLR_ULA_E_AUTH_FAILURE),
.out_state_mask = S(VLR_ULA_S_WAIT_CIPH) |
  S(VLR_ULA_S_WAIT_LU_COMPL) |
diff --git a/tests/msc_vlr/msc_vlr_test_authen_reuse.err 
b/tests/msc_vlr/msc_vlr_test_authen_reuse.err
index be28348..1f8afb0 100644
--- a/tests/msc_vlr/msc_vlr_test_authen_reuse.err
+++ b/tests/msc_vlr/msc_vlr_test_authen_reuse.err
@@ -66,7 +66,7 @@
 DVLR VLR_Authenticate(IMSI-90170010650:GERAN-A:LU){VLR_SUB_AS_WAIT_RESP}: 
state_chg to VLR_SUB_AS_AUTHENTICATED
 DVLR 
VLR_Authenticate(IMSI-90170010650:GERAN-A:LU){VLR_SUB_AS_AUTHENTICATED}: 
Terminating (cause = OSMO_FSM_TERM_REGULAR)
 DVLR 
VLR_Authenticate(IMSI-90170010650:GERAN-A:LU){VLR_SUB_AS_AUTHENTICATED}: 
Removing from parent vlr_lu_fsm(IMSI-90170010650:GERAN-A:LU)
-DVLR vlr_lu_fsm(IMSI-90170010650:GERAN-A:LU){VLR_ULA_S_WAIT_AUTH}: 
Received Event VLR_ULA_E_AUTH_RES
+DVLR vlr_lu_fsm(IMSI-90170010650:GERAN-A:LU){VLR_ULA_S_WAIT_AUTH}: 
Received Event VLR_ULA_E_AUTH_SUCCESS
 DVLR vlr_lu_fsm(IMSI-90170010650:GERAN-A:LU){VLR_ULA_S_WAIT_AUTH}: 
vlr_loc_upd_post_auth()
 DVLR vlr_lu_fsm(IMSI-90170010650:GERAN-A:LU){VLR_ULA_S_WAIT_AUTH}: 
vlr_loc_upd_post_ciph()
 DMSC msc_a(IMSI-90170010650:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN encode: 
COMMON_ID on GERAN-A
@@ -575,7 +575,7 @@
 DVLR VLR_Authenticate(IMSI-90170010650:UTRAN-Iu:LU){VLR_SUB_AS_WAIT_RESP}: 
state_chg to VLR_SUB_AS_AUTHENTICATED
 DVLR 
VLR_Authenticate(IMSI-90170010650:UTRAN-Iu:LU){VLR_SUB_AS_AUTHENTICATED}: 
Terminating (cause = OSMO_FSM_TERM_REGULAR)
 DVLR 
VLR_Authenticate(IMSI-90170010650:UTRAN-Iu:LU){VLR_SUB_AS_AUTHENTICATED}: 
Removi

Change in osmo-msc[master]: msc_a,vlr: rename ciphering_required to try_ciphering

2022-10-26 Thread neels
Attention is currently required from: neels.
Hello Jenkins Builder, laforge,

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

https://gerrit.osmocom.org/c/osmo-msc/+/29694

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

Change subject: msc_a,vlr: rename ciphering_required to try_ciphering
..

msc_a,vlr: rename ciphering_required to try_ciphering

Clarify the name to avoid confusion in upcoming patches.

This function actually returns whether any ciphering mode besides A5/0
is enabled, and does not imply that ciphering is mandatory. A5/0 may
well be allowed when this function returns true.

Related: OS#4830
Change-Id: Ia55085e3b36feb275bcf92fc91a4be7d1c24a6b9
---
M include/osmocom/msc/msc_a.h
M include/osmocom/msc/vlr.h
M src/libmsc/gsm_04_08.c
M src/libmsc/msc_a.c
M src/libvlr/vlr_access_req_fsm.c
M src/libvlr/vlr_lu_fsm.c
6 files changed, 24 insertions(+), 24 deletions(-)


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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ia55085e3b36feb275bcf92fc91a4be7d1c24a6b9
Gerrit-Change-Number: 29694
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Attention: neels 
Gerrit-MessageType: newpatchset


Change in osmo-msc[master]: msc_a,vlr: add ciphering_required (accurately named)

2022-10-26 Thread neels
Attention is currently required from: neels.
Hello Jenkins Builder, laforge, pespin,

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

https://gerrit.osmocom.org/c/osmo-msc/+/29695

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

Change subject: msc_a,vlr: add ciphering_required (accurately named)
..

msc_a,vlr: add ciphering_required (accurately named)

For establishing Layer 3, pass a flag from msc_a to VLR that indicates
to fail if encryption is not possible.

An earlier patch [1] renamed a previously existing flag ciphering_required
to try_ciphering, because the naming was not accurate. This new flag now
indicates exactly what its name suggests.

This new flag is needed for upcoming patch [2] to distinguish between
optional and mandatory encryption.

[1] Ia55085e3b36feb275bcf92fc91a4be7d1c24a6b9
[2] I5feda196fa481dd8a46b0e4721c64b7c6600f0d1

Related: OS#4830
Change-Id: I52090c5f5db997030da7c2ed9beca9c51f55f4cf
---
M include/osmocom/msc/msc_a.h
M include/osmocom/msc/vlr.h
M src/libmsc/gsm_04_08.c
M src/libmsc/msc_a.c
M src/libvlr/vlr_access_req_fsm.c
M src/libvlr/vlr_lu_fsm.c
6 files changed, 39 insertions(+), 0 deletions(-)


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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I52090c5f5db997030da7c2ed9beca9c51f55f4cf
Gerrit-Change-Number: 29695
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-CC: msuraev 
Gerrit-Attention: neels 
Gerrit-MessageType: newpatchset


Change in osmo-msc[master]: vlr: implement fallback to no-auth

2022-10-26 Thread neels
Attention is currently required from: pespin.
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-msc/+/29699

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

Change subject: vlr: implement fallback to no-auth
..

vlr: implement fallback to no-auth

When the HLR fails to return auth info and authentication and ciphering
are configured to be optional, fall back to no-auth.

This patch concludes a series of preparatory patches and implements the
actual functional change.

Related: OS#4830
Change-Id: I5feda196fa481dd8a46b0e4721c64b7c6600f0d1
---
M include/osmocom/msc/vlr.h
M src/libvlr/vlr_access_req_fsm.c
M src/libvlr/vlr_lu_fsm.c
M tests/msc_vlr/msc_vlr_test_hlr_reject.err
4 files changed, 46 insertions(+), 10 deletions(-)


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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I5feda196fa481dd8a46b0e4721c64b7c6600f0d1
Gerrit-Change-Number: 29699
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


Change in osmo-msc[master]: vlr: implement fallback to no-auth

2022-10-26 Thread neels
Attention is currently required from: pespin.
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/29699 )

Change subject: vlr: implement fallback to no-auth
..


Patch Set 1:

(1 comment)

File src/libvlr/vlr_lu_fsm.c:

https://gerrit.osmocom.org/c/osmo-msc/+/29699/comment/2675bfa1_3c17c84f
PS1, Line 1165: lu_fsm_failure(fi, res? *res : 
GSM48_REJECT_NETWORK_FAILURE);
> > spaces required around that '?' (ctx:VxW) […]
btw, there is no need to ask for fixing linter issues, it is obvious =)



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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I5feda196fa481dd8a46b0e4721c64b7c6600f0d1
Gerrit-Change-Number: 29699
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 26 Oct 2022 16:23:36 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-msc[master]: vlr_lu_fsm: clarify naming of static functions

2022-10-26 Thread pespin
Attention is currently required from: neels.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/29696 )

Change subject: vlr_lu_fsm: clarify naming of static functions
..


Patch Set 1:

(1 comment)

Patchset:

PS1:
> hm that's true, what naming do you suggest?
you changed is_cmc_smc_required -> try_cmc_smc.
What about is_cmc_smc_required -> is_cmc_smc_to_be_requested?
Or "is_cmc_smc_to_be_attempted".
I know they are long but they are far more understandable.



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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I0ea90476470109134411255ffd1f11d88236c91b
Gerrit-Change-Number: 29696
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: neels 
Gerrit-Comment-Date: Wed, 26 Oct 2022 16:16:14 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-bsc[master]: tests: add test_meas_rep_multi_band.ho_vty

2022-10-26 Thread pespin
Attention is currently required from: osmith.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/29882 )

Change subject: tests: add test_meas_rep_multi_band.ho_vty
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ie18e341f236bab5cf60d3a342c15c96cc848a7c2
Gerrit-Change-Number: 29882
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Wed, 26 Oct 2022 16:14:11 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-msc[master]: vlr: auth_fsm: clarify success/failure result

2022-10-26 Thread neels
Attention is currently required from: pespin.
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/29697 )

Change subject: vlr: auth_fsm: clarify success/failure result
..


Patch Set 1:

(1 comment)

File include/osmocom/msc/vlr.h:

https://gerrit.osmocom.org/c/osmo-msc/+/29697/comment/49b30334_d611ccc8
PS1, Line 70:   VLR_ULA_E_AUTH_RES, /* Successful result of auth procedure 
*/
> Can you then change this one to _SUCCESS?
adding separate patch



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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I02776dfe6785983f2ebe398f57867f5ceb288ba0
Gerrit-Change-Number: 29697
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 26 Oct 2022 16:13:44 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-bsc[master]: vty: Fix and deprecate typo in cmd 'amr-payload bandwith-efficient'

2022-10-26 Thread fixeria
Attention is currently required from: osmith, laforge, pespin.
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/29876 )

Change subject: vty: Fix and deprecate typo in cmd 'amr-payload 
bandwith-efficient'
..


Patch Set 3: Code-Review+2

(1 comment)

File src/osmo-bsc/bsc_vty.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/29876/comment/bc8645ca_023e9997
PS2, Line 3229: deprecaed
> speaking of typos ;)
Done



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Iefbadea374974587a421ec981e246b87c7b5de59
Gerrit-Change-Number: 29876
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-CC: laforge 
Gerrit-Attention: osmith 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 26 Oct 2022 16:13:09 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: osmith 
Gerrit-MessageType: comment


Change in osmo-msc[master]: msc_a,vlr: add ciphering_required (accurately named)

2022-10-26 Thread pespin
Attention is currently required from: neels.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/29695 )

Change subject: msc_a,vlr: add ciphering_required (accurately named)
..


Patch Set 1: Code-Review+1

(1 comment)

File src/libvlr/vlr_access_req_fsm.c:

https://gerrit.osmocom.org/c/osmo-msc/+/29695/comment/3d433852_efe60f0c
PS1, Line 662:  par->try_ciphering = try_ciphering;
> it can never happen, see the callers in gsm_04_08.c. But i can add an assert. 
> […]
Yeah I meant an assert for instance.
As you want, I think it also makes easier to understand certain conditions are 
not to be taken into account when looking at code.



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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I52090c5f5db997030da7c2ed9beca9c51f55f4cf
Gerrit-Change-Number: 29695
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-CC: msuraev 
Gerrit-Attention: neels 
Gerrit-Comment-Date: Wed, 26 Oct 2022 16:12:50 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: neels 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-bsc[master]: vty: Fix and deprecate typo in cmd 'amr-payload bandwith-efficient'

2022-10-26 Thread pespin
Attention is currently required from: laforge, pespin.
Hello osmith, Jenkins Builder, fixeria,

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

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

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

Change subject: vty: Fix and deprecate typo in cmd 'amr-payload 
bandwith-efficient'
..

vty: Fix and deprecate typo in cmd 'amr-payload bandwith-efficient'

Related: OS#6161
Change-Id: Iefbadea374974587a421ec981e246b87c7b5de59
---
M src/osmo-bsc/bsc_vty.c
M src/osmo-bsc/lchan_rtp_fsm.c
2 files changed, 16 insertions(+), 4 deletions(-)


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Iefbadea374974587a421ec981e246b87c7b5de59
Gerrit-Change-Number: 29876
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-CC: laforge 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


Change in osmo-msc[master]: vlr_lu_fsm: clarify naming of static functions

2022-10-26 Thread neels
Attention is currently required from: pespin.
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/29696 )

Change subject: vlr_lu_fsm: clarify naming of static functions
..


Patch Set 1:

(1 comment)

Patchset:

PS1:
> I find all this "try" names really misleading, as it seems the function is 
> doing some sort of action […]
hm that's true, what naming do you suggest?



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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I0ea90476470109134411255ffd1f11d88236c91b
Gerrit-Change-Number: 29696
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 26 Oct 2022 16:05:34 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-bsc[master]: gsm48_parse_meas_rep: fix parsing multi-band list

2022-10-26 Thread fixeria
Attention is currently required from: osmith, neels, laforge, pespin.
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/29836 )

Change subject: gsm48_parse_meas_rep: fix parsing multi-band list
..


Patch Set 5: Code-Review+2


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ic5e4f0531e08685460948b102367825588d839ba
Gerrit-Change-Number: 29836
Gerrit-PatchSet: 5
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: neels 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 26 Oct 2022 16:05:14 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: tests: add test_meas_rep_multi_band.ho_vty

2022-10-26 Thread fixeria
Attention is currently required from: osmith.
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/29882 )

Change subject: tests: add test_meas_rep_multi_band.ho_vty
..


Patch Set 1: Code-Review+1

(1 comment)

File tests/handover/handover_test.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/29882/comment/34c28f8c_295b9849
PS1, Line 1465: VTY_ECHO
Existing commands are calling VTY_ECHO() first. Not sure if it's critical.



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ie18e341f236bab5cf60d3a342c15c96cc848a7c2
Gerrit-Change-Number: 29882
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Wed, 26 Oct 2022 16:04:48 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-mgw[master]: Improve logging on AMR OA<->BWE conversion failure

2022-10-26 Thread osmith
Attention is currently required from: pespin.
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/29877 )

Change subject: Improve logging on AMR OA<->BWE conversion failure
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I7c7dd10650c1d249c723d6781585b343004bd64d
Gerrit-Change-Number: 29877
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 26 Oct 2022 15:53:17 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmocom-bb[master]: Revert "mobile/gsm48_rr.c: fix ACCH System Information parsing"

2022-10-26 Thread Hoernchen
Hoernchen has submitted this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/29879 )

Change subject: Revert "mobile/gsm48_rr.c: fix ACCH System Information parsing"
..

Revert "mobile/gsm48_rr.c: fix ACCH System Information parsing"

This reverts commit 1a8a80aeae4c2e5c870ae5b032d9a6ae60b67ac8.

We currently get ALL SI messages wrong - the protocol disseminator is
accidentally being used as SI msg type, and
6=radio resources management - but 6 is also type=si5ter.. so all SI we
receive end up being parsed as SI5, what a coincidence!

Change-Id: I3822f74295920680a935f3031c642ba00162d09d
---
M src/host/layer23/src/mobile/gsm48_rr.c
1 file changed, 15 insertions(+), 11 deletions(-)

Approvals:
  fixeria: Looks good to me, but someone else must approve
  Hoernchen: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/host/layer23/src/mobile/gsm48_rr.c 
b/src/host/layer23/src/mobile/gsm48_rr.c
index be9a7e1..fa11001 100644
--- a/src/host/layer23/src/mobile/gsm48_rr.c
+++ b/src/host/layer23/src/mobile/gsm48_rr.c
@@ -1945,9 +1945,10 @@
 /* receive "SYSTEM INFORMATION 5" message (9.1.37) */
 static int gsm48_rr_rx_sysinfo5(struct osmocom_ms *ms, struct msgb *msg)
 {
-   struct gsm48_system_information_type_5 *si = msgb_l3(msg);
+   /* NOTE: pseudo length is not in this structure, so we skip */
+   struct gsm48_system_information_type_5 *si = msgb_l3(msg) + 1;
struct gsm48_sysinfo *s = ms->cellsel.si;
-   int payload_len = msgb_l3len(msg) - sizeof(*si);
+   int payload_len = msgb_l3len(msg) - sizeof(*si) - 1;

if (!s) {
LOGP(DRR, LOGL_INFO, "No cell selected, SYSTEM INFORMATION 5 "
@@ -1974,9 +1975,10 @@
 /* receive "SYSTEM INFORMATION 5bis" message (9.1.38) */
 static int gsm48_rr_rx_sysinfo5bis(struct osmocom_ms *ms, struct msgb *msg)
 {
-   struct gsm48_system_information_type_5bis *si = msgb_l3(msg);
+   /* NOTE: pseudo length is not in this structure, so we skip */
+   struct gsm48_system_information_type_5bis *si = msgb_l3(msg) + 1;
struct gsm48_sysinfo *s = ms->cellsel.si;
-   int payload_len = msgb_l3len(msg) - sizeof(*si);
+   int payload_len = msgb_l3len(msg) - sizeof(*si) - 1;

if (!s) {
LOGP(DRR, LOGL_INFO, "No cell selected, SYSTEM INFORMATION 5bis"
@@ -2004,9 +2006,10 @@
 /* receive "SYSTEM INFORMATION 5ter" message (9.1.39) */
 static int gsm48_rr_rx_sysinfo5ter(struct osmocom_ms *ms, struct msgb *msg)
 {
-   struct gsm48_system_information_type_5ter *si = msgb_l3(msg);
+   /* NOTE: pseudo length is not in this structure, so we skip */
+   struct gsm48_system_information_type_5ter *si = msgb_l3(msg) + 1;
struct gsm48_sysinfo *s = ms->cellsel.si;
-   int payload_len = msgb_l3len(msg) - sizeof(*si);
+   int payload_len = msgb_l3len(msg) - sizeof(*si) - 1;

if (!s) {
LOGP(DRR, LOGL_INFO, "No cell selected, SYSTEM INFORMATION 5ter"
@@ -2034,10 +2037,11 @@
 /* receive "SYSTEM INFORMATION 6" message (9.1.39) */
 static int gsm48_rr_rx_sysinfo6(struct osmocom_ms *ms, struct msgb *msg)
 {
-   struct gsm48_system_information_type_6 *si = msgb_l3(msg);
+   /* NOTE: pseudo length is not in this structure, so we skip */
+   struct gsm48_system_information_type_6 *si = msgb_l3(msg) + 1;
struct gsm48_sysinfo *s = ms->cellsel.si;
struct rx_meas_stat *meas = &ms->meas;
-   int payload_len = msgb_l3len(msg) - sizeof(*si);
+   int payload_len = msgb_l3len(msg) - sizeof(*si) - 1;

if (!s) {
LOGP(DRR, LOGL_INFO, "No cell selected, SYSTEM INFORMATION 6 "
@@ -4754,7 +4758,7 @@
struct gsm48_rrlayer *rr = &ms->rrlayer;
struct gsm_settings *set = &ms->settings;
struct abis_rsl_rll_hdr *rllh = msgb_l2(msg);
-   struct gsm48_hdr *sih = msgb_l3(msg);
+   struct gsm48_system_information_type_header *sih = msgb_l3(msg);
uint8_t ind_ta, ind_tx_power;

if (msgb_l2len(msg) < sizeof(*rllh) + 2 + 2) {
@@ -4778,7 +4782,7 @@
rr->cd_now.ind_tx_power = ind_tx_power;
}

-   switch (sih->msg_type) {
+   switch (sih->system_information) {
case GSM48_MT_RR_SYSINFO_5:
return gsm48_rr_rx_sysinfo5(ms, msg);
case GSM48_MT_RR_SYSINFO_5bis:
@@ -4789,7 +4793,7 @@
return gsm48_rr_rx_sysinfo6(ms, msg);
default:
LOGP(DRR, LOGL_NOTICE, "ACCH message type 0x%02x unknown.\n",
-   sih->msg_type);
+   sih->system_information);
return -EINVAL;
}
 }

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I3822f74295920680a935f3031c642ba00162d09d
Gerrit-Change-Number: 29879

Change in osmocom-bb[master]: Revert "mobile/gsm48_rr.c: fix ACCH System Information parsing"

2022-10-26 Thread Hoernchen
Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/29879 )

Change subject: Revert "mobile/gsm48_rr.c: fix ACCH System Information parsing"
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I3822f74295920680a935f3031c642ba00162d09d
Gerrit-Change-Number: 29879
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Comment-Date: Wed, 26 Oct 2022 15:52:45 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: vty: Fix and deprecate typo in cmd 'amr-payload bandwith-efficient'

2022-10-26 Thread osmith
Attention is currently required from: laforge, pespin.
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/29876 )

Change subject: vty: Fix and deprecate typo in cmd 'amr-payload 
bandwith-efficient'
..


Patch Set 2: Code-Review+1

(1 comment)

File src/osmo-bsc/bsc_vty.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/29876/comment/70e5a0f9_1ea0ea11
PS2, Line 3229: deprecaed
speaking of typos ;)



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Iefbadea374974587a421ec981e246b87c7b5de59
Gerrit-Change-Number: 29876
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-CC: laforge 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 26 Oct 2022 15:51:49 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: BSC: add TC_ho_meas_rep_multi_band

2022-10-26 Thread osmith
Attention is currently required from: neels, fixeria.
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29837 )

Change subject: BSC: add TC_ho_meas_rep_multi_band
..


Patch Set 3:

(1 comment)

File library/BSSMAP_Templates.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29837/comment/6572b3dd_5548c66d
PS3, Line 898: cid_list := *
> > Wouldn't this break existing code using this? […]
Thanks for the explanation! Done.



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29837
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: I4fe6bb9e4b5a69ea6204585ebdf1f157a68a8286
Gerrit-Change-Number: 29837
Gerrit-PatchSet: 3
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels 
Gerrit-CC: fixeria 
Gerrit-CC: pespin 
Gerrit-Attention: neels 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Wed, 26 Oct 2022 15:45:43 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith 
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: BSC: add TC_ho_meas_rep_multi_band

2022-10-26 Thread osmith
Attention is currently required from: osmith, neels.
Hello Jenkins Builder, neels,

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

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

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

Change subject: BSC: add TC_ho_meas_rep_multi_band
..

BSC: add TC_ho_meas_rep_multi_band

Related: OS#5717
Related: osmo-bsc Ic5e4f0531e08685460948b102367825588d839ba
Change-Id: I4fe6bb9e4b5a69ea6204585ebdf1f157a68a8286
---
M bsc/BSC_Tests.ttcn
M library/BSSMAP_Templates.ttcn
2 files changed, 95 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/37/29837/4
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29837
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: I4fe6bb9e4b5a69ea6204585ebdf1f157a68a8286
Gerrit-Change-Number: 29837
Gerrit-PatchSet: 4
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels 
Gerrit-CC: fixeria 
Gerrit-CC: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: neels 
Gerrit-MessageType: newpatchset


Change in osmo-ttcn3-hacks[master]: msc: test auth options, and fall-back to no-auth

2022-10-26 Thread neels
neels has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29692 )

Change subject: msc: test auth options, and fall-back to no-auth
..

msc: test auth options, and fall-back to no-auth

Test 12 permutations of
(auth optional,required) x (a5 '0', '0 3', '3') x (hlr has auth info)

In TC_auth_options_2(), expect behavior after implementing OS#4830: if
the HLR fails to return auth info and auth + ciph are configured
optional, fall back to no authentication. This test will start
succeeding starting with commit
I5feda196fa481dd8a46b0e4721c64b7c6600f0d1 in osmo-msc.git.

All other tests yield the current behavior of osmo-msc.

Related: I5feda196fa481dd8a46b0e4721c64b7c6600f0d1 (osmo-msc)
Related: OS#4830
Change-Id: I8e3b02ca83e56ef5349d85f08407509e19fa353c
---
M msc/BSC_ConnectionHandler.ttcn
M msc/MSC_Tests.ttcn
2 files changed, 409 insertions(+), 32 deletions(-)

Approvals:
  neels: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  osmith: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn
index 4e736b8..fe9187c 100644
--- a/msc/BSC_ConnectionHandler.ttcn
+++ b/msc/BSC_ConnectionHandler.ttcn
@@ -78,8 +78,24 @@
 }

 type record BSC_ConnHdlrNetworkPars {
+   /* Bitmask of expected A5 levels; in Ciphering, will expect use of the 
highest A5 remaining after masking this
+* with A5 supported by the MS */
OCT1kc_support,
+   /* osmo-msc VTY cfg under 'network': If a test wants to temporarily 
modify auth and encr config, this is the
+* original config to return to for this test (is *not* sent to vty 
before the test, but maybe it should).
+* For example: { "authentication optional", "encryption a5 0 3" } */
+   rof_charstring net_config,
+   /* expect_attach_success == true: expect Location Updating / CM Service 
Request to succeed.
+* expect_attach_success == false: expect the MSC to reject LU / CM 
Service. */
+   boolean expect_attach_success,
+   /* expect_tmsi == true: expect MSC to allocate a new TMSI.
+* expect_tmsi == false: expect no TMSI to be assigned, operate with 
IMSI Mobile Identity. */
boolean expect_tmsi,
+   /* expect_auth == true overrides expect_auth_attempt == false */
+   boolean expect_auth_attempt,
+   /* hlr_has_auth_info has an effect only when (expect_auth_attempt or 
expect_auth) == true.
+* hlr_has_auth_info == false means the HLR responds to Send Auth Info 
Request with a NACK. */
+   boolean hlr_has_auth_info,
boolean expect_auth,
boolean expect_ciph,
boolean expect_imei,
@@ -404,7 +420,11 @@
} else {
if (etype != EST_TYPE_PAG_RESP) {
/* explicit CM SERVICE ACCEPT */
-   BSSAP.receive(tr_PDU_DTAP_MT(tr_CM_SERV_ACC));
+   if (g_pars.net.expect_attach_success) {
+   BSSAP.receive(tr_PDU_DTAP_MT(tr_CM_SERV_ACC));
+   } else {
+   BSSAP.receive(tr_PDU_DTAP_MT(tr_CM_SERV_REJ));
+   }
}
}
 }
@@ -436,34 +456,43 @@
 altstep as_GSUP_SAI() runs on BSC_ConnHdlr {
 var GSUP_IE auth_tuple;
 [] GSUP.receive(tr_GSUP_SAI_REQ(g_pars.imsi)) {
-   if (g_pars.use_umts_aka) {
-   if (not g_pars.vec_keep) {
-   g_pars.vec := f_gen_auth_vec_3g();
+   if (g_pars.net.hlr_has_auth_info) {
+   if (g_pars.use_umts_aka) {
+   if (not g_pars.vec_keep) {
+   g_pars.vec := f_gen_auth_vec_3g();
+   }
+   auth_tuple := 
valueof(ts_GSUP_IE_AuthTuple2G3G(g_pars.vec.rand,
+   
g_pars.vec.sres,
+   
g_pars.vec.kc,
+   
g_pars.vec.ik,
+   
g_pars.vec.ck,
+   
g_pars.vec.autn,
+   
g_pars.vec.res));
+   GSUP.send(ts_GSUP_SAI_RES(g_pars.imsi, auth_tuple));
+   } else {
+   if (not g_pars.vec_keep) {
+   g_pars.vec := f_gen_auth_vec_2g();
+   }
+   auth_tuple := 
valueof(ts_GSUP_IE_AuthTuple2G(g_pars.vec.rand,
+   
g_pars.vec.sres,
+   
g_pars.vec.kc));
+   

Change in osmo-ttcn3-hacks[master]: msc: test auth options, and fall-back to no-auth

2022-10-26 Thread neels
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29692 )

Change subject: msc: test auth options, and fall-back to no-auth
..


Patch Set 2: Code-Review+2

(1 comment)

Patchset:

PS2:
combine votes



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29692
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: I8e3b02ca83e56ef5349d85f08407509e19fa353c
Gerrit-Change-Number: 29692
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Wed, 26 Oct 2022 15:35:05 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: BSC: extend TC_ho_meas_rep_multi_band for ARFCN=0

2022-10-26 Thread osmith
osmith has abandoned this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29858 )

Change subject: BSC: extend TC_ho_meas_rep_multi_band for ARFCN=0
..


Abandoned

covered in unit test instead: https://gerrit.osmocom.org/c/osmo-bsc/+/29882
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29858
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: Ia8f94d72651061427afc9e34f678544f89d0149b
Gerrit-Change-Number: 29858
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: abandon


Change in osmo-bsc[master]: gsm48_parse_meas_rep: fix parsing multi-band list

2022-10-26 Thread osmith
Attention is currently required from: neels, laforge, pespin, fixeria.
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/29836 )

Change subject: gsm48_parse_meas_rep: fix parsing multi-band list
..


Patch Set 5:

(1 comment)

Patchset:

PS4:
> indeed, it would be good to have some unit test coverage showing the old bug 
> before this change and  […]
unit test added: https://gerrit.osmocom.org/c/osmo-bsc/+/29882



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ic5e4f0531e08685460948b102367825588d839ba
Gerrit-Change-Number: 29836
Gerrit-PatchSet: 5
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-Attention: neels 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Wed, 26 Oct 2022 15:26:58 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Gerrit-MessageType: comment


Change in osmo-bsc[master]: gsm48_parse_meas_rep: fix parsing multi-band list

2022-10-26 Thread osmith
Attention is currently required from: osmith, neels.
Hello Jenkins Builder, neels, laforge, pespin, fixeria,

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

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

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

Change subject: gsm48_parse_meas_rep: fix parsing multi-band list
..

gsm48_parse_meas_rep: fix parsing multi-band list

When looking up "BCCH-FREQ-NCELL i" from the measurement report, don't
treat the BCCH channel list as one list sorted by ascending ARFCN.
Instead, treat it as two sub lists, one for the same band, and one for
channels in different bands, as described in 3GPP TS 04.08 § 10.5.2.20.

This fixes getting the wrong ARFCN from measurement reports in
multi-band BSS, which leads to failing handovers.

Fixes: OS#5717
Related: osmo-ttcn3-hacks I4fe6bb9e4b5a69ea6204585ebdf1f157a68a8286
Change-Id: Ic5e4f0531e08685460948b102367825588d839ba
---
M include/osmocom/bsc/system_information.h
M src/osmo-bsc/gsm_04_08_rr.c
M src/osmo-bsc/system_information.c
M tests/handover/test_meas_rep_multi_band.ho_vty
4 files changed, 61 insertions(+), 14 deletions(-)


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ic5e4f0531e08685460948b102367825588d839ba
Gerrit-Change-Number: 29836
Gerrit-PatchSet: 5
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: neels 
Gerrit-MessageType: newpatchset


Change in osmo-bsc[master]: tests: add test_meas_rep_multi_band.ho_vty

2022-10-26 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/29882 )


Change subject: tests: add test_meas_rep_multi_band.ho_vty
..

tests: add test_meas_rep_multi_band.ho_vty

Add a test that shows that the ARFCN of neighbors from the measurement
report is not parsed correctly for multi-band BSS. A follow-up patch
fixes it.

Related: OS#5717
Change-Id: Ie18e341f236bab5cf60d3a342c15c96cc848a7c2
---
M tests/handover/handover_test.c
M tests/handover/handover_tests.ok
A tests/handover/test_meas_rep_multi_band.ho_vty
3 files changed, 108 insertions(+), 0 deletions(-)



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

diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index 6830b48..bf3ece8 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -20,6 +20,7 @@
 #include 
 #include 
 #include 
+#include 

 #include 

@@ -1433,6 +1434,59 @@
return CMD_SUCCESS;
 }

+DEFUN(set_arfcn, set_arfcn_cmd,
+   "set-arfcn trx <0-255> <0-255> <0-1023>",
+   "Set the ARFCN for a BTS' TRX\n"
+   "Indicate a BTS and TRX\n" "BTS nr\n" "TRX nr\n"
+   "Absolute Radio Frequency Channel Number\n")
+{
+   enum gsm_band unused;
+   struct gsm_bts *bts = bts_by_num_str(argv[0]);
+   struct gsm_bts_trx *trx = trx_by_num_str(bts, argv[1]);
+   int arfcn = atoi(argv[2]);
+
+   if (gsm_arfcn2band_rc(arfcn, &unused) < 0) {
+   vty_out(vty, "%% Invalid arfcn %" PRIu16 " detected%s", arfcn, 
VTY_NEWLINE);
+   return CMD_WARNING;
+   }
+
+   trx->arfcn = arfcn;
+
+   if (generate_cell_chan_alloc(trx->bts) != 0) {
+   vty_out(vty, "%% Failed to re-generate Cell Allocation%s", 
VTY_NEWLINE);
+   return CMD_WARNING;
+   }
+
+   for (int i = 0; i < bsc_gsmnet->num_bts; i++) {
+   if (gsm_generate_si(gsm_bts_num(bsc_gsmnet, i), SYSINFO_TYPE_2) 
<= 0)
+   fprintf(stderr, "Error generating SI2\n");
+   }
+
+   VTY_ECHO();
+   return CMD_SUCCESS;
+}
+
+DEFUN(set_band, set_band_cmd,
+   "set-band bts <0-255> BAND",
+   "Set the frequency band for a BTS\n"
+   "Indicate a BTS\n" "BTS nr\n"
+   "Frequency band\n")
+{
+   struct gsm_bts *bts = bts_by_num_str(argv[0]);
+   int band = gsm_band_parse(argv[1]);
+
+   if (band < 0) {
+   vty_out(vty, "%% BAND %d is not a valid GSM band%s",
+   band, VTY_NEWLINE);
+   return CMD_WARNING;
+   }
+
+   bts->band = band;
+
+   VTY_ECHO();
+   return CMD_SUCCESS;
+}
+
 DEFUN(set_ts_use, set_ts_use_cmd,
"set-ts-use trx <0-255> <0-255> states" TS_USE TS_USE TS_USE TS_USE 
TS_USE TS_USE TS_USE TS_USE,
"Put timeslots of a BTS' TRX into a specific state\n"
@@ -1490,6 +1544,8 @@
install_element(CONFIG_NODE, &expect_ts_use_cmd);
install_element(CONFIG_NODE, &codec_f_cmd);
install_element(CONFIG_NODE, &codec_h_cmd);
+   install_element(CONFIG_NODE, &set_arfcn_cmd);
+   install_element(CONFIG_NODE, &set_band_cmd);
install_element(CONFIG_NODE, &set_ts_use_cmd);
install_element(CONFIG_NODE, &wait_cmd);
 }
diff --git a/tests/handover/handover_tests.ok b/tests/handover/handover_tests.ok
index 168ebd6..0424181 100644
--- a/tests/handover/handover_tests.ok
+++ b/tests/handover/handover_tests.ok
@@ -42,6 +42,7 @@
 pass test_keep_hr_codec.ho_vty
 pass test_max_handovers.ho_vty
 pass test_max_ta.ho_vty
+pass test_meas_rep_multi_band.ho_vty
 pass test_min_rxlev_vs_congestion.ho_vty
 pass test_min_rxlev_vs_hysteresis.ho_vty
 pass test_neighbor_congested.ho_vty
diff --git a/tests/handover/test_meas_rep_multi_band.ho_vty 
b/tests/handover/test_meas_rep_multi_band.ho_vty
new file mode 100644
index 000..45bcfa3
--- /dev/null
+++ b/tests/handover/test_meas_rep_multi_band.ho_vty
@@ -0,0 +1,51 @@
+# Test ARFCN parsing from measurement report in multi-band BSS (OS#5717)
+
+create-n-bts 5
+
+set-band bts 0 1800
+set-arfcn trx 0 0 600
+
+set-band bts 1 900
+set-arfcn trx 1 0 1000
+
+set-band bts 2 850
+set-arfcn trx 2 0 200
+
+set-band bts 3 900
+set-arfcn trx 3 0 0
+
+set-band bts 4 1800
+set-arfcn trx 4 0 800
+
+# Attach MS to BTS 0, BTS 1-4 are neighbors
+create-ms bts 0 TCH/F AMR
+
+expect-ts-use trx 0 0 states * TCH/F - - - - - -
+expect-ts-use trx 1 0 states * - - - - - - -
+expect-ts-use trx 2 0 states * - - - - - - -
+expect-ts-use trx 3 0 states * - - - - - - -
+expect-ts-use trx 4 0 states * - - - - - - -
+
+# Send a measurement report where TRX with ARFCN=800 has the best rxqual. If
+# the BSC resolved the indexes in the measurement report correctly according to
+# 3GPP TS 04.08 § 10.5.2.20, then the neighbors are the following:
+# Sub list 1 (band == 1800, same band as the TRX where MS is attached):
+#   IDX=0 ARFCN=800  BSIC=63 RXLEV=-75dBm  (BTS 4)
+# 

Change in osmo-msc[master]: libosmonetify SMPP

2022-10-26 Thread msuraev
Attention is currently required from: pespin, msuraev.
msuraev has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/28849 )

Change subject: libosmonetify SMPP
..


Set Ready For Review


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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Idc2e60af1010783e555e61b114ae61f55a89d890
Gerrit-Change-Number: 28849
Gerrit-PatchSet: 49
Gerrit-Owner: msuraev 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-Attention: pespin 
Gerrit-Attention: msuraev 
Gerrit-Comment-Date: Wed, 26 Oct 2022 15:19:58 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-pcu[master]: bts: bts_snd_dl_ass(): use GSM_TDMA_FN_SUM() macro

2022-10-26 Thread fixeria
fixeria has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/29881 )

Change subject: bts: bts_snd_dl_ass(): use GSM_TDMA_FN_SUM() macro
..

bts: bts_snd_dl_ass(): use GSM_TDMA_FN_SUM() macro

Change-Id: If363e3320372c798b9b16274327fa8041358e350
---
M src/bts.cpp
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  pespin: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/bts.cpp b/src/bts.cpp
index 3eb41d2..e72f4c7 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -40,6 +40,7 @@
#include 
#include 
#include 
+   #include 
#include 
#include 
#include 
@@ -1092,7 +1093,7 @@
trx_no, tbf->trx->arfcn, ts_no, tbf->ta());
plen = 
Encoding::write_immediate_assignment(&bts->trx[trx_no].pdch[ts_no],
tbf, immediate_assignment, 
true, 125,
-   
(tbf->pdch[ts_no]->last_rts_fn + 21216) % GSM_MAX_FN,
+   
GSM_TDMA_FN_SUM(tbf->pdch[ts_no]->last_rts_fn, 21216),
tbf->ta(), 7, false, 0,
bts_get_ms_pwr_alpha(bts), 
bts->pcu->vty.gamma, -1,
GSM_L1_BURST_TYPE_ACCESS_0);

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: If363e3320372c798b9b16274327fa8041358e350
Gerrit-Change-Number: 29881
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-pcu[master]: bts: bts_snd_dl_ass(): clarify the meaning of last_rts_fn + 21216

2022-10-26 Thread fixeria
fixeria has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/29880 )

Change subject: bts: bts_snd_dl_ass(): clarify the meaning of last_rts_fn + 
21216
..

bts: bts_snd_dl_ass(): clarify the meaning of last_rts_fn + 21216

Change-Id: I8127e17607426443bb95b42873b580fc9f400af9
---
M src/bts.cpp
1 file changed, 5 insertions(+), 2 deletions(-)

Approvals:
  pespin: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/bts.cpp b/src/bts.cpp
index df08cc6..3eb41d2 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -1083,8 +1083,11 @@
LOGPTBF(tbf, LOGL_INFO, "TX: START Immediate Assignment Downlink 
(PCH)\n");
bitvec *immediate_assignment = bitvec_alloc(22, tall_pcu_ctx); /* 
without plen */
bitvec_unhex(immediate_assignment, DUMMY_VEC); /* standard '2B'O 
padding */
-   /* use request reference that has maximum distance to current time,
-* so the assignment will not conflict with possible RACH requests. */
+   /* 3GPP TS 44.018, section 9.1.18.0d states that the network shall code 
the
+* Request Reference IE, e.g. by using a suitably offset frame number, 
such
+* that the resource reference cannot be confused with any CHANNEL 
REQUEST
+* message sent by a mobile station.  Use last_rts_fn + 21216 (16 TDMA
+* super-frame periods, or ~21.3 seconds) to achieve a decent distance. 
*/
LOGP(DRLCMAC, LOGL_DEBUG, " - TRX=%d (%d) TS=%d TA=%d\n",
trx_no, tbf->trx->arfcn, ts_no, tbf->ta());
plen = 
Encoding::write_immediate_assignment(&bts->trx[trx_no].pdch[ts_no],

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I8127e17607426443bb95b42873b580fc9f400af9
Gerrit-Change-Number: 29880
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-pcu[master]: bts: bts_snd_dl_ass(): use GSM_TDMA_FN_SUM() macro

2022-10-26 Thread pespin
Attention is currently required from: fixeria.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/29881 )

Change subject: bts: bts_snd_dl_ass(): use GSM_TDMA_FN_SUM() macro
..


Patch Set 1: Code-Review+2

(1 comment)

File src/bts.cpp:

https://gerrit.osmocom.org/c/osmo-pcu/+/29881/comment/5639ca50_c77f6d9a
PS1, Line 1096: 
GSM_TDMA_FN_SUM(tbf->pdch[ts_no]->last_rts_fn, 21216),
you could even move this to a variable in a previous line to untangle a bit the 
call this function (write_immediate_assignment).



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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: If363e3320372c798b9b16274327fa8041358e350
Gerrit-Change-Number: 29881
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Wed, 26 Oct 2022 13:42:48 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: vty: Fix and deprecate typo in cmd 'amr-payload bandwith-efficient'

2022-10-26 Thread fixeria
Attention is currently required from: laforge, pespin.
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/29876 )

Change subject: vty: Fix and deprecate typo in cmd 'amr-payload 
bandwith-efficient'
..


Patch Set 2: Code-Review+1


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Iefbadea374974587a421ec981e246b87c7b5de59
Gerrit-Change-Number: 29876
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-CC: laforge 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 26 Oct 2022 13:42:11 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-pcu[master]: bts: bts_snd_dl_ass(): clarify the meaning of last_rts_fn + 21216

2022-10-26 Thread pespin
Attention is currently required from: fixeria.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/29880 )

Change subject: bts: bts_snd_dl_ass(): clarify the meaning of last_rts_fn + 
21216
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I8127e17607426443bb95b42873b580fc9f400af9
Gerrit-Change-Number: 29880
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Wed, 26 Oct 2022 13:41:45 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: gsm0502: gsm0502_fn_remap(): use GSM_TDMA_FN_SUB() macro

2022-10-26 Thread fixeria
fixeria has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/29878 )

Change subject: gsm0502: gsm0502_fn_remap(): use GSM_TDMA_FN_SUB() macro
..

gsm0502: gsm0502_fn_remap(): use GSM_TDMA_FN_SUB() macro

Change-Id: Id77644d945ad195733d4bf68c0d1c5b450b16e58
---
M src/gsm/gsm0502.c
1 file changed, 1 insertion(+), 4 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, but someone else must approve
  pespin: Looks good to me, but someone else must approve
  fixeria: Looks good to me, approved



diff --git a/src/gsm/gsm0502.c b/src/gsm/gsm0502.c
index e34d3f5..94db94e 100644
--- a/src/gsm/gsm0502.c
+++ b/src/gsm/gsm0502.c
@@ -179,7 +179,6 @@
uint8_t fn_cycle;
uint8_t i;
int sub = -1;
-   uint32_t fn_map;
struct fn_remap_table *table;

OSMO_ASSERT(channel < ARRAY_SIZE(fn_remap_table_ptr));
@@ -199,9 +198,7 @@
return fn;
}
 
-   fn_map = (fn + GSM_MAX_FN - sub) % GSM_MAX_FN;
-
-   return fn_map;
+   return GSM_TDMA_FN_SUB(fn, sub);
 }

 /* Magic numbers (RNTABLE) for pseudo-random hopping sequence generation. */

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id77644d945ad195733d4bf68c0d1c5b450b16e58
Gerrit-Change-Number: 29878
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in libosmocore[master]: gsm0502: gsm0502_fn_remap(): use GSM_TDMA_FN_SUB() macro

2022-10-26 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/29878 )

Change subject: gsm0502: gsm0502_fn_remap(): use GSM_TDMA_FN_SUB() macro
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id77644d945ad195733d4bf68c0d1c5b450b16e58
Gerrit-Change-Number: 29878
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Wed, 26 Oct 2022 13:41:09 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-pcu[master]: bts: bts_snd_dl_ass(): use GSM_TDMA_FN_SUM() macro

2022-10-26 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/29881 )


Change subject: bts: bts_snd_dl_ass(): use GSM_TDMA_FN_SUM() macro
..

bts: bts_snd_dl_ass(): use GSM_TDMA_FN_SUM() macro

Change-Id: If363e3320372c798b9b16274327fa8041358e350
---
M src/bts.cpp
1 file changed, 2 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/81/29881/1

diff --git a/src/bts.cpp b/src/bts.cpp
index 3eb41d2..e72f4c7 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -40,6 +40,7 @@
#include 
#include 
#include 
+   #include 
#include 
#include 
#include 
@@ -1092,7 +1093,7 @@
trx_no, tbf->trx->arfcn, ts_no, tbf->ta());
plen = 
Encoding::write_immediate_assignment(&bts->trx[trx_no].pdch[ts_no],
tbf, immediate_assignment, 
true, 125,
-   
(tbf->pdch[ts_no]->last_rts_fn + 21216) % GSM_MAX_FN,
+   
GSM_TDMA_FN_SUM(tbf->pdch[ts_no]->last_rts_fn, 21216),
tbf->ta(), 7, false, 0,
bts_get_ms_pwr_alpha(bts), 
bts->pcu->vty.gamma, -1,
GSM_L1_BURST_TYPE_ACCESS_0);

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: If363e3320372c798b9b16274327fa8041358e350
Gerrit-Change-Number: 29881
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


Change in osmo-pcu[master]: bts: bts_snd_dl_ass(): clarify the meaning of last_rts_fn + 21216

2022-10-26 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/29880 )


Change subject: bts: bts_snd_dl_ass(): clarify the meaning of last_rts_fn + 
21216
..

bts: bts_snd_dl_ass(): clarify the meaning of last_rts_fn + 21216

Change-Id: I8127e17607426443bb95b42873b580fc9f400af9
---
M src/bts.cpp
1 file changed, 5 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/80/29880/1

diff --git a/src/bts.cpp b/src/bts.cpp
index df08cc6..3eb41d2 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -1083,8 +1083,11 @@
LOGPTBF(tbf, LOGL_INFO, "TX: START Immediate Assignment Downlink 
(PCH)\n");
bitvec *immediate_assignment = bitvec_alloc(22, tall_pcu_ctx); /* 
without plen */
bitvec_unhex(immediate_assignment, DUMMY_VEC); /* standard '2B'O 
padding */
-   /* use request reference that has maximum distance to current time,
-* so the assignment will not conflict with possible RACH requests. */
+   /* 3GPP TS 44.018, section 9.1.18.0d states that the network shall code 
the
+* Request Reference IE, e.g. by using a suitably offset frame number, 
such
+* that the resource reference cannot be confused with any CHANNEL 
REQUEST
+* message sent by a mobile station.  Use last_rts_fn + 21216 (16 TDMA
+* super-frame periods, or ~21.3 seconds) to achieve a decent distance. 
*/
LOGP(DRLCMAC, LOGL_DEBUG, " - TRX=%d (%d) TS=%d TA=%d\n",
trx_no, tbf->trx->arfcn, ts_no, tbf->ta());
plen = 
Encoding::write_immediate_assignment(&bts->trx[trx_no].pdch[ts_no],

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I8127e17607426443bb95b42873b580fc9f400af9
Gerrit-Change-Number: 29880
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


Change in osmo-bsc[master]: vty: Fix and deprecate typo in cmd 'amr-payload bandwith-efficient'

2022-10-26 Thread pespin
Attention is currently required from: laforge, fixeria.
Hello Jenkins Builder,

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

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

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

Change subject: vty: Fix and deprecate typo in cmd 'amr-payload 
bandwith-efficient'
..

vty: Fix and deprecate typo in cmd 'amr-payload bandwith-efficient'

Related: OS#6161
Change-Id: Iefbadea374974587a421ec981e246b87c7b5de59
---
M src/osmo-bsc/bsc_vty.c
M src/osmo-bsc/lchan_rtp_fsm.c
2 files changed, 16 insertions(+), 4 deletions(-)


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Iefbadea374974587a421ec981e246b87c7b5de59
Gerrit-Change-Number: 29876
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: fixeria 
Gerrit-CC: laforge 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-MessageType: newpatchset


Change in osmo-bsc[master]: vty: Fix and deprecate typo in cmd 'amr-payload bandwith-efficient'

2022-10-26 Thread pespin
Attention is currently required from: laforge, fixeria.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/29876 )

Change subject: vty: Fix and deprecate typo in cmd 'amr-payload 
bandwith-efficient'
..


Patch Set 1:

(1 comment)

File src/osmo-bsc/bsc_vty.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/29876/comment/2af1e45c_7825f8db
PS1, Line 3219:   "payload fields packed (AoIP) (DEPRECATED option 
with typo)\n")
> agreed
Ack



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Iefbadea374974587a421ec981e246b87c7b5de59
Gerrit-Change-Number: 29876
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: fixeria 
Gerrit-CC: laforge 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Wed, 26 Oct 2022 13:29:40 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


Change in libosmocore[master]: gsm0502: gsm0502_fn_remap(): use GSM_TDMA_FN_SUB() macro

2022-10-26 Thread pespin
Attention is currently required from: fixeria.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/29878 )

Change subject: gsm0502: gsm0502_fn_remap(): use GSM_TDMA_FN_SUB() macro
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id77644d945ad195733d4bf68c0d1c5b450b16e58
Gerrit-Change-Number: 29878
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Wed, 26 Oct 2022 13:29:09 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmocom-bb[master]: Revert "mobile/gsm48_rr.c: fix ACCH System Information parsing"

2022-10-26 Thread fixeria
Attention is currently required from: Hoernchen.
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/29879 )

Change subject: Revert "mobile/gsm48_rr.c: fix ACCH System Information parsing"
..


Patch Set 1: Code-Review+1

(1 comment)

Patchset:

PS1:
Related: 
http://lists.osmocom.org/pipermail/baseband-devel/2017-December/005459.html



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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I3822f74295920680a935f3031c642ba00162d09d
Gerrit-Change-Number: 29879
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: fixeria 
Gerrit-Attention: Hoernchen 
Gerrit-Comment-Date: Wed, 26 Oct 2022 12:39:23 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmocom-bb[master]: Revert "mobile/gsm48_rr.c: fix ACCH System Information parsing"

2022-10-26 Thread Hoernchen
Hoernchen has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/29879 )


Change subject: Revert "mobile/gsm48_rr.c: fix ACCH System Information parsing"
..

Revert "mobile/gsm48_rr.c: fix ACCH System Information parsing"

This reverts commit 1a8a80aeae4c2e5c870ae5b032d9a6ae60b67ac8.

We currently get ALL SI messages wrong - the protocol disseminator is
accidentally being used as SI msg type, and
6=radio resources management - but 6 is also type=si5ter.. so all SI we
receive end up being parsed as SI5, what a coincidence!

Change-Id: I3822f74295920680a935f3031c642ba00162d09d
---
M src/host/layer23/src/mobile/gsm48_rr.c
1 file changed, 15 insertions(+), 11 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/79/29879/1

diff --git a/src/host/layer23/src/mobile/gsm48_rr.c 
b/src/host/layer23/src/mobile/gsm48_rr.c
index be9a7e1..fa11001 100644
--- a/src/host/layer23/src/mobile/gsm48_rr.c
+++ b/src/host/layer23/src/mobile/gsm48_rr.c
@@ -1945,9 +1945,10 @@
 /* receive "SYSTEM INFORMATION 5" message (9.1.37) */
 static int gsm48_rr_rx_sysinfo5(struct osmocom_ms *ms, struct msgb *msg)
 {
-   struct gsm48_system_information_type_5 *si = msgb_l3(msg);
+   /* NOTE: pseudo length is not in this structure, so we skip */
+   struct gsm48_system_information_type_5 *si = msgb_l3(msg) + 1;
struct gsm48_sysinfo *s = ms->cellsel.si;
-   int payload_len = msgb_l3len(msg) - sizeof(*si);
+   int payload_len = msgb_l3len(msg) - sizeof(*si) - 1;

if (!s) {
LOGP(DRR, LOGL_INFO, "No cell selected, SYSTEM INFORMATION 5 "
@@ -1974,9 +1975,10 @@
 /* receive "SYSTEM INFORMATION 5bis" message (9.1.38) */
 static int gsm48_rr_rx_sysinfo5bis(struct osmocom_ms *ms, struct msgb *msg)
 {
-   struct gsm48_system_information_type_5bis *si = msgb_l3(msg);
+   /* NOTE: pseudo length is not in this structure, so we skip */
+   struct gsm48_system_information_type_5bis *si = msgb_l3(msg) + 1;
struct gsm48_sysinfo *s = ms->cellsel.si;
-   int payload_len = msgb_l3len(msg) - sizeof(*si);
+   int payload_len = msgb_l3len(msg) - sizeof(*si) - 1;

if (!s) {
LOGP(DRR, LOGL_INFO, "No cell selected, SYSTEM INFORMATION 5bis"
@@ -2004,9 +2006,10 @@
 /* receive "SYSTEM INFORMATION 5ter" message (9.1.39) */
 static int gsm48_rr_rx_sysinfo5ter(struct osmocom_ms *ms, struct msgb *msg)
 {
-   struct gsm48_system_information_type_5ter *si = msgb_l3(msg);
+   /* NOTE: pseudo length is not in this structure, so we skip */
+   struct gsm48_system_information_type_5ter *si = msgb_l3(msg) + 1;
struct gsm48_sysinfo *s = ms->cellsel.si;
-   int payload_len = msgb_l3len(msg) - sizeof(*si);
+   int payload_len = msgb_l3len(msg) - sizeof(*si) - 1;

if (!s) {
LOGP(DRR, LOGL_INFO, "No cell selected, SYSTEM INFORMATION 5ter"
@@ -2034,10 +2037,11 @@
 /* receive "SYSTEM INFORMATION 6" message (9.1.39) */
 static int gsm48_rr_rx_sysinfo6(struct osmocom_ms *ms, struct msgb *msg)
 {
-   struct gsm48_system_information_type_6 *si = msgb_l3(msg);
+   /* NOTE: pseudo length is not in this structure, so we skip */
+   struct gsm48_system_information_type_6 *si = msgb_l3(msg) + 1;
struct gsm48_sysinfo *s = ms->cellsel.si;
struct rx_meas_stat *meas = &ms->meas;
-   int payload_len = msgb_l3len(msg) - sizeof(*si);
+   int payload_len = msgb_l3len(msg) - sizeof(*si) - 1;

if (!s) {
LOGP(DRR, LOGL_INFO, "No cell selected, SYSTEM INFORMATION 6 "
@@ -4754,7 +4758,7 @@
struct gsm48_rrlayer *rr = &ms->rrlayer;
struct gsm_settings *set = &ms->settings;
struct abis_rsl_rll_hdr *rllh = msgb_l2(msg);
-   struct gsm48_hdr *sih = msgb_l3(msg);
+   struct gsm48_system_information_type_header *sih = msgb_l3(msg);
uint8_t ind_ta, ind_tx_power;

if (msgb_l2len(msg) < sizeof(*rllh) + 2 + 2) {
@@ -4778,7 +4782,7 @@
rr->cd_now.ind_tx_power = ind_tx_power;
}

-   switch (sih->msg_type) {
+   switch (sih->system_information) {
case GSM48_MT_RR_SYSINFO_5:
return gsm48_rr_rx_sysinfo5(ms, msg);
case GSM48_MT_RR_SYSINFO_5bis:
@@ -4789,7 +4793,7 @@
return gsm48_rr_rx_sysinfo6(ms, msg);
default:
LOGP(DRR, LOGL_NOTICE, "ACCH message type 0x%02x unknown.\n",
-   sih->msg_type);
+   sih->system_information);
return -EINVAL;
}
 }

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I3822f74295920680a935f3031c642ba00162d09d
Gerrit-Change-Number: 29879
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerri

Change in osmo-bsc[master]: vty: Fix and deprecate typo in cmd 'amr-payload bandwith-efficient'

2022-10-26 Thread laforge
Attention is currently required from: fixeria, pespin.
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/29876 )

Change subject: vty: Fix and deprecate typo in cmd 'amr-payload 
bandwith-efficient'
..


Patch Set 1:

(1 comment)

File src/osmo-bsc/bsc_vty.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/29876/comment/df2e8c54_01064b3e
PS1, Line 3219:   "payload fields packed (AoIP) (DEPRECATED option 
with typo)\n")
> We don't really want this deprecated variant to be present in documentation 
> and shown in the VTY hel […]
agreed



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Iefbadea374974587a421ec981e246b87c7b5de59
Gerrit-Change-Number: 29876
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: fixeria 
Gerrit-CC: laforge 
Gerrit-Attention: fixeria 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 26 Oct 2022 12:35:06 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


Change in libosmocore[master]: gsm0502: gsm0502_fn_remap(): use GSM_TDMA_FN_SUB() macro

2022-10-26 Thread laforge
Attention is currently required from: fixeria.
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/29878 )

Change subject: gsm0502: gsm0502_fn_remap(): use GSM_TDMA_FN_SUB() macro
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id77644d945ad195733d4bf68c0d1c5b450b16e58
Gerrit-Change-Number: 29878
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Wed, 26 Oct 2022 12:34:32 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-mgw[master]: Improve logging on AMR OA<->BWE conversion failure

2022-10-26 Thread laforge
Attention is currently required from: pespin.
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/29877 )

Change subject: Improve logging on AMR OA<->BWE conversion failure
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I7c7dd10650c1d249c723d6781585b343004bd64d
Gerrit-Change-Number: 29877
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 26 Oct 2022 12:34:08 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: gsm0502: gsm0502_fn_remap(): use GSM_TDMA_FN_SUB() macro

2022-10-26 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/29878 )


Change subject: gsm0502: gsm0502_fn_remap(): use GSM_TDMA_FN_SUB() macro
..

gsm0502: gsm0502_fn_remap(): use GSM_TDMA_FN_SUB() macro

Change-Id: Id77644d945ad195733d4bf68c0d1c5b450b16e58
---
M src/gsm/gsm0502.c
1 file changed, 1 insertion(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/78/29878/1

diff --git a/src/gsm/gsm0502.c b/src/gsm/gsm0502.c
index e34d3f5..94db94e 100644
--- a/src/gsm/gsm0502.c
+++ b/src/gsm/gsm0502.c
@@ -179,7 +179,6 @@
uint8_t fn_cycle;
uint8_t i;
int sub = -1;
-   uint32_t fn_map;
struct fn_remap_table *table;

OSMO_ASSERT(channel < ARRAY_SIZE(fn_remap_table_ptr));
@@ -199,9 +198,7 @@
return fn;
}

-   fn_map = (fn + GSM_MAX_FN - sub) % GSM_MAX_FN;
-
-   return fn_map;
+   return GSM_TDMA_FN_SUB(fn, sub);
 }

 /* Magic numbers (RNTABLE) for pseudo-random hopping sequence generation. */

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id77644d945ad195733d4bf68c0d1c5b450b16e58
Gerrit-Change-Number: 29878
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


Change in osmo-mgw[master]: Improve logging on AMR OA<->BWE conversion failure

2022-10-26 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/29877 )


Change subject: Improve logging on AMR OA<->BWE conversion failure
..

Improve logging on AMR OA<->BWE conversion failure

Change-Id: I7c7dd10650c1d249c723d6781585b343004bd64d
---
M src/libosmo-mgcp/mgcp_network.c
1 file changed, 9 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/77/29877/1

diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c
index 72d97fd..d93e695 100644
--- a/src/libosmo-mgcp/mgcp_network.c
+++ b/src/libosmo-mgcp/mgcp_network.c
@@ -737,6 +737,7 @@
struct rtp_hdr *rtp_hdr;
unsigned int payload_len;
int rc;
+   bool orig_is_oa;

if (msgb_length(msg) < sizeof(struct rtp_hdr)) {
LOGPENDP(endp, DRTP, LOGL_ERROR, "AMR RTP packet too short (%d 
< %zu)\n", msgb_length(msg), sizeof(struct rtp_hdr));
@@ -744,10 +745,10 @@
}

rtp_hdr = (struct rtp_hdr *)msgb_data(msg);
-
payload_len = msgb_length(msg) - sizeof(struct rtp_hdr);
+   orig_is_oa = osmo_amr_is_oa(rtp_hdr->data, payload_len);

-   if (osmo_amr_is_oa(rtp_hdr->data, payload_len)) {
+   if (orig_is_oa) {
if (!target_is_oa)
/* Input data is oa an target format is bwe
 * ==> convert */
@@ -769,7 +770,10 @@
}
if (rc < 0) {
LOGPENDP(endp, DRTP, LOGL_ERROR,
-"AMR RTP packet conversion failed\n");
+"RTP AMR packet conversion %s->%s failed: %s\n",
+orig_is_oa ? "OA" : "BWE",
+target_is_oa ? "OA" : "BWE",
+osmo_hexdump(rtp_hdr->data, payload_len));
return -EINVAL;
}

@@ -1226,7 +1230,8 @@

conn_dst->end.codec->param.amr_octet_aligned);
if (rc < 0) {
LOGPENDP(endp, DRTP, LOGL_ERROR,
-"Error in AMR octet-aligned 
<-> bandwidth-efficient mode conversion\n");
+"Error in AMR octet-aligned 
<-> bandwidth-efficient mode conversion (target=%s)\n",
+
conn_dst->end.codec->param.amr_octet_aligned ? "octet-aligned" : 
"bandwidth-efficient");
break;
}
} else if (rtp_end->rfc5993_hr_convert &&

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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I7c7dd10650c1d249c723d6781585b343004bd64d
Gerrit-Change-Number: 29877
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


Change in osmo-bsc[master]: vty: Fix and deprecate typo in cmd 'amr-payload bandwith-efficient'

2022-10-26 Thread fixeria
Attention is currently required from: pespin.
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/29876 )

Change subject: vty: Fix and deprecate typo in cmd 'amr-payload 
bandwith-efficient'
..


Patch Set 1:

(1 comment)

File src/osmo-bsc/bsc_vty.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/29876/comment/a8192d04_ed4abc01
PS1, Line 3219:   "payload fields packed (AoIP) (DEPRECATED option 
with typo)\n")
We don't really want this deprecated variant to be present in documentation and 
shown in the VTY help, right? I suggest defining an alias as follows:

  ALIAS_DEPRECATED(cfg_net_msc_amr_octet_align,
   deprecated_cfg_net_msc_amr_octet_align_cmd,
   "amr-payload bandwith-efficient",
   "Set AMR payload framing mode\n"
   "payload fields packed (AoIP)\n");



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Iefbadea374974587a421ec981e246b87c7b5de59
Gerrit-Change-Number: 29876
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: fixeria 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 26 Oct 2022 10:25:24 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-trx[master]: Transceiver::expectedCorrType(): RACH is always 8-bit on PTCCH/U

2022-10-26 Thread fixeria
fixeria has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/29874 )

Change subject: Transceiver::expectedCorrType(): RACH is always 8-bit on PTCCH/U
..

Transceiver::expectedCorrType(): RACH is always 8-bit on PTCCH/U

It does not make sense for the MS to use 11-bit Access Bursts on
PTCCH/U because the payload does not matter, only the ToA does.

Change-Id: I5fb9f1c6810cdcd26a885b183e414d01d422eb28
---
M Transceiver52M/Transceiver.cpp
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index 42aa93e..cbe1e27 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -584,7 +584,7 @@
   case XIII: {
 int mod52 = burstFN % 52;
 if ((mod52 == 12) || (mod52 == 38))
-  return cfg->ext_rach ? EXT_RACH : RACH;
+  return RACH; /* RACH is always 8-bit on PTCCH/U */
 else if ((mod52 == 25) || (mod52 == 51))
   return IDLE;
 else /* Enable 8-PSK burst detection if EDGE is enabled */

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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I5fb9f1c6810cdcd26a885b183e414d01d422eb28
Gerrit-Change-Number: 29874
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-bsc[master]: vty: Fix and deprecate typo in cmd 'amr-payload bandwith-efficient'

2022-10-26 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/29876 )


Change subject: vty: Fix and deprecate typo in cmd 'amr-payload 
bandwith-efficient'
..

vty: Fix and deprecate typo in cmd 'amr-payload bandwith-efficient'

Related: OS#6161
Change-Id: Iefbadea374974587a421ec981e246b87c7b5de59
---
M src/osmo-bsc/bsc_vty.c
M src/osmo-bsc/lchan_rtp_fsm.c
2 files changed, 12 insertions(+), 5 deletions(-)



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

diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index 11fcfad..d5df739 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -2524,7 +2524,7 @@
if (msc->amr_octet_aligned)
vty_out(vty, " amr-payload octet-aligned%s", VTY_NEWLINE);
else
-   vty_out(vty, " amr-payload bandwith-efficient%s", VTY_NEWLINE);
+   vty_out(vty, " amr-payload bandwidth-efficient%s", VTY_NEWLINE);
 }

 static void msc_write_nri(struct vty *vty, struct bsc_msc_data *msc, bool 
verbose);
@@ -3212,17 +3212,24 @@
 DEFUN_USRATTR(cfg_net_msc_amr_octet_align,
  cfg_net_msc_amr_octet_align_cmd,
  X(BSC_VTY_ATTR_NEW_LCHAN),
- "amr-payload (octet-aligned|bandwith-efficient",
+ "amr-payload 
(octet-aligned|bandwidth-efficient|bandwith-efficient)",
  "Set AMR payload framing mode\n"
  "payload fields aligned on octet boundaries\n"
- "payload fields packed (AoIP)\n")
+ "payload fields packed (AoIP)\n"
+ "payload fields packed (AoIP) (DEPRECATED option with typo)\n")
 {
struct bsc_msc_data *data = bsc_msc_data(vty);

if (strcmp(argv[0], "octet-aligned") == 0)
data->amr_octet_aligned = true;
-   else if (strcmp(argv[0], "bandwith-efficient") == 0)
+   else if (strcmp(argv[0], "bandwidth-efficient") == 0)
data->amr_octet_aligned = false;
+   else {
+   data->amr_octet_aligned = false;
+   vty_out(vty, "%% Command 'amr-payload': Option 
'bandwith-efficient' "
+"containing typo is deprecaed, use 
'bandwidth-efficient' instead!%s",
+VTY_NEWLINE);
+   }

return CMD_SUCCESS;
 }
diff --git a/src/osmo-bsc/lchan_rtp_fsm.c b/src/osmo-bsc/lchan_rtp_fsm.c
index b788e99..466b168 100644
--- a/src/osmo-bsc/lchan_rtp_fsm.c
+++ b/src/osmo-bsc/lchan_rtp_fsm.c
@@ -919,7 +919,7 @@
if (bss_side && verb_info->codecs[0] == CODEC_AMR_8000_1) {
/* FIXME: At the moment all BTSs we support are using the
 * octet-aligned payload format. However, in the future
-* we may support BTSs that are using bandwith-efficient
+* we may support BTSs that are using bandwidth-efficient
 * format. In this case we will have to add functionality
 * that distinguishes by the BTS model which mode to use. */
verb_info->param.amr_octet_aligned = true;

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Iefbadea374974587a421ec981e246b87c7b5de59
Gerrit-Change-Number: 29876
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


Change in osmo-mgw[master]: osmux: Make sure RTP AMR feed to osmux is in octet-aligned mode

2022-10-26 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/29867 )

Change subject: osmux: Make sure RTP AMR feed to osmux is in octet-aligned mode
..

osmux: Make sure RTP AMR feed to osmux is in octet-aligned mode

The Osmux implementation in libosmo-netif expects to work with RTP AMR
in octet-aligned mode. Therefore, if the peer connection received RTP
AMR in bandwidth-efficient mode, we need to convert it to octet-aligned
before feeding the packets to the osmux layer.

Related: SYS#6161
Change-Id: Ifeec44241079f7a31da12745c92bfdc4fb222f3a
---
M include/osmocom/mgcp/mgcp_network.h
M src/libosmo-mgcp/mgcp_network.c
M src/libosmo-mgcp/mgcp_osmux.c
3 files changed, 18 insertions(+), 3 deletions(-)

Approvals:
  Jenkins Builder: Verified
  osmith: Looks good to me, approved
  laforge: Looks good to me, but someone else must approve



diff --git a/include/osmocom/mgcp/mgcp_network.h 
b/include/osmocom/mgcp/mgcp_network.h
index a3d57f0..e95907d 100644
--- a/include/osmocom/mgcp/mgcp_network.h
+++ b/include/osmocom/mgcp/mgcp_network.h
@@ -183,3 +183,5 @@
 int id);
 void forward_data_tap(int fd, struct mgcp_rtp_tap *tap, struct msgb *msg);
 uint32_t mgcp_get_current_ts(unsigned codec_rate);
+
+int amr_oa_bwe_convert(struct mgcp_endpoint *endp, struct msgb *msg, bool 
target_is_oa);
diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c
index 3248cbd..72d97fd 100644
--- a/src/libosmo-mgcp/mgcp_network.c
+++ b/src/libosmo-mgcp/mgcp_network.c
@@ -717,11 +717,18 @@
return 0;
 }

-/* For AMR RTP two framing modes are defined RFC3267. There is a bandwith
+/*! Convert msg to AMR RTP framing mode specified by target_is_oa.
+ *  \param[in] endp MGCP Endpoint where this message belongs to (used for 
logging purposes)
+ *  \param[in] msg Message containing an AMR RTP payload (in octet-aligned or 
bandwidth-efficient format).
+ *  \param[in] target_is_oa the target framing mode that msg will contain 
after this function succeeds.
+ *  \returns The size of the new RTP AMR content on success, negative on error.
+ *
+ * For AMR RTP two framing modes are defined RFC3267. There is a bandwidth
  * efficient encoding scheme where all fields are packed together one after
  * another and an octet aligned mode where all fields are aligned to octet
- * boundaries. This function is used to convert between the two modes */
-static int amr_oa_bwe_convert(struct mgcp_endpoint *endp, struct msgb *msg,
+ * boundaries. This function is used to convert between the two modes.
+ */
+int amr_oa_bwe_convert(struct mgcp_endpoint *endp, struct msgb *msg,
  bool target_is_oa)
 {
/* NOTE: the msgb has an allocated length of RTP_BUF_SIZE, so there is
diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c
index e1380ec..5df5446 100644
--- a/src/libosmo-mgcp/mgcp_osmux.c
+++ b/src/libosmo-mgcp/mgcp_osmux.c
@@ -226,6 +226,12 @@
if (!msg2)
return -1;

+   /* Osmux implementation works with AMR OA only, make sure we convert to 
it if needed: */
+   if (amr_oa_bwe_convert(conn->conn->endp, msg2, true) < 0) {
+   LOGPCONN(conn->conn, DOSMUX, LOGL_ERROR,
+"Error converting to AMR octet-aligned mode\n");
+   return -1;
+   }

while ((ret = osmux_xfrm_input(conn->osmux.in, msg2, 
conn->osmux.remote_cid)) > 0) {
/* batch full, build and deliver it */



5 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted 
one.
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29867
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ifeec44241079f7a31da12745c92bfdc4fb222f3a
Gerrit-Change-Number: 29867
Gerrit-PatchSet: 6
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-CC: neels 
Gerrit-MessageType: merged


Change in osmo-mgw[master]: osmux: Rename function and pass msgb directly to it

2022-10-26 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/29873 )

Change subject: osmux: Rename function and pass msgb directly to it
..

osmux: Rename function and pass msgb directly to it

The new prefix now matches other related functions acting on an osmux
connection.
Pass the msgb to it so simplify new msgb copy.

Change-Id: I8c0121485d0c96f70fe8bcbdb150793d428183ff
---
M include/osmocom/mgcp/osmux.h
M src/libosmo-mgcp/mgcp_network.c
M src/libosmo-mgcp/mgcp_osmux.c
3 files changed, 10 insertions(+), 12 deletions(-)

Approvals:
  Jenkins Builder: Verified
  osmith: Looks good to me, approved
  laforge: Looks good to me, but someone else must approve



diff --git a/include/osmocom/mgcp/osmux.h b/include/osmocom/mgcp/osmux.h
index 044a33f..4ea6da7 100644
--- a/include/osmocom/mgcp/osmux.h
+++ b/include/osmocom/mgcp/osmux.h
@@ -15,7 +15,7 @@
 int conn_osmux_enable(struct mgcp_conn_rtp *conn);
 void conn_osmux_disable(struct mgcp_conn_rtp *conn);
 int conn_osmux_event_rx_crcx_mdcx(struct mgcp_conn_rtp *conn);
-int osmux_xfrm_to_osmux(char *buf, int buf_len, struct mgcp_conn_rtp *conn);
+int conn_osmux_send_rtp(struct mgcp_conn_rtp *conn, struct msgb *msg);
 int osmux_send_dummy(struct mgcp_conn_rtp *conn);

 void osmux_cid_pool_get(uint8_t osmux_cid);
diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c
index 6edb4ae..3248cbd 100644
--- a/src/libosmo-mgcp/mgcp_network.c
+++ b/src/libosmo-mgcp/mgcp_network.c
@@ -1020,7 +1020,7 @@
LOGPENDP(endp, DRTP, LOGL_DEBUG,
 "endpoint type is MGCP_RTP_OSMUX, "
 "using osmux_xfrm_to_osmux() to forward data through 
OSMUX\n");
-   return osmux_xfrm_to_osmux((char*)msgb_data(msg), 
msgb_length(msg), conn_dst);
+   return conn_osmux_send_rtp(conn_dst, msg);
case MGCP_RTP_IUUP:
if (proto == MGCP_PROTO_RTP) {
LOGPENDP(endp, DRTP, LOGL_DEBUG,
diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c
index 0fd1ba7..e1380ec 100644
--- a/src/libosmo-mgcp/mgcp_osmux.c
+++ b/src/libosmo-mgcp/mgcp_osmux.c
@@ -201,14 +201,13 @@
 }

 /*! send RTP packet through OSMUX connection.
- *  \param[in] buf rtp data
- *  \param[in] buf_len length of rtp data
  *  \param[in] conn associated RTP connection
+ *  \param[in] msg msgb containing an RTP AMR packet
  *  \returns 0 on success, -1 on ERROR */
-int osmux_xfrm_to_osmux(char *buf, int buf_len, struct mgcp_conn_rtp *conn)
+int conn_osmux_send_rtp(struct mgcp_conn_rtp *conn, struct msgb *msg)
 {
int ret;
-   struct msgb *msg;
+   struct msgb *msg2;

if (!conn->end.output_enabled) {
rtpconn_osmux_rate_ctr_inc(conn, 
OSMUX_RTP_PACKETS_TX_DROPPED_CTR);
@@ -222,14 +221,13 @@
return -1;
}

-   msg = msgb_alloc(4096, "RTP");
-   if (!msg)
+   /* msg is not owned by us and will be freed by the caller stack upon 
return: */
+   msg2 = msgb_copy_c(conn->conn, msg, "osmux-rtp-send");
+   if (!msg2)
return -1;

-   memcpy(msg->data, buf, buf_len);
-   msgb_put(msg, buf_len);

-   while ((ret = osmux_xfrm_input(conn->osmux.in, msg, 
conn->osmux.remote_cid)) > 0) {
+   while ((ret = osmux_xfrm_input(conn->osmux.in, msg2, 
conn->osmux.remote_cid)) > 0) {
/* batch full, build and deliver it */
osmux_xfrm_input_deliver(conn->osmux.in);
}
@@ -237,7 +235,7 @@
rtpconn_osmux_rate_ctr_inc(conn, 
OSMUX_RTP_PACKETS_TX_DROPPED_CTR);
} else {
rtpconn_osmux_rate_ctr_inc(conn, OSMUX_RTP_PACKETS_TX_CTR);
-   rtpconn_osmux_rate_ctr_add(conn, OSMUX_AMR_OCTETS_TX_CTR, 
buf_len - sizeof(struct rtp_hdr));
+   rtpconn_osmux_rate_ctr_add(conn, OSMUX_AMR_OCTETS_TX_CTR, 
msgb_length(msg2) - sizeof(struct rtp_hdr));
}
return 0;
 }



2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted 
one.
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29873
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I8c0121485d0c96f70fe8bcbdb150793d428183ff
Gerrit-Change-Number: 29873
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-mgw[master]: mgw: Rename s/mgcp_send_rtp/mgcp_conn_rtp_dispatch_rtp/

2022-10-26 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/29865 )

Change subject: mgw: Rename s/mgcp_send_rtp/mgcp_conn_rtp_dispatch_rtp/
..

mgw: Rename s/mgcp_send_rtp/mgcp_conn_rtp_dispatch_rtp/

The previous name is misleading since the function is not really sending
stuff over a socket, but rather handling/dispatching the incoming
message internally (and finally later it may be sent over a socket under
some conditions).

Change-Id: Idaf791997b8438a4aede50f614afa0d55ad41faa
---
M src/libosmo-mgcp/mgcp_network.c
1 file changed, 13 insertions(+), 6 deletions(-)

Approvals:
  Jenkins Builder: Verified
  osmith: Looks good to me, approved



diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c
index 432c2b1..6edb4ae 100644
--- a/src/libosmo-mgcp/mgcp_network.c
+++ b/src/libosmo-mgcp/mgcp_network.c
@@ -982,9 +982,16 @@
return 0;
 }

-/* Send RTP data. Possible options are standard RTP packet
- * transmission or trsmission via an osmux connection */
-static int mgcp_send_rtp(struct mgcp_conn_rtp *conn_dst, struct msgb *msg)
+/*! Dispatch msg bridged from the sister conn in the endpoint.
+ *  \param[in] conn_dst The destination conn that should handle and transmit 
the content to
+ * its peer outside MGW.
+ *  \param[in] msg msgb containing an RTP pkt received by the sister conn in 
the endpoint,
+ *  \returns bytes sent, -1 on error.
+ *
+ * Possible options are standard RTP packet transmission, transmission
+ * via IuUP or transmission via an osmux connection.
+ */
+static int mgcp_conn_rtp_dispatch_rtp(struct mgcp_conn_rtp *conn_dst, struct 
msgb *msg)
 {
struct osmo_rtp_msg_ctx *mc = OSMO_RTP_MSG_CTX(msg);
enum rtp_proto proto = mc->proto;
@@ -1315,7 +1322,7 @@
 osmo_sockaddr_ntop(&from_addr->u.sa, 
ipbuf),
 
osmo_sockaddr_port(&conn->u.rtp.end.addr.u.sa));
}
-   return mgcp_send_rtp(conn_src, msg);
+   return mgcp_conn_rtp_dispatch_rtp(conn_src, msg);
}

/* Find a destination connection. */
@@ -1347,7 +1354,7 @@
}

/* Dispatch RTP packet to destination RTP connection */
-   return mgcp_send_rtp(&conn_dst->u.rtp, msg);
+   return mgcp_conn_rtp_dispatch_rtp(&conn_dst->u.rtp, msg);
 }

 /*! dispatch incoming RTP packet to E1 subslot, handle RTCP packets locally.
@@ -1380,7 +1387,7 @@
 osmo_sockaddr_ntop(&from_addr->u.sa, 
ipbuf),
 
osmo_sockaddr_port(&conn->u.rtp.end.addr.u.sa));
}
-   return mgcp_send_rtp(conn_src, msg);
+   return mgcp_conn_rtp_dispatch_rtp(conn_src, msg);
}

/* Forward to E1 */

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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Idaf791997b8438a4aede50f614afa0d55ad41faa
Gerrit-Change-Number: 29865
Gerrit-PatchSet: 4
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-mgw[master]: mgw: Rename s/mgcp_send_rtp/mgcp_conn_rtp_dispatch_rtp/

2022-10-26 Thread osmith
Attention is currently required from: neels, pespin.
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/29865 )

Change subject: mgw: Rename s/mgcp_send_rtp/mgcp_conn_rtp_dispatch_rtp/
..


Patch Set 4: Code-Review+2


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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Idaf791997b8438a4aede50f614afa0d55ad41faa
Gerrit-Change-Number: 29865
Gerrit-PatchSet: 4
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Attention: neels 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 26 Oct 2022 09:59:40 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: sccplite: Use mgwpool config to set up socket forwarding IPA-MGCP fro...

2022-10-26 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/29875 )

Change subject: sccplite: Use mgwpool config to set up socket forwarding 
IPA-MGCP from MSC to MGW
..

sccplite: Use mgwpool config to set up socket forwarding IPA-MGCP from MSC to 
MGW

In SCCPlite, the BSC receives the CN-side MGCP from the MSC through an
IPA conn, and it then forwards those messages to its co-located MGW
through a rawUDP socket created at startup.

This forwarding UDP socket still relied exclusively on the "mgw.conf"
struct which was filled only by the old VTY interface which was been
deprecated lately.

This patch moves the mgw-pool setup before the msc setup so that if the
VTY config file still uses the old VTY, the single MGW is added to the
MGW pool through mgcp_client_pool_register_single(). It then simply
picks the first available MGW from the pool when creating the raw UDP
MGCP-forwarding socket.

This means SCCPLite is still left with supporting only 1 MGW. If more
than one MGW is defined in the pool, then when the call is being set up
a different MGW could be picked from the pool while the CN-side MGCP
would still be sent to the MGW pool selected at osm-bsc startup.

This limitation coul be removed later on  by adding a new VTY command
under the "msc" to pin calls for an MSC to an MGW with a given "mgw_nr"
from the pool, and that same MGW be looked for in the pool every time a
new call is being established.
Another possibility would be to avoid creating the "connected" UDP
socket at osmo-bsc startup, and rather use it in non-connected mode and
transmit (sendto) using the mgcp_client remote address during call
establishment.
In any case, this is left as future excercise since so far there hasn't
been any need for multiple MGWs in SCCPLite setups.

Related: SYS#5987
Change-Id: If105dee52b8d36161c759f979eaef4579b47d365
---
M src/osmo-bsc/osmo_bsc_main.c
M src/osmo-bsc/osmo_bsc_msc.c
2 files changed, 16 insertions(+), 10 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, but someone else must approve
  osmith: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved



diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c
index 863ceea..dd8e696 100644
--- a/src/osmo-bsc/osmo_bsc_main.c
+++ b/src/osmo-bsc/osmo_bsc_main.c
@@ -989,6 +989,9 @@
}
}

+   if (bsc_mgw_setup() != 0)
+   exit(1);
+
llist_for_each_entry(msc, &bsc_gsmnet->mscs, entry) {
if (osmo_bsc_msc_init(msc) != 0) {
LOGP(DMSC, LOGL_ERROR, "Failed to start up. 
Exiting.\n");
@@ -996,9 +999,6 @@
}
}

-   if (bsc_mgw_setup() != 0)
-   exit(1);
-
if (osmo_bsc_sigtran_init(&bsc_gsmnet->mscs) != 0) {
LOGP(DNM, LOGL_ERROR, "Failed to initialize sigtran 
backhaul.\n");
exit(1);
diff --git a/src/osmo-bsc/osmo_bsc_msc.c b/src/osmo-bsc/osmo_bsc_msc.c
index 1dd486f..4d5d5b2 100644
--- a/src/osmo-bsc/osmo_bsc_msc.c
+++ b/src/osmo-bsc/osmo_bsc_msc.c
@@ -40,6 +40,7 @@
 #include 

 #include 
+#include 

 #include 
 #include 
@@ -163,27 +164,32 @@
 int osmo_bsc_msc_init(struct bsc_msc_data *msc)
 {
struct gsm_network *net = msc->network;
-   uint16_t mgw_port;
+   struct mgcp_client *mgcp_cli;
int rc;

/* Everything below refers to SCCP-Lite MSC connections only. */
if (msc_is_aoip(msc))
return 0;

-   if (net->mgw.conf->remote_port >= 0)
-   mgw_port = net->mgw.conf->remote_port;
-   else
-   mgw_port = MGCP_CLIENT_REMOTE_PORT_DEFAULT;
-
+   /* Note: MGW is preselected here at startup, which means currently
+* osmo-bsc configured for SCCPLite doesn't support MGW pools with more
+* than 1 MGW.
+*/
+   mgcp_cli = mgcp_client_pool_get(net->mgw.mgw_pool);
+   OSMO_ASSERT(mgcp_cli);
rc = osmo_sock_init2_ofd(&msc->mgcp_ipa.ofd, AF_UNSPEC, SOCK_DGRAM, 
IPPROTO_UDP,
 msc->mgcp_ipa.local_addr, 
msc->mgcp_ipa.local_port,
-net->mgw.conf->remote_addr, mgw_port,
+mgcp_client_remote_addr_str(mgcp_cli),
+mgcp_client_remote_port(mgcp_cli),
 OSMO_SOCK_F_BIND | OSMO_SOCK_F_CONNECT);
+   mgcp_client_pool_put(mgcp_cli);
if (rc < 0) {
LOGP(DMSC, LOGL_ERROR, "msc %u: Could not create/connect/bind 
MGCP proxy socket: %d\n",
msc->nr, rc);
return rc;
}
+   LOGP(DMSC, LOGL_INFO, "msc %u: Socket forwarding IPA-encapsulated MGCP 
messages towards MGW: %s\n",
+msc->nr, osmo_sock_get_name2(msc->mgcp_ipa.ofd.fd));

return 0;
 }

--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/29875

Change in osmo-bsc[master]: sccplite: Use mgwpool config to set up socket forwarding IPA-MGCP fro...

2022-10-26 Thread pespin
Attention is currently required from: osmith, fixeria.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/29875 )

Change subject: sccplite: Use mgwpool config to set up socket forwarding 
IPA-MGCP from MSC to MGW
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: If105dee52b8d36161c759f979eaef4579b47d365
Gerrit-Change-Number: 29875
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Wed, 26 Oct 2022 09:59:06 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: sccplite: Use mgwpool config to set up socket forwarding IPA-MGCP fro...

2022-10-26 Thread pespin
Attention is currently required from: osmith, fixeria.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/29875 )

Change subject: sccplite: Use mgwpool config to set up socket forwarding 
IPA-MGCP from MSC to MGW
..


Patch Set 2:

(1 comment)

File src/osmo-bsc/osmo_bsc_msc.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/29875/comment/2972f92e_8c70d8f3
PS2, Line 176:   * than 1 MGW.
> maybe print an error log entry if the user tries to do this?
It's not that straighforward to find out the number of mgw configured in the 
pool, all the API is contained in a lib and there's no API for it.



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: If105dee52b8d36161c759f979eaef4579b47d365
Gerrit-Change-Number: 29875
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Attention: osmith 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Wed, 26 Oct 2022 09:59:02 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith 
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: mgw: Introduce test to validate Osmux<->RTP-AMR-BWE

2022-10-26 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29871 )

Change subject: mgw: Introduce test to validate Osmux<->RTP-AMR-BWE
..

mgw: Introduce test to validate Osmux<->RTP-AMR-BWE

Related: SYS#6161
Change-Id: I974e265938da15639acae7e2c9c589d5784ae5c5
---
M library/AMR_Types.ttcn
M mgw/MGCP_Test.ttcn
2 files changed, 60 insertions(+), 9 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, approved
  osmith: Looks good to me, but someone else must approve
  laforge: Looks good to me, but someone else must approve



diff --git a/library/AMR_Types.ttcn b/library/AMR_Types.ttcn
index 5586a20..f453234 100644
--- a/library/AMR_Types.ttcn
+++ b/library/AMR_Types.ttcn
@@ -67,4 +67,25 @@
 external function dec_RTP_AMR_Hdr(in octetstring stream) return RTP_AMR_Hdr
 with { extension "prototype(convert) decode(RAW)" };
 
+
+type record RTP_AMR_BWE_Hdr {
+   uint4_t cmr,
+   BIT1 f,
+   uint4_t ft,
+   BIT1 q
+} with { variant "FIELDORDER(msb)" };
+template (value) RTP_AMR_BWE_Hdr ts_RTP_AMR_BWE_Hdr(template (value) uint4_t 
cmr,
+   template (value) uint4_t ft,
+   template (value) BIT1 q := '1'B,
+   template (value) BIT1 f := '0'B) := 
{
+   cmr := cmr,
+   f := f,
+   ft := ft,
+   q := q
+}
+external function enc_RTP_AMR_BWE_Hdr(in RTP_AMR_BWE_Hdr amr_hdr) return 
octetstring
+with { extension "prototype(convert) encode(RAW)" };
+external function dec_RTP_AMR_BWE_Hdr(in octetstring stream) return 
RTP_AMR_BWE_Hdr
+with { extension "prototype(convert) decode(RAW)" };
+
 } with { encode "RAW"}
diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn
index 5ff5247..3b49afc 100644
--- a/mgw/MGCP_Test.ttcn
+++ b/mgw/MGCP_Test.ttcn
@@ -1339,7 +1339,7 @@
return true;
}

-   function f_TC_two_crcx_and_rtp_osmux(boolean bidir,
+   function f_TC_two_crcx_and_rtp_osmux(boolean bidir, boolean rtp_amr_oa,
 charstring local_ip_rtp, 
charstring remote_ip_rtp,
 charstring local_ip_osmux, 
charstring remote_ip_osmux) runs on dummy_CT {
var RtpFlowData flow[2];
@@ -1350,15 +1350,35 @@
var MgcpCallId call_id := '1226'H;
var integer tolerance := 0;

+   var octetstring amr_payload;
+   var charstring fmtp;
+
f_init(ep, true);

+   var AMRFT cmr := AMR_FT_0;
+   var AMRFT ft := AMR_FT_2;
+   if (rtp_amr_oa) {
+   fmtp := "octet-align=1";
+   var RTP_AMR_Hdr amr_oa_hdr := 
valueof(ts_RTP_AMR_Hdr(enum2int(cmr), enum2int(ft)));
+   amr_payload := enc_RTP_AMR_Hdr(amr_oa_hdr) &
+  
f_osmux_gen_expected_rx_rtp_payload(enum2int(ft), 
c_OsmuxemDefaultCfg.tx_fixed_payload);
+   } else {
+   fmtp := "octet-align=0";
+   /* Convert OA to BWE: */
+   var RTP_AMR_BWE_Hdr amr_bwe_hdr := 
valueof(ts_RTP_AMR_BWE_Hdr(enum2int(cmr), enum2int(ft)));
+   var bitstring amr_bwe_hdr_bits := 
substr(oct2bit(enc_RTP_AMR_BWE_Hdr(amr_bwe_hdr)), 0 , 10);
+   var bitstring amr_data_bits := 
oct2bit(f_osmux_gen_expected_rx_rtp_payload(enum2int(ft), 
c_OsmuxemDefaultCfg.tx_fixed_payload));
+   var bitstring amr_payload_bits := amr_bwe_hdr_bits & 
substr(amr_data_bits, 0, f_amrft_payload_bits_len(enum2int(ft)));
+   amr_payload := bit2oct(f_pad_bit(amr_payload_bits, 
(lengthof(amr_payload_bits)+7)/8*8, '0'B));
+   };
+
/* from us to MGW */
flow[0] := valueof(t_RtpFlow(local_ip_rtp, remote_ip_rtp, 112, 
"AMR/8000"));
flow[0].rtp_cfg := c_RtpemDefaultCfg
flow[0].rtp_cfg.tx_payload_type := flow[0].pt;
-   /* 0014 is the ToC (CMR=AMR4.75) in front of AMR Payload in RTP 
Payload */
-   flow[0].rtp_cfg.rx_fixed_payload := '0014'O & 
f_osmux_gen_expected_rx_rtp_payload(2 /* AMR_FT_2, 5.90 */, 
c_OsmuxemDefaultCfg.tx_fixed_payload);
-   flow[0].rtp_cfg.tx_fixed_payload := 
flow[0].rtp_cfg.rx_fixed_payload;
+   flow[0].rtp_cfg.rx_fixed_payload := amr_payload;
+   flow[0].rtp_cfg.tx_fixed_payload := amr_payload;
+   flow[0].fmtp := fmtp;
/* bind local RTP emulation sockets */
flow[0].em.portnr := 1;
f_flow_create(RTPEM[0], ep, call_id, "sendrecv", flow[0]);
@@ -1409,30 +1429,39 @@

/* create one RTP and one OSmux emulations; create two connections on 
MGW EP, exchange some data */
   

Change in osmo-ttcn3-hacks[master]: osmux: Generate AMR OA payload paddings bits as 0

2022-10-26 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29870 )

Change subject: osmux: Generate AMR OA payload paddings bits as 0
..

osmux: Generate AMR OA payload paddings bits as 0

Some AMR format's payload size doesn't necessarily fit octet boundaries.
When AMR octet-aligned is used, padding bits are appended at the end to
fill the octet.
Until this patch, the padding bits where set with whatever payload fill
pattern was provided. Instead of doing so, better set the padding bits
to 0 to avoid conflicts when checking the received paytload later on,
since those bits are potentially be going to be set to 0 (eg when
converting to bandwidth-efficient).

Related: SYS#6161
Change-Id: I5bc68eb05c2f5500a259f4c73d14b51794f7f078
---
M library/AMR_Types.ttcn
M library/OSMUX_Emulation.ttcn
2 files changed, 17 insertions(+), 3 deletions(-)

Approvals:
  Jenkins Builder: Verified
  osmith: Looks good to me, approved



diff --git a/library/AMR_Types.ttcn b/library/AMR_Types.ttcn
index b4f044d..5586a20 100644
--- a/library/AMR_Types.ttcn
+++ b/library/AMR_Types.ttcn
@@ -33,7 +33,13 @@
 const integer c_AMRFT_len[9] := {12, 13, 15, 17, 19, 20, 26, 31, 5};

 function f_amrft_payload_len(INT4b amr_ft) return integer {
-return c_AMRFT_len[amr_ft];
+   return c_AMRFT_len[amr_ft];
+}
+
+const integer c_AMRFT_bits_len[9] := {95, 103, 118, 134, 148, 159, 204, 244, 
39};
+
+function f_amrft_payload_bits_len(INT4b amr_ft) return integer {
+   return c_AMRFT_bits_len[amr_ft];
 }

 type record RTP_AMR_Hdr {
diff --git a/library/OSMUX_Emulation.ttcn b/library/OSMUX_Emulation.ttcn
index c6999de..4538fdf 100644
--- a/library/OSMUX_Emulation.ttcn
+++ b/library/OSMUX_Emulation.ttcn
@@ -374,12 +374,20 @@
log2str("No Space in TxHandleList for ", 
hdl.cid));
 }

+/* Generate correctly-sized AMR payload based on amr_ft, using 
tx_fixed_payload as a fill pattern. */
 function f_osmux_gen_expected_rx_rtp_payload(INT4b amr_ft, octetstring 
tx_fixed_payload) return octetstring {
+   var integer payload_len_bits;
var integer payload_len;
+   var bitstring payload_truncated_bits;
var octetstring payload_truncated;
-   var integer i;
+
+   /* Generate the AMR payload as a bitstring, since some formats don't 
end up in octet boundary: */
+   payload_len_bits := f_amrft_payload_bits_len(amr_ft);
+   payload_truncated_bits := substr(oct2bit(tx_fixed_payload), 0, 
payload_len_bits);
+
+   /* Now convert it as an octet string filling final padding with zeroes: 
*/
payload_len := f_amrft_payload_len(amr_ft);
-   payload_truncated := substr(tx_fixed_payload, 0, payload_len);
+   payload_truncated := bit2oct(f_pad_bit(payload_truncated_bits, 
payload_len*8, '0'B));
return payload_truncated;
 }


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29870
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: I5bc68eb05c2f5500a259f4c73d14b51794f7f078
Gerrit-Change-Number: 29870
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-ttcn3-hacks[master]: mgw: Introduce test to validate Osmux<->RTP-AMR-BWE

2022-10-26 Thread pespin
Attention is currently required from: dexter.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29871 )

Change subject: mgw: Introduce test to validate Osmux<->RTP-AMR-BWE
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29871
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: I974e265938da15639acae7e2c9c589d5784ae5c5
Gerrit-Change-Number: 29871
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Wed, 26 Oct 2022 09:57:34 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-mgw[master]: mgw: Rename s/mgcp_send_rtp/mgcp_conn_rtp_dispatch_rtp/

2022-10-26 Thread pespin
Attention is currently required from: osmith, neels.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/29865 )

Change subject: mgw: Rename s/mgcp_send_rtp/mgcp_conn_rtp_dispatch_rtp/
..


Patch Set 4:

(1 comment)

File src/libosmo-mgcp/mgcp_network.c:

https://gerrit.osmocom.org/c/osmo-mgw/+/29865/comment/1121168e_4ec33dce
PS3, Line 985: Send RTP data.
> maybe replace this with what you described in the commit message?
Done



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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Idaf791997b8438a4aede50f614afa0d55ad41faa
Gerrit-Change-Number: 29865
Gerrit-PatchSet: 4
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Attention: osmith 
Gerrit-Attention: neels 
Gerrit-Comment-Date: Wed, 26 Oct 2022 09:57:17 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith 
Gerrit-MessageType: comment


Change in osmo-bsc[master]: sccplite: Use mgwpool config to set up socket forwarding IPA-MGCP fro...

2022-10-26 Thread osmith
Attention is currently required from: pespin, fixeria.
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/29875 )

Change subject: sccplite: Use mgwpool config to set up socket forwarding 
IPA-MGCP from MSC to MGW
..


Patch Set 2: Code-Review+1

(1 comment)

File src/osmo-bsc/osmo_bsc_msc.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/29875/comment/ab1324fa_d9c94559
PS2, Line 176:   * than 1 MGW.
maybe print an error log entry if the user tries to do this?



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: If105dee52b8d36161c759f979eaef4579b47d365
Gerrit-Change-Number: 29875
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Wed, 26 Oct 2022 09:57:15 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-mgw[master]: mgw: Rename s/mgcp_send_rtp/mgcp_conn_rtp_dispatch_rtp/

2022-10-26 Thread pespin
Attention is currently required from: neels, pespin.
Hello osmith, Jenkins Builder, neels, laforge, dexter,

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

https://gerrit.osmocom.org/c/osmo-mgw/+/29865

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

Change subject: mgw: Rename s/mgcp_send_rtp/mgcp_conn_rtp_dispatch_rtp/
..

mgw: Rename s/mgcp_send_rtp/mgcp_conn_rtp_dispatch_rtp/

The previous name is misleading since the function is not really sending
stuff over a socket, but rather handling/dispatching the incoming
message internally (and finally later it may be sent over a socket under
some conditions).

Change-Id: Idaf791997b8438a4aede50f614afa0d55ad41faa
---
M src/libosmo-mgcp/mgcp_network.c
1 file changed, 13 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/65/29865/4
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29865
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Idaf791997b8438a4aede50f614afa0d55ad41faa
Gerrit-Change-Number: 29865
Gerrit-PatchSet: 4
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Attention: neels 
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


Change in osmo-bsc[master]: sccplite: Use mgwpool config to set up socket forwarding IPA-MGCP fro...

2022-10-26 Thread laforge
Attention is currently required from: osmith, pespin, fixeria.
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/29875 )

Change subject: sccplite: Use mgwpool config to set up socket forwarding 
IPA-MGCP from MSC to MGW
..


Patch Set 2: Code-Review+1


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: If105dee52b8d36161c759f979eaef4579b47d365
Gerrit-Change-Number: 29875
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Attention: osmith 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Wed, 26 Oct 2022 09:50:11 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: sccplite: Use mgwpool config to set up socket forwarding IPA-MGCP fro...

2022-10-26 Thread pespin
Attention is currently required from: pespin.
Hello Jenkins Builder,

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

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

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

Change subject: sccplite: Use mgwpool config to set up socket forwarding 
IPA-MGCP from MSC to MGW
..

sccplite: Use mgwpool config to set up socket forwarding IPA-MGCP from MSC to 
MGW

In SCCPlite, the BSC receives the CN-side MGCP from the MSC through an
IPA conn, and it then forwards those messages to its co-located MGW
through a rawUDP socket created at startup.

This forwarding UDP socket still relied exclusively on the "mgw.conf"
struct which was filled only by the old VTY interface which was been
deprecated lately.

This patch moves the mgw-pool setup before the msc setup so that if the
VTY config file still uses the old VTY, the single MGW is added to the
MGW pool through mgcp_client_pool_register_single(). It then simply
picks the first available MGW from the pool when creating the raw UDP
MGCP-forwarding socket.

This means SCCPLite is still left with supporting only 1 MGW. If more
than one MGW is defined in the pool, then when the call is being set up
a different MGW could be picked from the pool while the CN-side MGCP
would still be sent to the MGW pool selected at osm-bsc startup.

This limitation coul be removed later on  by adding a new VTY command
under the "msc" to pin calls for an MSC to an MGW with a given "mgw_nr"
from the pool, and that same MGW be looked for in the pool every time a
new call is being established.
Another possibility would be to avoid creating the "connected" UDP
socket at osmo-bsc startup, and rather use it in non-connected mode and
transmit (sendto) using the mgcp_client remote address during call
establishment.
In any case, this is left as future excercise since so far there hasn't
been any need for multiple MGWs in SCCPLite setups.

Related: SYS#5987
Change-Id: If105dee52b8d36161c759f979eaef4579b47d365
---
M src/osmo-bsc/osmo_bsc_main.c
M src/osmo-bsc/osmo_bsc_msc.c
2 files changed, 16 insertions(+), 10 deletions(-)


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: If105dee52b8d36161c759f979eaef4579b47d365
Gerrit-Change-Number: 29875
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


Change in osmo-mgw[master]: Rename and move func checking if amr mode is explicitly configured

2022-10-26 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/29861 )

Change subject: Rename and move func checking if amr mode is explicitly 
configured
..

Rename and move func checking if amr mode is explicitly configured

The previous naming was quite confusing, since the function is not
really checking whether a conversion is needed, but rather whether the
codec has the AMR RTP mode defined explicitly and hence forced.

The previous naming didn't harm because the amr_oa_bwe_convert also
supports the conversion path OA<->OA and BE<->BE.
Hence nowadays the amr_oa_bwe_convert() function is called always if the
dst conn has its codec with AMR RTP mode explicitly set, no matter if
the src and dst conn have the same mode.

Related: SYS#6161
Change-Id: I8dce3038ebccf5e1e37e2908070a67d66693a96f
---
M include/osmocom/mgcp/mgcp_codec.h
M src/libosmo-mgcp/mgcp_codec.c
M src/libosmo-mgcp/mgcp_network.c
3 files changed, 15 insertions(+), 16 deletions(-)

Approvals:
  Jenkins Builder: Verified
  osmith: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved
  laforge: Looks good to me, but someone else must approve



diff --git a/include/osmocom/mgcp/mgcp_codec.h 
b/include/osmocom/mgcp/mgcp_codec.h
index 97e6b8d..994d770 100644
--- a/include/osmocom/mgcp/mgcp_codec.h
+++ b/include/osmocom/mgcp/mgcp_codec.h
@@ -17,4 +17,5 @@
 int mgcp_codec_pt_translate(struct mgcp_conn_rtp *conn_src, struct 
mgcp_conn_rtp *conn_dst, int payload_type);
 const struct mgcp_rtp_codec *mgcp_codec_pt_find_by_subtype_name(struct 
mgcp_conn_rtp *conn,
const char 
*subtype_name, unsigned int match_nr);
+bool mgcp_codec_amr_align_mode_is_indicated(const struct mgcp_rtp_codec 
*codec);
 bool mgcp_codec_amr_is_octet_aligned(const struct mgcp_rtp_codec *codec);
diff --git a/src/libosmo-mgcp/mgcp_codec.c b/src/libosmo-mgcp/mgcp_codec.c
index 38aa0a7..1a8d26a 100644
--- a/src/libosmo-mgcp/mgcp_codec.c
+++ b/src/libosmo-mgcp/mgcp_codec.c
@@ -345,6 +345,18 @@
return -EINVAL;
 }

+/* Check if the codec has a specific AMR mode (octet-aligned or 
bandwith-efficient) set. */
+bool mgcp_codec_amr_align_mode_is_indicated(const struct mgcp_rtp_codec *codec)
+{
+   if (codec->param_present == false)
+   return false;
+   if (!codec->param.amr_octet_aligned_present)
+   return false;
+   if (strcmp(codec->subtype_name, "AMR") != 0)
+   return false;
+   return true;
+}
+
 /* Return true if octet-aligned is set in the given codec. Default to 
octet-aligned=0, i.e. bandwidth-efficient mode.
  * See RFC4867 "RTP Payload Format for AMR and AMR-WB" sections "8.1. AMR 
Media Type Registration" and "8.2. AMR-WB
  * Media Type Registration":
diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c
index 55f49c4..26f3475 100644
--- a/src/libosmo-mgcp/mgcp_network.c
+++ b/src/libosmo-mgcp/mgcp_network.c
@@ -769,20 +769,6 @@
return msgb_trim(msg, rc + sizeof(struct rtp_hdr));
 }

-/* Check if a conversion between octet-aligned and bandwith-efficient mode is
- * indicated. */
-static bool amr_oa_bwe_convert_indicated(struct mgcp_rtp_codec *codec)
-{
-   if (codec->param_present == false)
-   return false;
-   if (!codec->param.amr_octet_aligned_present)
-   return false;
-   if (strcmp(codec->subtype_name, "AMR") != 0)
-   return false;
-   return true;
-}
-
-
 /* Return whether an RTP packet with AMR payload is in octet-aligned mode.
  * Return 0 if in bandwidth-efficient mode, 1 for octet-aligned mode, and 
negative if the RTP data is invalid. */
 static int amr_oa_check(char *data, int len)
@@ -1221,7 +1207,7 @@

if (mgcp_conn_rtp_is_iuup(conn_dst) || 
mgcp_conn_rtp_is_iuup(conn_src)) {
/* the iuup code will correctly transform to 
the correct AMR mode */
-   } else if 
(amr_oa_bwe_convert_indicated(conn_dst->end.codec)) {
+   } else if 
(mgcp_codec_amr_align_mode_is_indicated(conn_dst->end.codec)) {
rc = amr_oa_bwe_convert(endp, msg,

conn_dst->end.codec->param.amr_octet_aligned);
if (rc < 0) {
@@ -1535,7 +1521,7 @@
 * defined, then we check if the incoming payload matches that
 * expectation. */
if (mc->proto == MGCP_PROTO_RTP &&
-   amr_oa_bwe_convert_indicated(conn_src->end.codec)) {
+   mgcp_codec_amr_align_mode_is_indicated(conn_src->end.codec)) {
int oa = amr_oa_check((char*)msgb_data(msg), msgb_length(msg));
if (oa < 0)
return -1;

--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29861
To unsubscribe, or for help writing mail f

Change in osmo-mgw[master]: mgw: rx_rtp(): reorder checks and handlings

2022-10-26 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/29864 )

Change subject: mgw: rx_rtp(): reorder checks and handlings
..

mgw: rx_rtp(): reorder checks and handlings

First validate the origin of the message, then later the content
of the message and finally execute whatever triggers are necessary.
This way contents from unknown senders are not even parsed or acted
upon, avoiding useless potential harm.

Change-Id: I011a6d7d705768c32a35cec5cd7169725a21a670
---
M src/libosmo-mgcp/mgcp_network.c
1 file changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Jenkins Builder: Verified
  osmith: Looks good to me, approved
  laforge: Looks good to me, but someone else must approve



diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c
index 26f3475..432c2b1 100644
--- a/src/libosmo-mgcp/mgcp_network.c
+++ b/src/libosmo-mgcp/mgcp_network.c
@@ -1514,7 +1514,9 @@

LOG_CONN_RTP(conn_src, LOGL_DEBUG, "rx_rtp(%u bytes)\n", 
msgb_length(msg));

-   mgcp_conn_watchdog_kick(conn_src->conn);
+   /* Check if the origin of the RTP packet seems plausible */
+   if (!trunk->rtp_accept_all && check_rtp_origin(conn_src, from_addr))
+   return -1;

/* If AMR is configured for the ingress connection and conversion of the
 * framing mode (octet-aligned vs. bandwith-efficient) is explicitly
@@ -1534,9 +1536,7 @@
}
}

-   /* Check if the origin of the RTP packet seems plausible */
-   if (!trunk->rtp_accept_all && check_rtp_origin(conn_src, from_addr))
-   return -1;
+   mgcp_conn_watchdog_kick(conn_src->conn);
 
/* Execute endpoint specific implementation that handles the
 * dispatching of the RTP data */

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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I011a6d7d705768c32a35cec5cd7169725a21a670
Gerrit-Change-Number: 29864
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-CC: neels 
Gerrit-MessageType: merged


Change in osmo-mgw[master]: Rename and move func checking if amr mode is explicitly configured

2022-10-26 Thread pespin
Attention is currently required from: neels, fixeria, daniel.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/29861 )

Change subject: Rename and move func checking if amr mode is explicitly 
configured
..


Patch Set 3: Code-Review+2


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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I8dce3038ebccf5e1e37e2908070a67d66693a96f
Gerrit-Change-Number: 29861
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: neels 
Gerrit-Attention: fixeria 
Gerrit-Attention: daniel 
Gerrit-Comment-Date: Wed, 26 Oct 2022 09:41:11 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: osmux: Generate AMR OA payload paddings bits as 0

2022-10-26 Thread osmith
Attention is currently required from: pespin, daniel, dexter.
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29870 )

Change subject: osmux: Generate AMR OA payload paddings bits as 0
..


Patch Set 3: Code-Review+2

(1 comment)

File library/OSMUX_Emulation.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29870/comment/42649d84_c4ee9641
PS2, Line 377: Generatea
> Generate
Done



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29870
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: I5bc68eb05c2f5500a259f4c73d14b51794f7f078
Gerrit-Change-Number: 29870
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Attention: pespin 
Gerrit-Attention: daniel 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Wed, 26 Oct 2022 09:38:57 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: osmith 
Gerrit-MessageType: comment


Change in osmo-bsc[master]: sccplite: Use mgwpool config to set up socket forwarding IPA-MGCP fro...

2022-10-26 Thread Jenkins Builder
Jenkins Builder has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/29875 )

Change subject: sccplite: Use mgwpool config to set up socket forwarding 
IPA-MGCP from MSC to MGW
..


Patch Set 1:

(1 comment)

File src/osmo-bsc/osmo_bsc_msc.c:

Robot Comment from checkpatch (run ID jenkins-gerrit-lint-435):
https://gerrit.osmocom.org/c/osmo-bsc/+/29875/comment/bd33a416_ddd30f48
PS1, Line 167:  struct mgcp_client * mgcp_cli;
"foo * bar" should be "foo *bar"



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: If105dee52b8d36161c759f979eaef4579b47d365
Gerrit-Change-Number: 29875
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Wed, 26 Oct 2022 09:36:11 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-bsc[master]: sccplite: Use mgwpool config to set up socket forwarding IPA-MGCP fro...

2022-10-26 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/29875 )


Change subject: sccplite: Use mgwpool config to set up socket forwarding 
IPA-MGCP from MSC to MGW
..

sccplite: Use mgwpool config to set up socket forwarding IPA-MGCP from MSC to 
MGW

In SCCPlite, the BSC receives the CN-side MGCP from the MSC through an
IPA conn, and it then forwards those messages to its co-located MGW
through a rawUDP socket created at startup.

This forwarding UDP socket still relied exclusively on the "mgw.conf"
struct which was filled only by the old VTY interface which was been
deprecated lately.

This patch moves the mgw-pool setup before the msc setup so that if the
VTY config file still uses the old VTY, the single MGW is added to the
MGW pool through mgcp_client_pool_register_single(). It then simply
picks the first available MGW from the pool when creating the raw UDP
MGCP-forwarding socket.

This means SCCPLite is still left with supporting only 1 MGW. If more
than one MGW is defined in the pool, then when the call is being set up
a different MGW could be picked from the pool while the CN-side MGCP
would still be sent to the MGW pool selected at osm-bsc startup.

This limitation coul be removed later on  by adding a new VTY command
under the "msc" to pin calls for an MSC to an MGW with a given "mgw_nr"
from the pool, and that same MGW be looked for in the pool every time a
new call is being established.
Another possibility would be to avoid creating the "connected" UDP
socket at osmo-bsc startup, and rather use it in non-connected mode and
transmit (sendto) using the mgcp_client remote address during call
establishment.
In any case, this is left as future excercise since so far there hasn't
been any need for multiple MGWs in SCCPLite setups.

Related: SYS#5987
Change-Id: If105dee52b8d36161c759f979eaef4579b47d365
---
M src/osmo-bsc/osmo_bsc_main.c
M src/osmo-bsc/osmo_bsc_msc.c
2 files changed, 16 insertions(+), 10 deletions(-)



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

diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c
index 863ceea..dd8e696 100644
--- a/src/osmo-bsc/osmo_bsc_main.c
+++ b/src/osmo-bsc/osmo_bsc_main.c
@@ -989,6 +989,9 @@
}
}

+   if (bsc_mgw_setup() != 0)
+   exit(1);
+
llist_for_each_entry(msc, &bsc_gsmnet->mscs, entry) {
if (osmo_bsc_msc_init(msc) != 0) {
LOGP(DMSC, LOGL_ERROR, "Failed to start up. 
Exiting.\n");
@@ -996,9 +999,6 @@
}
}

-   if (bsc_mgw_setup() != 0)
-   exit(1);
-
if (osmo_bsc_sigtran_init(&bsc_gsmnet->mscs) != 0) {
LOGP(DNM, LOGL_ERROR, "Failed to initialize sigtran 
backhaul.\n");
exit(1);
diff --git a/src/osmo-bsc/osmo_bsc_msc.c b/src/osmo-bsc/osmo_bsc_msc.c
index 1dd486f..a584f46 100644
--- a/src/osmo-bsc/osmo_bsc_msc.c
+++ b/src/osmo-bsc/osmo_bsc_msc.c
@@ -40,6 +40,7 @@
 #include 

 #include 
+#include 

 #include 
 #include 
@@ -163,27 +164,32 @@
 int osmo_bsc_msc_init(struct bsc_msc_data *msc)
 {
struct gsm_network *net = msc->network;
-   uint16_t mgw_port;
+   struct mgcp_client * mgcp_cli;
int rc;

/* Everything below refers to SCCP-Lite MSC connections only. */
if (msc_is_aoip(msc))
return 0;

-   if (net->mgw.conf->remote_port >= 0)
-   mgw_port = net->mgw.conf->remote_port;
-   else
-   mgw_port = MGCP_CLIENT_REMOTE_PORT_DEFAULT;
-
+   /* Note: MGW is preselected here at startup, which means currently
+* osmo-bsc configured for SCCPLite doesn't support MGW pools with more
+* than 1 MGW.
+*/
+   mgcp_cli = mgcp_client_pool_get(net->mgw.mgw_pool);
+   OSMO_ASSERT(mgcp_cli);
rc = osmo_sock_init2_ofd(&msc->mgcp_ipa.ofd, AF_UNSPEC, SOCK_DGRAM, 
IPPROTO_UDP,
 msc->mgcp_ipa.local_addr, 
msc->mgcp_ipa.local_port,
-net->mgw.conf->remote_addr, mgw_port,
+mgcp_client_remote_addr_str(mgcp_cli),
+mgcp_client_remote_port(mgcp_cli),
 OSMO_SOCK_F_BIND | OSMO_SOCK_F_CONNECT);
+   mgcp_client_pool_put(mgcp_cli);
if (rc < 0) {
LOGP(DMSC, LOGL_ERROR, "msc %u: Could not create/connect/bind 
MGCP proxy socket: %d\n",
msc->nr, rc);
return rc;
}
+   LOGP(DMSC, LOGL_INFO, "msc %u: Socket forwarding IPA-encapsulated MGCP 
messages towards MGW: %s\n",
+msc->nr, osmo_sock_get_name2(msc->mgcp_ipa.ofd.fd));

return 0;
 }

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

Gerrit-Proj

Change in osmo-pcu[master]: Rework tbf::update_ms()

2022-10-26 Thread osmith
Attention is currently required from: fixeria, pespin.
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/29846 )

Change subject: Rework tbf::update_ms()
..


Patch Set 4: Code-Review+1

(2 comments)

Commit Message:

https://gerrit.osmocom.org/c/osmo-pcu/+/29846/comment/9cdc4ef5_3344f378
PS3, Line 18: practive
> practice? […]
Done


File src/gprs_ms_storage.cpp:

https://gerrit.osmocom.org/c/osmo-pcu/+/29846/comment/4531169f_4bc92074
PS3, Line 112:
> " No newline at end of revision file. […]
Done



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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I1b7c0fde15b9bb8a973068994dbe972285ad0aff
Gerrit-Change-Number: 29846
Gerrit-PatchSet: 4
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Attention: fixeria 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 26 Oct 2022 09:32:25 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


Change in osmo-mgw[master]: osmux: Make sure RTP AMR feed to osmux is in octet-aligned mode

2022-10-26 Thread osmith
Attention is currently required from: neels, laforge, pespin, dexter.
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/29867 )

Change subject: osmux: Make sure RTP AMR feed to osmux is in octet-aligned mode
..


Patch Set 5: Code-Review+2


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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ifeec44241079f7a31da12745c92bfdc4fb222f3a
Gerrit-Change-Number: 29867
Gerrit-PatchSet: 5
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-CC: neels 
Gerrit-Attention: neels 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Wed, 26 Oct 2022 09:30:48 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-mgw[master]: osmux: Rename function and pass msgb directly to it

2022-10-26 Thread osmith
Attention is currently required from: pespin.
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/29873 )

Change subject: osmux: Rename function and pass msgb directly to it
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I8c0121485d0c96f70fe8bcbdb150793d428183ff
Gerrit-Change-Number: 29873
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 26 Oct 2022 09:27:05 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-mgw[master]: mgw: Rename s/mgcp_send_rtp/mgcp_conn_rtp_dispatch_rtp/

2022-10-26 Thread osmith
Attention is currently required from: neels, pespin.
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/29865 )

Change subject: mgw: Rename s/mgcp_send_rtp/mgcp_conn_rtp_dispatch_rtp/
..


Patch Set 3: Code-Review+1

(1 comment)

File src/libosmo-mgcp/mgcp_network.c:

https://gerrit.osmocom.org/c/osmo-mgw/+/29865/comment/fadcd172_56913a18
PS3, Line 985: Send RTP data.
maybe replace this with what you described in the commit message?



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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Idaf791997b8438a4aede50f614afa0d55ad41faa
Gerrit-Change-Number: 29865
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Attention: neels 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 26 Oct 2022 09:25:19 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-mgw[master]: mgw: rx_rtp(): reorder checks and handlings

2022-10-26 Thread osmith
Attention is currently required from: neels, pespin.
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/29864 )

Change subject: mgw: rx_rtp(): reorder checks and handlings
..


Patch Set 3: Code-Review+2

(1 comment)

Commit Message:

https://gerrit.osmocom.org/c/osmo-mgw/+/29864/comment/27a66f10_a3a65af8
PS1, Line 9: Let's first validate the origin of the message, then the content 
of the
> I'd say the imperative form is specially useful in the first line since it 
> needs to be short. […]
Done



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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I011a6d7d705768c32a35cec5cd7169725a21a670
Gerrit-Change-Number: 29864
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-CC: neels 
Gerrit-Attention: neels 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 26 Oct 2022 09:23:34 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: neels 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-mgw[master]: Rename and move func checking if amr mode is explicitly configured

2022-10-26 Thread osmith
Attention is currently required from: neels, pespin, fixeria, daniel.
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/29861 )

Change subject: Rename and move func checking if amr mode is explicitly 
configured
..


Patch Set 3: Code-Review+1

(1 comment)

File include/osmocom/mgcp/mgcp_codec.h:

https://gerrit.osmocom.org/c/osmo-mgw/+/29861/comment/0d03559d_7aeba552
PS1, Line 20: bool mgcp_codec_amr_mode_is_indicated(const struct mgcp_rtp_codec 
*codec);
> Ah I remember why I moved it. To have it in mgcp_codec. […]
(Looks like Pau addressed everything here.)



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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I8dce3038ebccf5e1e37e2908070a67d66693a96f
Gerrit-Change-Number: 29861
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Attention: neels 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Attention: daniel 
Gerrit-Comment-Date: Wed, 26 Oct 2022 09:21:20 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: neels 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: osmux: Generate AMR OA payload paddings bits as 0

2022-10-26 Thread pespin
Attention is currently required from: pespin, daniel, dexter.
Hello osmith, Jenkins Builder, laforge, daniel, dexter,

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

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

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

Change subject: osmux: Generate AMR OA payload paddings bits as 0
..

osmux: Generate AMR OA payload paddings bits as 0

Some AMR format's payload size doesn't necessarily fit octet boundaries.
When AMR octet-aligned is used, padding bits are appended at the end to
fill the octet.
Until this patch, the padding bits where set with whatever payload fill
pattern was provided. Instead of doing so, better set the padding bits
to 0 to avoid conflicts when checking the received paytload later on,
since those bits are potentially be going to be set to 0 (eg when
converting to bandwidth-efficient).

Related: SYS#6161
Change-Id: I5bc68eb05c2f5500a259f4c73d14b51794f7f078
---
M library/AMR_Types.ttcn
M library/OSMUX_Emulation.ttcn
2 files changed, 17 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/70/29870/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29870
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: I5bc68eb05c2f5500a259f4c73d14b51794f7f078
Gerrit-Change-Number: 29870
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Attention: pespin 
Gerrit-Attention: daniel 
Gerrit-Attention: dexter 
Gerrit-MessageType: newpatchset


Change in osmo-ttcn3-hacks[master]: mgw: Introduce test to validate Osmux<->RTP-AMR-BWE

2022-10-26 Thread osmith
Attention is currently required from: pespin, dexter.
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29871 )

Change subject: mgw: Introduce test to validate Osmux<->RTP-AMR-BWE
..


Patch Set 2: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29871
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: I974e265938da15639acae7e2c9c589d5784ae5c5
Gerrit-Change-Number: 29871
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Attention: pespin 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Wed, 26 Oct 2022 09:15:32 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


  1   2   >