[ABANDON] openbsc[master]: Migrate from OpenSSL to osmo_get_rand_id()

2017-09-04 Thread Max
Max has abandoned this change.

Change subject: Migrate from OpenSSL to osmo_get_rand_id()
..


Abandoned

-- 
To view, visit https://gerrit.osmocom.org/1464
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: I270c33912bf107b3c7c217d199262cc74d56ffdb
Gerrit-PatchSet: 7
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: tnt 


libosmo-netif[master]: osmux: Re-write osmux_snprintf

2017-09-04 Thread Pablo Neira Ayuso

Patch Set 3:

(1 comment)

https://gerrit.osmocom.org/#/c/3537/3/src/osmux.c
File src/osmux.c:

Line 918:   SNPRINTF_BUFFER_SIZE(ret, buf_offset, size);
> Are you asking about this exact "No room for OSMUX payload" error case?
OK, if the problem are truncated packet, then fix _snprintf() function to use 
msg->len instead of fetching the field from the RTP header. We shouldn't trust 
what the header announces.


-- 
To view, visit https://gerrit.osmocom.org/3537
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I695771d099833842db37a415b636035d17f1bba7
Gerrit-PatchSet: 3
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pablo Neira Ayuso 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: Yes


libosmo-netif[master]: osmux: Re-write osmux_snprintf

2017-09-04 Thread Pau Espin Pedrol

Patch Set 3:

(1 comment)

https://gerrit.osmocom.org/#/c/3537/3/src/osmux.c
File src/osmux.c:

Line 918:   SNPRINTF_BUFFER_SIZE(ret, buf_offset, size);
> I'm telling this because I suspect this is papering a problem somewhere els
Are you asking about this exact "No room for OSMUX payload" error case?

It's not about a buffer being full, it's about extra validation to assert we 
don't read out of bounds by checking contents of the packet were not truncated, 
ie. osmux_get_payload_len says there should be 35 bytes, but packet only 
contains 30 bytes more. Thus, we read 4 bytes out of the buffer.

In case you referer to why we may return in the SNPRINTF_BUFFER_SIZE() above:
- In a general case, if the buffer is too small.
- In this specific case (osmux_test calling osmux_snprintf): Initially the 
buffer was 2048, and I changed it to 4096 because I was seeing the buffer 
overflows (initial crash). Then, AMR payload may be a few bytes, but its 
representation using ASCII + spacing + other stuff can grow bigger. Then in one 
osmux frame, you can have 8 of those. And again multiply that by the amount of 
osmux frames in one UDP packet.


-- 
To view, visit https://gerrit.osmocom.org/3537
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I695771d099833842db37a415b636035d17f1bba7
Gerrit-PatchSet: 3
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pablo Neira Ayuso 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: Yes


[MERGED] osmo-gsm-manuals[master]: OsmoGsmTester: Move coredump section and add reference to ke...

2017-09-04 Thread Neels Hofmeyr
Neels Hofmeyr has submitted this change and it was merged.

Change subject: OsmoGsmTester: Move coredump section and add reference to 
kernel.core_pattern sysctl
..


OsmoGsmTester: Move coredump section and add reference to kernel.core_pattern 
sysctl

This section is moved further below in order to have it after section
which explains how to create user jenkins and osmo-gsm-tester group, as
we need this group already created anyway for the config to work
correctly.

Change-Id: I5bdde0a9960f9806f081e9a876b8b66db9e7f37c
---
M OsmoGSMTester/chapters/install.adoc
1 file changed, 32 insertions(+), 25 deletions(-)

Approvals:
  Neels Hofmeyr: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/OsmoGSMTester/chapters/install.adoc 
b/OsmoGSMTester/chapters/install.adoc
index f58c611..4d2b677 100644
--- a/OsmoGSMTester/chapters/install.adoc
+++ b/OsmoGSMTester/chapters/install.adoc
@@ -330,31 +330,6 @@
 
 This assumes you have already created the jenkins user (see 
<>).
 
- Allow Core Files
-
-In case a binary run for the test crashes, a core file of the crash should be
-written. This requires a limit rule. Copy the following config file from the
-osmo-gsm-tester source tree to the main unit:
-
-
-sudo -s
-echo "@osmo-gsm-tester - core unlimited" > 
/etc/security/limits.d/osmo-gsm-tester_allow-core.conf
-
-
-Re-login the user to make these changes take effect.
-
- Allow Realtime Priority
-
-Certain binaries should be run with real-time priority, like 'osmo-bts-trx'.
-Add this permission on the main unit:
-
-
-sudo -s
-echo "@osmo-gsm-tester - rtprio 99" > 
/etc/security/limits.d/osmo-gsm-tester_allow-rtprio.conf
-
-
-Re-login the user to make these changes take effect.
-
  User Permissions
 
 On the main unit, create a group for all users that should be allowed to use
@@ -467,6 +442,38 @@
 
 TODO: allow skipping pcaps by configuration if access to tcpdump is not wanted
 
+ Allow Core Files
+
+In case a binary run for the test crashes, a core file of the crash should be
+written. This requires a limit rule. Create a file with the required rule:
+
+
+sudo -s
+echo "@osmo-gsm-tester - core unlimited" > 
/etc/security/limits.d/osmo-gsm-tester_allow-core.conf
+
+
+Re-login the user to make these changes take effect.
+
+Set the *kernel.core_pattern* sysctl to *core* (usually the default). For each
+binary run by osmo-gsm-tester, a core file will then appear in the same dir 
that
+contains stdout and stderr for that process (because this dir is set as CWD).
+
+
+sysctl -w kernel.core_pattern=core
+
+
+ Allow Realtime Priority
+
+Certain binaries should be run with real-time priority, like 'osmo-bts-trx'.
+Add this permission on the main unit:
+
+
+sudo -s
+echo "@osmo-gsm-tester - rtprio 99" > 
/etc/security/limits.d/osmo-gsm-tester_allow-rtprio.conf
+
+
+Re-login the user to make these changes take effect.
+
 [[user_config_uhd]]
  UHD
 

-- 
To view, visit https://gerrit.osmocom.org/3711
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5bdde0a9960f9806f081e9a876b8b66db9e7f37c
Gerrit-PatchSet: 3
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 


osmo-gsm-manuals[master]: OsmoGsmTester: Move coredump section and add reference to ke...

2017-09-04 Thread Neels Hofmeyr

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/3711
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I5bdde0a9960f9806f081e9a876b8b66db9e7f37c
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


libosmo-netif[master]: osmux: Re-write osmux_snprintf

2017-09-04 Thread Pablo Neira Ayuso

Patch Set 3:

(2 comments)

https://gerrit.osmocom.org/#/c/3537/3/src/osmux.c
File src/osmux.c:

Line 851:   return ret; \
> I strongly object this coding style. Please no hidden return statements in 
Return hidden is macros is not good. I'm with Neels in this one.


Line 918:   SNPRINTF_BUFFER_SIZE(ret, buf_offset, size);
> How come is the buffer getting full? AMR payload is very very small and we'
I'm telling this because I suspect this is papering a problem somewhere else...


-- 
To view, visit https://gerrit.osmocom.org/3537
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I695771d099833842db37a415b636035d17f1bba7
Gerrit-PatchSet: 3
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pablo Neira Ayuso 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: Yes


openbsc[master]: handover_decision: Fix condition for power budget handover a...

2017-09-04 Thread Ivan Kluchnikov

Patch Set 1:

> Cool. Could you please add spec reference to put this into proper
 > context?
Hi,
I am not sure that I can find exact spec reference.
But I used openbsc/doc/handover.txt and it has link to  Chapter 8 of 
"Performance Enhancements in a Frequency Hopping GSM Network".
It's useful for understanding of current handover implementation.

-- 
To view, visit https://gerrit.osmocom.org/3814
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If7f54a4cb179eaa9e5eb147b9477633ac618e69e
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Ivan Kluchnikov 
Gerrit-Reviewer: Ivan Kluchnikov 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-HasComments: No


[PATCH] osmo-gsm-manuals[master]: OsmoGsmTester: Move coredump section and add reference to ke...

2017-09-04 Thread Pau Espin Pedrol
Hello Neels Hofmeyr, Jenkins Builder,

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

https://gerrit.osmocom.org/3711

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

OsmoGsmTester: Move coredump section and add reference to kernel.core_pattern 
sysctl

This section is moved further below in order to have it after section
which explains how to create user jenkins and osmo-gsm-tester group, as
we need this group already created anyway for the config to work
correctly.

Change-Id: I5bdde0a9960f9806f081e9a876b8b66db9e7f37c
---
M OsmoGSMTester/chapters/install.adoc
1 file changed, 32 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals 
refs/changes/11/3711/2

diff --git a/OsmoGSMTester/chapters/install.adoc 
b/OsmoGSMTester/chapters/install.adoc
index f58c611..4d2b677 100644
--- a/OsmoGSMTester/chapters/install.adoc
+++ b/OsmoGSMTester/chapters/install.adoc
@@ -330,31 +330,6 @@
 
 This assumes you have already created the jenkins user (see 
<>).
 
- Allow Core Files
-
-In case a binary run for the test crashes, a core file of the crash should be
-written. This requires a limit rule. Copy the following config file from the
-osmo-gsm-tester source tree to the main unit:
-
-
-sudo -s
-echo "@osmo-gsm-tester - core unlimited" > 
/etc/security/limits.d/osmo-gsm-tester_allow-core.conf
-
-
-Re-login the user to make these changes take effect.
-
- Allow Realtime Priority
-
-Certain binaries should be run with real-time priority, like 'osmo-bts-trx'.
-Add this permission on the main unit:
-
-
-sudo -s
-echo "@osmo-gsm-tester - rtprio 99" > 
/etc/security/limits.d/osmo-gsm-tester_allow-rtprio.conf
-
-
-Re-login the user to make these changes take effect.
-
  User Permissions
 
 On the main unit, create a group for all users that should be allowed to use
@@ -467,6 +442,38 @@
 
 TODO: allow skipping pcaps by configuration if access to tcpdump is not wanted
 
+ Allow Core Files
+
+In case a binary run for the test crashes, a core file of the crash should be
+written. This requires a limit rule. Create a file with the required rule:
+
+
+sudo -s
+echo "@osmo-gsm-tester - core unlimited" > 
/etc/security/limits.d/osmo-gsm-tester_allow-core.conf
+
+
+Re-login the user to make these changes take effect.
+
+Set the *kernel.core_pattern* sysctl to *core* (usually the default). For each
+binary run by osmo-gsm-tester, a core file will then appear in the same dir 
that
+contains stdout and stderr for that process (because this dir is set as CWD).
+
+
+sysctl -w kernel.core_pattern=core
+
+
+ Allow Realtime Priority
+
+Certain binaries should be run with real-time priority, like 'osmo-bts-trx'.
+Add this permission on the main unit:
+
+
+sudo -s
+echo "@osmo-gsm-tester - rtprio 99" > 
/etc/security/limits.d/osmo-gsm-tester_allow-rtprio.conf
+
+
+Re-login the user to make these changes take effect.
+
 [[user_config_uhd]]
  UHD
 

-- 
To view, visit https://gerrit.osmocom.org/3711
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I5bdde0a9960f9806f081e9a876b8b66db9e7f37c
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 


[ABANDON] openbsc[master]: bsc_control.py: convert to python3

2017-09-04 Thread Max
Max has abandoned this change.

Change subject: bsc_control.py: convert to python3
..


Abandoned

-- 
To view, visit https://gerrit.osmocom.org/1358
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: I669be3e8731460d5d9229fd0459ef7dd60e8bd73
Gerrit-PatchSet: 5
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 


[PATCH] osmo-pcu[master]: Move DL scheduling and RTS handler to trx level

2017-09-04 Thread Max
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/3150

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

Move DL scheduling and RTS handler to trx level

Use TRX object directly instead of BTS singleton and trx_no. This is
necessary to facilitate the move of UL/DL TBF lists to TRX level.

Change-Id: Ia176245647c19fa1551fb6f5c8225b2529f73cbf
Related: OS#1541
---
M src/bts.cpp
M src/bts.h
M src/gprs_rlcmac.h
M src/gprs_rlcmac_sched.cpp
M src/pcu_l1_if.cpp
M src/tbf.cpp
M src/tbf.h
M tests/tbf/TbfTest.cpp
8 files changed, 66 insertions(+), 76 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/50/3150/9

diff --git a/src/bts.cpp b/src/bts.cpp
index b768569..5cf3d7c 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -1375,8 +1375,7 @@
egprs_ms_class, tlli, ta, ms);
 
if (!ul_tbf) {
-   handle_tbf_reject(bts_data(), ms, tlli,
-   trx_no(), ts_no);
+   handle_tbf_reject(get_trx(), ms, tlli, ts_no);
return;
}
 
diff --git a/src/bts.h b/src/bts.h
index d65cd2f..37e065e 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -92,7 +92,7 @@
gprs_rlcmac_bts *bts_data() const;
BTS *bts() const;
uint8_t trx_no() const;
-
+   gprs_rlcmac_trx *get_trx();
struct gprs_rlcmac_ul_tbf *ul_tbf_by_tfi(uint8_t tfi);
struct gprs_rlcmac_dl_tbf *dl_tbf_by_tfi(uint8_t tfi);
 
@@ -695,6 +695,11 @@
return trx->bts->bts_data();
 }
 
+inline gprs_rlcmac_trx *gprs_rlcmac_pdch::get_trx()
+{
+   return trx;
+}
+
 inline uint8_t gprs_rlcmac_pdch::trx_no() const
 {
return trx->trx_no;
diff --git a/src/gprs_rlcmac.h b/src/gprs_rlcmac.h
index be1e686..3d825a8 100644
--- a/src/gprs_rlcmac.h
+++ b/src/gprs_rlcmac.h
@@ -89,9 +89,7 @@
 int gprs_rlcmac_paging_request(uint8_t *ptmsi, uint16_t ptmsi_len,
const char *imsi);
 
-int gprs_rlcmac_rcv_rts_block(struct gprs_rlcmac_bts *bts,
-   uint8_t trx, uint8_t ts,
-uint32_t fn, uint8_t block_nr);
+int gprs_rlcmac_rcv_rts_block(struct gprs_rlcmac_trx *trx, uint8_t ts, 
uint32_t fn, uint8_t block_nr);
 
 int gprs_alloc_max_dl_slots_per_ms(struct gprs_rlcmac_bts *bts,
uint8_t ms_class = 0);
diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp
index 2350808..4585622 100644
--- a/src/gprs_rlcmac_sched.cpp
+++ b/src/gprs_rlcmac_sched.cpp
@@ -25,12 +25,10 @@
 
 #include "pcu_utils.h"
 
-static uint32_t sched_poll(BTS *bts,
-   uint8_t trx, uint8_t ts, uint32_t fn, uint8_t block_nr,
-   struct gprs_rlcmac_tbf **poll_tbf,
-   struct gprs_rlcmac_tbf **ul_ass_tbf,
-   struct gprs_rlcmac_tbf **dl_ass_tbf,
-   struct gprs_rlcmac_ul_tbf **ul_ack_tbf)
+static uint32_t sched_poll(struct gprs_rlcmac_trx *trx, uint8_t ts, uint32_t 
fn, uint8_t block_nr,
+  struct gprs_rlcmac_tbf **poll_tbf,
+  struct gprs_rlcmac_tbf **ul_ass_tbf, struct 
gprs_rlcmac_tbf **dl_ass_tbf,
+  struct gprs_rlcmac_ul_tbf **ul_ack_tbf)
 {
struct gprs_rlcmac_ul_tbf *ul_tbf;
struct gprs_rlcmac_dl_tbf *dl_tbf;
@@ -42,11 +40,11 @@
if ((block_nr % 3) == 2)
poll_fn ++;
poll_fn = poll_fn % GSM_MAX_FN;
-   llist_for_each(pos, >ul_tbfs()) {
+   llist_for_each(pos, >bts->ul_tbfs()) {
ul_tbf = as_ul_tbf(pos->entry());
OSMO_ASSERT(ul_tbf);
/* this trx, this ts */
-   if (ul_tbf->trx->trx_no != trx || !ul_tbf->is_control_ts(ts))
+   if (ul_tbf->trx->trx_no != trx->trx_no || 
!ul_tbf->is_control_ts(ts))
continue;
/* polling for next uplink block */
if (ul_tbf->poll_state == GPRS_RLCMAC_POLL_SCHED
@@ -63,11 +61,11 @@
 /* FIXME: Is this supposed to be fair? The last TBF for each wins? Maybe use 
llist_add_tail and skip once we have all
 states? */
}
-   llist_for_each(pos, >dl_tbfs()) {
+   llist_for_each(pos, >bts->dl_tbfs()) {
dl_tbf = as_dl_tbf(pos->entry());
OSMO_ASSERT(dl_tbf);
/* this trx, this ts */
-   if (dl_tbf->trx->trx_no != trx || !dl_tbf->is_control_ts(ts))
+   if (dl_tbf->trx->trx_no != trx->trx_no || 
!dl_tbf->is_control_ts(ts))
continue;
/* polling for next uplink block */
if (dl_tbf->poll_state == GPRS_RLCMAC_POLL_SCHED
@@ -207,9 +205,8 @@
return NULL;
 }
 
-static struct msgb *sched_select_downlink(struct gprs_rlcmac_bts *bts,
-   uint8_t trx, uint8_t ts, uint32_t fn,
-   uint8_t block_nr, struct gprs_rlcmac_pdch *pdch)
+static struct msgb *sched_select_downlink(struct gprs_rlcmac_trx *trx, uint8_t 
ts, uint32_t fn, 

osmo-gsm-tester[master]: Reserve ARFCN dynamically based on BTS band support

2017-09-04 Thread Pau Espin Pedrol

Patch Set 3: Code-Review-1

As discussed, let's not merge this for now. I still fixed some comments you had 
in case we can re-use some of the work done in here.

-- 
To view, visit https://gerrit.osmocom.org/3731
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6fb5d95bed1fa50c3deaf62a7a6df3cb276bc3c9
Gerrit-PatchSet: 3
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: neels 
Gerrit-HasComments: No


[PATCH] osmo-gsm-tester[master]: resource: Fix list comparison in item_matches

2017-09-04 Thread Pau Espin Pedrol
Hello Neels Hofmeyr, Jenkins Builder,

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

https://gerrit.osmocom.org/3721

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

resource: Fix list comparison in item_matches

In following commits, cipher attribute containing a list of supported
ciphers is introdued in osmo-gsm-tester. While developing the feature,
it was found that resources containing lists are not being handled
correctly.

Previous implementation regarding lists in several ways:
- In the list coe path, both item and wanted_item are expected to be
lists. Python doesn't support to check for sublists using the "in"
operand.
- want_item basically contains the scenario dic, and item is each of the
items available as resource of a given type. Thus, we want to check that
item supports the subset of features requested by the scenario, ie. that
the list in the scenario is a subset of the ones in the3 item and not
the opposite.

The following failing scenario is going to be checked during "make check"
when the cipher attribute is added: BTS supporting cipher a50 and a51,
and scenario requesting a50 succeeds. If this commit is remove, the test
no longer passes, and it fails with:
osmo_gsm_tester.resource.NoResourceExn: No matching resource available for
bts = {'type': 'osmo-bts-sysmo', 'ciphers': ['a5 1']}

Change-Id: I27b372aa5906feac2843f24f5cdd0d9578d44b4d
---
M src/osmo_gsm_tester/resource.py
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/21/3721/2

diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py
index c55140a..da543f7 100644
--- a/src/osmo_gsm_tester/resource.py
+++ b/src/osmo_gsm_tester/resource.py
@@ -441,9 +441,12 @@
 return True
 
 if is_list(wanted_item):
-# multiple possible values
-if item not in wanted_item:
+if not is_list(item):
 return False
+# multiple possible values
+for val in wanted_item:
+if val not in item:
+return False
 return True
 
 return item == wanted_item

-- 
To view, visit https://gerrit.osmocom.org/3721
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I27b372aa5906feac2843f24f5cdd0d9578d44b4d
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 


[PATCH] osmo-gsm-tester[master]: resource_test: Fix trailing whitespace

2017-09-04 Thread Pau Espin Pedrol

Review at  https://gerrit.osmocom.org/3816

resource_test: Fix trailing whitespace

Change-Id: I654484b21ca2e950ff3019ee20133e9cb50296bb
---
M selftest/resource_test.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/16/3816/1

diff --git a/selftest/resource_test.py b/selftest/resource_test.py
index 8b60be6..9a78674 100755
--- a/selftest/resource_test.py
+++ b/selftest/resource_test.py
@@ -37,7 +37,7 @@
 try:
 resource.solve([ [0, 2],
  [2],
- [0, 2] ]) 
+ [0, 2] ])
 assert False
 except resource.NotSolvable as e:
 print(e)

-- 
To view, visit https://gerrit.osmocom.org/3816
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I654484b21ca2e950ff3019ee20133e9cb50296bb
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 


[PATCH] osmo-gsm-tester[master]: Reserve ARFCN dynamically based on BTS band support

2017-09-04 Thread Pau Espin Pedrol
Hello Neels Hofmeyr, Jenkins Builder,

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

https://gerrit.osmocom.org/3731

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

Reserve ARFCN dynamically based on BTS band support

Instead of statically specifying a band for a BTS to use, declare a list
of supported bands for each BTS.

At the time of BTS object creation, ask the BTS for band support and try
to dynamically reserve an ARFCN resource which is compatible with any of
the bands supported by the BTS. All this happens transparently to the
test.

Still, the test may want to use a specific band / arfcn. In this case, a
test can use suite.reserve_arfcn(band, arfcn) to reserve a specific
band/arfcn and pass that to the BTS at creation time, which will then
use that one instead of trying to find a suitable one.

It is left as future work to support BTs with multiple TRX, in which
case several arfcn must be reserved. It should not be that difficult,
mostly using "times: X" where X is the amount of trx, changing the API
to use a list of arfcns and the configure() methods of the BTS.

Related: OS#2230

Change-Id: I6fb5d95bed1fa50c3deaf62a7a6df3cb276bc3c9
---
M example/default-suites.conf
M example/defaults.conf
M example/resources.conf
A example/scenarios/band-1900.conf
M selftest/conf/resources.conf
M selftest/resource_test.ok
M selftest/suite_test.ok
M selftest/suite_test/resources.conf
M src/osmo_gsm_tester/bts_osmotrx.py
M src/osmo_gsm_tester/bts_sysmo.py
M src/osmo_gsm_tester/resource.py
M src/osmo_gsm_tester/schema.py
M src/osmo_gsm_tester/suite.py
A suites/register/register_band_1900.py
A suites/register/suite.conf
15 files changed, 152 insertions(+), 30 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/31/3731/3

diff --git a/example/default-suites.conf b/example/default-suites.conf
index 1e8d47a..7fc97d3 100644
--- a/example/default-suites.conf
+++ b/example/default-suites.conf
@@ -7,3 +7,4 @@
 - smpp
 - aoip_smpp
 - aoip_encryption:cipher-a50+cipher-a51
+- register:band-1900
diff --git a/example/defaults.conf b/example/defaults.conf
index 969fac6..e9e7846 100644
--- a/example/defaults.conf
+++ b/example/defaults.conf
@@ -34,7 +34,6 @@
   osmobsc_bts_type: sysmobts
   trx_list:
   - max_power_red: 0
-arfcn: 868
 timeslot_list:
 - phys_chan_config: CCCH+SDCCH4
 - phys_chan_config: SDCCH8
diff --git a/example/resources.conf b/example/resources.conf
index 95cb8cf..3ebd57f 100644
--- a/example/resources.conf
+++ b/example/resources.conf
@@ -12,14 +12,14 @@
   type: osmo-bts-sysmo
   ipa_unit_id: 1
   addr: 10.42.42.114
-  band: GSM-1800
+  bands: ['GSM-850', 'GSM-900', 'GSM-1800', 'GSM-1900']
   ciphers: [a5_0, a5_1, a5_3]
 
 - label: Ettus B200
   type: osmo-bts-trx
   ipa_unit_id: 6
   addr: 10.42.42.50
-  band: GSM-1800
+  bands: ['GSM-1800', 'GSM-1900']
   launch_trx: true
   ciphers: [a5_0, a5_1]
 
@@ -27,7 +27,7 @@
   type: osmo-bts-trx
   ipa_unit_id: 7
   addr: 10.42.42.51
-  band: GSM-1800
+  bands: ['GSM-1800']
   trx_remote_ip: 10.42.42.112
   ciphers: [a5_0, a5_1]
 
diff --git a/example/scenarios/band-1900.conf b/example/scenarios/band-1900.conf
new file mode 100644
index 000..956c8db
--- /dev/null
+++ b/example/scenarios/band-1900.conf
@@ -0,0 +1,4 @@
+resources:
+  bts:
+  - bands:
+- GSM-1900
diff --git a/selftest/conf/resources.conf b/selftest/conf/resources.conf
index b186737..e5fe6e6 100644
--- a/selftest/conf/resources.conf
+++ b/selftest/conf/resources.conf
@@ -12,7 +12,7 @@
   type: osmo-bts-sysmo
   ipa_unit_id: 1
   addr: 10.42.42.114
-  band: GSM-1800
+  bands: ['GSM-850', 'GSM-900', 'GSM-1800', 'GSM-1900']
   ciphers:
   - 'a5_0'
   - 'a5_1'
@@ -21,7 +21,7 @@
   type: osmo-bts-trx
   ipa_unit_id: 6
   addr: 10.42.42.50
-  band: GSM-1800
+  bands: ['GSM-1800']
   launch_trx: true
   ciphers:
   - 'a5_0'
@@ -31,7 +31,7 @@
   type: osmo-bts-trx
   ipa_unit_id: 7
   addr: 10.42.42.51
-  band: GSM-1800
+  bands: ['GSM-1800']
   trx_remote_ip: 10.42.42.112
   ciphers:
   - 'a5_0'
diff --git a/selftest/resource_test.ok b/selftest/resource_test.ok
index c946d3d..207cfb0 100644
--- a/selftest/resource_test.ok
+++ b/selftest/resource_test.ok
@@ -46,16 +46,16 @@
{'_hash': 'dc9ce027a257da087f31a5bc1ee6b4abd2637369',
 'arfcn': '548',
 'band': 'GSM-1900'}],
- 'bts': [{'_hash': '377ac78d5404b826d40c84efd04b4a9fd4e62b7e',
+ 'bts': [{'_hash': '2769d8f6cfe22f15e7dbd14f7ce929db2e56bdf3',
   'addr': '10.42.42.114',
-  'band': 'GSM-1800',
+  'bands': ['GSM-850', 'GSM-900', 'GSM-1800', 'GSM-1900'],
   'ciphers': ['a5_0', 'a5_1'],
   'ipa_unit_id': '1',
   'label': 'sysmoBTS 1002',
   'type': 'osmo-bts-sysmo'},
  {'_hash': '6a9c9fbd364e1563a5b9f0826030a7888fd19575',
   'addr': '10.42.42.50',
-  'band': 'GSM-1800',
+  'bands': ['GSM-1800'],
   'ciphers': ['a5_0', 'a5_1'],
   'ipa_unit_id': '6',
   'label': 

[PATCH] osmo-gsm-tester[master]: Add cipher cfg param for modem and bts

2017-09-04 Thread Pau Espin Pedrol
Hello Neels Hofmeyr, Jenkins Builder,

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

https://gerrit.osmocom.org/3723

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

Add cipher cfg param for modem and bts

This parameter is contains a list of supported encryption ciphers by the
modem or bts setting it. It is so far not directly/automatically used
inside osmo-gsm-tester code, but can be useful to create scenarios for
tests that require specific ciphering modes.
For instance, aoip_encryption suite contains tests that require a BTS and
a modem that supports a5 0 and a5 1, otherwise tests will fail.

Change-Id: Ic0e368843a6e58bd3eeef36d2c0a7501296f0f3e
---
M example/default-suites.conf
M example/resources.conf
A example/scenarios/cipher-a50.conf
A example/scenarios/cipher-a51.conf
M src/osmo_gsm_tester/resource.py
M src/osmo_gsm_tester/schema.py
6 files changed, 31 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/23/3723/4

diff --git a/example/default-suites.conf b/example/default-suites.conf
index 0198486..1e8d47a 100644
--- a/example/default-suites.conf
+++ b/example/default-suites.conf
@@ -6,4 +6,4 @@
 - aoip_sms:trx-sysmocell5000
 - smpp
 - aoip_smpp
-- aoip_encryption
+- aoip_encryption:cipher-a50+cipher-a51
diff --git a/example/resources.conf b/example/resources.conf
index f190c2f..95cb8cf 100644
--- a/example/resources.conf
+++ b/example/resources.conf
@@ -13,6 +13,7 @@
   ipa_unit_id: 1
   addr: 10.42.42.114
   band: GSM-1800
+  ciphers: [a5_0, a5_1, a5_3]
 
 - label: Ettus B200
   type: osmo-bts-trx
@@ -20,6 +21,7 @@
   addr: 10.42.42.50
   band: GSM-1800
   launch_trx: true
+  ciphers: [a5_0, a5_1]
 
 - label: sysmoCell 5000
   type: osmo-bts-trx
@@ -27,6 +29,7 @@
   addr: 10.42.42.51
   band: GSM-1800
   trx_remote_ip: 10.42.42.112
+  ciphers: [a5_0, a5_1]
 
 arfcn:
   - arfcn: 512
@@ -56,21 +59,25 @@
   imsi: '90170009031'
   ki: '80A37E6FDEA931EAC92FFA5F671EFEAD'
   auth_algo: 'xor'
+  ciphers: [a5_0, a5_1]
 
 - label: sierra_2
   path: '/sierra_2'
   imsi: '90170009029'
   ki: '00969E283349D354A8239E877F2E0866'
   auth_algo: 'xor'
+  ciphers: [a5_0, a5_1]
 
 - label: gobi_0
   path: '/gobi_0'
   imsi: '90170009030'
   ki: 'BB70807226393CDBAC8DD3439FF54252'
   auth_algo: 'xor'
+  ciphers: [a5_0, a5_1]
 
 - label: gobi_3
   path: '/gobi_3'
   imsi: '90170009032'
   ki: '2F70DCA43C45ACB97E947FDD0C7CA30A'
   auth_algo: 'xor'
+  ciphers: [a5_0, a5_1]
diff --git a/example/scenarios/cipher-a50.conf 
b/example/scenarios/cipher-a50.conf
new file mode 100644
index 000..107172b
--- /dev/null
+++ b/example/scenarios/cipher-a50.conf
@@ -0,0 +1,7 @@
+resources:
+  bts:
+  - ciphers:
+- a5_0
+  modem:
+  - ciphers:
+- a5_0
diff --git a/example/scenarios/cipher-a51.conf 
b/example/scenarios/cipher-a51.conf
new file mode 100644
index 000..8539867
--- /dev/null
+++ b/example/scenarios/cipher-a51.conf
@@ -0,0 +1,7 @@
+resources:
+  bts:
+  - ciphers:
+- a5_1
+  modem:
+  - ciphers:
+- a5_1
diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py
index da543f7..4f43bfc 100644
--- a/src/osmo_gsm_tester/resource.py
+++ b/src/osmo_gsm_tester/resource.py
@@ -56,6 +56,7 @@
 'bts[].band': schema.BAND,
 'bts[].trx_remote_ip': schema.IPV4,
 'bts[].launch_trx': schema.BOOL_STR,
+'bts[].ciphers[]': schema.CIPHER,
 'bts[].trx_list[].hw_addr': schema.HWADDR,
 'bts[].trx_list[].net_device': schema.STR,
 'arfcn[].arfcn': schema.INT,
@@ -65,6 +66,7 @@
 'modem[].imsi': schema.IMSI,
 'modem[].ki': schema.KI,
 'modem[].auth_algo': schema.AUTH_ALGO,
+'modem[].ciphers[]': schema.CIPHER,
 }
 
 WANT_SCHEMA = util.dict_add(
diff --git a/src/osmo_gsm_tester/schema.py b/src/osmo_gsm_tester/schema.py
index 2da80cd..cdf0a04 100644
--- a/src/osmo_gsm_tester/schema.py
+++ b/src/osmo_gsm_tester/schema.py
@@ -66,6 +66,11 @@
 return
 raise ValueError('Unknown Authentication Algorithm: %r' % val)
 
+def cipher(val):
+if val in ('a5_0', 'a5_1', 'a5_2', 'a5_3', 'a5_4', 'a5_5', 'a5_6', 'a5_7'):
+return
+raise ValueError('Unknown Cipher value: %r' % val)
+
 INT = 'int'
 STR = 'str'
 BOOL_STR = 'bool_str'
@@ -76,6 +81,7 @@
 KI = 'ki'
 MSISDN = 'msisdn'
 AUTH_ALGO = 'auth_algo'
+CIPHER = 'cipher'
 SCHEMA_TYPES = {
 INT: int,
 STR: str,
@@ -87,6 +93,7 @@
 KI: ki,
 MSISDN: msisdn,
 AUTH_ALGO: auth_algo,
+CIPHER: cipher,
 }
 
 def validate(config, schema):

-- 
To view, visit https://gerrit.osmocom.org/3723
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic0e368843a6e58bd3eeef36d2c0a7501296f0f3e
Gerrit-PatchSet: 4
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 

[PATCH] osmo-pcu[master]: Simplify TS alloc: split into digestible pieces

2017-09-04 Thread Max
Hello Neels Hofmeyr, Jenkins Builder,

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

https://gerrit.osmocom.org/3760

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

Simplify TS alloc: split into digestible pieces

Algorithm B implementation is way too big and complex to maintain or
even to follow the code. Split it into set of smaller functions with
documented interfaces to make it easier to read and modify.

This opens up the road for reusing those functions in implementation of
additional allocation algorithms. The test results are intentionally
left unchanged to avoid potential regressions.

Change-Id: I02da2b8ba8c9c8815dae0e39e1fed277ca0df171
Related: OS#2400
---
M src/gprs_rlcmac_ts_alloc.cpp
1 file changed, 235 insertions(+), 135 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/60/3760/4

diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp
index ed4a79e..52d5edd 100644
--- a/src/gprs_rlcmac_ts_alloc.cpp
+++ b/src/gprs_rlcmac_ts_alloc.cpp
@@ -217,6 +217,16 @@
 
 }
 
+/*! Return the TS which corresponds to least busy PDCH
+ *
+ *  \param[in,out] trx Pointer to TRX object
+ *  \param[in] dir TBF direction
+ *  \param[in] mask set of available timeslots
+ *  \param[in] fn Function pointer to function which computes number of 
associated TBFs
+ *  \param[out] free_tfi Free TFI
+ *  \param[out] free_usf Free USF
+ *  \returns TS number or -1 if unable to find
+ */
 static int find_least_busy_pdch(struct gprs_rlcmac_trx *trx,
enum gprs_rlcmac_tbf_direction dir,
uint8_t mask,
@@ -374,18 +384,27 @@
 /*! Return free TFI
  *
  *  \param[in,out] bts Pointer to BTS struct
- *  \param[in] trx Pointer to TRX struct
+ *  \param[in] trx Optional pointer to TRX struct
  *  \param[in] ms Pointer to MS object
  *  \param[in] dir DL or UL direction
  *  \param[in] use_trx which TRX to use or -1 if it should be selected based 
on what MS uses
  *  \param[out] trx_no_ TRX number on which TFI was found
  *  \returns negative error code or 0 on success
  */
-static int tfi_find_free(BTS *bts, const GprsMs *ms,
+static int tfi_find_free(BTS *bts, const gprs_rlcmac_trx *trx, const GprsMs 
*ms,
 enum gprs_rlcmac_tbf_direction dir, int8_t use_trx, 
uint8_t *trx_no_)
 {
int tfi;
uint8_t trx_no;
+
+   if (trx) {
+   if (use_trx >= 0 && use_trx != trx->trx_no) {
+   LOGP(DRLCMAC, LOGL_ERROR, "- Requested incompatible TRX 
%d (current is %d)\n",
+use_trx, trx->trx_no);
+   return -EINVAL;
+   }
+   use_trx = trx->trx_no;
+   }
 
if (use_trx == -1 && ms->current_trx())
use_trx = ms->current_trx()->trx_no;
@@ -394,8 +413,7 @@
if (tfi < 0)
return -EBUSY;
 
-   if (trx_no_)
-   *trx_no_ = trx_no;
+   *trx_no_ = trx_no;
 
return tfi;
 }
@@ -811,6 +829,205 @@
return 0;
 }
 
+/*! Update MS' reserved timeslots
+ *
+ *  \param[in,out] trx Pointer to TRX struct
+ *  \param[in,out] ms_ Pointer to MS object
+ *  \param[in] tbf_ Pointer to TBF struct
+ *  \param[in] res_ul_slots Newly reserved UL slots
+ *  \param[in] res_dl_slots Newly reserved DL slots
+ *  \param[in] ul_slots available UL slots (for logging only)
+ *  \param[in] dl_slots available DL slots (for logging only)
+ */
+static void update_ms_reserved_slots(gprs_rlcmac_trx *trx, GprsMs *ms, uint8_t 
res_ul_slots, uint8_t res_dl_slots,
+uint8_t ul_slots, uint8_t dl_slots)
+{
+   char slot_info[9] = { 0 };
+
+   if (res_ul_slots == ms->reserved_ul_slots() && res_dl_slots == 
ms->reserved_dl_slots())
+   return;
+
+   /* The reserved slots have changed, update the MS */
+   ms->set_reserved_slots(trx, res_ul_slots, res_dl_slots);
+
+   LOGP(DRLCMAC, LOGL_DEBUG, "- Reserved DL/UL slots: 
(TS=0)\"%s\"(TS=7)\n",
+set_flag_chars(set_flag_chars(set_flag_chars(slot_info, dl_slots, 
'D', '.'), ul_slots, 'U'),
+   ul_slots & dl_slots, 'C'));
+}
+
+/*! Assign given UL timeslots to UL TBF
+ *
+ *  \param[in,out] ul_tbf Pointer to UL TBF struct
+ *  \param[in,out] trx Pointer to TRX object
+ *  \param[in] ul_slots Set of slots to be assigned
+ *  \param[in] tfi selected TFI
+ *  \param[in] usf selected USF
+ */
+static void assign_ul_tbf_slots(struct gprs_rlcmac_ul_tbf *ul_tbf, 
gprs_rlcmac_trx *trx, uint8_t ul_slots, int tfi,
+   int *usf)
+{
+   uint8_t ts;
+
+   for (ts = 0; ts < 8; ts++) {
+   if (!(ul_slots & (1 << ts)))
+   continue;
+
+   OSMO_ASSERT(usf[ts] >= 0);
+
+   LOGP(DRLCMAC, LOGL_DEBUG, "- Assigning UL TS %u\n", ts);
+   assign_uplink_tbf_usf(>pdch[ts], ul_tbf, tfi, usf[ts]);
+   }
+}
+
+/*! Assign given DL timeslots to DL TBF
+ *
+ *  \param[in,out] dl_tbf Pointer to DL TBF 

[PATCH] openbsc[master]: handover_decision: Fix condition for power budget handover a...

2017-09-04 Thread Ivan Kluchnikov

Review at  https://gerrit.osmocom.org/3814

handover_decision: Fix condition for power budget handover attempt

Handover attempt for power budget case should be performed every N SACCH frames,
where N = Power Budget Interval.
First measurement report with mr->nr = 0 was used for the first handover attempt
in this case, which is not correct, because first usable report should have
mr->nr = net->handover.pwr_interval-1.
Moreover using the first measurement report with mr->nr = 0 for handover attempt
could lead to unnecessary handover, because usually av_rxlev for first 
measurement report
from MS is worse than for following reports.

Change-Id: If7f54a4cb179eaa9e5eb147b9477633ac618e69e
---
M openbsc/src/libbsc/handover_decision.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/14/3814/1

diff --git a/openbsc/src/libbsc/handover_decision.c 
b/openbsc/src/libbsc/handover_decision.c
index 0f07bca..f81f1dd 100644
--- a/openbsc/src/libbsc/handover_decision.c
+++ b/openbsc/src/libbsc/handover_decision.c
@@ -273,7 +273,7 @@
return attempt_handover(mr);
 
/* Power Budget AKA Better Cell */
-   if ((mr->nr % net->handover.pwr_interval) == 0)
+   if ((mr->nr % net->handover.pwr_interval) == net->handover.pwr_interval 
- 1)
return attempt_handover(mr);
 
return 0;

-- 
To view, visit https://gerrit.osmocom.org/3814
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If7f54a4cb179eaa9e5eb147b9477633ac618e69e
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Ivan Kluchnikov 


[PATCH] osmo-bsc[master]: move include/openbsc to include/osmocom/bsc

2017-09-04 Thread Neels Hofmeyr

Review at  https://gerrit.osmocom.org/3813

move include/openbsc to include/osmocom/bsc

Change-Id: I39e7b882caa98334636d19ccd104fd83d07d5055
---
M configure.ac
M include/Makefile.am
A include/osmocom/Makefile.am
R include/osmocom/bsc/Makefile.am
R include/osmocom/bsc/a_reset.h
R include/osmocom/bsc/abis_nm.h
R include/osmocom/bsc/abis_om2000.h
R include/osmocom/bsc/abis_rsl.h
R include/osmocom/bsc/arfcn_range_encode.h
R include/osmocom/bsc/auth.h
R include/osmocom/bsc/bsc_api.h
R include/osmocom/bsc/bsc_msc.h
R include/osmocom/bsc/bsc_msc_data.h
R include/osmocom/bsc/bsc_msg_filter.h
R include/osmocom/bsc/bsc_nat.h
R include/osmocom/bsc/bsc_nat_callstats.h
R include/osmocom/bsc/bsc_nat_sccp.h
R include/osmocom/bsc/bsc_rll.h
R include/osmocom/bsc/bsc_subscriber.h
R include/osmocom/bsc/bss.h
R include/osmocom/bsc/bts_ipaccess_nanobts_omlattr.h
R include/osmocom/bsc/chan_alloc.h
R include/osmocom/bsc/common.h
R include/osmocom/bsc/common_bsc.h
R include/osmocom/bsc/common_cs.h
R include/osmocom/bsc/crc24.h
R include/osmocom/bsc/ctrl.h
R include/osmocom/bsc/debug.h
R include/osmocom/bsc/e1_config.h
R include/osmocom/bsc/gsm_04_08_utils.h
R include/osmocom/bsc/gsm_04_80.h
R include/osmocom/bsc/gsm_data.h
R include/osmocom/bsc/gsm_data_shared.h
R include/osmocom/bsc/gsm_subscriber.h
R include/osmocom/bsc/handover.h
R include/osmocom/bsc/handover_decision.h
R include/osmocom/bsc/ipaccess.h
R include/osmocom/bsc/iu_dummy.h
R include/osmocom/bsc/meas_feed.h
R include/osmocom/bsc/meas_rep.h
R include/osmocom/bsc/misdn.h
R include/osmocom/bsc/mncc.h
R include/osmocom/bsc/mncc_int.h
R include/osmocom/bsc/msc_ifaces.h
R include/osmocom/bsc/nat_rewrite_trie.h
R include/osmocom/bsc/network_listen.h
R include/osmocom/bsc/openbscdefines.h
R include/osmocom/bsc/osmo_bsc.h
R include/osmocom/bsc/osmo_bsc_grace.h
R include/osmocom/bsc/osmo_bsc_reset.h
R include/osmocom/bsc/osmo_bsc_rf.h
R include/osmocom/bsc/osmo_bsc_sigtran.h
R include/osmocom/bsc/osmo_msc.h
R include/osmocom/bsc/osmux.h
R include/osmocom/bsc/paging.h
R include/osmocom/bsc/pcu_if.h
R include/osmocom/bsc/pcuif_proto.h
R include/osmocom/bsc/rest_octets.h
R include/osmocom/bsc/rrlp.h
R include/osmocom/bsc/rs232.h
R include/osmocom/bsc/rtp_proxy.h
R include/osmocom/bsc/sgsn.h
R include/osmocom/bsc/signal.h
R include/osmocom/bsc/silent_call.h
R include/osmocom/bsc/smpp.h
R include/osmocom/bsc/sms_queue.h
R include/osmocom/bsc/socket.h
R include/osmocom/bsc/system_information.h
R include/osmocom/bsc/transaction.h
R include/osmocom/bsc/trau_mux.h
R include/osmocom/bsc/trau_upqueue.h
R include/osmocom/bsc/ussd.h
R include/osmocom/bsc/vty.h
M src/ipaccess/abisip-find.c
M src/ipaccess/ipaccess-config.c
M src/ipaccess/ipaccess-firmware.c
M src/ipaccess/ipaccess-proxy.c
M src/ipaccess/network_listen.c
M src/libbsc/abis_nm.c
M src/libbsc/abis_nm_vty.c
M src/libbsc/abis_om2000.c
M src/libbsc/abis_om2000_vty.c
M src/libbsc/abis_rsl.c
M src/libbsc/arfcn_range_encode.c
M src/libbsc/bsc_api.c
M src/libbsc/bsc_ctrl_commands.c
M src/libbsc/bsc_ctrl_lookup.c
M src/libbsc/bsc_dyn_ts.c
M src/libbsc/bsc_init.c
M src/libbsc/bsc_msc.c
M src/libbsc/bsc_rf_ctrl.c
M src/libbsc/bsc_rll.c
M src/libbsc/bsc_subscriber.c
M src/libbsc/bsc_vty.c
M src/libbsc/bts_ericsson_rbs2000.c
M src/libbsc/bts_init.c
M src/libbsc/bts_ipaccess_nanobts.c
M src/libbsc/bts_ipaccess_nanobts_omlattr.c
M src/libbsc/bts_nokia_site.c
M src/libbsc/bts_siemens_bs11.c
M src/libbsc/bts_sysmobts.c
M src/libbsc/bts_unknown.c
M src/libbsc/chan_alloc.c
M src/libbsc/e1_config.c
M src/libbsc/gsm_04_08_utils.c
M src/libbsc/gsm_04_80_utils.c
M src/libbsc/handover_decision.c
M src/libbsc/handover_logic.c
M src/libbsc/meas_proc.c
M src/libbsc/meas_rep.c
M src/libbsc/net_init.c
M src/libbsc/paging.c
M src/libbsc/pcu_sock.c
M src/libbsc/rest_octets.c
M src/libbsc/system_information.c
M src/libcommon-cs/a_reset.c
M src/libcommon-cs/common_cs.c
M src/libcommon-cs/common_cs_vty.c
M src/libcommon/common_vty.c
M src/libcommon/debug.c
M src/libcommon/gsm_data.c
M src/libcommon/gsm_data_shared.c
M src/libcommon/gsm_subscriber_base.c
M src/libcommon/socket.c
M src/libfilter/bsc_msg_acc.c
M src/libfilter/bsc_msg_filter.c
M src/libfilter/bsc_msg_vty.c
M src/libtrau/rtp_proxy.c
M src/libtrau/trau_mux.c
M src/libtrau/trau_upqueue.c
M src/osmo-bsc/osmo_bsc_api.c
M src/osmo-bsc/osmo_bsc_audio.c
M src/osmo-bsc/osmo_bsc_bssap.c
M src/osmo-bsc/osmo_bsc_ctrl.c
M src/osmo-bsc/osmo_bsc_filter.c
M src/osmo-bsc/osmo_bsc_grace.c
M src/osmo-bsc/osmo_bsc_main.c
M src/osmo-bsc/osmo_bsc_msc.c
M src/osmo-bsc/osmo_bsc_reset.c
M src/osmo-bsc/osmo_bsc_sigtran.c
M src/osmo-bsc/osmo_bsc_vty.c
M src/osmo-bsc_nat/bsc_filter.c
M src/osmo-bsc_nat/bsc_mgcp_utils.c
M src/osmo-bsc_nat/bsc_nat.c
M src/osmo-bsc_nat/bsc_nat_ctrl.c
M src/osmo-bsc_nat/bsc_nat_filter.c
M src/osmo-bsc_nat/bsc_nat_rewrite.c
M src/osmo-bsc_nat/bsc_nat_rewrite_trie.c
M src/osmo-bsc_nat/bsc_nat_utils.c
M src/osmo-bsc_nat/bsc_nat_vty.c
M src/osmo-bsc_nat/bsc_sccp.c
M src/osmo-bsc_nat/bsc_ussd.c
M 

[PATCH] osmo-msc[master]: remove contrib/soap.py, seems to apply to osmo-bsc only

2017-09-04 Thread Neels Hofmeyr

Review at  https://gerrit.osmocom.org/3812

remove contrib/soap.py, seems to apply to osmo-bsc only

Change-Id: I647be0a646bbc3cfee226c55061e0e57fa1211fa
---
D contrib/soap.py
1 file changed, 0 insertions(+), 188 deletions(-)


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

diff --git a/contrib/soap.py b/contrib/soap.py
deleted file mode 100755
index 4d0a023..000
--- a/contrib/soap.py
+++ /dev/null
@@ -1,188 +0,0 @@
-#!/usr/bin/python3
-# -*- mode: python-mode; py-indent-tabs-mode: nil -*-
-"""
-/*
- * Copyright (C) 2016 sysmocom s.f.m.c. GmbH
- *
- * All Rights Reserved
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-"""
-
-__version__ = "v0.7" # bump this on every non-trivial change
-
-from twisted.internet import defer, reactor
-from twisted_ipa import CTRL, IPAFactory, __version__ as twisted_ipa_version
-from ipa import Ctrl
-from treq import post, collect
-from suds.client import Client
-from functools import partial
-from distutils.version import StrictVersion as V # FIXME: use 
NormalizedVersion from PEP-386 when available
-import argparse, datetime, signal, sys, os, logging, logging.handlers
-
-# we don't support older versions of TwistedIPA module
-assert V(twisted_ipa_version) > V('0.4')
-
-# keys from OpenBSC openbsc/src/libbsc/bsc_rf_ctrl.c, values SOAP-specific
-oper = { 'inoperational' : 0, 'operational' : 1 }
-admin = { 'locked' : 0, 'unlocked' : 1 }
-policy = { 'off' : 0, 'on' : 1, 'grace' : 2, 'unknown' : 3 }
-
-# keys from OpenBSC openbsc/src/libbsc/bsc_vty.c
-fix = { 'invalid' : 0, 'fix2d' : 1, 'fix3d' : 1 } # SOAP server treats it as 
boolean but expects int
-
-
-def handle_reply(p, f, log, r):
-"""
-Reply handler: takes function p to process raw SOAP server reply r, 
function f to run for each command and verbosity flag v
-"""
-repl = p(r) # result is expected to have both commands[] array and error 
string (could be None)
-bsc_id = repl.commands[0].split()[0].split('.')[3] # we expect 1st command 
to have net.0.bsc.666.bts.2.trx.1 location prefix format
-log.info("Received SOAP response for BSC %s with %d commands, error 
status: %s" % (bsc_id, len(repl.commands), repl.error))
-log.debug("BSC %s commands: %s" % (bsc_id, repl.commands))
-for t in repl.commands: # Process OpenBscCommands format from .wsdl
-(_, m) = Ctrl().cmd(*t.split())
-f(m)
-
-
-class Trap(CTRL):
-"""
-TRAP handler (agnostic to factory's client object)
-"""
-def ctrl_TRAP(self, data, op_id, v):
-"""
-Parse CTRL TRAP and dispatch to appropriate handler after normalization
-"""
-(l, r) = v.split()
-loc = l.split('.')
-t_type = loc[-1]
-p = partial(lambda a, i: a[i] if len(a) > i else None, loc) # parse 
helper
-method = getattr(self, 'handle_' + t_type.replace('-', ''), lambda: 
"Unhandled %s trap" % t_type)
-method(p(1), p(3), p(5), p(7), r) # we expect 
net.0.bsc.666.bts.2.trx.1 format for trap prefix
-
-def ctrl_SET_REPLY(self, data, _, v):
-"""
-Debug log for replies to our commands
-"""
-self.factory.log.debug('SET REPLY %s' % v)
-
-def ctrl_ERROR(self, data, op_id, v):
-"""
-We want to know if smth went wrong
-"""
-self.factory.log.debug('CTRL ERROR [%s] %s' % (op_id, v))
-
-def connectionMade(self):
-"""
-Logging wrapper, calling super() is necessary not to break 
reconnection logic
-"""
-self.factory.log.info("Connected to CTRL@%s:%d" % (self.factory.host, 
self.factory.port))
-super(CTRL, self).connectionMade()
-
-@defer.inlineCallbacks
-def handle_locationstate(self, net, bsc, bts, trx, data):
-"""
-Handle location-state TRAP: parse trap content, build SOAP context and 
use treq's routines to post it while setting up async handlers
-"""
-(ts, fx, lat, lon, height, opr, adm, pol, mcc, mnc) = data.split(',')
-tstamp = datetime.datetime.fromtimestamp(float(ts)).isoformat()
-self.factory.log.debug('location-state@%s.%s.%s.%s (%s) [%s/%s] => %s' 
% (net, bsc, bts, trx, tstamp, mcc, mnc, data))
-ctx = self.factory.client.registerSiteLocation(bsc, float(lon), 
float(lat), fix.get(fx, 0), 

[PATCH] osmo-msc[master]: rename include/openbsc to include/osmocom/msc

2017-09-04 Thread Neels Hofmeyr

Review at  https://gerrit.osmocom.org/3811

rename include/openbsc to include/osmocom/msc

Change-Id: I1f96a1285bbd1b4607614856bca935d5c26e2da9
---
M configure.ac
M include/Makefile.am
A include/osmocom/Makefile.am
R include/osmocom/msc/Makefile.am
R include/osmocom/msc/a_iface.h
R include/osmocom/msc/a_iface_bssap.h
R include/osmocom/msc/a_reset.h
R include/osmocom/msc/abis_nm.h
R include/osmocom/msc/abis_om2000.h
R include/osmocom/msc/abis_rsl.h
R include/osmocom/msc/arfcn_range_encode.h
R include/osmocom/msc/auth.h
R include/osmocom/msc/bsc_api.h
R include/osmocom/msc/bsc_msc.h
R include/osmocom/msc/bsc_msc_data.h
R include/osmocom/msc/bsc_msg_filter.h
R include/osmocom/msc/bsc_rll.h
R include/osmocom/msc/bss.h
R include/osmocom/msc/bts_ipaccess_nanobts_omlattr.h
R include/osmocom/msc/chan_alloc.h
R include/osmocom/msc/common.h
R include/osmocom/msc/common_bsc.h
R include/osmocom/msc/common_cs.h
R include/osmocom/msc/crc24.h
R include/osmocom/msc/ctrl.h
R include/osmocom/msc/db.h
R include/osmocom/msc/debug.h
R include/osmocom/msc/e1_config.h
R include/osmocom/msc/gsm_04_08.h
R include/osmocom/msc/gsm_04_11.h
R include/osmocom/msc/gsm_04_14.h
R include/osmocom/msc/gsm_04_80.h
R include/osmocom/msc/gsm_data.h
R include/osmocom/msc/gsm_data_shared.h
R include/osmocom/msc/gsm_subscriber.h
R include/osmocom/msc/gsup_client.h
R include/osmocom/msc/gtphub.h
R include/osmocom/msc/handover.h
R include/osmocom/msc/handover_decision.h
R include/osmocom/msc/ipaccess.h
R include/osmocom/msc/iu_dummy.h
R include/osmocom/msc/iucs.h
R include/osmocom/msc/iucs_ranap.h
R include/osmocom/msc/meas_feed.h
R include/osmocom/msc/meas_rep.h
R include/osmocom/msc/misdn.h
R include/osmocom/msc/mncc.h
R include/osmocom/msc/mncc_int.h
R include/osmocom/msc/msc_ifaces.h
R include/osmocom/msc/network_listen.h
R include/osmocom/msc/oap_client.h
R include/osmocom/msc/openbscdefines.h
R include/osmocom/msc/osmo_bsc.h
R include/osmocom/msc/osmo_bsc_grace.h
R include/osmocom/msc/osmo_bsc_reset.h
R include/osmocom/msc/osmo_bsc_rf.h
R include/osmocom/msc/osmo_bsc_sigtran.h
R include/osmocom/msc/osmo_msc.h
R include/osmocom/msc/osmux.h
R include/osmocom/msc/paging.h
R include/osmocom/msc/rest_octets.h
R include/osmocom/msc/rrlp.h
R include/osmocom/msc/rs232.h
R include/osmocom/msc/rtp_proxy.h
R include/osmocom/msc/signal.h
R include/osmocom/msc/silent_call.h
R include/osmocom/msc/slhc.h
R include/osmocom/msc/smpp.h
R include/osmocom/msc/sms_queue.h
R include/osmocom/msc/socket.h
R include/osmocom/msc/system_information.h
R include/osmocom/msc/transaction.h
R include/osmocom/msc/trau_mux.h
R include/osmocom/msc/trau_upqueue.h
R include/osmocom/msc/ussd.h
R include/osmocom/msc/vlr.h
R include/osmocom/msc/vty.h
M src/libcommon-cs/a_reset.c
M src/libcommon-cs/common_cs.c
M src/libcommon-cs/common_cs_vty.c
M src/libcommon/common_vty.c
M src/libcommon/debug.c
M src/libcommon/gsm_data.c
M src/libcommon/gsm_data_shared.c
M src/libcommon/gsm_subscriber_base.c
M src/libcommon/gsup_client.c
M src/libcommon/gsup_test_client.c
M src/libcommon/oap_client.c
M src/libcommon/socket.c
M src/libmsc/a_iface.c
M src/libmsc/a_iface_bssap.c
M src/libmsc/auth.c
M src/libmsc/ctrl_commands.c
M src/libmsc/db.c
M src/libmsc/gsm_04_08.c
M src/libmsc/gsm_04_11.c
M src/libmsc/gsm_04_14.c
M src/libmsc/gsm_04_80.c
M src/libmsc/gsm_subscriber.c
M src/libmsc/iu_dummy.c
M src/libmsc/iucs.c
M src/libmsc/iucs_ranap.c
M src/libmsc/meas_feed.c
M src/libmsc/mncc.c
M src/libmsc/mncc_builtin.c
M src/libmsc/mncc_sock.c
M src/libmsc/msc_ifaces.c
M src/libmsc/msc_vty.c
M src/libmsc/osmo_msc.c
M src/libmsc/rrlp.c
M src/libmsc/silent_call.c
M src/libmsc/smpp_openbsc.c
M src/libmsc/smpp_smsc.c
M src/libmsc/smpp_utils.c
M src/libmsc/smpp_vty.c
M src/libmsc/sms_queue.c
M src/libmsc/subscr_conn.c
M src/libmsc/transaction.c
M src/libmsc/ussd.c
M src/libmsc/vty_interface_layer3.c
M src/libvlr/vlr.c
M src/libvlr/vlr_access_req_fsm.c
M src/libvlr/vlr_auth_fsm.c
M src/libvlr/vlr_core.h
M src/libvlr/vlr_lu_fsm.c
M src/osmo-msc/msc_main.c
M src/utils/meas_db.c
M src/utils/meas_json.c
M src/utils/meas_pcap2db.c
M src/utils/meas_udp2db.c
M src/utils/meas_vis.c
M src/utils/smpp_mirror.c
M tests/db/db_test.c
M tests/msc_vlr/msc_vlr_tests.c
M tests/msc_vlr/msc_vlr_tests.h
M tests/smpp/smpp_test.c
M tests/sms_queue/sms_queue_test.c
137 files changed, 349 insertions(+), 345 deletions(-)


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

diff --git a/configure.ac b/configure.ac
index 0549ed3..4e27a14 100644
--- a/configure.ac
+++ b/configure.ac
@@ -177,8 +177,9 @@
 
 AC_OUTPUT(
 osmo-msc.pc
-include/openbsc/Makefile
 include/Makefile
+include/osmocom/Makefile
+include/osmocom/msc/Makefile
 src/Makefile
 src/libmsc/Makefile
 src/libvlr/Makefile
diff --git a/include/Makefile.am b/include/Makefile.am
index 677eec3..9d963a0 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -1,3 +1,3 @@
 SUBDIRS = \
-   openbsc \
+   osmocom \
 

[PATCH] osmo-sgsn[master]: move include/openbsc to include/osmocom/sgsn

2017-09-04 Thread Neels Hofmeyr

Review at  https://gerrit.osmocom.org/3810

move include/openbsc to include/osmocom/sgsn

Change-Id: I281ef585fffc2644682c8282224fb1c2da5ca795
---
M configure.ac
M debian/copyright
M include/Makefile.am
A include/osmocom/Makefile.am
R include/osmocom/sgsn/Makefile.am
R include/osmocom/sgsn/common.h
R include/osmocom/sgsn/crc24.h
R include/osmocom/sgsn/debug.h
R include/osmocom/sgsn/gb_proxy.h
R include/osmocom/sgsn/gprs_gb_parse.h
R include/osmocom/sgsn/gprs_gmm.h
R include/osmocom/sgsn/gprs_llc.h
R include/osmocom/sgsn/gprs_llc_xid.h
R include/osmocom/sgsn/gprs_sgsn.h
R include/osmocom/sgsn/gprs_sndcp.h
R include/osmocom/sgsn/gprs_sndcp_comp.h
R include/osmocom/sgsn/gprs_sndcp_dcomp.h
R include/osmocom/sgsn/gprs_sndcp_pcomp.h
R include/osmocom/sgsn/gprs_sndcp_xid.h
R include/osmocom/sgsn/gprs_subscriber.h
R include/osmocom/sgsn/gprs_utils.h
R include/osmocom/sgsn/gsup_client.h
R include/osmocom/sgsn/gtphub.h
R include/osmocom/sgsn/oap_client.h
R include/osmocom/sgsn/rest_octets.h
R include/osmocom/sgsn/sgsn.h
R include/osmocom/sgsn/signal.h
R include/osmocom/sgsn/slhc.h
R include/osmocom/sgsn/v42bis.h
R include/osmocom/sgsn/v42bis_private.h
R include/osmocom/sgsn/vty.h
M src/gprs/crc24.c
M src/gprs/gb_proxy.c
M src/gprs/gb_proxy_main.c
M src/gprs/gb_proxy_patch.c
M src/gprs/gb_proxy_peer.c
M src/gprs/gb_proxy_tlli.c
M src/gprs/gb_proxy_vty.c
M src/gprs/gprs_gb_parse.c
M src/gprs/gprs_gmm.c
M src/gprs/gprs_llc.c
M src/gprs/gprs_llc_parse.c
M src/gprs/gprs_llc_vty.c
M src/gprs/gprs_llc_xid.c
M src/gprs/gprs_sgsn.c
M src/gprs/gprs_sndcp.c
M src/gprs/gprs_sndcp_comp.c
M src/gprs/gprs_sndcp_dcomp.c
M src/gprs/gprs_sndcp_pcomp.c
M src/gprs/gprs_sndcp_vty.c
M src/gprs/gprs_sndcp_xid.c
M src/gprs/gprs_subscriber.c
M src/gprs/gprs_utils.c
M src/gprs/gsup_client.c
M src/gprs/gtphub.c
M src/gprs/gtphub_ares.c
M src/gprs/gtphub_main.c
M src/gprs/gtphub_sock.c
M src/gprs/gtphub_vty.c
M src/gprs/oap_client.c
M src/gprs/sgsn_ares.c
M src/gprs/sgsn_auth.c
M src/gprs/sgsn_cdr.c
M src/gprs/sgsn_ctrl.c
M src/gprs/sgsn_libgtp.c
M src/gprs/sgsn_main.c
M src/gprs/sgsn_vty.c
M src/gprs/slhc.c
M src/gprs/v42bis.c
M src/libcommon/common_vty.c
M src/libcommon/debug.c
M src/libcommon/gsm_data.c
M src/libcommon/gsm_data_shared.c
M src/libcommon/gsm_subscriber_base.c
M src/libcommon/gsup_client.c
M src/libcommon/gsup_test_client.c
M src/libcommon/oap_client.c
M src/libcommon/socket.c
M tests/gbproxy/gbproxy_test.c
M tests/gprs/gprs_test.c
M tests/gtphub/gtphub_test.c
M tests/oap/oap_client_test.c
M tests/sgsn/sgsn_test.c
M tests/slhc/slhc_test.c
M tests/sndcp_xid/sndcp_xid_test.c
M tests/v42bis/v42bis_test.c
M tests/xid/xid_test.c
87 files changed, 268 insertions(+), 264 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/10/3810/1

diff --git a/configure.ac b/configure.ac
index f1167d6..5ded61f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -179,8 +179,9 @@
 
 AC_OUTPUT(
 osmo-sgsn.pc
-include/openbsc/Makefile
 include/Makefile
+include/osmocom/Makefile
+include/osmocom/sgsn/Makefile
 src/Makefile
 src/gprs/Makefile
 tests/Makefile
diff --git a/debian/copyright b/debian/copyright
index b58117e..1f7f6fd 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -78,22 +78,22 @@
doc/osmo-nitb-data_structures.dot
doc/paging.txt
include/Makefile.am
-   include/openbsc/Makefile.am
-   include/openbsc/common.h
-   include/openbsc/crc24.h
-   include/openbsc/debug.h
-   include/openbsc/gb_proxy.h
-   include/openbsc/gprs_gb_parse.h
-   include/openbsc/gprs_gmm.h
-   include/openbsc/gprs_llc.h
-   include/openbsc/gprs_sgsn.h
-   include/openbsc/gprs_sndcp.h
-   include/openbsc/gprs_subscriber.h
-   include/openbsc/rest_octets.h
-   include/openbsc/sgsn.h
-   include/openbsc/vty.h
+   include/osmocom/sgsn/Makefile.am
+   include/osmocom/sgsn/common.h
+   include/osmocom/sgsn/crc24.h
+   include/osmocom/sgsn/debug.h
+   include/osmocom/sgsn/gb_proxy.h
+   include/osmocom/sgsn/gprs_gb_parse.h
+   include/osmocom/sgsn/gprs_gmm.h
+   include/osmocom/sgsn/gprs_llc.h
+   include/osmocom/sgsn/gprs_sgsn.h
+   include/osmocom/sgsn/gprs_sndcp.h
+   include/osmocom/sgsn/gprs_subscriber.h
+   include/osmocom/sgsn/rest_octets.h
+   include/osmocom/sgsn/sgsn.h
+   include/osmocom/sgsn/vty.h
m4/README
-   openbsc.pc.in
+   osmo-sgsn.pc.in
src/Makefile.am
src/gprs/.gitignore
src/gprs/Makefile.am
@@ -130,17 +130,17 @@
 Copyright: __NO_COPYRIGHT_NOR_LICENSE__
 License:   __NO_COPYRIGHT_NOR_LICENSE__
 
-Files: include/openbsc/a_reset.h
-   include/openbsc/gprs_llc_xid.h
-   include/openbsc/gprs_sndcp_comp.h
-   include/openbsc/gprs_sndcp_dcomp.h
-  

[PATCH] osmo-sgsn[master]: configure.ac: set name to osmo-sgsn, fix ML addr

2017-09-04 Thread Neels Hofmeyr

Review at  https://gerrit.osmocom.org/3808

configure.ac: set name to osmo-sgsn, fix ML addr

Change-Id: I47e9f2307b42d171f2ceeda1e129e2311f611883
---
M configure.ac
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/08/3808/1

diff --git a/configure.ac b/configure.ac
index 359c5c1..85a921f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
 dnl Process this file with autoconf to produce a configure script
-AC_INIT([openbsc],
+AC_INIT([osmo-sgsn],
m4_esyscmd([./git-version-gen .tarball-version]),
-   [open...@lists.osmocom.org])
+   [osmocom-net-g...@lists.osmocom.org])
 
 dnl *This* is the root dir, even if an install-sh exists in ../ or ../../
 AC_CONFIG_AUX_DIR([.])

-- 
To view, visit https://gerrit.osmocom.org/3808
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I47e9f2307b42d171f2ceeda1e129e2311f611883
Gerrit-PatchSet: 1
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 


[PATCH] osmo-sgsn[master]: move openbsc.pc to osmo-sgsn.pc

2017-09-04 Thread Neels Hofmeyr

Review at  https://gerrit.osmocom.org/3809

move openbsc.pc to osmo-sgsn.pc

Change-Id: Iad28d85b2a6d175cbe5d506aa82e7e4d94111eff
---
M Makefile.am
M configure.ac
D openbsc.pc.in
A osmo-sgsn.pc.in
4 files changed, 12 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/09/3809/1

diff --git a/Makefile.am b/Makefile.am
index 536b3f4..d57b66d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,7 +17,7 @@
$(NULL)
 
 pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = openbsc.pc
+pkgconfig_DATA = osmo-sgsn.pc
 
 BUILT_SOURCES = $(top_srcdir)/.version
 EXTRA_DIST = git-version-gen osmoappdesc.py .version
diff --git a/configure.ac b/configure.ac
index 85a921f..f1167d6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -178,7 +178,7 @@
 AM_CONFIG_HEADER(bscconfig.h)
 
 AC_OUTPUT(
-openbsc.pc
+osmo-sgsn.pc
 include/openbsc/Makefile
 include/Makefile
 src/Makefile
diff --git a/openbsc.pc.in b/openbsc.pc.in
deleted file mode 100644
index 17e265d..000
--- a/openbsc.pc.in
+++ /dev/null
@@ -1,10 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@/
-
-Name: OpenBSC
-Description: OpenBSC base station controller
-Requires:
-Version: @VERSION@
-Cflags: -I${includedir}
diff --git a/osmo-sgsn.pc.in b/osmo-sgsn.pc.in
new file mode 100644
index 000..45aef57
--- /dev/null
+++ b/osmo-sgsn.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@/
+
+Name: OsmoSGSN
+Description: Osmocom's Serving GPRS Support Node for 2G and 3G packet-switched 
mobile networks
+Requires:
+Version: @VERSION@
+Cflags: -I${includedir}

-- 
To view, visit https://gerrit.osmocom.org/3809
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iad28d85b2a6d175cbe5d506aa82e7e4d94111eff
Gerrit-PatchSet: 1
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 


libosmo-netif[master]: osmux: Re-write osmux_snprintf

2017-09-04 Thread Pau Espin Pedrol

Patch Set 3:

(4 comments)

https://gerrit.osmocom.org/#/c/3537/3/src/osmux.c
File src/osmux.c:

Line 849: #define SNPRINTF_BUFFER_SIZE(ret, buffer_offset, size)
\
> agreed; yet when first reading it, it helps to have doc for these non-obvio
Agree, I'll add a short description of each parameter.


Line 903:   if (msg->len - msg_offset < sizeof(struct osmux_hdr)) {
> ok, but let's have a unit test
Agree


Line 911:   if (osmuxh->ft == OSMUX_FT_VOICE_AMR && 
!osmo_amr_ft_valid(osmuxh->amr_ft)) {
> it is unrelated to range checking of snprintf calls. Should be separate IMH
OK I'll split it


Line 918:   SNPRINTF_BUFFER_SIZE(ret, buf_offset, size);
> There was an error log statement ("No room for OSMUX payload") that you're 
That's not checking the string output buffer, but the packet input buffer, it's 
different stuff.

That check is there to prevent osmux_snprintf_payload() reading from put of 
bytes input buffer, and as our output buffer is full, there's no point in doing 
that check / print that error because anyway we are not interested in 
continuing and calling osmux_snprintf_payload(). So the early return imho is 
correct.


-- 
To view, visit https://gerrit.osmocom.org/3537
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I695771d099833842db37a415b636035d17f1bba7
Gerrit-PatchSet: 3
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pablo Neira Ayuso 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: Yes


osmo-gsm-tester[master]: resource_test: update to check list features (ciphers)

2017-09-04 Thread Neels Hofmeyr

Patch Set 3:

> (1 comment)

I am still puzzled how we ended up with xor sim cards, I've never encountered 
one before. Using the sysmo-usim-tool and a card reader it should be easy to 
change this, pmaier knows all about it.

-- 
To view, visit https://gerrit.osmocom.org/3724
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I532f66585ab6f7be1a71853190791feeecbf263c
Gerrit-PatchSet: 3
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


osmo-gsm-tester[master]: Add cipher cfg param for modem and bts

2017-09-04 Thread Neels Hofmeyr

Patch Set 3:

(1 comment)

https://gerrit.osmocom.org/#/c/3723/3/example/resources.conf
File example/resources.conf:

Line 16:   ciphers: ['a5 0', 'a5 1', 'a5 3']
> TBH, I don't care that much.
I think it's only about numbers starting with 0 being interpreted as octal.

my choice would be a5_0. quote if you have to, but I wouldn't :)


-- 
To view, visit https://gerrit.osmocom.org/3723
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic0e368843a6e58bd3eeef36d2c0a7501296f0f3e
Gerrit-PatchSet: 3
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: Yes


osmo-gsm-manuals[master]: OsmoGsmTester: Move coredump section and add reference to ke...

2017-09-04 Thread Neels Hofmeyr

Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/3711/1//COMMIT_MSG
Commit Message:

Line 7: OsmoGsmTester: Move coredump section and add reference to 
kernel.core_pattern sysctl
> So do you want me to split this into 2 commits? Is it really needed? The am
maybe next time.


-- 
To view, visit https://gerrit.osmocom.org/3711
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I5bdde0a9960f9806f081e9a876b8b66db9e7f37c
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: Yes


osmo-gsm-tester[master]: Reserve ARFCN dynamically based on BTS band support

2017-09-04 Thread Neels Hofmeyr

Patch Set 2:

(2 comments)

https://gerrit.osmocom.org/#/c/3731/2/src/osmo_gsm_tester/bts_sysmo.py
File src/osmo_gsm_tester/bts_sysmo.py:

Line 120: return self.band_arfcn.get('band')
> It should always be set by suite.py just after creating it in suite.py:bts_
hmm, should be set by suite.py, but we're in bts_sysmo.py here. I'd prefer a 
'if not self.band_arfcn: return None'


Line 123: return int(self.band_arfcn.get('arfcn'))
> same too.
same again :)


-- 
To view, visit https://gerrit.osmocom.org/3731
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6fb5d95bed1fa50c3deaf62a7a6df3cb276bc3c9
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: neels 
Gerrit-HasComments: Yes


osmo-gsm-tester[master]: resource: Fix list comparison in item_matches

2017-09-04 Thread Pau Espin Pedrol

Patch Set 1:

Yes, I'll go through all comments in all commits and push the entire branch 
again.

-- 
To view, visit https://gerrit.osmocom.org/3721
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I27b372aa5906feac2843f24f5cdd0d9578d44b4d
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


osmo-gsm-tester[master]: resource: Fix list comparison in item_matches

2017-09-04 Thread Neels Hofmeyr

Patch Set 1: Code-Review+1

ok I understand now, thanks!
(only +1 because you mentioned you wanted to push another commit...?)

-- 
To view, visit https://gerrit.osmocom.org/3721
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I27b372aa5906feac2843f24f5cdd0d9578d44b4d
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


osmo-pcu[master]: cosmetic: convert explicit warnings to fixme/todo

2017-09-04 Thread Neels Hofmeyr

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/3761
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I72070e2a027e60e8b80c12ccfa23ff075434689f
Gerrit-PatchSet: 2
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


libosmo-netif[master]: osmux: Re-write osmux_snprintf

2017-09-04 Thread Neels Hofmeyr

Patch Set 3: Code-Review-1

(5 comments)

https://gerrit.osmocom.org/#/c/3537/3/src/osmux.c
File src/osmux.c:

Line 849: #define SNPRINTF_BUFFER_SIZE(ret, buffer_offset, size)
\
> At least now there's one parameter left storing state, so easier than befor
agreed; yet when first reading it, it helps to have doc for these non-obvious 
parameters.


Line 851:   return ret; \
> Why? this macro is intended to be used only in this set of functions, not t
I strongly object this coding style. Please no hidden return statements in 
macros, it makes the code cryptic; the flow should be obvious to the 
uninformed, and that's worth a few more lines. IIUC I have even identified one 
instance below where it breaks the current code flow.


Line 903:   if (msg->len - msg_offset < sizeof(struct osmux_hdr)) {
> As I said, I mostly rewrite the functions because there was bad logic + dif
ok, but let's have a unit test


Line 911:   if (osmuxh->ft == OSMUX_FT_VOICE_AMR && 
!osmo_amr_ft_valid(osmuxh->amr_ft)) {
> It's related in the sense of improving the function. This check was missing
it is unrelated to range checking of snprintf calls. Should be separate IMHO.


Line 918:   SNPRINTF_BUFFER_SIZE(ret, buf_offset, size);
> If there was an error in snprintf or if the buffer is full, why do I want t
There was an error log statement ("No room for OSMUX payload") that you're now 
dropping. You shouldn't be failing silently.


-- 
To view, visit https://gerrit.osmocom.org/3537
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I695771d099833842db37a415b636035d17f1bba7
Gerrit-PatchSet: 3
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pablo Neira Ayuso 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: Yes


osmo-gsm-tester[master]: resource: Fix list comparison in item_matches

2017-09-04 Thread Pau Espin Pedrol

Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/3721/1/src/osmo_gsm_tester/resource.py
File src/osmo_gsm_tester/resource.py:

Line 449: return False
> I'll provide a test for this. I think I stumbled onto it when trying to use
After doing some tests, it fixes the following scenario:
You have a BTS which supports a50 and a51. Then you use only 1 of the ciphers 
in the scenario, for instance a50. Without this patch, this setup will fail.

I'll push a new version of the commit with better git commit description.

A test in test_resources.py is already provided with later commits when cipher 
attribute is added, which checks for this case. So, in later commits, if this 
commit is not present  then "make check" fails, I just tried it:

--- 
/home/pespin/dev/sysmocom/git/osmo-gsm-tester-sysmocom/osmo-gsm-tester/selftest/resource_test.err
+++ got
@@ -0,0 +1,8 @@
+Traceback (most recent call last):
+  File 
"/home/pespin/dev/sysmocom/git/osmo-gsm-tester-sysmocom/osmo-gsm-tester/selftest/resource_test.py",
 line 83, in 
+resources = pool.reserve(origin, want)
+  File 
"/home/pespin/dev/sysmocom/git/osmo-gsm-tester-sysmocom/osmo-gsm-tester/selftest/../src/osmo_gsm_tester/resource.py",
 line 155, in reserve
+to_be_reserved = self.all_resources.without(reserved).find(origin, want)
+  File 
"/home/pespin/dev/sysmocom/git/osmo-gsm-tester-sysmocom/osmo-gsm-tester/selftest/../src/osmo_gsm_tester/resource.py",
 line 332, in find
+% (key, want_item))
+osmo_gsm_tester.resource.NoResourceExn: No matching resource available for bts 
= {'type': 'osmo-bts-sysmo', 'ciphers': ['a5 1']}
output mismatch: 'resource_test.err'

Test failed: 'resource_test.py'


-- 
To view, visit https://gerrit.osmocom.org/3721
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I27b372aa5906feac2843f24f5cdd0d9578d44b4d
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: Yes


libosmo-netif[master]: osmux: Re-write osmux_snprintf

2017-09-04 Thread Pau Espin Pedrol

Patch Set 3:

(6 comments)

https://gerrit.osmocom.org/#/c/3537/3/src/osmux.c
File src/osmux.c:

Line 849: #define SNPRINTF_BUFFER_SIZE(ret, buffer_offset, size)
\
> phew, can we document the arguments? my head is spinning...
At least now there's one parameter left storing state, so easier than before 
IMHO ;)


Line 851:   return ret; \
> wait, you are having a function return in this macro? I think that's bad st
Why? this macro is intended to be used only in this set of functions, not to be 
used by other non-related code. It's just put here together because it's used 
in lots of places in a few lines. No need to clutter more parts of the 
functions with extra returns.

return only happens if ret < 0 which means snprintf failed and in that case we 
just want to return that error to the caller, no need to do more work. 
Furthermore, it then simplifies the code (early return, no need to check 
specific code branches, as we can take some assumptions granted).


Line 866:   osmuxh->amr_ft, osmuxh->amr_cmr);
> If I get this right, before this patch this function always returned 0 (off
It could return other values depending on what was returned by ret. It's the 
same now, but also returning values <0 on error and checking overflows 
correctly, etc.


Line 903:   if (msg->len - msg_offset < sizeof(struct osmux_hdr)) {
> This change alone is complex enough. With the rest also being changed I'm u
As I said, I mostly rewrite the functions because there was bad logic + 
difficult to catch cases all around. Take it as a new implementation. Otherwise 
I'd need to spend hours and provide lots of commits to end up doing the same as 
you see here) or maybe worse. Not that worth spending more hours for this I 
think.


Line 911:   if (osmuxh->ft == OSMUX_FT_VOICE_AMR && 
!osmo_amr_ft_valid(osmuxh->amr_ft)) {
> oof, is this change really related?
It's related in the sense of improving the function. This check was missing 
because there are other types of osmux frames which can then end up in this 
error code patch and they should. I can split it into a new  patch if you ask 
for it, but as I was already rewriting the function I decided to put it here 
too.


Line 918:   SNPRINTF_BUFFER_SIZE(ret, buf_offset, size);
> (to illustrate above point, this macro call might return the function and b
If there was an error in snprintf or if the buffer is full, why do I want to 
continue looping and wasting CPU time if anyway I cannot write into the buffer? 
I just want to return the error or return that we wrote the entire buffer. Why 
continuing?


-- 
To view, visit https://gerrit.osmocom.org/3537
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I695771d099833842db37a415b636035d17f1bba7
Gerrit-PatchSet: 3
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pablo Neira Ayuso 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: Yes


[PATCH] osmo-pcu[master]: cosmetic: convert explicit warnings to fixme/todo

2017-09-04 Thread Max
Hello Pau Espin Pedrol, Neels Hofmeyr, Jenkins Builder,

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

https://gerrit.osmocom.org/3761

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

cosmetic: convert explicit warnings to fixme/todo

We do not use this style (#warning as an issue tracker replacement) in
any other Osmocom project. Also those warnings clutter compiler output
making it harder to spot warnings for the actual code.

Change-Id: I72070e2a027e60e8b80c12ccfa23ff075434689f
---
M src/bts.cpp
M src/gprs_rlcmac_meas.cpp
M src/gprs_rlcmac_sched.cpp
M src/osmobts_sock.cpp
M src/tbf.cpp
M src/tbf_dl.cpp
6 files changed, 9 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/61/3761/2

diff --git a/src/bts.cpp b/src/bts.cpp
index add6ab3..b768569 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -649,7 +649,7 @@
}
} else {
// Create new TBF
-   #warning "Copy and paste with other routines.."
+   /* FIXME: Copy and paste with other routines.. */
 
if (is_11bit) {
tbf = tbf_alloc_ul_tbf(_bts, NULL, -1, 0,
diff --git a/src/gprs_rlcmac_meas.cpp b/src/gprs_rlcmac_meas.cpp
index d6bbc19..41a7531 100644
--- a/src/gprs_rlcmac_meas.cpp
+++ b/src/gprs_rlcmac_meas.cpp
@@ -28,7 +28,7 @@
 /*
  * downlink measurement
  */
-#warning "TODO: trigger the measurement report from the pollcontroller and use 
it for flow control"
+/* TODO: trigger the measurement report from the pollcontroller and use it for 
flow control */
 
 /* received Measurement Report */
 int gprs_rlcmac_meas_rep(Packet_Measurement_Report_t *pmr)
diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp
index 42f0308..4309909 100644
--- a/src/gprs_rlcmac_sched.cpp
+++ b/src/gprs_rlcmac_sched.cpp
@@ -60,7 +60,8 @@
|| ul_tbf->ul_ass_state ==
GPRS_RLCMAC_UL_ASS_SEND_ASS_REJ)
*ul_ass_tbf = ul_tbf;
-#warning "Is this supposed to be fair? The last TBF for each wins? Maybe use 
llist_add_tail and skip once we have all states?"
+/* FIXME: Is this supposed to be fair? The last TBF for each wins? Maybe use 
llist_add_tail and skip once we have all
+states? */
}
llist_for_each(pos, >dl_tbfs()) {
dl_tbf = as_dl_tbf(pos->entry());
diff --git a/src/osmobts_sock.cpp b/src/osmobts_sock.cpp
index e9b85ab..31715d5 100644
--- a/src/osmobts_sock.cpp
+++ b/src/osmobts_sock.cpp
@@ -108,7 +108,8 @@
 #endif
for (ts = 0; ts < 8; ts++)
bts->trx[trx].pdch[ts].disable();
-#warning "NOT ALL RESOURCES are freed in this case... inconsistent with the 
other code. Share the code with pcu_l1if.c for the reset."
+/* FIXME: NOT ALL RESOURCES are freed in this case... inconsistent with the 
other code. Share the code with pcu_l1if.c
+for the reset. */
gprs_rlcmac_tbf::free_all(>trx[trx]);
}
 
diff --git a/src/tbf.cpp b/src/tbf.cpp
index c5f4348..8e54157 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -382,7 +382,7 @@
 {
struct gprs_rlcmac_ul_tbf *tbf;
 
-#warning "Copy and paste with tbf_new_dl_assignment"
+/* FIXME: Copy and paste with tbf_new_dl_assignment */
/* create new TBF, use same TRX as DL TBF */
/* use multislot class of downlink TBF */
tbf = tbf_alloc_ul_tbf(bts, ms, use_trx, ms_class, egprs_ms_class, 0);
@@ -465,7 +465,7 @@
 get_value_string(gprs_rlcmac_tbf_dl_ass_state_names,
  tbf->dl_ass_state));
tbf->stop_timer();
-   #warning "TODO: Could/Should generate  bssgp_tx_llc_discarded"
+   /* TODO: Could/Should generate  bssgp_tx_llc_discarded */
tbf_unlink_pdch(tbf);
llist_del(>list());
 
diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index b350720..1dd7dd8 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -145,7 +145,7 @@
}
 
// Create new TBF (any TRX)
-#warning "Copy and paste with alloc_ul_tbf"
+/* 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, ms_class, egprs_ms_class, 
ss);
 

-- 
To view, visit https://gerrit.osmocom.org/3761
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I72070e2a027e60e8b80c12ccfa23ff075434689f
Gerrit-PatchSet: 2
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 


[ABANDON] osmo-sgsn[master]: Use release helper from libosmocore

2017-09-04 Thread Max
Max has abandoned this change.

Change subject: Use release helper from libosmocore
..


Abandoned

-- 
To view, visit https://gerrit.osmocom.org/3716
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: I73823c568cfc55ad21a08dec76874724b43f419f
Gerrit-PatchSet: 2
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Neels Hofmeyr 


osmo-gsm-tester[master]: config: Fix combination of lists

2017-09-04 Thread Pau Espin Pedrol

Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/3722/1/src/osmo_gsm_tester/config.py
File src/osmo_gsm_tester/config.py:

Line 253: dest.append(src[i])
> It is potentially dangerous to change this logic and I want to be sure I un
I'll provide a a test for this, but AFAIR it fails with the same scenario of 
the other patch: -s encryption:cipher_a50+cipher_a51, for instance:

cipher_a50.conf:
  bts:
  - ciphers:
- 'a5 0'

cipher_a51.conf
  bts:
  - ciphers:
- 'a5 1'

Combining both scenarios means you want to restrict more, ie adding more 
requirements for the resources. This means you should end up with the following 
dict, because you require to have a BTS with both ciphers:
bts :  { ciphers : ['a5 0', 'a5 1' } 

So, if I understand correctly, in essence we are doing the union for scenarios 
dictionaries in order to have a bigger set which will then provide a smaller 
intersection against resources (only BTs having both ciphers are selected).

Before this patch, the code basically fails to combine the two scenarios.


-- 
To view, visit https://gerrit.osmocom.org/3722
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib7a38f10eb9de338a77bf1fa3afceb9df1532015
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: Yes


osmo-gsm-tester[master]: resource: Fix list comparison in item_matches

2017-09-04 Thread Pau Espin Pedrol

Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/3721/1/src/osmo_gsm_tester/resource.py
File src/osmo_gsm_tester/resource.py:

Line 449: return False
> It is potentially dangerous to change this logic and I want to be sure I un
I'll provide a test for this. I think I stumbled onto it when trying to use 
more than one scenario together, ie: -s encryption:cipher_a51+cipher_a52.

AFAIR there were several things not correct in this code before my change:
- It is expected that item and wanted_item to be the of the same type (because 
they follow same syntax). Thus in this case of are type list. AFAIR I checked 
and using this syntax doesn't work correctly to check if a list is a 
sublist/subset of another list.
- I think here you want to check the opposite, that is: if all wanted items are 
a subset of the item capabilitites. For instance if a modem supports 3 ciphers, 
and you want a scenario which supports 2, then len(wanted_item)==2 and 
len(item)==3, and you want to check that wnated_item is a subset of item.


-- 
To view, visit https://gerrit.osmocom.org/3721
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I27b372aa5906feac2843f24f5cdd0d9578d44b4d
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: Yes


[MERGED] openggsn[master]: ggsn: Fix DNS not sent in PDP context response

2017-09-04 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged.

Change subject: ggsn: Fix DNS not sent in PDP context response
..


ggsn: Fix DNS not sent in PDP context response

During IPv6 support implementation, helper function pco_contains_proto
was added which contains an error: It is only capable of finding first
protocol correctly, and as a consequence, in my setup DNS servers where not
sent back to the SGSN/MS, resulting in phone being able to connect to
IPs but not to domain names which required DNS resolution.

The condition in the while loop is also changed to match the increment
of the variable inside the loop to make it easier to understand at first
glance.

Fixes: 1ae98777d9b1ee62e6900caf4bb580d1a42bb416

Change-Id: Icc2e6716c33d78d3c3e000f529806228d8aa155e
---
M ggsn/ggsn.c
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Max: Looks good to me, but someone else must approve
  Neels Hofmeyr: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c
index c6a6dac..1e92956 100644
--- a/ggsn/ggsn.c
+++ b/ggsn/ggsn.c
@@ -215,14 +215,14 @@
uint8_t *cur = pco->v + 1;
 
/* iterate over PCO and check if protocol contained */
-   while (cur + 2 < pco->v + pco->l) {
+   while (cur + 3 <= pco->v + pco->l) {
uint16_t cur_prot = osmo_load16be(cur);
uint8_t cur_len = cur[2];
if (cur_prot == prot)
return true;
if (cur_len == 0)
break;
-   cur += cur_len;
+   cur += cur_len + 3;
}
return false;
 }

-- 
To view, visit https://gerrit.osmocom.org/3748
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Icc2e6716c33d78d3c3e000f529806228d8aa155e
Gerrit-PatchSet: 1
Gerrit-Project: openggsn
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 


osmo-sip-connector[master]: sdp.c Send octet-align in fmtp

2017-09-04 Thread Keith Whyte

Patch Set 11:

> 
 > don't worry. Let me edit as example.

Ah right.. the caller frees it. of course.

-- 
To view, visit https://gerrit.osmocom.org/3735
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I938758ac4ec55db9223e3da6c3c277e8fa670055
Gerrit-PatchSet: 11
Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-Owner: Keith Whyte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Keith Whyte 
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No