From gerrit-no-reply at lists.osmocom.org Mon Jan 2 09:07:34 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 2 Jan 2017 09:07:34 +0000 Subject: [MERGED] libosmo-abis[master]: ipaccess_line_update(): log connection IP addresses and ports In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: ipaccess_line_update(): log connection IP addresses and ports ...................................................................... ipaccess_line_update(): log connection IP addresses and ports Remove dup: call function to obtain IPA address only once. Log explicitly IP address and ports to which IPA is bound or connected. Change-Id: I841c40abdcba0fdd695a43231391c5d7cee20fae --- M src/input/ipaccess.c 1 file changed, 9 insertions(+), 6 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c index 35465e3..675f07a 100644 --- a/src/input/ipaccess.c +++ b/src/input/ipaccess.c @@ -839,11 +839,13 @@ switch(line->ops->cfg.ipa.role) { case E1INP_LINE_R_BSC: { struct ipa_server_link *oml_link, *rsl_link; + const char *ipa = e1inp_ipa_get_bind_addr(); - LOGP(DLINP, LOGL_NOTICE, "enabling ipaccess BSC mode\n"); + LOGP(DLINP, LOGL_NOTICE, "enabling ipaccess BSC mode on %s " + "with OML %u and RSL %u TCP ports\n", ipa, + IPA_TCP_PORT_OML, IPA_TCP_PORT_RSL); - oml_link = ipa_server_link_create(tall_ipa_ctx, line, - e1inp_ipa_get_bind_addr(), + oml_link = ipa_server_link_create(tall_ipa_ctx, line, ipa, IPA_TCP_PORT_OML, ipaccess_bsc_oml_cb, NULL); if (oml_link == NULL) { @@ -857,8 +859,7 @@ ipa_server_link_destroy(oml_link); return -EIO; } - rsl_link = ipa_server_link_create(tall_ipa_ctx, line, - e1inp_ipa_get_bind_addr(), + rsl_link = ipa_server_link_create(tall_ipa_ctx, line, ipa, IPA_TCP_PORT_RSL, ipaccess_bsc_rsl_cb, NULL); if (rsl_link == NULL) { @@ -878,7 +879,9 @@ case E1INP_LINE_R_BTS: { struct ipa_client_conn *link; - LOGP(DLINP, LOGL_NOTICE, "enabling ipaccess BTS mode\n"); + LOGP(DLINP, LOGL_NOTICE, "enabling ipaccess BTS mode, " + "OML connecting to %s:%u\n", line->ops->cfg.ipa.addr, + IPA_TCP_PORT_OML); link = ipa_client_conn_create(tall_ipa_ctx, &line->ts[E1INP_SIGN_OML-1], -- To view, visit https://gerrit.osmocom.org/1515 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I841c40abdcba0fdd695a43231391c5d7cee20fae Gerrit-PatchSet: 3 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Jan 2 11:47:04 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 2 Jan 2017 11:47:04 +0000 Subject: [PATCH] openbsc[master]: SI2q: add support for multiple UARFCNs Message-ID: Review at https://gerrit.osmocom.org/1516 SI2q: add support for multiple UARFCNs Support multiple UARFCNs with the same Scrambler Code. Change-Id: If1c32e8b547a28325180faaaddd21f80c37f7337 --- M openbsc/src/libbsc/rest_octets.c M openbsc/src/libbsc/system_information.c M openbsc/tests/gsm0408/gsm0408_test.c M openbsc/tests/gsm0408/gsm0408_test.ok 4 files changed, 107 insertions(+), 34 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/16/1516/1 diff --git a/openbsc/src/libbsc/rest_octets.c b/openbsc/src/libbsc/rest_octets.c index fc0282e..6fae9cd 100644 --- a/openbsc/src/libbsc/rest_octets.c +++ b/openbsc/src/libbsc/rest_octets.c @@ -180,11 +180,40 @@ bitvec_set_bit(bv, L); } -static inline int append_uarfcn(struct bitvec *bv, const uint16_t *u, +/* Append single FDD UARFCN */ +static inline int append_utran_fdd(struct bitvec *bv, uint16_t u, int *sc, + size_t length) +{ + int f0, w[RANGE_ENC_MAX_ARFCNS] = { 0 }; + uint8_t chan_list[16] = {0}; + /* Repeated UTRAN FDD Neighbour Cells */ + bitvec_set_bit(bv, 1); + + /* FDD-ARFCN */ + bitvec_set_bit(bv, 0); + bitvec_set_uint(bv, u, 14); + + f0 = range_encode(ARFCN_RANGE_1024, sc, length, w, 0, chan_list); + if (f0 < 0) + return f0; + + /* FDD_Indic0: parameter value '0000000000' is a member of the set? */ + bitvec_set_bit(bv, f0); + /* NR_OF_FDD_CELLS */ + bitvec_set_uint(bv, length, 5); + + f0 = bv->cur_bit; + bitvec_add_range1024(bv, (struct gsm48_range_1024 *)chan_list); + bv->cur_bit = f0 + range1024_p(length); + return 0; +} + +/* Append multiple FDD UARFCNs */ +static inline int append_uarfcns(struct bitvec *bv, const uint16_t *u, const uint16_t *sc, size_t length) { - int f0_inc, i, w[RANGE_ENC_MAX_ARFCNS] = { 0 }, a[length]; - uint8_t chan_list[16] = {0}; + int i, j, k, rc, st = 0, a[length]; + uint16_t cu = u[0]; /* caller ensures that length is positive */ /* 3G Neighbour Cell Description */ bitvec_set_bit(bv, 1); @@ -198,31 +227,24 @@ /* No Bandwidth_FDD */ bitvec_set_bit(bv, 0); - memset(w, 0, sizeof(w)); - for (i = 0; i < length; i++) - a[i] = sc[i]; + for (i = 0; i < length; i++) { + for (j = st, k = 0; j < i; j++) + a[k++] = sc[j]; /* copy corresponding SCs */ + if (u[i] != cu) { /* we've reached new UARFCN */ + rc = append_utran_fdd(bv, cu, a, k); + if (rc < 0) + return rc; + cu = u[i]; + st = i; /* update start position */ + } + } - /* Note: we do not support repeating Neighbour Cells ATM */ - /* Repeated UTRAN FDD Neighbour Cells */ - bitvec_set_bit(bv, 1); - - /* FDD-ARFCN */ - bitvec_set_bit(bv, 0); - /* Note: we do not support multiple UARFCN values ATM: */ - bitvec_set_uint(bv, u[0], 14); - - f0_inc = range_encode(ARFCN_RANGE_1024, a, length, w, 0, chan_list); - if (f0_inc < 0) - return f0_inc; - - /* FDD_Indic0: parameter value '0000000000' is not a member of the set */ - bitvec_set_bit(bv, f0_inc); - /* NR_OF_FDD_CELLS */ - bitvec_set_uint(bv, length, 5); - - i = bv->cur_bit; - bitvec_add_range1024(bv, (struct gsm48_range_1024 *)chan_list); - bv->cur_bit = i + range1024_p(length); + /* add last UARFCN not covered by previous cycle */ + for (i = st, k = 0; i < length; i++) + a[k++] = sc[i]; + rc = append_utran_fdd(bv, cu, a, k); + if (rc < 0) + return rc; /* stop bit - end of Repeated UTRAN FDD Neighbour Cells */ bitvec_set_bit(bv, 0); @@ -282,7 +304,8 @@ SI2Q_MAX_LEN); return -ENOMEM; } - rc = append_uarfcn(&bv, u, sc, u_len); + + rc = append_uarfcns(&bv, u, sc, u_len); if (rc < 0) { LOGP(DRR, LOGL_ERROR, "SI2quater: failed to append %zu " "UARFCNs due to range encoding failure: %s\n", diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c index 20c3915..e71490e 100644 --- a/openbsc/src/libbsc/system_information.c +++ b/openbsc/src/libbsc/system_information.c @@ -130,8 +130,23 @@ unsigned uarfcn_size(const uint16_t *u, const uint16_t *sc, size_t u_len) { - /*account for all the constant bits in append_uarfcn() */ - return 29 + range1024_p(u_len); + /*account for all the constant bits in append_uarfcns() */ + unsigned s = 7, append = 22, r = 0, i, st = 0, j, k; + uint16_t cu = u[0]; + + for (i = 0; i < u_len; i++) { + for (j = st, k = 0; j < i; j++, k++); + if (u[i] != cu) { /* we've reached new UARFCN */ + r += (append + range1024_p(k)); + cu = u[i]; + st = i; /* update start position */ + } + } + + /* add last UARFCN not covered by previous cycle */ + for (i = st, k = 0; i < u_len; i++, k++); + + return s + r + append + range1024_p(k); } bool si2q_size_check(const struct gsm_bts *bts) @@ -184,7 +199,7 @@ int bts_uarfcn_add(struct gsm_bts *bts, uint16_t arfcn, uint16_t scramble, bool diversity) { - size_t len = bts->si_common.uarfcn_length, i, k; + size_t len = bts->si_common.uarfcn_length, i, k = 0; uint16_t scr, chk, *ual = bts->si_common.data.uarfcn_list, *scl = bts->si_common.data.scramble_list, @@ -197,7 +212,11 @@ if (len == MAX_EARFCN_LIST) return -ENOMEM; - for (i = 0, k = 0; i < len; i++) { + for (i = 0; i < len; i++) /* find the position of arfcn if any */ + if (arfcn == ual[i]) + break; + + for (k = 0; i < len; i++) { if (arfcn == ual[i] && (scr == scl[i] || chk == scl[i])) return -EADDRINUSE; if (scr > scl[i]) @@ -209,6 +228,7 @@ memmove(ual + k + 1, ual + k, (len - k) * 2); memmove(scl + k + 1, scl + k, (len - k) * 2); } + ual[k] = arfcn; scl[k] = scr; bts->si_common.uarfcn_length++; diff --git a/openbsc/tests/gsm0408/gsm0408_test.c b/openbsc/tests/gsm0408/gsm0408_test.c index 472c2ae..08cf43f 100644 --- a/openbsc/tests/gsm0408/gsm0408_test.c +++ b/openbsc/tests/gsm0408/gsm0408_test.c @@ -135,6 +135,26 @@ gen(bts); } +static inline void test_si2q_mu(void) +{ + struct gsm_bts *bts; + struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + printf("Test SI2quater multiple UARFCNs:\n"); + + if (!network) + exit(1); + bts = gsm_bts_alloc(network); + + _bts_uarfcn_add(bts, 10564, 318, 0); + _bts_uarfcn_add(bts, 10612, 319, 0); + _bts_uarfcn_add(bts, 10612, 31, 0); + _bts_uarfcn_add(bts, 10612, 19, 0); + _bts_uarfcn_add(bts, 10613, 64, 0); + _bts_uarfcn_add(bts, 10613, 164, 0); + _bts_uarfcn_add(bts, 10613, 14, 0); + gen(bts); +} + static inline void test_si2q_u(void) { struct gsm_bts *bts; @@ -608,6 +628,7 @@ test_si2q_segfault(); test_si2q_e(); test_si2q_u(); + test_si2q_mu(); printf("Done.\n"); return EXIT_SUCCESS; } diff --git a/openbsc/tests/gsm0408/gsm0408_test.ok b/openbsc/tests/gsm0408/gsm0408_test.ok index 1118dd9..1c02dfd 100644 --- a/openbsc/tests/gsm0408/gsm0408_test.ok +++ b/openbsc/tests/gsm0408/gsm0408_test.ok @@ -64,8 +64,8 @@ Allocated reference: 1 Test SI2quater UARFCN (same scrambling code and diversity): generated valid SI2quater: [23] 59 06 07 c0 00 25 52 88 0a 7e 10 99 64 00 0b 2b 2b 2b 2b 2b 2b 2b 2b -failed to generate SI2quater: Invalid argument -failed to generate SI2quater: Invalid argument +generated valid SI2quater: [23] 59 06 07 c0 00 25 52 e8 0a 7f 52 88 0a 7e 10 99 64 00 0b 2b 2b 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 52 e8 0a 7f 52 88 0a 7e 10 99 64 00 0b 2b 2b 2b 2b Testing SYSINFO_TYPE_2quater EARFCN generation: generated invalid SI2quater: [23] 59 06 07 c0 00 04 86 59 0a 03 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b added EARFCN 1917 - generated valid SI2quater: [23] 59 06 07 c0 00 04 86 59 83 be c8 50 0b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b @@ -89,4 +89,13 @@ failed to add UARFCN to SI2quater: No space left on device failed to add UARFCN to SI2quater: No space left on device generated valid SI2quater: [23] 59 06 07 c0 00 25 0f 7c 4c 7a 34 0e 64 77 85 43 55 c8 10 99 64 00 0b +Test SI2quater multiple UARFCNs: +generated valid SI2quater: [23] 59 06 07 c0 00 25 52 88 0a 7c 10 99 64 00 0b 2b 2b 2b 2b 2b 2b 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 52 e8 0a 7f 52 88 0a 7c 10 99 64 00 0b 2b 2b 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 52 e8 12 7e e0 a9 44 05 3e 00 44 b2 00 03 2b 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 52 e8 18 3f f4 90 54 a2 02 9f 04 86 59 00 03 2b 2b +failed to add UARFCN to SI2quater: No space left on device +failed to add UARFCN to SI2quater: No space left on device +failed to add UARFCN to SI2quater: No space left on device +generated valid SI2quater: [23] 59 06 07 c0 00 25 52 e8 18 3f f4 90 54 a2 02 9f 04 86 59 00 03 2b 2b Done. -- To view, visit https://gerrit.osmocom.org/1516 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If1c32e8b547a28325180faaaddd21f80c37f7337 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Jan 2 11:49:08 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 2 Jan 2017 11:49:08 +0000 Subject: [PATCH] openbsc[master]: SI2q: add support for multiple UARFCNs In-Reply-To: References: Message-ID: SI2q: add support for multiple UARFCNs Support multiple UARFCNs with the same Scrambler Code. Fixes: RT#7379 Change-Id: If1c32e8b547a28325180faaaddd21f80c37f7337 --- M openbsc/src/libbsc/rest_octets.c M openbsc/src/libbsc/system_information.c M openbsc/tests/gsm0408/gsm0408_test.c M openbsc/tests/gsm0408/gsm0408_test.ok 4 files changed, 107 insertions(+), 34 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/16/1516/2 diff --git a/openbsc/src/libbsc/rest_octets.c b/openbsc/src/libbsc/rest_octets.c index fc0282e..6fae9cd 100644 --- a/openbsc/src/libbsc/rest_octets.c +++ b/openbsc/src/libbsc/rest_octets.c @@ -180,11 +180,40 @@ bitvec_set_bit(bv, L); } -static inline int append_uarfcn(struct bitvec *bv, const uint16_t *u, +/* Append single FDD UARFCN */ +static inline int append_utran_fdd(struct bitvec *bv, uint16_t u, int *sc, + size_t length) +{ + int f0, w[RANGE_ENC_MAX_ARFCNS] = { 0 }; + uint8_t chan_list[16] = {0}; + /* Repeated UTRAN FDD Neighbour Cells */ + bitvec_set_bit(bv, 1); + + /* FDD-ARFCN */ + bitvec_set_bit(bv, 0); + bitvec_set_uint(bv, u, 14); + + f0 = range_encode(ARFCN_RANGE_1024, sc, length, w, 0, chan_list); + if (f0 < 0) + return f0; + + /* FDD_Indic0: parameter value '0000000000' is a member of the set? */ + bitvec_set_bit(bv, f0); + /* NR_OF_FDD_CELLS */ + bitvec_set_uint(bv, length, 5); + + f0 = bv->cur_bit; + bitvec_add_range1024(bv, (struct gsm48_range_1024 *)chan_list); + bv->cur_bit = f0 + range1024_p(length); + return 0; +} + +/* Append multiple FDD UARFCNs */ +static inline int append_uarfcns(struct bitvec *bv, const uint16_t *u, const uint16_t *sc, size_t length) { - int f0_inc, i, w[RANGE_ENC_MAX_ARFCNS] = { 0 }, a[length]; - uint8_t chan_list[16] = {0}; + int i, j, k, rc, st = 0, a[length]; + uint16_t cu = u[0]; /* caller ensures that length is positive */ /* 3G Neighbour Cell Description */ bitvec_set_bit(bv, 1); @@ -198,31 +227,24 @@ /* No Bandwidth_FDD */ bitvec_set_bit(bv, 0); - memset(w, 0, sizeof(w)); - for (i = 0; i < length; i++) - a[i] = sc[i]; + for (i = 0; i < length; i++) { + for (j = st, k = 0; j < i; j++) + a[k++] = sc[j]; /* copy corresponding SCs */ + if (u[i] != cu) { /* we've reached new UARFCN */ + rc = append_utran_fdd(bv, cu, a, k); + if (rc < 0) + return rc; + cu = u[i]; + st = i; /* update start position */ + } + } - /* Note: we do not support repeating Neighbour Cells ATM */ - /* Repeated UTRAN FDD Neighbour Cells */ - bitvec_set_bit(bv, 1); - - /* FDD-ARFCN */ - bitvec_set_bit(bv, 0); - /* Note: we do not support multiple UARFCN values ATM: */ - bitvec_set_uint(bv, u[0], 14); - - f0_inc = range_encode(ARFCN_RANGE_1024, a, length, w, 0, chan_list); - if (f0_inc < 0) - return f0_inc; - - /* FDD_Indic0: parameter value '0000000000' is not a member of the set */ - bitvec_set_bit(bv, f0_inc); - /* NR_OF_FDD_CELLS */ - bitvec_set_uint(bv, length, 5); - - i = bv->cur_bit; - bitvec_add_range1024(bv, (struct gsm48_range_1024 *)chan_list); - bv->cur_bit = i + range1024_p(length); + /* add last UARFCN not covered by previous cycle */ + for (i = st, k = 0; i < length; i++) + a[k++] = sc[i]; + rc = append_utran_fdd(bv, cu, a, k); + if (rc < 0) + return rc; /* stop bit - end of Repeated UTRAN FDD Neighbour Cells */ bitvec_set_bit(bv, 0); @@ -282,7 +304,8 @@ SI2Q_MAX_LEN); return -ENOMEM; } - rc = append_uarfcn(&bv, u, sc, u_len); + + rc = append_uarfcns(&bv, u, sc, u_len); if (rc < 0) { LOGP(DRR, LOGL_ERROR, "SI2quater: failed to append %zu " "UARFCNs due to range encoding failure: %s\n", diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c index 20c3915..e71490e 100644 --- a/openbsc/src/libbsc/system_information.c +++ b/openbsc/src/libbsc/system_information.c @@ -130,8 +130,23 @@ unsigned uarfcn_size(const uint16_t *u, const uint16_t *sc, size_t u_len) { - /*account for all the constant bits in append_uarfcn() */ - return 29 + range1024_p(u_len); + /*account for all the constant bits in append_uarfcns() */ + unsigned s = 7, append = 22, r = 0, i, st = 0, j, k; + uint16_t cu = u[0]; + + for (i = 0; i < u_len; i++) { + for (j = st, k = 0; j < i; j++, k++); + if (u[i] != cu) { /* we've reached new UARFCN */ + r += (append + range1024_p(k)); + cu = u[i]; + st = i; /* update start position */ + } + } + + /* add last UARFCN not covered by previous cycle */ + for (i = st, k = 0; i < u_len; i++, k++); + + return s + r + append + range1024_p(k); } bool si2q_size_check(const struct gsm_bts *bts) @@ -184,7 +199,7 @@ int bts_uarfcn_add(struct gsm_bts *bts, uint16_t arfcn, uint16_t scramble, bool diversity) { - size_t len = bts->si_common.uarfcn_length, i, k; + size_t len = bts->si_common.uarfcn_length, i, k = 0; uint16_t scr, chk, *ual = bts->si_common.data.uarfcn_list, *scl = bts->si_common.data.scramble_list, @@ -197,7 +212,11 @@ if (len == MAX_EARFCN_LIST) return -ENOMEM; - for (i = 0, k = 0; i < len; i++) { + for (i = 0; i < len; i++) /* find the position of arfcn if any */ + if (arfcn == ual[i]) + break; + + for (k = 0; i < len; i++) { if (arfcn == ual[i] && (scr == scl[i] || chk == scl[i])) return -EADDRINUSE; if (scr > scl[i]) @@ -209,6 +228,7 @@ memmove(ual + k + 1, ual + k, (len - k) * 2); memmove(scl + k + 1, scl + k, (len - k) * 2); } + ual[k] = arfcn; scl[k] = scr; bts->si_common.uarfcn_length++; diff --git a/openbsc/tests/gsm0408/gsm0408_test.c b/openbsc/tests/gsm0408/gsm0408_test.c index 472c2ae..08cf43f 100644 --- a/openbsc/tests/gsm0408/gsm0408_test.c +++ b/openbsc/tests/gsm0408/gsm0408_test.c @@ -135,6 +135,26 @@ gen(bts); } +static inline void test_si2q_mu(void) +{ + struct gsm_bts *bts; + struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + printf("Test SI2quater multiple UARFCNs:\n"); + + if (!network) + exit(1); + bts = gsm_bts_alloc(network); + + _bts_uarfcn_add(bts, 10564, 318, 0); + _bts_uarfcn_add(bts, 10612, 319, 0); + _bts_uarfcn_add(bts, 10612, 31, 0); + _bts_uarfcn_add(bts, 10612, 19, 0); + _bts_uarfcn_add(bts, 10613, 64, 0); + _bts_uarfcn_add(bts, 10613, 164, 0); + _bts_uarfcn_add(bts, 10613, 14, 0); + gen(bts); +} + static inline void test_si2q_u(void) { struct gsm_bts *bts; @@ -608,6 +628,7 @@ test_si2q_segfault(); test_si2q_e(); test_si2q_u(); + test_si2q_mu(); printf("Done.\n"); return EXIT_SUCCESS; } diff --git a/openbsc/tests/gsm0408/gsm0408_test.ok b/openbsc/tests/gsm0408/gsm0408_test.ok index 1118dd9..1c02dfd 100644 --- a/openbsc/tests/gsm0408/gsm0408_test.ok +++ b/openbsc/tests/gsm0408/gsm0408_test.ok @@ -64,8 +64,8 @@ Allocated reference: 1 Test SI2quater UARFCN (same scrambling code and diversity): generated valid SI2quater: [23] 59 06 07 c0 00 25 52 88 0a 7e 10 99 64 00 0b 2b 2b 2b 2b 2b 2b 2b 2b -failed to generate SI2quater: Invalid argument -failed to generate SI2quater: Invalid argument +generated valid SI2quater: [23] 59 06 07 c0 00 25 52 e8 0a 7f 52 88 0a 7e 10 99 64 00 0b 2b 2b 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 52 e8 0a 7f 52 88 0a 7e 10 99 64 00 0b 2b 2b 2b 2b Testing SYSINFO_TYPE_2quater EARFCN generation: generated invalid SI2quater: [23] 59 06 07 c0 00 04 86 59 0a 03 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b added EARFCN 1917 - generated valid SI2quater: [23] 59 06 07 c0 00 04 86 59 83 be c8 50 0b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b @@ -89,4 +89,13 @@ failed to add UARFCN to SI2quater: No space left on device failed to add UARFCN to SI2quater: No space left on device generated valid SI2quater: [23] 59 06 07 c0 00 25 0f 7c 4c 7a 34 0e 64 77 85 43 55 c8 10 99 64 00 0b +Test SI2quater multiple UARFCNs: +generated valid SI2quater: [23] 59 06 07 c0 00 25 52 88 0a 7c 10 99 64 00 0b 2b 2b 2b 2b 2b 2b 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 52 e8 0a 7f 52 88 0a 7c 10 99 64 00 0b 2b 2b 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 52 e8 12 7e e0 a9 44 05 3e 00 44 b2 00 03 2b 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 52 e8 18 3f f4 90 54 a2 02 9f 04 86 59 00 03 2b 2b +failed to add UARFCN to SI2quater: No space left on device +failed to add UARFCN to SI2quater: No space left on device +failed to add UARFCN to SI2quater: No space left on device +generated valid SI2quater: [23] 59 06 07 c0 00 25 52 e8 18 3f f4 90 54 a2 02 9f 04 86 59 00 03 2b 2b Done. -- To view, visit https://gerrit.osmocom.org/1516 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If1c32e8b547a28325180faaaddd21f80c37f7337 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Jan 2 13:13:40 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 2 Jan 2017 13:13:40 +0000 Subject: [PATCH] libosmocore[master]: Add OML definitions from OsmoBTS Message-ID: Review at https://gerrit.osmocom.org/1517 Add OML definitions from OsmoBTS Change-Id: I9c3bc15662949654e7bba6aad5488c69ee7d0c45 Related: OS#1615 --- M include/osmocom/gsm/abis_nm.h M include/osmocom/gsm/protocol/gsm_12_21.h M src/gsm/abis_nm.c M src/gsm/libosmogsm.map 4 files changed, 76 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/17/1517/1 diff --git a/include/osmocom/gsm/abis_nm.h b/include/osmocom/gsm/abis_nm.h index 04bca43..14dbc08 100644 --- a/include/osmocom/gsm/abis_nm.h +++ b/include/osmocom/gsm/abis_nm.h @@ -34,6 +34,7 @@ const char *abis_nm_avail_name(uint8_t avail); const char *abis_nm_test_name(uint8_t test); extern const struct tlv_definition abis_nm_osmo_att_tlvdef; +extern const struct tlv_definition abis_nm_att_tlvdef_ipa; /*! \brief write a human-readable OML header to the debug log * \param[in] ss Logging sub-system diff --git a/include/osmocom/gsm/protocol/gsm_12_21.h b/include/osmocom/gsm/protocol/gsm_12_21.h index 3c3a2c9..fa29923 100644 --- a/include/osmocom/gsm/protocol/gsm_12_21.h +++ b/include/osmocom/gsm/protocol/gsm_12_21.h @@ -615,6 +615,19 @@ uint8_t subslot; /*!< \brief E1 sub-slot */ } __attribute__ ((packed)); +/*! \brief 3GPP TS 12.21 9.4.53 T200 index */ +enum abis_nm_t200_idx { + T200_SDCCH = 0, + T200_FACCH_F = 1, + T200_FACCH_H = 2, + T200_SACCH_TCH_SAPI0 = 3, + T200_SACCH_SDCCH = 4, + T200_SDCCH_SAPI3 = 5, + T200_SACCH_TCH_SAPI3 = 6 +}; + +extern const uint8_t abis_nm_t200_ms; + /*! \brief Siemens BS-11 specific objects in the SienemsHW (0xA5) object class */ enum abis_bs11_objtype { BS11_OBJ_ALCO = 0x01, diff --git a/src/gsm/abis_nm.c b/src/gsm/abis_nm.c index e607d30..c085e06 100644 --- a/src/gsm/abis_nm.c +++ b/src/gsm/abis_nm.c @@ -227,6 +227,17 @@ return get_value_string(severity_names, cause); } +/*! \brief 3GPP TS 12.21 9.4.53 T200 values (in msec) */ +const uint8_t abis_nm_t200_ms[] = { + [T200_SDCCH] = 5, + [T200_FACCH_F] = 5, + [T200_FACCH_H] = 5, + [T200_SACCH_TCH_SAPI0] = 10, + [T200_SACCH_SDCCH] = 10, + [T200_SDCCH_SAPI3] = 5, + [T200_SACCH_TCH_SAPI3] = 10 +}; + /*! \brief Attributes that the BSC can set, not only get, according to Section 9.4 */ const enum abis_nm_attr abis_nm_att_settable[] = { NM_ATT_ADD_INFO, @@ -256,6 +267,55 @@ NM_ATT_MEAS_TYPE, }; +/*! \brief GSM A-bis OML IPA TLV parser definition */ +const struct tlv_definition abis_nm_att_tlvdef_ipa = { + .def = { + /* ip.access specifics */ + [NM_ATT_IPACC_DST_IP] = { TLV_TYPE_FIXED, 4 }, + [NM_ATT_IPACC_DST_IP_PORT] = { TLV_TYPE_FIXED, 2 }, + [NM_ATT_IPACC_STREAM_ID] = { TLV_TYPE_TV, }, + [NM_ATT_IPACC_SEC_OML_CFG] = { TLV_TYPE_FIXED, 6 }, + [NM_ATT_IPACC_IP_IF_CFG] = { TLV_TYPE_FIXED, 8 }, + [NM_ATT_IPACC_IP_GW_CFG] = { TLV_TYPE_FIXED, 12 }, + [NM_ATT_IPACC_IN_SERV_TIME] = { TLV_TYPE_FIXED, 4 }, + [NM_ATT_IPACC_LOCATION] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_PAGING_CFG] = { TLV_TYPE_FIXED, 2 }, + [NM_ATT_IPACC_UNIT_ID] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_UNIT_NAME] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_SNMP_CFG] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_PRIM_OML_CFG_LIST] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_NV_FLAGS] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_FREQ_CTRL] = { TLV_TYPE_FIXED, 2 }, + [NM_ATT_IPACC_PRIM_OML_FB_TOUT] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_CUR_SW_CFG] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_TIMING_BUS] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_CGI] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_RAC] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_OBJ_VERSION] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_GPRS_PAGING_CFG]= { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_NSEI] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_BVCI] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_NSVCI] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_NS_CFG] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_BSSGP_CFG] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_NS_LINK_CFG] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_RLC_CFG] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_ALM_THRESH_LIST]= { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_MONIT_VAL_LIST] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_TIB_CONTROL] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_SUPP_FEATURES] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_CODING_SCHEMES] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_RLC_CFG_2] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_HEARTB_TOUT] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_UPTIME] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_RLC_CFG_3] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_SSL_CFG] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_SEC_POSSIBLE] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_IML_SSL_STATE] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_REVOC_DATE] = { TLV_TYPE_TL16V }, + }, +}; + /*! \brief GSM A-bis OML TLV parser definition */ const struct tlv_definition abis_nm_att_tlvdef = { .def = { diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index a3d224f..199d05a 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -10,11 +10,13 @@ abis_nm_nack_cause_name; abis_nm_nack_name; abis_nm_att_tlvdef; +abis_nm_att_tlvdef_ipa; abis_nm_osmo_att_tlvdef; abis_nm_msg_disc_names; abis_nm_obj_class_names; abis_nm_opstate_name; abis_nm_nacks; +abis_nm_t200_ms; abis_nm_no_ack_nack; abis_nm_pchan4chcomb; abis_nm_reports; -- To view, visit https://gerrit.osmocom.org/1517 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9c3bc15662949654e7bba6aad5488c69ee7d0c45 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Jan 2 13:13:42 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 2 Jan 2017 13:13:42 +0000 Subject: [PATCH] libosmocore[master]: Add parsed TLV helpers from OsmoBTS Message-ID: Review at https://gerrit.osmocom.org/1518 Add parsed TLV helpers from OsmoBTS Add functions to copy and merge parsed TLV structures from OsmoBTS. Change-Id: Ieaaaed19da9c069fe451faa53d24c5b84d7d5615 --- M include/osmocom/gsm/tlv.h M src/gsm/libosmogsm.map M src/gsm/tlv_parser.c 3 files changed, 63 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/18/1518/1 diff --git a/include/osmocom/gsm/tlv.h b/include/osmocom/gsm/tlv.h index cf09969..701fe68 100644 --- a/include/osmocom/gsm/tlv.h +++ b/include/osmocom/gsm/tlv.h @@ -436,6 +436,8 @@ return res; } +struct tlv_parsed *osmo_tlvp_copy(const struct tlv_parsed *tp_orig, void *ctx); +int osmo_tlvp_merge(struct tlv_parsed *dst, const struct tlv_parsed *src); int osmo_shift_v_fixed(uint8_t **data, size_t *data_len, size_t len, uint8_t **value); int osmo_match_shift_tv_fixed(uint8_t **data, size_t *data_len, diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 199d05a..b84f859 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -324,6 +324,8 @@ tvlv_att_def; vtvlv_gan_att_def; +osmo_tlvp_copy; +osmo_tlvp_merge; osmo_shift_v_fixed; osmo_match_shift_tv_fixed; osmo_shift_tlv; diff --git a/src/gsm/tlv_parser.c b/src/gsm/tlv_parser.c index e84edd9..790534f 100644 --- a/src/gsm/tlv_parser.c +++ b/src/gsm/tlv_parser.c @@ -43,6 +43,65 @@ return 0; } +/*! \brief Copy \ref tlv_parsed using given talloc context + * \param[in] tp_orig Parsed TLV structure + * \param[in] ctx Talloc context for allocations + * \returns NULL on errors, \ref tlv_parsed pointer otherwise + */ +struct tlv_parsed *osmo_tlvp_copy(const struct tlv_parsed *tp_orig, void *ctx) +{ + struct tlv_parsed *tp_out; + size_t i, len; + + tp_out = talloc_zero(ctx, struct tlv_parsed); + if (!tp_out) + return NULL; + + /* if the original is NULL, return empty tlvp */ + if (!tp_orig) + return tp_out; + + for (i = 0; i < ARRAY_SIZE(tp_orig->lv); i++) { + len = tp_orig->lv[i].len; + tp_out->lv[i].len = len; + if (len && tp_out->lv[i].val) { + tp_out->lv[i].val = talloc_zero_size(tp_out, len); + if (!tp_out->lv[i].val) { + talloc_free(tp_out); + return NULL; + } + memcpy((uint8_t *)tp_out->lv[i].val, tp_orig->lv[i].val, + len); + } + } + + return tp_out; +} + +/*! \brief Merge all \ref tlv_parsed attributes of 'src' into 'dst' + * \param[in] dst Parsed TLV structure to merge into + * \param[in] src Parsed TLV structure to merge from + * \returns 0 on success, negative on error + */ +int osmo_tlvp_merge(struct tlv_parsed *dst, const struct tlv_parsed *src) +{ + size_t i, len; + for (i = 0; i < ARRAY_SIZE(dst->lv); i++) { + len = src->lv[i].len; + if (len == 0 || src->lv[i].val == NULL) + continue; + if (dst->lv[i].val) { + talloc_free((uint8_t *) dst->lv[i].val); + dst->lv[i].len = 0; + } + dst->lv[i].val = talloc_zero_size(dst, len); + if (!dst->lv[i].val) + return -ENOMEM; + memcpy((uint8_t *) dst->lv[i].val, src->lv[i].val, len); + } + return 0; +} + /*! \brief Parse a single TLV encoded IE * \param[out] o_tag the tag of the IE that was found * \param[out] o_len length of the IE that was found -- To view, visit https://gerrit.osmocom.org/1518 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ieaaaed19da9c069fe451faa53d24c5b84d7d5615 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Jan 2 13:17:53 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 2 Jan 2017 13:17:53 +0000 Subject: [PATCH] libosmocore[master]: Add OML definitions from OsmoBTS In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1517 to look at the new patch set (#2). Add OML definitions from OsmoBTS Change-Id: I9c3bc15662949654e7bba6aad5488c69ee7d0c45 Related: OS#1615 --- M include/osmocom/gsm/abis_nm.h M include/osmocom/gsm/protocol/gsm_12_21.h M src/gsm/abis_nm.c M src/gsm/libosmogsm.map 4 files changed, 76 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/17/1517/2 diff --git a/include/osmocom/gsm/abis_nm.h b/include/osmocom/gsm/abis_nm.h index 04bca43..14dbc08 100644 --- a/include/osmocom/gsm/abis_nm.h +++ b/include/osmocom/gsm/abis_nm.h @@ -34,6 +34,7 @@ const char *abis_nm_avail_name(uint8_t avail); const char *abis_nm_test_name(uint8_t test); extern const struct tlv_definition abis_nm_osmo_att_tlvdef; +extern const struct tlv_definition abis_nm_att_tlvdef_ipa; /*! \brief write a human-readable OML header to the debug log * \param[in] ss Logging sub-system diff --git a/include/osmocom/gsm/protocol/gsm_12_21.h b/include/osmocom/gsm/protocol/gsm_12_21.h index 3c3a2c9..ed53dc6 100644 --- a/include/osmocom/gsm/protocol/gsm_12_21.h +++ b/include/osmocom/gsm/protocol/gsm_12_21.h @@ -615,6 +615,19 @@ uint8_t subslot; /*!< \brief E1 sub-slot */ } __attribute__ ((packed)); +/*! \brief 3GPP TS 12.21 9.4.53 T200 index */ +enum abis_nm_t200_idx { + T200_SDCCH = 0, + T200_FACCH_F = 1, + T200_FACCH_H = 2, + T200_SACCH_TCH_SAPI0 = 3, + T200_SACCH_SDCCH = 4, + T200_SDCCH_SAPI3 = 5, + T200_SACCH_TCH_SAPI3 = 6 +}; + +extern const uint8_t abis_nm_t200_ms[]; + /*! \brief Siemens BS-11 specific objects in the SienemsHW (0xA5) object class */ enum abis_bs11_objtype { BS11_OBJ_ALCO = 0x01, diff --git a/src/gsm/abis_nm.c b/src/gsm/abis_nm.c index e607d30..c085e06 100644 --- a/src/gsm/abis_nm.c +++ b/src/gsm/abis_nm.c @@ -227,6 +227,17 @@ return get_value_string(severity_names, cause); } +/*! \brief 3GPP TS 12.21 9.4.53 T200 values (in msec) */ +const uint8_t abis_nm_t200_ms[] = { + [T200_SDCCH] = 5, + [T200_FACCH_F] = 5, + [T200_FACCH_H] = 5, + [T200_SACCH_TCH_SAPI0] = 10, + [T200_SACCH_SDCCH] = 10, + [T200_SDCCH_SAPI3] = 5, + [T200_SACCH_TCH_SAPI3] = 10 +}; + /*! \brief Attributes that the BSC can set, not only get, according to Section 9.4 */ const enum abis_nm_attr abis_nm_att_settable[] = { NM_ATT_ADD_INFO, @@ -256,6 +267,55 @@ NM_ATT_MEAS_TYPE, }; +/*! \brief GSM A-bis OML IPA TLV parser definition */ +const struct tlv_definition abis_nm_att_tlvdef_ipa = { + .def = { + /* ip.access specifics */ + [NM_ATT_IPACC_DST_IP] = { TLV_TYPE_FIXED, 4 }, + [NM_ATT_IPACC_DST_IP_PORT] = { TLV_TYPE_FIXED, 2 }, + [NM_ATT_IPACC_STREAM_ID] = { TLV_TYPE_TV, }, + [NM_ATT_IPACC_SEC_OML_CFG] = { TLV_TYPE_FIXED, 6 }, + [NM_ATT_IPACC_IP_IF_CFG] = { TLV_TYPE_FIXED, 8 }, + [NM_ATT_IPACC_IP_GW_CFG] = { TLV_TYPE_FIXED, 12 }, + [NM_ATT_IPACC_IN_SERV_TIME] = { TLV_TYPE_FIXED, 4 }, + [NM_ATT_IPACC_LOCATION] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_PAGING_CFG] = { TLV_TYPE_FIXED, 2 }, + [NM_ATT_IPACC_UNIT_ID] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_UNIT_NAME] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_SNMP_CFG] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_PRIM_OML_CFG_LIST] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_NV_FLAGS] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_FREQ_CTRL] = { TLV_TYPE_FIXED, 2 }, + [NM_ATT_IPACC_PRIM_OML_FB_TOUT] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_CUR_SW_CFG] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_TIMING_BUS] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_CGI] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_RAC] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_OBJ_VERSION] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_GPRS_PAGING_CFG]= { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_NSEI] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_BVCI] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_NSVCI] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_NS_CFG] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_BSSGP_CFG] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_NS_LINK_CFG] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_RLC_CFG] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_ALM_THRESH_LIST]= { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_MONIT_VAL_LIST] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_TIB_CONTROL] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_SUPP_FEATURES] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_CODING_SCHEMES] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_RLC_CFG_2] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_HEARTB_TOUT] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_UPTIME] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_RLC_CFG_3] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_SSL_CFG] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_SEC_POSSIBLE] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_IML_SSL_STATE] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_REVOC_DATE] = { TLV_TYPE_TL16V }, + }, +}; + /*! \brief GSM A-bis OML TLV parser definition */ const struct tlv_definition abis_nm_att_tlvdef = { .def = { diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index a3d224f..199d05a 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -10,11 +10,13 @@ abis_nm_nack_cause_name; abis_nm_nack_name; abis_nm_att_tlvdef; +abis_nm_att_tlvdef_ipa; abis_nm_osmo_att_tlvdef; abis_nm_msg_disc_names; abis_nm_obj_class_names; abis_nm_opstate_name; abis_nm_nacks; +abis_nm_t200_ms; abis_nm_no_ack_nack; abis_nm_pchan4chcomb; abis_nm_reports; -- To view, visit https://gerrit.osmocom.org/1517 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9c3bc15662949654e7bba6aad5488c69ee7d0c45 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Jan 2 13:17:53 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 2 Jan 2017 13:17:53 +0000 Subject: [PATCH] libosmocore[master]: Add parsed TLV helpers from OsmoBTS In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1518 to look at the new patch set (#2). Add parsed TLV helpers from OsmoBTS Add functions to copy and merge parsed TLV structures from OsmoBTS. Change-Id: Ieaaaed19da9c069fe451faa53d24c5b84d7d5615 --- M include/osmocom/gsm/tlv.h M src/gsm/libosmogsm.map M src/gsm/tlv_parser.c 3 files changed, 64 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/18/1518/2 diff --git a/include/osmocom/gsm/tlv.h b/include/osmocom/gsm/tlv.h index cf09969..701fe68 100644 --- a/include/osmocom/gsm/tlv.h +++ b/include/osmocom/gsm/tlv.h @@ -436,6 +436,8 @@ return res; } +struct tlv_parsed *osmo_tlvp_copy(const struct tlv_parsed *tp_orig, void *ctx); +int osmo_tlvp_merge(struct tlv_parsed *dst, const struct tlv_parsed *src); int osmo_shift_v_fixed(uint8_t **data, size_t *data_len, size_t len, uint8_t **value); int osmo_match_shift_tv_fixed(uint8_t **data, size_t *data_len, diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 199d05a..b84f859 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -324,6 +324,8 @@ tvlv_att_def; vtvlv_gan_att_def; +osmo_tlvp_copy; +osmo_tlvp_merge; osmo_shift_v_fixed; osmo_match_shift_tv_fixed; osmo_shift_tlv; diff --git a/src/gsm/tlv_parser.c b/src/gsm/tlv_parser.c index e84edd9..4cc43f6 100644 --- a/src/gsm/tlv_parser.c +++ b/src/gsm/tlv_parser.c @@ -19,6 +19,7 @@ #include #include +#include #include #include @@ -43,6 +44,65 @@ return 0; } +/*! \brief Copy \ref tlv_parsed using given talloc context + * \param[in] tp_orig Parsed TLV structure + * \param[in] ctx Talloc context for allocations + * \returns NULL on errors, \ref tlv_parsed pointer otherwise + */ +struct tlv_parsed *osmo_tlvp_copy(const struct tlv_parsed *tp_orig, void *ctx) +{ + struct tlv_parsed *tp_out; + size_t i, len; + + tp_out = talloc_zero(ctx, struct tlv_parsed); + if (!tp_out) + return NULL; + + /* if the original is NULL, return empty tlvp */ + if (!tp_orig) + return tp_out; + + for (i = 0; i < ARRAY_SIZE(tp_orig->lv); i++) { + len = tp_orig->lv[i].len; + tp_out->lv[i].len = len; + if (len && tp_out->lv[i].val) { + tp_out->lv[i].val = talloc_zero_size(tp_out, len); + if (!tp_out->lv[i].val) { + talloc_free(tp_out); + return NULL; + } + memcpy((uint8_t *)tp_out->lv[i].val, tp_orig->lv[i].val, + len); + } + } + + return tp_out; +} + +/*! \brief Merge all \ref tlv_parsed attributes of 'src' into 'dst' + * \param[in] dst Parsed TLV structure to merge into + * \param[in] src Parsed TLV structure to merge from + * \returns 0 on success, negative on error + */ +int osmo_tlvp_merge(struct tlv_parsed *dst, const struct tlv_parsed *src) +{ + size_t i, len; + for (i = 0; i < ARRAY_SIZE(dst->lv); i++) { + len = src->lv[i].len; + if (len == 0 || src->lv[i].val == NULL) + continue; + if (dst->lv[i].val) { + talloc_free((uint8_t *) dst->lv[i].val); + dst->lv[i].len = 0; + } + dst->lv[i].val = talloc_zero_size(dst, len); + if (!dst->lv[i].val) + return -ENOMEM; + memcpy((uint8_t *) dst->lv[i].val, src->lv[i].val, len); + } + return 0; +} + /*! \brief Parse a single TLV encoded IE * \param[out] o_tag the tag of the IE that was found * \param[out] o_len length of the IE that was found -- To view, visit https://gerrit.osmocom.org/1518 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ieaaaed19da9c069fe451faa53d24c5b84d7d5615 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Jan 2 13:45:22 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 2 Jan 2017 13:45:22 +0000 Subject: [PATCH] libosmocore[master]: Add OML Failure Event Report support Message-ID: Review at https://gerrit.osmocom.org/1519 Add OML Failure Event Report support Add structure representing 3GPP TS 12.21 ? 8.8.2 Failure Event Report and function to pack it into msgb. Change-Id: I58c198d8ea588432c62520928b08f0b2a7035e93 Related: OS#1615 --- M include/osmocom/gsm/protocol/gsm_12_21.h M src/gsm/abis_nm.c M src/gsm/libosmogsm.map 3 files changed, 34 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/19/1519/1 diff --git a/include/osmocom/gsm/protocol/gsm_12_21.h b/include/osmocom/gsm/protocol/gsm_12_21.h index ed53dc6..1d014c8 100644 --- a/include/osmocom/gsm/protocol/gsm_12_21.h +++ b/include/osmocom/gsm/protocol/gsm_12_21.h @@ -492,6 +492,15 @@ }; #define NM_ATT_BS11_FILE_DATA NM_ATT_EVENT_TYPE +/*! \brief OML Failure Event Report (Section 8.8.2) */ +struct abis_nm_fail_evt_rep { + uint8_t type; /* Event Type (Section 9.4.16) */ + uint8_t severity; /* Perceived Severity (Section 9.4.63) */ + uint8_t cause_type; /* Probable Cause (Section 9.4.43) type */ + uint16_t cause_value; /* Probable Cause (Section 9.4.43) value */ + char *add_text; /* Additional Text (Section 9.4.3) */ +}; + /*! \brief OML Administrative State (Section 9.4.4) */ enum abis_nm_adm_state { NM_STATE_LOCKED = 0x01, diff --git a/src/gsm/abis_nm.c b/src/gsm/abis_nm.c index c085e06..015919a 100644 --- a/src/gsm/abis_nm.c +++ b/src/gsm/abis_nm.c @@ -502,6 +502,30 @@ /* FIXME: bounds check */ }; +/*! \brief Pack 3GPP TS 12.21 ? 8.8.2 Failure Event Report into msgb */ +struct msgb *abis_nm_fail_evt_rep2msgb(const struct abis_nm_fail_evt_rep fail) +{ + uint8_t cause[3]; + size_t len; + struct msgb *nmsg = msgb_alloc_headroom(1024, 128, "OML FAIL EV REP"); + if (!nmsg) + return NULL; + + msgb_tv_put(nmsg, NM_ATT_EVENT_TYPE, fail.type); + msgb_tv_put(nmsg, NM_ATT_SEVERITY, fail.severity); + + cause[0] = fail.cause_type; + osmo_store16be(fail.cause_value, cause + 1); + + msgb_tv_fixed_put(nmsg, NM_ATT_PROB_CAUSE, 3, cause); + + len = strlen(fail.add_text); + if (len) + msgb_tl16v_put(nmsg, NM_ATT_ADD_TEXT, len, fail.add_text); + + return nmsg; +} + /*! \brief Obtain OML Channel Combination for phnsical channel config */ int abis_nm_chcomb4pchan(enum gsm_phys_chan_config pchan) { diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index b84f859..11e264c 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -4,6 +4,7 @@ abis_nm_adm_state_names; abis_nm_att_settable; abis_nm_avail_name; +abis_nm_fail_evt_rep2msgb; abis_nm_chcomb4pchan; abis_nm_debugp_foh; abis_nm_event_type_name; -- To view, visit https://gerrit.osmocom.org/1519 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I58c198d8ea588432c62520928b08f0b2a7035e93 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Jan 2 13:56:17 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 2 Jan 2017 13:56:17 +0000 Subject: [PATCH] libosmocore[master]: Add cause enum for OML fail reports Message-ID: Review at https://gerrit.osmocom.org/1520 Add cause enum for OML fail reports Add 3GPP TS 12.21 ?9.4.43 Probable Cause values of type 03 (Manufacturer specific values). Max's note: renamed to make it clear that values are vendor-specific. Related: OS#1615 Change-Id: Ie9ba4b53fb19a151447aec9ea309284e20613585 --- M include/osmocom/gsm/protocol/gsm_12_21.h 1 file changed, 18 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/20/1520/1 diff --git a/include/osmocom/gsm/protocol/gsm_12_21.h b/include/osmocom/gsm/protocol/gsm_12_21.h index 1d014c8..1ab9daa 100644 --- a/include/osmocom/gsm/protocol/gsm_12_21.h +++ b/include/osmocom/gsm/protocol/gsm_12_21.h @@ -256,6 +256,24 @@ NM_MT_IPACC_SET_ATTR_NACK, }; +/*! \brief OML Probable Cause (Section 9.4.43) Manufacturer specific values */ +enum abis_mm_event_causes { + /* Critical causes */ + OSMO_EVT_CRIT_SW_FATAL = 0x0000, + OSMO_EVT_CRIT_PROC_STOP = 0x0002, + OSMO_EVT_CRIT_RTP_TOUT = 0x032c, + OSMO_EVT_CRIT_BOOT_FAIL = 0x0401, + /* Major causes */ + OMSO_EVT_MAJ_UKWN_MSG = 0x0002, + OSMO_EVT_MAJ_RSL_FAIL = 0x0309, + OSMO_EVT_MAJ_UNSUP_ATTR = 0x0318, + OSMO_EVT_MAJ_NET_CONGEST = 0x032b, + /* Minor causes */ + OSMO_EVT_MIN_PAG_TAB_FULL = 0x0401, + /* Warning causes */ + OSMO_EVT_WARN_SW_WARN = 0x0001, +}; + enum abis_nm_bs11_cell_alloc { NM_BS11_CANR_GSM = 0x00, NM_BS11_CANR_DCS1800 = 0x01, -- To view, visit https://gerrit.osmocom.org/1520 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie9ba4b53fb19a151447aec9ea309284e20613585 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Minh-Quang Nguyen From gerrit-no-reply at lists.osmocom.org Mon Jan 2 13:57:06 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 2 Jan 2017 13:57:06 +0000 Subject: [PATCH] libosmocore[master]: Add cause enum for OML fail reports In-Reply-To: References: Message-ID: Add cause enum for OML fail reports Add 3GPP TS 12.21 ?9.4.43 Probable Cause values of type 03 (Manufacturer specific values). Max's note: renamed to make it clear that values are vendor-specific. Related: OS#1615 Change-Id: Ie9ba4b53fb19a151447aec9ea309284e20613585 --- M include/osmocom/gsm/protocol/gsm_12_21.h 1 file changed, 18 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/20/1520/2 diff --git a/include/osmocom/gsm/protocol/gsm_12_21.h b/include/osmocom/gsm/protocol/gsm_12_21.h index 1d014c8..07b5527 100644 --- a/include/osmocom/gsm/protocol/gsm_12_21.h +++ b/include/osmocom/gsm/protocol/gsm_12_21.h @@ -256,6 +256,24 @@ NM_MT_IPACC_SET_ATTR_NACK, }; +/*! \brief OML Probable Cause (Section 9.4.43) Manufacturer specific values */ +enum abis_mm_event_causes { + /* Critical causes */ + OSMO_EVT_CRIT_SW_FATAL = 0x0000, + OSMO_EVT_CRIT_PROC_STOP = 0x0002, + OSMO_EVT_CRIT_RTP_TOUT = 0x032c, + OSMO_EVT_CRIT_BOOT_FAIL = 0x0401, + /* Major causes */ + OSMO_EVT_MAJ_UKWN_MSG = 0x0002, + OSMO_EVT_MAJ_RSL_FAIL = 0x0309, + OSMO_EVT_MAJ_UNSUP_ATTR = 0x0318, + OSMO_EVT_MAJ_NET_CONGEST = 0x032b, + /* Minor causes */ + OSMO_EVT_MIN_PAG_TAB_FULL = 0x0401, + /* Warning causes */ + OSMO_EVT_WARN_SW_WARN = 0x0001, +}; + enum abis_nm_bs11_cell_alloc { NM_BS11_CANR_GSM = 0x00, NM_BS11_CANR_DCS1800 = 0x01, -- To view, visit https://gerrit.osmocom.org/1520 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie9ba4b53fb19a151447aec9ea309284e20613585 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Minh-Quang Nguyen From gerrit-no-reply at lists.osmocom.org Mon Jan 2 17:33:10 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 2 Jan 2017 17:33:10 +0000 Subject: [PATCH] osmo-bts[master]: Remove code duplication Message-ID: Review at https://gerrit.osmocom.org/1521 Remove code duplication Use functions and definitions from libosmocore. Requires libosmocore with I9c3bc15662949654e7bba6aad5488c69ee7d0c45 and Ieaaaed19da9c069fe451faa53d24c5b84d7d5615 commits. Change-Id: Ia4980062ea88ffe9019b201f84e92e006ae3c2e3 --- M src/common/oml.c 1 file changed, 7 insertions(+), 128 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/21/1521/1 diff --git a/src/common/oml.c b/src/common/oml.c index c4f3d7e..0700aa2 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -42,110 +42,11 @@ #include #include -/* FIXME: move this to libosmocore */ -static struct tlv_definition abis_nm_att_tlvdef_ipa = { - .def = { - /* ip.access specifics */ - [NM_ATT_IPACC_DST_IP] = { TLV_TYPE_FIXED, 4 }, - [NM_ATT_IPACC_DST_IP_PORT] = { TLV_TYPE_FIXED, 2 }, - [NM_ATT_IPACC_STREAM_ID] = { TLV_TYPE_TV, }, - [NM_ATT_IPACC_SEC_OML_CFG] = { TLV_TYPE_FIXED, 6 }, - [NM_ATT_IPACC_IP_IF_CFG] = { TLV_TYPE_FIXED, 8 }, - [NM_ATT_IPACC_IP_GW_CFG] = { TLV_TYPE_FIXED, 12 }, - [NM_ATT_IPACC_IN_SERV_TIME] = { TLV_TYPE_FIXED, 4 }, - [NM_ATT_IPACC_LOCATION] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_PAGING_CFG] = { TLV_TYPE_FIXED, 2 }, - [NM_ATT_IPACC_UNIT_ID] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_UNIT_NAME] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_SNMP_CFG] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_PRIM_OML_CFG_LIST] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_NV_FLAGS] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_FREQ_CTRL] = { TLV_TYPE_FIXED, 2 }, - [NM_ATT_IPACC_PRIM_OML_FB_TOUT] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_CUR_SW_CFG] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_TIMING_BUS] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_CGI] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_RAC] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_OBJ_VERSION] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_GPRS_PAGING_CFG]= { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_NSEI] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_BVCI] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_NSVCI] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_NS_CFG] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_BSSGP_CFG] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_NS_LINK_CFG] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_RLC_CFG] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_ALM_THRESH_LIST]= { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_MONIT_VAL_LIST] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_TIB_CONTROL] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_SUPP_FEATURES] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_CODING_SCHEMES] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_RLC_CFG_2] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_HEARTB_TOUT] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_UPTIME] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_RLC_CFG_3] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_SSL_CFG] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_SEC_POSSIBLE] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_IML_SSL_STATE] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_REVOC_DATE] = { TLV_TYPE_TL16V }, - }, -}; - static int oml_ipa_set_attr(struct gsm_bts *bts, struct msgb *msg); /* * support */ - -struct tlv_parsed *tlvp_copy(const struct tlv_parsed *tp_orig, void *ctx) -{ - struct tlv_parsed *tp_out; - unsigned int i; - - tp_out = talloc_zero(ctx, struct tlv_parsed); - if (!tp_out) - return NULL; - - /* if the original is NULL, return empty tlvp */ - if (!tp_orig) - return tp_out; - - for (i = 0; i < ARRAY_SIZE(tp_orig->lv); i++) { - unsigned int len = tp_orig->lv[i].len; - tp_out->lv[i].len = len; - if (len && tp_out->lv[i].val) { - tp_out->lv[i].val = talloc_zero_size(tp_out, len); - if (!tp_out->lv[i].val) { - talloc_free(tp_out); - return NULL; - } - memcpy((uint8_t *)tp_out->lv[i].val, tp_orig->lv[i].val, len); - } - } - - return tp_out; -} - -/* merge all attributes of 'new' into 'out' */ -int tlvp_merge(struct tlv_parsed *out, const struct tlv_parsed *new) -{ - unsigned int i; - - for (i = 0; i < ARRAY_SIZE(out->lv); i++) { - unsigned int len = new->lv[i].len; - if (len == 0 || new->lv[i].val == NULL) - continue; - if (out->lv[i].val) { - talloc_free((uint8_t *) out->lv[i].val); - out->lv[i].len = 0; - } - out->lv[i].val = talloc_zero_size(out, len); - if (!out->lv[i].val) - return -ENOMEM; - memcpy((uint8_t *) out->lv[i].val, new->lv[i].val, len); - } - return 0; -} static int oml_tlv_parse(struct tlv_parsed *tp, const uint8_t *buf, int len) { @@ -369,28 +270,6 @@ return oml_mo_send_msg(mo, nmsg, NM_MT_SW_ACTIVATED_REP); } -/* TS 12.21 9.4.53 */ -enum abis_nm_t200_idx { - T200_SDCCH = 0, - T200_FACCH_F = 1, - T200_FACCH_H = 2, - T200_SACCH_TCH_SAPI0 = 3, - T200_SACCH_SDCCH = 4, - T200_SDCCH_SAPI3 = 5, - T200_SACCH_TCH_SAPI3 = 6 -}; - -/* TS 12.21 9.4.53 */ -static const uint8_t abis_nm_t200_mult[] = { - [T200_SDCCH] = 5, - [T200_FACCH_F] = 5, - [T200_FACCH_H] = 5, - [T200_SACCH_TCH_SAPI0] = 10, - [T200_SACCH_SDCCH] = 10, - [T200_SDCCH_SAPI3] = 5, - [T200_SACCH_TCH_SAPI3] = 10 -}; - /* the below defaults correpsond to the libocmocore default of 1s for * DCCH and 2s for ACCH. The BSC should overried this via OML anyway. */ const unsigned int oml_default_t200_ms[7] = { @@ -483,8 +362,8 @@ } /* merge existing BTS attributes with new attributes */ - tp_merged = tlvp_copy(bts->mo.nm_attr, bts); - tlvp_merge(tp_merged, &tp); + tp_merged = osmo_tlvp_copy(bts->mo.nm_attr, bts); + osmo_tlvp_merge(tp_merged, &tp); /* Ask BTS driver to validate new merged attributes */ rc = bts_model_check_oml(bts, foh->msg_type, bts->mo.nm_attr, tp_merged, bts); @@ -531,7 +410,7 @@ if (TLVP_PRESENT(&tp, NM_ATT_T200)) { payload = TLVP_VAL(&tp, NM_ATT_T200); for (i = 0; i < ARRAY_SIZE(btsb->t200_ms); i++) { - uint32_t t200_ms = payload[i] * abis_nm_t200_mult[i]; + uint32_t t200_ms = payload[i] * abis_nm_t200_ms[i]; #if 0 btsb->t200_ms[i] = t200_ms; DEBUGP(DOML, "T200[%u]: OML=%u, mult=%u => %u ms\n", @@ -619,8 +498,8 @@ return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); /* merge existing BTS attributes with new attributes */ - tp_merged = tlvp_copy(trx->mo.nm_attr, trx->bts); - tlvp_merge(tp_merged, &tp); + tp_merged = osmo_tlvp_copy(trx->mo.nm_attr, trx->bts); + osmo_tlvp_merge(tp_merged, &tp); /* Ask BTS driver to validate new merged attributes */ rc = bts_model_check_oml(trx->bts, foh->msg_type, trx->mo.nm_attr, tp_merged, trx); @@ -794,8 +673,8 @@ } /* merge existing BTS attributes with new attributes */ - tp_merged = tlvp_copy(ts->mo.nm_attr, bts); - tlvp_merge(tp_merged, &tp); + tp_merged = osmo_tlvp_copy(ts->mo.nm_attr, bts); + osmo_tlvp_merge(tp_merged, &tp); /* Call into BTS driver to check attribute values */ rc = bts_model_check_oml(bts, foh->msg_type, ts->mo.nm_attr, tp_merged, ts); -- To view, visit https://gerrit.osmocom.org/1521 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia4980062ea88ffe9019b201f84e92e006ae3c2e3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Jan 2 17:33:11 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 2 Jan 2017 17:33:11 +0000 Subject: [PATCH] osmo-bts[master]: Add Abis OML failure event reporting Message-ID: Review at https://gerrit.osmocom.org/1522 Add Abis OML failure event reporting Send 3GPP TS 12.21 ? 8.8.2 Abis/OML failure event report. Max's note: used libosmocore functions, minor restructuring. Change-Id: Ib1170edca2207752984a554d7a6a57c224f6d5f5 Related: OS#1615 --- M include/osmo-bts/oml.h M src/common/main.c M src/common/oml.c 3 files changed, 44 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/22/1522/1 diff --git a/include/osmo-bts/oml.h b/include/osmo-bts/oml.h index 9f49444..510b0ea 100644 --- a/include/osmo-bts/oml.h +++ b/include/osmo-bts/oml.h @@ -1,6 +1,8 @@ #ifndef _OML_H #define _OML_H +#include + struct gsm_bts; struct gsm_abis_mo; struct msgb; @@ -42,4 +44,8 @@ int oml_set_lchan_t200(struct gsm_lchan *lchan); extern const unsigned int oml_default_t200_ms[7]; +/* Transmit failure event report */ +int oml_tx_failure_event_rep(struct gsm_abis_mo *mo, + struct abis_nm_fail_evt_rep failure_evt_rep); + #endif // _OML_H */ diff --git a/src/common/main.c b/src/common/main.c index 1b2549e..977f63a 100644 --- a/src/common/main.c +++ b/src/common/main.c @@ -50,6 +50,7 @@ #include #include #include +#include int quit = 0; static const char *config_file = "osmo-bts.cfg"; @@ -176,18 +177,35 @@ static void signal_handler(int signal) { + char log_msg[100]; + struct abis_nm_fail_evt_rep failure_rep; + failure_rep.type = NM_EVT_PROC_FAIL; + failure_rep.severity = NM_SEVER_CRITICAL; + failure_rep.cause_type = NM_PCAUSE_T_MANUF; + failure_rep.cause_value = OSMO_EVT_CRIT_PROC_STOP; + fprintf(stderr, "signal %u received\n", signal); switch (signal) { case SIGINT: //osmo_signal_dispatch(SS_GLOBAL, S_GLOBAL_SHUTDOWN, NULL); - if (!quit) + if (!quit) { + snprintf(log_msg, 100, "BTS: SIGINT received -> shutdown\n"); + failure_rep.add_text = (char *)&log_msg; + oml_tx_failure_event_rep(&bts->mo, failure_rep); + bts_shutdown(bts, "SIGINT"); + } quit++; break; case SIGABRT: case SIGUSR1: case SIGUSR2: + snprintf(log_msg, 100, "BTS: signal %s received\n", + strsignal(signal)); + failure_rep.add_text = (char *)&log_msg; + oml_tx_failure_event_rep(&bts->mo, failure_rep); + talloc_report_full(tall_bts_ctx, stderr); break; default: diff --git a/src/common/oml.c b/src/common/oml.c index 0700aa2..42a70ac 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -1140,6 +1140,25 @@ return ret; } +/* 3GPP TS 12.21 ? 8.8.2 */ +int oml_tx_failure_event_rep(struct gsm_abis_mo *mo, + struct abis_nm_fail_evt_rep failure_evt_rep) +{ + size_t len = strlen(failure_evt_rep.add_text); + struct msgb *nmsg = abis_nm_fail_evt_rep2msgb(failure_evt_rep); + if (!nmsg) + return -ENOMEM; + + LOGP(DOML, LOGL_INFO, "%s Tx FAILure EVT REP\n", gsm_abis_mo_name(mo)); + + if (len) + LOGP(DOML, LOGL_DEBUG, "%s Tx FAILure EVT REP Additional Text =" + " %s (%zu)\n", gsm_abis_mo_name(mo), + failure_evt_rep.add_text, len); + + return oml_mo_send_msg(mo, nmsg, NM_MT_FAILURE_EVENT_REP); +} + int oml_init(void) { DEBUGP(DOML, "Initializing OML attribute definitions\n"); -- To view, visit https://gerrit.osmocom.org/1522 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib1170edca2207752984a554d7a6a57c224f6d5f5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Minh-Quang Nguyen From gerrit-no-reply at lists.osmocom.org Mon Jan 2 18:07:20 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 2 Jan 2017 18:07:20 +0000 Subject: [PATCH] libosmocore[master]: Add event cause string descriptions Message-ID: Review at https://gerrit.osmocom.org/1523 Add event cause string descriptions Add human-readable descriptions to event causes from 3GPP TS 12.21 ? 9.4.43. Change-Id: Id173c978616c98b7831fbafb5401064257f1cf73 Related: OS#1615 --- M include/osmocom/gsm/protocol/gsm_12_21.h M src/gsm/abis_nm.c M src/gsm/libosmogsm.map 3 files changed, 18 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/23/1523/1 diff --git a/include/osmocom/gsm/protocol/gsm_12_21.h b/include/osmocom/gsm/protocol/gsm_12_21.h index 07b5527..6e4d0a7 100644 --- a/include/osmocom/gsm/protocol/gsm_12_21.h +++ b/include/osmocom/gsm/protocol/gsm_12_21.h @@ -274,6 +274,8 @@ OSMO_EVT_WARN_SW_WARN = 0x0001, }; +extern const struct value_string abis_mm_event_cause_names[]; + enum abis_nm_bs11_cell_alloc { NM_BS11_CANR_GSM = 0x00, NM_BS11_CANR_DCS1800 = 0x01, diff --git a/src/gsm/abis_nm.c b/src/gsm/abis_nm.c index 015919a..1174550 100644 --- a/src/gsm/abis_nm.c +++ b/src/gsm/abis_nm.c @@ -149,6 +149,21 @@ return get_value_string(nack_names, nack); } +/* Section 9.4.43: Manufacturer specific values */ +const struct value_string abis_mm_event_cause_names[] = { + { OSMO_EVT_CRIT_SW_FATAL, "Fatal software error" }, + { OSMO_EVT_CRIT_PROC_STOP, "Process stopped" }, + { OSMO_EVT_CRIT_RTP_TOUT, "RTP error" }, + { OSMO_EVT_CRIT_BOOT_FAIL, "Boot failure" }, + { OSMO_EVT_MAJ_UKWN_MSG, "Unknown message" }, + { OSMO_EVT_MAJ_RSL_FAIL, "RSL failure" }, + { OSMO_EVT_MAJ_UNSUP_ATTR, "Unsupported attribute" }, + { OSMO_EVT_MAJ_NET_CONGEST, "Network congestion" }, + { OSMO_EVT_MIN_PAG_TAB_FULL, "Paging table full" }, + { OSMO_EVT_WARN_SW_WARN, "Software warning" }, + { 0, NULL } +}; + /* Chapter 9.4.36 */ static const struct value_string nack_cause_names[] = { /* General Nack Causes */ diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 11e264c..33176a4 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -26,6 +26,7 @@ abis_nm_test_name; abis_nm_osmo_magic; abis_nm_ipa_magic; +abis_nm_event_cause_names; osmo_sitype_strs; osmo_c4; -- To view, visit https://gerrit.osmocom.org/1523 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id173c978616c98b7831fbafb5401064257f1cf73 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Jan 2 18:56:26 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 2 Jan 2017 18:56:26 +0000 Subject: [PATCH] libosmocore[master]: Add OML Failure Event Report support In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1519 to look at the new patch set (#2). Add OML Failure Event Report support Add 3GPP TS 12.21 ? 8.8.2 Failure Event Report function which pack given vararg string and parameters into msgb. Change-Id: I58c198d8ea588432c62520928b08f0b2a7035e93 Related: OS#1615 --- M include/osmocom/gsm/protocol/gsm_12_21.h M src/gsm/abis_nm.c M src/gsm/libosmogsm.map 3 files changed, 46 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/19/1519/2 diff --git a/include/osmocom/gsm/protocol/gsm_12_21.h b/include/osmocom/gsm/protocol/gsm_12_21.h index 6a37392..deca2df 100644 --- a/include/osmocom/gsm/protocol/gsm_12_21.h +++ b/include/osmocom/gsm/protocol/gsm_12_21.h @@ -45,6 +45,9 @@ uint8_t data[0]; } __attribute__ ((packed)); +#define ABIS_NM_MSG_SIZE 1024 +#define ABIS_NM_MSG_HEADROOM 128 + /*! \brief Message Discriminator for Formatted Object Messages */ #define ABIS_OM_MDISC_FOM 0x80 /*! \brief Message Discriminator for Man Machine Interface */ @@ -781,4 +784,8 @@ IPAC_BINF_CELL_ALLOC = (1 << 2), }; +struct msgb *abis_nm_fail_evt_rep(enum abis_nm_event_type t, + enum abis_nm_severity s, + enum abis_nm_pcause_type ct, + uint16_t cause_value, const char *fmt, ...); /*! @} */ diff --git a/src/gsm/abis_nm.c b/src/gsm/abis_nm.c index 87d05ab..7da3bc2 100644 --- a/src/gsm/abis_nm.c +++ b/src/gsm/abis_nm.c @@ -517,6 +517,44 @@ /* FIXME: bounds check */ }; +/*! \brief Pack 3GPP TS 12.21 ? 8.8.2 Failure Event Report into msgb */ +struct msgb *abis_nm_fail_evt_rep(enum abis_nm_event_type t, + enum abis_nm_severity s, + enum abis_nm_pcause_type ct, + uint16_t cause_value, const char *fmt, ...) +{ + uint8_t cause[3]; + int len; + va_list ap; + char add_text[ABIS_NM_MSG_HEADROOM]; + struct msgb *nmsg = msgb_alloc_headroom(ABIS_NM_MSG_SIZE, + ABIS_NM_MSG_HEADROOM, + "OML FAIL EV. REP."); + if (!nmsg) + return NULL; + + msgb_tv_put(nmsg, NM_ATT_EVENT_TYPE, t); + msgb_tv_put(nmsg, NM_ATT_SEVERITY, s); + + cause[0] = ct; + osmo_store16be(cause_value, cause + 1); + + msgb_tv_fixed_put(nmsg, NM_ATT_PROB_CAUSE, 3, cause); + + va_start(ap, fmt); + len = vsnprintf(add_text, ABIS_NM_MSG_HEADROOM, fmt, ap); + va_end(ap); + + if (len < 0) { + msgb_free(nmsg); + return NULL; + } + + msgb_tl16v_put(nmsg, NM_ATT_ADD_TEXT, len, add_text); + + return nmsg; +} + /*! \brief Obtain OML Channel Combination for phnsical channel config */ int abis_nm_chcomb4pchan(enum gsm_phys_chan_config pchan) { diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index c876d2b..0c37d1c 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -4,6 +4,7 @@ abis_nm_adm_state_names; abis_nm_att_settable; abis_nm_avail_name; +abis_nm_fail_evt_rep; abis_nm_chcomb4pchan; abis_nm_debugp_foh; abis_nm_event_type_name; -- To view, visit https://gerrit.osmocom.org/1519 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I58c198d8ea588432c62520928b08f0b2a7035e93 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Jan 2 19:26:32 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 2 Jan 2017 19:26:32 +0000 Subject: [PATCH] osmo-bts[master]: Add Abis OML failure event reporting In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1522 to look at the new patch set (#2). Add Abis OML failure event reporting Send 3GPP TS 12.21 ? 8.8.2 Abis/OML failure event report. Change-Id: Ib1170edca2207752984a554d7a6a57c224f6d5f5 Related: OS#1615 --- M include/osmo-bts/oml.h M src/common/main.c M src/common/oml.c 3 files changed, 35 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/22/1522/2 diff --git a/include/osmo-bts/oml.h b/include/osmo-bts/oml.h index 9f49444..217ec64 100644 --- a/include/osmo-bts/oml.h +++ b/include/osmo-bts/oml.h @@ -1,6 +1,8 @@ #ifndef _OML_H #define _OML_H +#include + struct gsm_bts; struct gsm_abis_mo; struct msgb; @@ -42,4 +44,8 @@ int oml_set_lchan_t200(struct gsm_lchan *lchan); extern const unsigned int oml_default_t200_ms[7]; +/* Transmit failure event report */ +int oml_tx_failure_event_rep(struct gsm_abis_mo *mo, uint16_t cause_value, + const char *fmt, ...); + #endif // _OML_H */ diff --git a/src/common/main.c b/src/common/main.c index 1b2549e..f99f196 100644 --- a/src/common/main.c +++ b/src/common/main.c @@ -50,6 +50,7 @@ #include #include #include +#include int quit = 0; static const char *config_file = "osmo-bts.cfg"; @@ -181,13 +182,21 @@ switch (signal) { case SIGINT: //osmo_signal_dispatch(SS_GLOBAL, S_GLOBAL_SHUTDOWN, NULL); - if (!quit) + if (!quit) { + oml_tx_failure_event_rep(&bts->mo, + OSMO_EVT_CRIT_PROC_STOP, + "BTS: SIGINT received -> " + "shutdown\n"); bts_shutdown(bts, "SIGINT"); + } quit++; break; case SIGABRT: case SIGUSR1: case SIGUSR2: + oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_CRIT_PROC_STOP, + "BTS: signal %s received\n", + strsignal(signal)); talloc_report_full(tall_bts_ctx, stderr); break; default: diff --git a/src/common/oml.c b/src/common/oml.c index 0700aa2..870ef3c 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -1140,6 +1140,25 @@ return ret; } +/* 3GPP TS 12.21 ? 8.8.2 */ +int oml_tx_failure_event_rep(struct gsm_abis_mo *mo, uint16_t cause_value, + const char *fmt, ...) +{ + struct msgb *nmsg; + va_list ap; + + va_start(ap, fmt); + nmsg = abis_nm_fail_evt_rep(NM_EVT_PROC_FAIL, NM_SEVER_CRITICAL, + NM_PCAUSE_T_MANUF, cause_value, fmt, ap); + LOGP(DOML, LOGL_INFO, fmt, ap); + va_end(ap); + + if (!nmsg) + return -ENOMEM; + + return oml_mo_send_msg(mo, nmsg, NM_MT_FAILURE_EVENT_REP); +} + int oml_init(void) { DEBUGP(DOML, "Initializing OML attribute definitions\n"); -- To view, visit https://gerrit.osmocom.org/1522 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib1170edca2207752984a554d7a6a57c224f6d5f5 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Minh-Quang Nguyen From gerrit-no-reply at lists.osmocom.org Mon Jan 2 19:40:31 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 2 Jan 2017 19:40:31 +0000 Subject: [PATCH] libosmocore[master]: Add OML Failure Event Report support In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1519 to look at the new patch set (#3). Add OML Failure Event Report support Add 3GPP TS 12.21 ? 8.8.2 Failure Event Report function which pack given vararg string and parameters into msgb. Change-Id: I58c198d8ea588432c62520928b08f0b2a7035e93 Related: OS#1615 --- M include/osmocom/gsm/protocol/gsm_12_21.h M src/gsm/abis_nm.c M src/gsm/libosmogsm.map 3 files changed, 46 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/19/1519/3 diff --git a/include/osmocom/gsm/protocol/gsm_12_21.h b/include/osmocom/gsm/protocol/gsm_12_21.h index 6a37392..deca2df 100644 --- a/include/osmocom/gsm/protocol/gsm_12_21.h +++ b/include/osmocom/gsm/protocol/gsm_12_21.h @@ -45,6 +45,9 @@ uint8_t data[0]; } __attribute__ ((packed)); +#define ABIS_NM_MSG_SIZE 1024 +#define ABIS_NM_MSG_HEADROOM 128 + /*! \brief Message Discriminator for Formatted Object Messages */ #define ABIS_OM_MDISC_FOM 0x80 /*! \brief Message Discriminator for Man Machine Interface */ @@ -781,4 +784,8 @@ IPAC_BINF_CELL_ALLOC = (1 << 2), }; +struct msgb *abis_nm_fail_evt_rep(enum abis_nm_event_type t, + enum abis_nm_severity s, + enum abis_nm_pcause_type ct, + uint16_t cause_value, const char *fmt, ...); /*! @} */ diff --git a/src/gsm/abis_nm.c b/src/gsm/abis_nm.c index 87d05ab..2de4941 100644 --- a/src/gsm/abis_nm.c +++ b/src/gsm/abis_nm.c @@ -517,6 +517,44 @@ /* FIXME: bounds check */ }; +/*! \brief Pack 3GPP TS 12.21 ? 8.8.2 Failure Event Report into msgb */ +struct msgb *abis_nm_fail_evt_rep(enum abis_nm_event_type t, + enum abis_nm_severity s, + enum abis_nm_pcause_type ct, + uint16_t cause_value, const char *fmt, ...) +{ + uint8_t cause[3]; + int len; + va_list ap; + char add_text[ABIS_NM_MSG_HEADROOM]; + struct msgb *nmsg = msgb_alloc_headroom(ABIS_NM_MSG_SIZE, + ABIS_NM_MSG_HEADROOM, + "OML FAIL EV. REP."); + if (!nmsg) + return NULL; + + msgb_tv_put(nmsg, NM_ATT_EVENT_TYPE, t); + msgb_tv_put(nmsg, NM_ATT_SEVERITY, s); + + cause[0] = ct; + osmo_store16be(cause_value, cause + 1); + + msgb_tv_fixed_put(nmsg, NM_ATT_PROB_CAUSE, 3, cause); + + va_start(ap, fmt); + len = vsnprintf(add_text, ABIS_NM_MSG_HEADROOM, fmt, ap); + va_end(ap); + + if (len < 0) { + msgb_free(nmsg); + return NULL; + } + if (len) + msgb_tl16v_put(nmsg, NM_ATT_ADD_TEXT, len, add_text); + + return nmsg; +} + /*! \brief Obtain OML Channel Combination for phnsical channel config */ int abis_nm_chcomb4pchan(enum gsm_phys_chan_config pchan) { diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index c876d2b..0c37d1c 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -4,6 +4,7 @@ abis_nm_adm_state_names; abis_nm_att_settable; abis_nm_avail_name; +abis_nm_fail_evt_rep; abis_nm_chcomb4pchan; abis_nm_debugp_foh; abis_nm_event_type_name; -- To view, visit https://gerrit.osmocom.org/1519 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I58c198d8ea588432c62520928b08f0b2a7035e93 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Jan 2 20:45:11 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 2 Jan 2017 20:45:11 +0000 Subject: [PATCH] osmo-bts[master]: Remove code duplication In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1521 to look at the new patch set (#2). Remove code duplication Use functions and definitions from libosmocore. Requires libosmocore with commits with I9c3bc15662949654e7bba6aad5488c69ee7d0c45 and Ieaaaed19da9c069fe451faa53d24c5b84d7d5615 IDs. Change-Id: Ia4980062ea88ffe9019b201f84e92e006ae3c2e3 --- M src/common/oml.c 1 file changed, 7 insertions(+), 128 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/21/1521/2 diff --git a/src/common/oml.c b/src/common/oml.c index c4f3d7e..0700aa2 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -42,110 +42,11 @@ #include #include -/* FIXME: move this to libosmocore */ -static struct tlv_definition abis_nm_att_tlvdef_ipa = { - .def = { - /* ip.access specifics */ - [NM_ATT_IPACC_DST_IP] = { TLV_TYPE_FIXED, 4 }, - [NM_ATT_IPACC_DST_IP_PORT] = { TLV_TYPE_FIXED, 2 }, - [NM_ATT_IPACC_STREAM_ID] = { TLV_TYPE_TV, }, - [NM_ATT_IPACC_SEC_OML_CFG] = { TLV_TYPE_FIXED, 6 }, - [NM_ATT_IPACC_IP_IF_CFG] = { TLV_TYPE_FIXED, 8 }, - [NM_ATT_IPACC_IP_GW_CFG] = { TLV_TYPE_FIXED, 12 }, - [NM_ATT_IPACC_IN_SERV_TIME] = { TLV_TYPE_FIXED, 4 }, - [NM_ATT_IPACC_LOCATION] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_PAGING_CFG] = { TLV_TYPE_FIXED, 2 }, - [NM_ATT_IPACC_UNIT_ID] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_UNIT_NAME] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_SNMP_CFG] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_PRIM_OML_CFG_LIST] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_NV_FLAGS] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_FREQ_CTRL] = { TLV_TYPE_FIXED, 2 }, - [NM_ATT_IPACC_PRIM_OML_FB_TOUT] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_CUR_SW_CFG] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_TIMING_BUS] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_CGI] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_RAC] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_OBJ_VERSION] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_GPRS_PAGING_CFG]= { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_NSEI] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_BVCI] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_NSVCI] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_NS_CFG] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_BSSGP_CFG] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_NS_LINK_CFG] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_RLC_CFG] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_ALM_THRESH_LIST]= { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_MONIT_VAL_LIST] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_TIB_CONTROL] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_SUPP_FEATURES] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_CODING_SCHEMES] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_RLC_CFG_2] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_HEARTB_TOUT] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_UPTIME] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_RLC_CFG_3] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_SSL_CFG] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_SEC_POSSIBLE] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_IML_SSL_STATE] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_REVOC_DATE] = { TLV_TYPE_TL16V }, - }, -}; - static int oml_ipa_set_attr(struct gsm_bts *bts, struct msgb *msg); /* * support */ - -struct tlv_parsed *tlvp_copy(const struct tlv_parsed *tp_orig, void *ctx) -{ - struct tlv_parsed *tp_out; - unsigned int i; - - tp_out = talloc_zero(ctx, struct tlv_parsed); - if (!tp_out) - return NULL; - - /* if the original is NULL, return empty tlvp */ - if (!tp_orig) - return tp_out; - - for (i = 0; i < ARRAY_SIZE(tp_orig->lv); i++) { - unsigned int len = tp_orig->lv[i].len; - tp_out->lv[i].len = len; - if (len && tp_out->lv[i].val) { - tp_out->lv[i].val = talloc_zero_size(tp_out, len); - if (!tp_out->lv[i].val) { - talloc_free(tp_out); - return NULL; - } - memcpy((uint8_t *)tp_out->lv[i].val, tp_orig->lv[i].val, len); - } - } - - return tp_out; -} - -/* merge all attributes of 'new' into 'out' */ -int tlvp_merge(struct tlv_parsed *out, const struct tlv_parsed *new) -{ - unsigned int i; - - for (i = 0; i < ARRAY_SIZE(out->lv); i++) { - unsigned int len = new->lv[i].len; - if (len == 0 || new->lv[i].val == NULL) - continue; - if (out->lv[i].val) { - talloc_free((uint8_t *) out->lv[i].val); - out->lv[i].len = 0; - } - out->lv[i].val = talloc_zero_size(out, len); - if (!out->lv[i].val) - return -ENOMEM; - memcpy((uint8_t *) out->lv[i].val, new->lv[i].val, len); - } - return 0; -} static int oml_tlv_parse(struct tlv_parsed *tp, const uint8_t *buf, int len) { @@ -369,28 +270,6 @@ return oml_mo_send_msg(mo, nmsg, NM_MT_SW_ACTIVATED_REP); } -/* TS 12.21 9.4.53 */ -enum abis_nm_t200_idx { - T200_SDCCH = 0, - T200_FACCH_F = 1, - T200_FACCH_H = 2, - T200_SACCH_TCH_SAPI0 = 3, - T200_SACCH_SDCCH = 4, - T200_SDCCH_SAPI3 = 5, - T200_SACCH_TCH_SAPI3 = 6 -}; - -/* TS 12.21 9.4.53 */ -static const uint8_t abis_nm_t200_mult[] = { - [T200_SDCCH] = 5, - [T200_FACCH_F] = 5, - [T200_FACCH_H] = 5, - [T200_SACCH_TCH_SAPI0] = 10, - [T200_SACCH_SDCCH] = 10, - [T200_SDCCH_SAPI3] = 5, - [T200_SACCH_TCH_SAPI3] = 10 -}; - /* the below defaults correpsond to the libocmocore default of 1s for * DCCH and 2s for ACCH. The BSC should overried this via OML anyway. */ const unsigned int oml_default_t200_ms[7] = { @@ -483,8 +362,8 @@ } /* merge existing BTS attributes with new attributes */ - tp_merged = tlvp_copy(bts->mo.nm_attr, bts); - tlvp_merge(tp_merged, &tp); + tp_merged = osmo_tlvp_copy(bts->mo.nm_attr, bts); + osmo_tlvp_merge(tp_merged, &tp); /* Ask BTS driver to validate new merged attributes */ rc = bts_model_check_oml(bts, foh->msg_type, bts->mo.nm_attr, tp_merged, bts); @@ -531,7 +410,7 @@ if (TLVP_PRESENT(&tp, NM_ATT_T200)) { payload = TLVP_VAL(&tp, NM_ATT_T200); for (i = 0; i < ARRAY_SIZE(btsb->t200_ms); i++) { - uint32_t t200_ms = payload[i] * abis_nm_t200_mult[i]; + uint32_t t200_ms = payload[i] * abis_nm_t200_ms[i]; #if 0 btsb->t200_ms[i] = t200_ms; DEBUGP(DOML, "T200[%u]: OML=%u, mult=%u => %u ms\n", @@ -619,8 +498,8 @@ return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); /* merge existing BTS attributes with new attributes */ - tp_merged = tlvp_copy(trx->mo.nm_attr, trx->bts); - tlvp_merge(tp_merged, &tp); + tp_merged = osmo_tlvp_copy(trx->mo.nm_attr, trx->bts); + osmo_tlvp_merge(tp_merged, &tp); /* Ask BTS driver to validate new merged attributes */ rc = bts_model_check_oml(trx->bts, foh->msg_type, trx->mo.nm_attr, tp_merged, trx); @@ -794,8 +673,8 @@ } /* merge existing BTS attributes with new attributes */ - tp_merged = tlvp_copy(ts->mo.nm_attr, bts); - tlvp_merge(tp_merged, &tp); + tp_merged = osmo_tlvp_copy(ts->mo.nm_attr, bts); + osmo_tlvp_merge(tp_merged, &tp); /* Call into BTS driver to check attribute values */ rc = bts_model_check_oml(bts, foh->msg_type, ts->mo.nm_attr, tp_merged, ts); -- To view, visit https://gerrit.osmocom.org/1521 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia4980062ea88ffe9019b201f84e92e006ae3c2e3 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Jan 2 20:45:11 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 2 Jan 2017 20:45:11 +0000 Subject: [PATCH] osmo-bts[master]: Add Abis OML failure event reporting In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1522 to look at the new patch set (#3). Add Abis OML failure event reporting Send 3GPP TS 12.21 ? 8.8.2 Abis/OML failure event report. Change-Id: Ib1170edca2207752984a554d7a6a57c224f6d5f5 Related: OS#1615 --- M include/osmo-bts/oml.h M src/common/main.c M src/common/oml.c 3 files changed, 35 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/22/1522/3 diff --git a/include/osmo-bts/oml.h b/include/osmo-bts/oml.h index 9f49444..217ec64 100644 --- a/include/osmo-bts/oml.h +++ b/include/osmo-bts/oml.h @@ -1,6 +1,8 @@ #ifndef _OML_H #define _OML_H +#include + struct gsm_bts; struct gsm_abis_mo; struct msgb; @@ -42,4 +44,8 @@ int oml_set_lchan_t200(struct gsm_lchan *lchan); extern const unsigned int oml_default_t200_ms[7]; +/* Transmit failure event report */ +int oml_tx_failure_event_rep(struct gsm_abis_mo *mo, uint16_t cause_value, + const char *fmt, ...); + #endif // _OML_H */ diff --git a/src/common/main.c b/src/common/main.c index 1b2549e..f99f196 100644 --- a/src/common/main.c +++ b/src/common/main.c @@ -50,6 +50,7 @@ #include #include #include +#include int quit = 0; static const char *config_file = "osmo-bts.cfg"; @@ -181,13 +182,21 @@ switch (signal) { case SIGINT: //osmo_signal_dispatch(SS_GLOBAL, S_GLOBAL_SHUTDOWN, NULL); - if (!quit) + if (!quit) { + oml_tx_failure_event_rep(&bts->mo, + OSMO_EVT_CRIT_PROC_STOP, + "BTS: SIGINT received -> " + "shutdown\n"); bts_shutdown(bts, "SIGINT"); + } quit++; break; case SIGABRT: case SIGUSR1: case SIGUSR2: + oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_CRIT_PROC_STOP, + "BTS: signal %s received\n", + strsignal(signal)); talloc_report_full(tall_bts_ctx, stderr); break; default: diff --git a/src/common/oml.c b/src/common/oml.c index 0700aa2..870ef3c 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -1140,6 +1140,25 @@ return ret; } +/* 3GPP TS 12.21 ? 8.8.2 */ +int oml_tx_failure_event_rep(struct gsm_abis_mo *mo, uint16_t cause_value, + const char *fmt, ...) +{ + struct msgb *nmsg; + va_list ap; + + va_start(ap, fmt); + nmsg = abis_nm_fail_evt_rep(NM_EVT_PROC_FAIL, NM_SEVER_CRITICAL, + NM_PCAUSE_T_MANUF, cause_value, fmt, ap); + LOGP(DOML, LOGL_INFO, fmt, ap); + va_end(ap); + + if (!nmsg) + return -ENOMEM; + + return oml_mo_send_msg(mo, nmsg, NM_MT_FAILURE_EVENT_REP); +} + int oml_init(void) { DEBUGP(DOML, "Initializing OML attribute definitions\n"); -- To view, visit https://gerrit.osmocom.org/1522 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib1170edca2207752984a554d7a6a57c224f6d5f5 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Minh-Quang Nguyen From gerrit-no-reply at lists.osmocom.org Mon Jan 2 20:45:12 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 2 Jan 2017 20:45:12 +0000 Subject: [PATCH] osmo-bts[master]: Alarm on various errors Message-ID: Review at https://gerrit.osmocom.org/1525 Alarm on various errors Send OML Failure Report for unsupported BTS attributes and other errors. Change-Id: Ic163bcfb6361a8ebd39e0bc0f238ef51e2cb214e Related: OS#1615 --- M src/common/bts.c M src/common/l1sap.c M src/common/oml.c M src/common/rsl.c 4 files changed, 85 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/25/1525/1 diff --git a/src/common/bts.c b/src/common/bts.c index 9c2f0e0..cfd4c7e 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -255,6 +255,7 @@ { struct e1inp_sign_link *link = trx->rsl_link; uint8_t radio_state = link ? NM_OPSTATE_ENABLED : NM_OPSTATE_DISABLED; + int rc; LOGP(DSUM, LOGL_INFO, "RSL link (TRX %02x) state changed to %s, sending Status'.\n", trx->nr, link ? "up" : "down"); @@ -262,10 +263,13 @@ oml_mo_state_chg(&trx->mo, radio_state, NM_AVSTATE_OK); if (link) - rsl_tx_rf_res(trx); + rc = rsl_tx_rf_res(trx); else - bts_model_trx_deact_rf(trx); - + rc = bts_model_trx_deact_rf(trx); + if(rc < 0) + oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_RSL_FAIL, link ? + "Failed to establish RSL link (%d)\n" : + "Failed to deactivate RF (%d)\n", rc); return 0; } diff --git a/src/common/l1sap.c b/src/common/l1sap.c index e9c94f0..2408d84 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -1024,6 +1025,10 @@ default: LOGP(DL1P, LOGL_NOTICE, "unknown prim %d op %d\n", l1sap->oph.primitive, l1sap->oph.operation); + oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, + "unknown prim %d op %d\n", + l1sap->oph.primitive, + l1sap->oph.operation); break; } diff --git a/src/common/oml.c b/src/common/oml.c index 870ef3c..26d425d 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -345,19 +345,28 @@ DEBUGPC(DOML, "Rx SET BTS ATTR\n"); rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); - if (rc < 0) + if (rc < 0) { + oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, + "New value for Attribute not supported\n"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); + } /* Test for globally unsupported stuff here */ if (TLVP_PRESENT(&tp, NM_ATT_BCCH_ARFCN)) { uint16_t arfcn = ntohs(tlvp_val16_unal(&tp, NM_ATT_BCCH_ARFCN)); if (arfcn > 1024) { + oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_WARN_SW_WARN, + "Given ARFCN %d is not supported.\n", + arfcn); LOGP(DOML, LOGL_NOTICE, "Given ARFCN %d is not supported.\n", arfcn); return oml_fom_ack_nack(msg, NM_NACK_FREQ_NOTAVAIL); } } /* 9.4.52 Starting Time */ if (TLVP_PRESENT(&tp, NM_ATT_START_TIME)) { + oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, + "NM_ATT_START_TIME Attribute not " + "supported\n"); return oml_fom_ack_nack(msg, NM_NACK_SPEC_IMPL_NOTSUPP); } @@ -494,8 +503,12 @@ DEBUGPC(DOML, "Rx SET RADIO CARRIER ATTR\n"); rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); - if (rc < 0) + if (rc < 0) { + oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UNSUP_ATTR, + "New value for Set Radio Attribute not" + " supported\n"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); + } /* merge existing BTS attributes with new attributes */ tp_merged = osmo_tlvp_copy(trx->mo.nm_attr, trx->bts); @@ -656,8 +669,12 @@ DEBUGPC(DOML, "Rx SET CHAN ATTR\n"); rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); - if (rc < 0) + if (rc < 0) { + oml_tx_failure_event_rep(&ts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, + "New value for Set Channel Attribute " + "not supported\n"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); + } /* 9.4.21 HSN... */ /* 9.4.27 MAIO */ @@ -791,11 +808,29 @@ if (msgb_l2len(msg) < sizeof(*foh)) { LOGP(DOML, LOGL_NOTICE, "Formatted O&M message too short\n"); + trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr); + if (trx) { + trx->mo.obj_inst.bts_nr = 0; + trx->mo.obj_inst.trx_nr = foh->obj_inst.trx_nr; + trx->mo.obj_inst.ts_nr = 0xff; + oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, + "Formatted O&M message too short\n"); + } return -EIO; } if (foh->obj_inst.bts_nr != 0 && foh->obj_inst.bts_nr != 0xff) { LOGP(DOML, LOGL_INFO, "Formatted O&M with BTS %d out of range.\n", foh->obj_inst.bts_nr); + trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr); + if (trx){ + trx->mo.obj_inst.bts_nr = 0; + trx->mo.obj_inst.trx_nr = foh->obj_inst.trx_nr; + trx->mo.obj_inst.ts_nr = 0xff; + oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, + "Formatted O&M with BTS %d out" + " of range (0:0xFF).\n", + foh->obj_inst.bts_nr); + } return oml_fom_ack_nack(msg, NM_NACK_BTSNR_UNKN); } @@ -829,6 +864,20 @@ default: LOGP(DOML, LOGL_INFO, "unknown Formatted O&M msg_type 0x%02x\n", foh->msg_type); + trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr); + if (trx) { + trx->mo.obj_inst.bts_nr = 0; + trx->mo.obj_inst.trx_nr = foh->obj_inst.trx_nr; + trx->mo.obj_inst.ts_nr = 0xff; + oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, + "unknown Formatted O&M " + "msg_type 0x%02x\n", + foh->msg_type); + } else + oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UKWN_MSG, + "unknown Formatted O&M " + "msg_type 0x%02x\n", + foh->msg_type); ret = oml_fom_ack_nack(msg, NM_NACK_MSGTYPE_INVAL); } @@ -997,8 +1046,13 @@ DEBUGPC(DOML, "Rx IPA SET ATTR\n"); rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); - if (rc < 0) + if (rc < 0) { + mo = gsm_objclass2mo(bts, foh->obj_class, &foh->obj_inst); + oml_tx_failure_event_rep(mo, OSMO_EVT_MAJ_UNSUP_ATTR, + "New value for IPAC Set Attribute not " + "supported\n"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); + } /* Resolve MO by obj_class/obj_inst */ mo = gsm_objclass2mo(bts, foh->obj_class, &foh->obj_inst); diff --git a/src/common/rsl.c b/src/common/rsl.c index 9e9cbb6..0f237e8 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -401,7 +401,11 @@ rc = paging_add_identity(btsb->paging_state, paging_group, identity_lv, chan_needed); if (rc < 0) { - /* FIXME: notfiy the BSC somehow ?*/ + /* FIXME: notfiy the BSC on other errors? */ + if(rc == -ENOSPC && trx) + oml_tx_failure_event_rep(&trx->mo, + OSMO_EVT_MIN_PAG_TAB_FULL, + "BTS page table is full\n"); } pcu_tx_pag_req(identity_lv, chan_needed); @@ -1649,6 +1653,11 @@ LOGP(DRSL, LOGL_ERROR, "%s IPAC Failed to create RTP/RTCP sockets\n", gsm_lchan_name(lchan)); + oml_tx_failure_event_rep(&lchan->ts->trx->mo, + OSMO_EVT_CRIT_RTP_TOUT, + "%s IPAC Failed to create " + "RTP/RTCP sockets\n", + gsm_lchan_name(lchan)); return tx_ipac_XXcx_nack(lchan, RSL_ERR_RES_UNAVAIL, inc_ip_port, dch->c.msg_type); } @@ -1688,6 +1697,11 @@ LOGP(DRSL, LOGL_ERROR, "%s IPAC Failed to bind RTP/RTCP sockets\n", gsm_lchan_name(lchan)); + oml_tx_failure_event_rep(&lchan->ts->trx->mo, + OSMO_EVT_CRIT_RTP_TOUT, + "%s IPAC Failed to bind " + "RTP/RTCP sockets\n", + gsm_lchan_name(lchan)); osmo_rtp_socket_free(lchan->abis_ip.rtp_socket); lchan->abis_ip.rtp_socket = NULL; msgb_queue_flush(&lchan->dl_tch_queue); -- To view, visit https://gerrit.osmocom.org/1525 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic163bcfb6361a8ebd39e0bc0f238ef51e2cb214e Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Jan 3 10:45:56 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 3 Jan 2017 10:45:56 +0000 Subject: [PATCH] libosmocore[master]: Add osmo_rand() function Message-ID: Review at https://gerrit.osmocom.org/1526 Add osmo_rand() function Add osmo_rand() as a tiny wrapper around corresponding GnuTLS function and use it for osmo-auc-gen tool (with fallback to weak random numbers used previously). Change-Id: I0241b814ea4c4ce1458f7ad76e31d390383c2048 Related: OS#1694 --- M configure.ac M debian/control M include/osmocom/gsm/gsm_utils.h M src/gsm/Makefile.am M src/gsm/gsm_utils.c M src/gsm/libosmogsm.map M tests/Makefile.am M utils/osmo-auc-gen.c 8 files changed, 36 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/26/1526/1 diff --git a/configure.ac b/configure.ac index ec03c26..cf4e868 100644 --- a/configure.ac +++ b/configure.ac @@ -35,6 +35,10 @@ fi PKG_PROG_PKG_CONFIG([0.20]) +PKG_CHECK_MODULES(LIBGNUTLS, gnutls >= 3.3.0) +AC_SUBST(LIBGNUTLS_CFLAGS) +AC_SUBST(LIBGNUTLS_LIBS) + dnl check os: some linker flags not available on osx case $host in *-darwin*) diff --git a/debian/control b/debian/control index 4cdb672..d61fdd3 100644 --- a/debian/control +++ b/debian/control @@ -12,6 +12,7 @@ git, doxygen, libpcsclite-dev, + libgnutls28-dev, pkg-config, libtalloc-dev, python (>= 2.7.6) diff --git a/include/osmocom/gsm/gsm_utils.h b/include/osmocom/gsm/gsm_utils.h index 1ffe579..b41f992 100644 --- a/include/osmocom/gsm/gsm_utils.h +++ b/include/osmocom/gsm/gsm_utils.h @@ -103,6 +103,8 @@ */ int gsm_7bit_encode_n_ussd(uint8_t *result, size_t n, const char *data, int *octets_written); +int osmo_rand(uint8_t *out, size_t len); + /* the four functions below are helper functions and here for the unit test */ int gsm_septets2octets(uint8_t *result, const uint8_t *rdata, uint8_t septet_len, uint8_t padding); int gsm_septet_encode(uint8_t *result, const char *data); diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am index 4ec441f..92da071 100644 --- a/src/gsm/Makefile.am +++ b/src/gsm/Makefile.am @@ -3,7 +3,7 @@ # before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html LIBVERSION=7:0:1 -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(TALLOC_CFLAGS) +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(TALLOC_CFLAGS) $(LIBGNUTLS_CFLAGS) AM_CFLAGS = -Wall ${GCC_FVISIBILITY_HIDDEN} # FIXME: this should eventually go into a milenage/Makefile.am @@ -24,11 +24,11 @@ milenage/aes-internal.c milenage/aes-internal-enc.c \ milenage/milenage.c gan.c ipa.c gsm0341.c apn.c \ gsup.c gprs_gea.c gsm0503_conv.c oap.c -libgsmint_la_LDFLAGS = -no-undefined +libgsmint_la_LDFLAGS = $(LIBGNUTLS_LIBS) -no-undefined libgsmint_la_LIBADD = $(top_builddir)/src/libosmocore.la libosmogsm_la_SOURCES = -libosmogsm_la_LDFLAGS = $(LTLDFLAGS_OSMOGSM) -version-info $(LIBVERSION) -no-undefined $(TALLOC_LIBS) +libosmogsm_la_LDFLAGS = $(LTLDFLAGS_OSMOGSM) -version-info $(LIBVERSION) -no-undefined $(TALLOC_LIBS) $(LIBGNUTLS_LIBS) libosmogsm_la_LIBADD = libgsmint.la EXTRA_DIST = libosmogsm.map diff --git a/src/gsm/gsm_utils.c b/src/gsm/gsm_utils.c index 7365ab7..1174023 100644 --- a/src/gsm/gsm_utils.c +++ b/src/gsm/gsm_utils.c @@ -77,6 +77,9 @@ #include #include +#include +#include + #include "../../config.h" /* ETSI GSM 03.38 6.2.1 and 6.2.1.1 default alphabet @@ -662,6 +665,16 @@ return arfcn; } +/*! \brief Generate random bytes + * \param[out] out Buffer to be filled with random data + * \param[in] len Number of random bytes required + * \returns Zero on success, or a negative error code on error. + */ +int osmo_rand(uint8_t *out, size_t len) +{ + return gnutls_rnd(GNUTLS_RND_NONCE, out, len); +} + void gsm_fn2gsmtime(struct gsm_time *time, uint32_t fn) { time->fn = fn; diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index a3d224f..1c3046b 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -26,6 +26,7 @@ osmo_sitype_strs; osmo_c4; +osmo_rand; bitvec_add_range1024; comp128; dbm2rxlev; diff --git a/tests/Makefile.am b/tests/Makefile.am index b9eb8f2..743e42a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,6 +1,6 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include AM_CFLAGS = -Wall $(TALLOC_CFLAGS) -AM_LDFLAGS = $(TALLOC_LIBS) +AM_LDFLAGS = $(TALLOC_LIBS) $(LIBGNUTLS_LIBS) check_PROGRAMS = timer/timer_test sms/sms_test ussd/ussd_test \ smscb/smscb_test bits/bitrev_test a5/a5_test \ diff --git a/utils/osmo-auc-gen.c b/utils/osmo-auc-gen.c index 3b3e557..99341a8 100644 --- a/utils/osmo-auc-gen.c +++ b/utils/osmo-auc-gen.c @@ -33,6 +33,7 @@ #include #include +#include static void dump_triplets_dat(struct osmo_auth_vector *vec) { @@ -214,17 +215,18 @@ } } - if (!rand_is_set) { - int i; - printf("WARNING: We're using really weak random numbers!\n\n"); - srand(time(NULL)); + if (!rand_is_set) + if (osmo_rand(_rand, 16) < 0) { + int i; + printf("WARNING: We're using really weak random numbers!\n\n"); + srand(time(NULL)); - for (i = 0; i < 4; ++i) { - uint32_t r; - r = rand(); - memcpy(&_rand[i*4], &r, 4); + for (i = 0; i < 4; ++i) { + uint32_t r; + r = rand(); + memcpy(&_rand[i*4], &r, 4); + } } - } if (test_aud.type == OSMO_AUTH_TYPE_NONE || test_aud.algo == OSMO_AUTH_ALG_NONE) { -- To view, visit https://gerrit.osmocom.org/1526 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0241b814ea4c4ce1458f7ad76e31d390383c2048 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Jan 3 10:46:35 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 3 Jan 2017 10:46:35 +0000 Subject: openbsc[master]: Migrate from OpenSSL to GnuTLS In-Reply-To: References: Message-ID: Patch Set 5: Code-Review-1 See gerrit #1526. -- To view, visit https://gerrit.osmocom.org/1464 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I270c33912bf107b3c7c217d199262cc74d56ffdb Gerrit-PatchSet: 5 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 3 11:01:32 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 3 Jan 2017 11:01:32 +0000 Subject: [PATCH] libosmo-abis[master]: osmo_ortp: use ortp_set_log_level_mask Message-ID: Review at https://gerrit.osmocom.org/1527 osmo_ortp: use ortp_set_log_level_mask since ortp 0.25.0 the log_level_mask is different. It's includes now a log domain. Change-Id: Icc87dbcd406906d8e2ef86b39360ff01efa38a9b --- M src/trau/osmo_ortp.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/27/1527/1 diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c index d4d4ff5..ff78e75 100644 --- a/src/trau/osmo_ortp.c +++ b/src/trau/osmo_ortp.c @@ -273,7 +273,7 @@ tall_rtp_ctx = ctx; ortp_set_memory_functions(&osmo_ortp_memfn); ortp_init(); - ortp_set_log_level_mask(0xffff); + ortp_set_log_level_mask(NULL, 0xffff); ortp_set_log_handler(my_ortp_logfn); create_payload_types(); } -- To view, visit https://gerrit.osmocom.org/1527 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icc87dbcd406906d8e2ef86b39360ff01efa38a9b Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Jan 3 11:02:34 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 3 Jan 2017 11:02:34 +0000 Subject: libosmo-abis[master]: osmo_ortp: use ortp_set_log_level_mask In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 I've written a mail to the ortp ML about the issue of no way to check the version of oRTP -- To view, visit https://gerrit.osmocom.org/1527 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icc87dbcd406906d8e2ef86b39360ff01efa38a9b Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 3 11:54:58 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 3 Jan 2017 11:54:58 +0000 Subject: [PATCH] libosmo-abis[master]: add basic unixsocket support In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1198 to look at the new patch set (#3). add basic unixsocket support Allow to connect to a unix socket communicating with LAPD. Missing for merge: - SOL_PACKET is not portable to *BSD - unix socket path not configurable Change-Id: Ia5723b09a5c68a0505829dc732def981e60a907a --- M include/osmocom/abis/e1_input.h M src/Makefile.am M src/e1_input.c M src/e1_input_vty.c A src/input/unixsocket.c 5 files changed, 255 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/98/1198/3 diff --git a/include/osmocom/abis/e1_input.h b/include/osmocom/abis/e1_input.h index 4c7f8a0..078eaea 100644 --- a/include/osmocom/abis/e1_input.h +++ b/include/osmocom/abis/e1_input.h @@ -303,6 +303,9 @@ struct gsm_network; int ipaccess_setup(struct gsm_network *gsmnet); +/* activate superchannel or deactive to use timeslots. only valid for unixsocket driver */ +void e1inp_ericsson_set_altc(struct e1inp_line *unixlinue, int superchannel); + extern struct llist_head e1inp_driver_list; extern struct llist_head e1inp_line_list; diff --git a/src/Makefile.am b/src/Makefile.am index b24f2cf..760c1f5 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,7 +24,8 @@ input/lapd.c \ input/lapd_pcap.c \ input/misdn.c \ - input/rs232.c + input/rs232.c \ + input/unixsocket.c libosmotrau_la_CFLAGS = $(AM_CFLAGS) $(ORTP_CFLAGS) libosmotrau_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(TRAU_LIBVERSION) diff --git a/src/e1_input.c b/src/e1_input.c index 2c8a541..8eecc0d 100644 --- a/src/e1_input.c +++ b/src/e1_input.c @@ -815,6 +815,7 @@ void e1inp_dahdi_init(void); void e1inp_ipaccess_init(void); void e1inp_rs232_init(void); +void e1inp_unixsocket_init(void); void e1inp_init(void) { @@ -829,4 +830,5 @@ #endif e1inp_ipaccess_init(); e1inp_rs232_init(); + e1inp_unixsocket_init(); } diff --git a/src/e1_input_vty.c b/src/e1_input_vty.c index 5320bb3..47bc5ba 100644 --- a/src/e1_input_vty.c +++ b/src/e1_input_vty.c @@ -38,12 +38,13 @@ /* CONFIG */ -#define E1_DRIVER_NAMES "(misdn|misdn_lapd|dahdi|ipa)" +#define E1_DRIVER_NAMES "(misdn|misdn_lapd|dahdi|ipa|unixsocket)" #define E1_DRIVER_HELP "mISDN supported E1 Card (kernel LAPD)\n" \ "mISDN supported E1 Card (userspace LAPD)\n" \ "DAHDI supported E1/T1/J1 Card\n" \ "IPA TCP/IP input\n" \ - "HSL TCP/IP input" + "HSL TCP/IP input\n" \ + "Unix socket input\n" #define E1_LINE_HELP "Configure E1/T1/J1 Line\n" "Line Number\n" diff --git a/src/input/unixsocket.c b/src/input/unixsocket.c new file mode 100644 index 0000000..157f398 --- /dev/null +++ b/src/input/unixsocket.c @@ -0,0 +1,245 @@ +/* OpenBSC Abis receive lapd over a unix socket */ + +/* (C) 2016 by sysmocom s.f.m.c. GmbH + * + * Author: Alexander Couzens + * Based on other e1_input drivers. + * + * 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 2 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. + * + */ + +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include "internal.h" + +void *tall_unixsocket_ctx; +#define UNIXSOCKET_ALLOC_SIZE 1600 + +struct unixsocket_line { + struct osmo_fd fd; +}; + +static int ts_want_write(struct e1inp_ts *e1i_ts); + +static int unixsocket_exception_cb(struct osmo_fd *bfd) +{ + struct e1inp_line *line = bfd->data; + LOGP(DLINP, LOGL_ERROR, "unixsocket: closing socket. Exception cb called.\n"); + + close(bfd->fd); + + return 0; +} + +static int unixsocket_read_cb(struct osmo_fd *bfd) +{ + struct e1inp_line *line = bfd->data; + struct msgb *msg = msgb_alloc(UNIXSOCKET_ALLOC_SIZE, "UNIXSOCKET TS"); + int ret; + + if (!msg) + return -ENOMEM; + + ret = read(bfd->fd, msg->data, UNIXSOCKET_ALLOC_SIZE - 16); + if (ret == 0) { + unixsocket_exception_cb(bfd); + return ret; + } else if (ret < 0) { + perror("read "); + return ret; + } + msgb_put(msg, ret); + + return e1inp_rx_ts_lapd(&line->ts[0], msg); +} + +static void timeout_ts1_write(void *data) +{ + struct e1inp_ts *e1i_ts = (struct e1inp_ts *)data; + + /* trigger write of ts1, due to tx delay timer */ + ts_want_write(e1i_ts); +} + +static int unixsocket_write_cb(struct osmo_fd *bfd) +{ + struct e1inp_line *line = bfd->data; + struct e1inp_ts *e1i_ts = &line->ts[0]; + struct msgb *msg; + struct e1inp_sign_link *sign_link; + + bfd->when &= ~BSC_FD_WRITE; + + /* get the next msg for this timeslot */ + msg = e1inp_tx_ts(e1i_ts, &sign_link); + if (!msg) { + /* no message after tx delay timer */ + LOGP(DLINP, LOGL_INFO, "unixsocket: no message available"); + return 0; + } + + /* set tx delay timer for next event */ + e1i_ts->sign.tx_timer.cb = timeout_ts1_write; + e1i_ts->sign.tx_timer.data = e1i_ts; + + osmo_timer_schedule(&e1i_ts->sign.tx_timer, 0, e1i_ts->sign.delay); + + LOGP(DLINP, LOGL_INFO, "unixsocket: sending: %s", msgb_hexdump(msg)); + lapd_transmit(e1i_ts->lapd, sign_link->tei, + sign_link->sapi, msg); + + return 0; +} + +static int unixsocket_cb(struct osmo_fd *bfd, unsigned int what) +{ + int ret = 0; + + if (what & BSC_FD_READ) + ret = unixsocket_read_cb(bfd); + if (what & BSC_FD_WRITE) + ret = unixsocket_write_cb(bfd); + + return ret; +} + +static int ts_want_write(struct e1inp_ts *e1i_ts) +{ + struct unixsocket_line *line = e1i_ts->line->driver_data; + + line->fd.when |= BSC_FD_WRITE; + + return 0; +} + +/*! + * \brief unixsocket_write_msg lapd callback for data to unixsocket + * \param msg + * \param cbdata + */ +static void unixsocket_write_msg(struct msgb *msg, void *cbdata) +{ + struct osmo_fd *bfd = cbdata; + int ret; + + ret = write(bfd->fd, msg->data, msg->len); + msgb_free(msg); + if (ret == -1) + unixsocket_exception_cb(bfd); + else if (ret < 0) + LOGP(DLMI, LOGL_NOTICE, "%s write failed %d\n", __func__, ret); +} + +static int unixsocket_line_update(struct e1inp_line *line) +{ + struct unixsocket_line *config; + const char *sock_path = "/tmp/rsl_oml"; + int ret = 0; + int i; + + LOGP(DLINP, LOGL_NOTICE, "unixsocket: line update\n"); + + if (!line->driver_data) + line->driver_data = talloc_zero(line, struct unixsocket_line); + + if (!line->driver_data) { + LOGP(DLINP, LOGL_ERROR, "unixsocket: OOM in line update\n"); + return -ENOMEM; + } + + config = line->driver_data; + + config->fd.data = line; + config->fd.when = BSC_FD_READ; + config->fd.cb = unixsocket_cb; + ret = osmo_sock_unix_init(SOCK_SEQPACKET, 0, sock_path, OSMO_SOCK_F_CONNECT); + + if (ret < 0) { + talloc_free(config); + return ret; + } + + config->fd.fd = ret; + if (osmo_fd_register(&config->fd) < 0) { + close(config->fd.fd); + return -EIO; + } + + for (i = 0; i < ARRAY_SIZE(line->ts); i++) { + struct e1inp_ts *e1i_ts = &line->ts[i]; + + if (!e1i_ts->lapd) + e1i_ts->lapd = lapd_instance_alloc(1, + unixsocket_write_msg, &config->fd, e1inp_dlsap_up, + e1i_ts, &lapd_profile_abis); + } + + return ret; +} + +struct e1inp_driver unixsocket_driver = { + .name = "unixsocket", + .want_write = ts_want_write, + .line_update = unixsocket_line_update, + .default_delay = 0, +}; + +void e1inp_unixsocket_init(void) +{ + tall_unixsocket_ctx = talloc_named_const(libosmo_abis_ctx, 1, "unixsocket"); + e1inp_driver_register(&unixsocket_driver); +} + +void e1inp_ericsson_set_altc(struct e1inp_line *unixline, int superchannel) +{ + struct unixsocket_line *config; + struct msgb *msg; + + if (!unixline) + return; + + if (unixline->driver != &unixsocket_driver) { + LOGP(DLMI, LOGL_NOTICE, "altc is only supported by unixsocket\n"); + return; + } + + config = unixline->driver_data; + if (!config) { + LOGP(DLMI, LOGL_NOTICE, "e1inp driver not yet initialized.\n"); + return; + } + + + msg = msgb_alloc_headroom(200, 100, "ALTC"); + + /* magic */ + msgb_put_u32(msg, 0x23004200); + msgb_put_u8(msg, superchannel ? 1 : 0); + + unixsocket_write_msg(msg, &config->fd); +} -- To view, visit https://gerrit.osmocom.org/1198 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia5723b09a5c68a0505829dc732def981e60a907a Gerrit-PatchSet: 3 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Jan 3 11:58:20 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 3 Jan 2017 11:58:20 +0000 Subject: [PATCH] openbsc[master]: Migrate from OpenSSL to osmo_rand() In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1464 to look at the new patch set (#6). Migrate from OpenSSL to osmo_rand() This avoids potential licensing incompatibility and makes integration of Debian packaging patches easier. Related: OS#1694 Change-Id: I270c33912bf107b3c7c217d199262cc74d56ffdb --- M debian/control M openbsc/configure.ac M openbsc/src/gprs/Makefile.am M openbsc/src/gprs/gb_proxy.c M openbsc/src/gprs/gprs_gmm.c M openbsc/src/gprs/gprs_llc.c M openbsc/src/gprs/gprs_sgsn.c M openbsc/src/libiu/Makefile.am M openbsc/src/libmsc/Makefile.am M openbsc/src/libmsc/auth.c M openbsc/src/libmsc/db.c M openbsc/src/osmo-bsc_nat/Makefile.am M openbsc/src/osmo-bsc_nat/bsc_nat.c M openbsc/src/osmo-nitb/Makefile.am M openbsc/tests/channel/Makefile.am M openbsc/tests/db/Makefile.am M openbsc/tests/gbproxy/Makefile.am M openbsc/tests/gbproxy/gbproxy_test.c M openbsc/tests/mm_auth/Makefile.am M openbsc/tests/mm_auth/mm_auth_test.c M openbsc/tests/sgsn/Makefile.am M openbsc/tests/sgsn/sgsn_test.c M openbsc/tests/sndcp_xid/Makefile.am M openbsc/tests/xid/Makefile.am 24 files changed, 49 insertions(+), 77 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/64/1464/6 diff --git a/debian/control b/debian/control index 79f18df..fa6d979 100644 --- a/debian/control +++ b/debian/control @@ -14,7 +14,6 @@ libosmo-netif-dev, libdbd-sqlite3, libpcap-dev, - libssl-dev, libc-ares-dev, libsmpp34-dev Standards-Version: 3.9.8 diff --git a/openbsc/configure.ac b/openbsc/configure.ac index 0753834..17a4f94 100644 --- a/openbsc/configure.ac +++ b/openbsc/configure.ac @@ -33,11 +33,10 @@ PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.9.5) PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.3.0) PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl) -PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.9.5) +PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.9.6) PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 0.2.0) PKG_CHECK_MODULES(LIBOSMOGB, libosmogb >= 0.6.4) PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.0.1) -PKG_CHECK_MODULES(LIBCRYPTO, libcrypto >= 0.9.5) # Enabke/disable the NAT? AC_ARG_ENABLE([nat], [AS_HELP_STRING([--enable-nat], [Build the BSC NAT. Requires SCCP])], diff --git a/openbsc/src/gprs/Makefile.am b/openbsc/src/gprs/Makefile.am index cff17dd..8bc0f87 100644 --- a/openbsc/src/gprs/Makefile.am +++ b/openbsc/src/gprs/Makefile.am @@ -15,7 +15,6 @@ $(LIBOSMOGB_CFLAGS) \ $(COVERAGE_CFLAGS) \ $(LIBCARES_CFLAGS) \ - $(LIBCRYPTO_CFLAGS) \ $(LIBGTP_CFLAGS) \ $(NULL) if BUILD_IU @@ -63,7 +62,6 @@ osmo_gbproxy_LDADD = \ $(top_builddir)/src/libcommon/libcommon.a \ $(OSMO_LIBS) \ - $(LIBCRYPTO_LIBS) \ -lrt \ $(NULL) @@ -98,7 +96,6 @@ $(OSMO_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(LIBCARES_LIBS) \ - $(LIBCRYPTO_LIBS) \ -lrt \ -lgtp \ -lm \ diff --git a/openbsc/src/gprs/gb_proxy.c b/openbsc/src/gprs/gb_proxy.c index d95139f..9c93cfb 100644 --- a/openbsc/src/gprs/gb_proxy.c +++ b/openbsc/src/gprs/gb_proxy.c @@ -51,8 +51,6 @@ #include #include -#include - static const struct rate_ctr_desc global_ctr_description[] = { { "inv-bvci", "Invalid BVC Identifier " }, { "inv-lai", "Invalid Location Area Identifier" }, @@ -236,7 +234,8 @@ bss_ptmsi = sgsn_ptmsi; } else { do { - if (RAND_bytes((uint8_t *) &bss_ptmsi, sizeof(bss_ptmsi)) != 1) { + if (osmo_rand((uint8_t *) &bss_ptmsi, + sizeof(bss_ptmsi)) < 0) { bss_ptmsi = GSM_RESERVED_TMSI; break; } @@ -273,7 +272,8 @@ } else { do { /* create random TLLI, 0b01111xxx... */ - if (RAND_bytes((uint8_t *) &sgsn_tlli, sizeof(sgsn_tlli)) != 1) { + if (osmo_rand((uint8_t *) &sgsn_tlli, + sizeof(sgsn_tlli)) < 0) { sgsn_tlli = 0; break; } diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c index 363b457..c48389f 100644 --- a/openbsc/src/gprs/gprs_gmm.c +++ b/openbsc/src/gprs/gprs_gmm.c @@ -31,8 +31,6 @@ #include #include -#include - #include "bscconfig.h" #include @@ -551,9 +549,9 @@ /* ? 10.5.5.7: */ acreq->force_stby = force_standby; /* 3GPP TS 24.008 ? 10.5.5.19: */ - if (RAND_bytes(&rbyte, 1) != 1) { - LOGP(DMM, LOGL_NOTICE, "RAND_bytes failed for A&C ref, falling " - "back to rand()\n"); + if (osmo_rand(&rbyte, 1) < 0) { + LOGP(DMM, LOGL_ERROR, "osmo_rand() failed for A&C ref, falling" + " back to rand()\n"); acreq->ac_ref_nr = rand(); } else acreq->ac_ref_nr = rbyte; @@ -1195,8 +1193,8 @@ }; /* XXX: Hack to make 3G auth work with special SIM card */ ctx->auth_state = SGSN_AUTH_AUTHENTICATE; - - RAND_bytes(tmp_rand, 16); + /* FIXME: check return value and propagate error */ + osmo_rand(tmp_rand, 16); memset(&ctx->auth_triplet.vec, 0, sizeof(ctx->auth_triplet.vec)); osmo_auth_gen_vec(&ctx->auth_triplet.vec, &auth, tmp_rand); diff --git a/openbsc/src/gprs/gprs_llc.c b/openbsc/src/gprs/gprs_llc.c index 2be663f..951497a 100644 --- a/openbsc/src/gprs/gprs_llc.c +++ b/openbsc/src/gprs/gprs_llc.c @@ -23,8 +23,6 @@ #include #include -#include - #include #include #include @@ -1070,8 +1068,8 @@ uint8_t *xid; LOGP(DLLC, LOGL_NOTICE, "LLGM Reset\n"); - if (RAND_bytes((uint8_t *) &llme->iov_ui, 4) != 1) { - LOGP(DLLC, LOGL_NOTICE, "RAND_bytes failed for LLC XID reset, " + if (osmo_rand((uint8_t *) &llme->iov_ui, 4) < 0) { + LOGP(DLLC, LOGL_ERROR, "osmo_rand() failed for LLC XID reset, " "falling back to rand()\n"); llme->iov_ui = rand(); } @@ -1103,8 +1101,8 @@ uint8_t *xid; LOGP(DLLC, LOGL_NOTICE, "LLGM Reset\n"); - if (RAND_bytes((uint8_t *) &llme->iov_ui, 4) != 1) { - LOGP(DLLC, LOGL_NOTICE, "RAND_bytes failed for LLC XID reset, " + if (osmo_rand((uint8_t *) &llme->iov_ui, 4) < 0) { + LOGP(DLLC, LOGL_ERROR, "osmo_rand() failed for LLC XID reset, " "falling back to rand()\n"); llme->iov_ui = rand(); } diff --git a/openbsc/src/gprs/gprs_sgsn.c b/openbsc/src/gprs/gprs_sgsn.c index e85e1a9..1c0f83a 100644 --- a/openbsc/src/gprs/gprs_sgsn.c +++ b/openbsc/src/gprs/gprs_sgsn.c @@ -45,8 +45,6 @@ #include -#include - #define GPRS_LLME_CHECK_TICK 30 extern struct sgsn_instance *sgsn; @@ -614,7 +612,7 @@ int max_retries = 100; restart: - if (RAND_bytes((uint8_t *) &ptmsi, sizeof(ptmsi)) != 1) + if (osmo_rand((uint8_t *) &ptmsi, sizeof(ptmsi)) < 0) goto failed; /* Enforce that the 2 MSB are set without loosing the distance between diff --git a/openbsc/src/libiu/Makefile.am b/openbsc/src/libiu/Makefile.am index e5f9e27..f78b411 100644 --- a/openbsc/src/libiu/Makefile.am +++ b/openbsc/src/libiu/Makefile.am @@ -7,7 +7,6 @@ AM_CFLAGS = \ -Wall \ $(COVERAGE_CFLAGS) \ - $(LIBCRYPTO_CFLAGS) \ $(LIBASN1C_CFLAGS) \ $(LIBOSMOCORE_CFLAGS) \ $(LIBOSMOVTY_CFLAGS) \ diff --git a/openbsc/src/libmsc/Makefile.am b/openbsc/src/libmsc/Makefile.am index 9d966db..38b6e21 100644 --- a/openbsc/src/libmsc/Makefile.am +++ b/openbsc/src/libmsc/Makefile.am @@ -10,7 +10,6 @@ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(COVERAGE_CFLAGS) \ - $(LIBCRYPTO_CFLAGS) \ $(LIBSMPP34_CFLAGS) \ $(NULL) diff --git a/openbsc/src/libmsc/auth.c b/openbsc/src/libmsc/auth.c index bf62d3c..e51ceed 100644 --- a/openbsc/src/libmsc/auth.c +++ b/openbsc/src/libmsc/auth.c @@ -28,8 +28,6 @@ #include #include -#include - #include const struct value_string auth_action_names[] = { @@ -122,8 +120,9 @@ } atuple->use_count = 1; - if (RAND_bytes(atuple->vec.rand, sizeof(atuple->vec.rand)) != 1) { - LOGP(DMM, LOGL_NOTICE, "RAND_bytes failed, can't generate new auth tuple\n"); + if (osmo_rand(atuple->vec.rand, sizeof(atuple->vec.rand)) < 0) { + LOGP(DMM, LOGL_ERROR, "osmo_rand() failed, can't generate new" + " auth tuple\n"); return AUTH_ERROR; } diff --git a/openbsc/src/libmsc/db.c b/openbsc/src/libmsc/db.c index 5cccb32..6eb32b5 100644 --- a/openbsc/src/libmsc/db.c +++ b/openbsc/src/libmsc/db.c @@ -40,8 +40,6 @@ #include #include -#include - /* Semi-Private-Interface (SPI) for the subscriber code */ void subscr_direct_free(struct gsm_subscriber *subscr); @@ -1223,8 +1221,9 @@ char *tmsi_quoted; for (;;) { - if (RAND_bytes((uint8_t *) &subscriber->tmsi, sizeof(subscriber->tmsi)) != 1) { - LOGP(DDB, LOGL_ERROR, "RAND_bytes failed\n"); + if (osmo_rand((uint8_t *) &subscriber->tmsi, + sizeof(subscriber->tmsi)) < 0) { + LOGP(DDB, LOGL_ERROR, "osmo_rand() failed\n"); return 1; } if (subscriber->tmsi == GSM_RESERVED_TMSI) @@ -1303,8 +1302,8 @@ uint32_t try; for (;;) { - if (RAND_bytes((uint8_t *) &try, sizeof(try)) != 1) { - LOGP(DDB, LOGL_ERROR, "RAND_bytes failed\n"); + if (osmo_rand((uint8_t *) &try, sizeof(try)) < 0) { + LOGP(DDB, LOGL_ERROR, "osmo_rand() failed\n"); return 1; } if (!try) /* 0 is an invalid token */ diff --git a/openbsc/src/osmo-bsc_nat/Makefile.am b/openbsc/src/osmo-bsc_nat/Makefile.am index be33d28..e7b78c9 100644 --- a/openbsc/src/osmo-bsc_nat/Makefile.am +++ b/openbsc/src/osmo-bsc_nat/Makefile.am @@ -13,7 +13,6 @@ $(LIBOSMOSCCP_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(LIBOSMONETIF_CFLAGS) \ - $(LIBCRYPTO_CFLAGS) \ $(COVERAGE_CFLAGS) \ $(NULL) @@ -53,6 +52,5 @@ $(LIBOSMOCTRL_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(LIBOSMONETIF_LIBS) \ - $(LIBCRYPTO_LIBS) \ -lrt \ $(NULL) diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat.c b/openbsc/src/osmo-bsc_nat/bsc_nat.c index a4dd679..ee7d0c5 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c @@ -74,8 +74,6 @@ #include -#include - #include "../../bscconfig.h" #define SCCP_CLOSE_TIME 20 @@ -223,7 +221,7 @@ buf = v_put(buf, 0x23); mrand = bsc->last_rand; - if (RAND_bytes(mrand, 16) != 1) + if (osmo_rand(mrand, 16) < 0) goto failed_random; memcpy(buf, mrand, 16); diff --git a/openbsc/src/osmo-nitb/Makefile.am b/openbsc/src/osmo-nitb/Makefile.am index f4ef487..ce6cf52 100644 --- a/openbsc/src/osmo-nitb/Makefile.am +++ b/openbsc/src/osmo-nitb/Makefile.am @@ -40,6 +40,5 @@ $(LIBOSMOCTRL_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(LIBSMPP34_LIBS) \ - $(LIBCRYPTO_LIBS) \ -ldbi \ $(NULL) diff --git a/openbsc/tests/channel/Makefile.am b/openbsc/tests/channel/Makefile.am index 5e9583f..aea3b71 100644 --- a/openbsc/tests/channel/Makefile.am +++ b/openbsc/tests/channel/Makefile.am @@ -30,6 +30,5 @@ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ - $(LIBCRYPTO_LIBS) \ -ldbi \ $(NULL) diff --git a/openbsc/tests/db/Makefile.am b/openbsc/tests/db/Makefile.am index 0eed5cd..7099645 100644 --- a/openbsc/tests/db/Makefile.am +++ b/openbsc/tests/db/Makefile.am @@ -43,6 +43,5 @@ $(LIBOSMOGSM_LIBS) \ $(LIBSMPP34_LIBS) \ $(LIBOSMOVTY_LIBS) \ - $(LIBCRYPTO_LIBS) \ -ldbi \ $(NULL) diff --git a/openbsc/tests/gbproxy/Makefile.am b/openbsc/tests/gbproxy/Makefile.am index 2dd66df..5027778 100644 --- a/openbsc/tests/gbproxy/Makefile.am +++ b/openbsc/tests/gbproxy/Makefile.am @@ -28,7 +28,7 @@ $(NULL) gbproxy_test_LDFLAGS = \ - -Wl,--wrap=RAND_bytes \ + -Wl,--wrap=osmo_rand \ $(NULL) gbproxy_test_LDADD = \ @@ -49,6 +49,5 @@ $(LIBOSMOVTY_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(LIBRARY_DL) \ - $(LIBCRYPTO_LIBS) \ -lrt \ $(NULL) diff --git a/openbsc/tests/gbproxy/gbproxy_test.c b/openbsc/tests/gbproxy/gbproxy_test.c index 577daa9..356837e 100644 --- a/openbsc/tests/gbproxy/gbproxy_test.c +++ b/openbsc/tests/gbproxy/gbproxy_test.c @@ -37,8 +37,6 @@ #include #include -#include - #define REMOTE_BSS_ADDR 0x01020304 #define REMOTE_SGSN_ADDR 0x05060708 @@ -53,30 +51,30 @@ struct llist_head *received_messages = NULL; -/* override, requires '-Wl,--wrap=RAND_bytes' */ -int __real_RAND_bytes(unsigned char *buf, int num); -int mock_RAND_bytes(unsigned char *buf, int num); -int (*RAND_bytes_cb)(unsigned char *, int) = - &mock_RAND_bytes; +/* override, requires '-Wl,--wrap=osmo_rand' */ +int __real_osmo_rand(uint8_t *data, size_t len); +int mock_osmo_rand(uint8_t *data, size_t len); +int (*osmo_rand_cb)(uint8_t *, size_t) = + &mock_osmo_rand; -int __wrap_RAND_bytes(unsigned char *buf, int num) +int __wrap_osmo_rand(uint8_t *data, size_t len) { - return (*RAND_bytes_cb)(buf, num); + return (*osmo_rand_cb)(data, len); } static int rand_seq_num = 0; -int mock_RAND_bytes(unsigned char *buf, int num) +int mock_osmo_rand(uint8_t *data, size_t len) { uint32_t val; - OSMO_ASSERT(num == sizeof(val)); - OSMO_ASSERT(__real_RAND_bytes(buf, num) == 1); + OSMO_ASSERT(len == sizeof(val)); + OSMO_ASSERT(__real_osmo_rand(data, len) == 0); val = 0x00dead00 + rand_seq_num; rand_seq_num++; - memcpy(buf, &val, num); + memcpy(data, &val, len); return 1; } diff --git a/openbsc/tests/mm_auth/Makefile.am b/openbsc/tests/mm_auth/Makefile.am index cb35198..a591d0a 100644 --- a/openbsc/tests/mm_auth/Makefile.am +++ b/openbsc/tests/mm_auth/Makefile.am @@ -8,7 +8,6 @@ $(LIBOSMOCORE_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(LIBOSMOGSM_CFLAGS) \ - $(LIBCRYPTO_CFLAGS) \ $(NULL) noinst_PROGRAMS = \ diff --git a/openbsc/tests/mm_auth/mm_auth_test.c b/openbsc/tests/mm_auth/mm_auth_test.c index b8777a8..2d5df72 100644 --- a/openbsc/tests/mm_auth/mm_auth_test.c +++ b/openbsc/tests/mm_auth/mm_auth_test.c @@ -120,8 +120,8 @@ return auth_action; } -/* override libssl RAND_bytes() to get testable crypto results */ -int RAND_bytes(uint8_t *rand, int len) +/* override osmo_rand() to get testable crypto results */ +int osmo_rand(uint8_t *rand, size_t len) { memset(rand, 23, len); return 1; diff --git a/openbsc/tests/sgsn/Makefile.am b/openbsc/tests/sgsn/Makefile.am index f1606cb..ab45bdf 100644 --- a/openbsc/tests/sgsn/Makefile.am +++ b/openbsc/tests/sgsn/Makefile.am @@ -32,7 +32,7 @@ $(NULL) sgsn_test_LDFLAGS = \ - -Wl,--wrap=RAND_bytes \ + -Wl,--wrap=osmo_rand \ -Wl,--wrap=sgsn_update_subscriber_data \ -Wl,--wrap=gprs_subscr_request_update_location \ -Wl,--wrap=gprs_subscr_request_auth_info \ @@ -66,7 +66,6 @@ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOGB_LIBS) \ $(LIBCARES_LIBS) \ - $(LIBCRYPTO_LIBS) \ $(LIBGTP_LIBS) \ -lrt \ -lm \ diff --git a/openbsc/tests/sgsn/sgsn_test.c b/openbsc/tests/sgsn/sgsn_test.c index b4bcaf6..d8fae1b 100644 --- a/openbsc/tests/sgsn/sgsn_test.c +++ b/openbsc/tests/sgsn/sgsn_test.c @@ -99,21 +99,22 @@ return 0; } -/* override, requires '-Wl,--wrap=RAND_bytes' */ -int __real_RAND_bytes(unsigned char *buf, int num); -int mock_RAND_bytes(unsigned char *buf, int num); -int (*RAND_bytes_cb)(unsigned char *, int) = - &mock_RAND_bytes; +/* override, requires '-Wl,--wrap=osmo_rand' */ +int __real_osmo_rand(uint8_t *data, size_t len); +int mock_osmo_rand(uint8_t *data, size_t len); +int (*osmo_rand_cb)(uint8_t *, size_t) = + &mock_osmo_rand; -int __wrap_RAND_bytes(unsigned char *buf, int num) +int __wrap_osmo_rand(uint8_t *buf, size_t num) { - return (*RAND_bytes_cb)(buf, num); + return (*osmo_rand_cb)(buf, num); } /* make results of A&C ref predictable */ -int mock_RAND_bytes(unsigned char *buf, int num) +int mock_osmo_rand(uint8_t *data, size_t num) { + uint8_t *buf = (uint8_t *)data; if (num > 1) - return __real_RAND_bytes(buf, num); + return __real_osmo_rand(data, num); buf[0] = 0; return 1; } diff --git a/openbsc/tests/sndcp_xid/Makefile.am b/openbsc/tests/sndcp_xid/Makefile.am index 99b9d1a..6f8ffe0 100644 --- a/openbsc/tests/sndcp_xid/Makefile.am +++ b/openbsc/tests/sndcp_xid/Makefile.am @@ -14,7 +14,6 @@ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOGB_LIBS) \ $(LIBCARES_LIBS) \ - $(LIBCRYPTO_LIBS) \ -lgtp -lrt -lm diff --git a/openbsc/tests/xid/Makefile.am b/openbsc/tests/xid/Makefile.am index aaf17ed..9956f36 100644 --- a/openbsc/tests/xid/Makefile.am +++ b/openbsc/tests/xid/Makefile.am @@ -31,7 +31,6 @@ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOGB_LIBS) \ $(LIBCARES_LIBS) \ - $(LIBCRYPTO_LIBS) \ $(LIBGTP_LIBS) \ -lrt \ -lm \ -- To view, visit https://gerrit.osmocom.org/1464 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I270c33912bf107b3c7c217d199262cc74d56ffdb Gerrit-PatchSet: 6 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: tnt From gerrit-no-reply at lists.osmocom.org Tue Jan 3 11:59:20 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 3 Jan 2017 11:59:20 +0000 Subject: [PATCH] libosmo-abis[master]: osmo_ortp: use ortp_set_log_level_mask In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1527 to look at the new patch set (#2). osmo_ortp: use ortp_set_log_level_mask since ortp 0.26.0 the log_level_mask is different. It's includes now a log domain. Change-Id: Icc87dbcd406906d8e2ef86b39360ff01efa38a9b --- M configure.ac M src/trau/osmo_ortp.c 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/27/1527/2 diff --git a/configure.ac b/configure.ac index f463c2e..40afaa5 100644 --- a/configure.ac +++ b/configure.ac @@ -43,7 +43,7 @@ PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.3.0) PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.3.0) PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.3.10) -PKG_CHECK_MODULES(ORTP, ortp >= 0.22.0) +PKG_CHECK_MODULES(ORTP, ortp >= 0.26.0) AC_CHECK_HEADERS(dahdi/user.h,,AC_MSG_WARN(DAHDI input driver will not be built)) diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c index d4d4ff5..ff78e75 100644 --- a/src/trau/osmo_ortp.c +++ b/src/trau/osmo_ortp.c @@ -273,7 +273,7 @@ tall_rtp_ctx = ctx; ortp_set_memory_functions(&osmo_ortp_memfn); ortp_init(); - ortp_set_log_level_mask(0xffff); + ortp_set_log_level_mask(NULL, 0xffff); ortp_set_log_handler(my_ortp_logfn); create_payload_types(); } -- To view, visit https://gerrit.osmocom.org/1527 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Icc87dbcd406906d8e2ef86b39360ff01efa38a9b Gerrit-PatchSet: 2 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Jan 3 12:02:23 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 3 Jan 2017 12:02:23 +0000 Subject: libosmo-abis[master]: osmo_ortp: use ortp_set_log_level_mask In-Reply-To: References: Message-ID: Patch Set 1: We probably should tighten version requirements in debian/control and configure.ac -- To view, visit https://gerrit.osmocom.org/1527 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icc87dbcd406906d8e2ef86b39360ff01efa38a9b Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 3 12:03:20 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 3 Jan 2017 12:03:20 +0000 Subject: libosmo-abis[master]: osmo_ortp: use ortp_set_log_level_mask In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 -- To view, visit https://gerrit.osmocom.org/1527 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icc87dbcd406906d8e2ef86b39360ff01efa38a9b Gerrit-PatchSet: 2 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 3 12:39:09 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 3 Jan 2017 12:39:09 +0000 Subject: libosmocore[master]: Add osmo_rand() function In-Reply-To: References: Message-ID: Patch Set 1: Note: this should not be merged until OS#1894 is implemented. -- To view, visit https://gerrit.osmocom.org/1526 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0241b814ea4c4ce1458f7ad76e31d390383c2048 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 3 15:47:24 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 3 Jan 2017 15:47:24 +0000 Subject: libosmocore[master]: libosmocoding: migrate transcoding routines from OsmoBTS In-Reply-To: References: Message-ID: Patch Set 9: Regarding your question: can we have both? I mean smth like "pdtch" and "pdtch_punctured" and let application choose which one to use? -- To view, visit https://gerrit.osmocom.org/933 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0c3256b87686d878e4e716d12393cad5924fdfa1 Gerrit-PatchSet: 9 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Tom Tsou Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 3 15:53:12 2017 From: gerrit-no-reply at lists.osmocom.org (ikostov) Date: Tue, 3 Jan 2017 15:53:12 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: BSC, BTS: add diagrams of PCU-BTS-NITB-SGSN relationships In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1514 to look at the new patch set (#2). BSC,BTS: add diagrams of PCU-BTS-NITB-SGSN relationships Change-Id: I0eb09706efb768fa4f6810872fb6568cbc9838cb --- M OsmoBSC/chapters/overview.adoc M OsmoBTS/chapters/interfaces.adoc 2 files changed, 103 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/14/1514/2 diff --git a/OsmoBSC/chapters/overview.adoc b/OsmoBSC/chapters/overview.adoc index 580a42e..63e01ca 100644 --- a/OsmoBSC/chapters/overview.adoc +++ b/OsmoBSC/chapters/overview.adoc @@ -13,6 +13,83 @@ GSM Base Station Controller with A-bis interface towards BTSs and A interface towards a MSC. +The difference between classic GSM network architecture and +the OsmoNITB based GSM network architecture is illustrated in +<> and <>. + +[[fig-gsm-classic]] +.Classic GSM network architecture (simplified) +[graphviz] +---- +digraph G { + rankdir=LR; + MS0 [label="MS"] + MS1 [label="MS"] + MS2 [label="MS"] + MS3 [label="MS"] + BTS0 [label="BTS"] + BTS1 [label="BTS"] + BSC [label="BSC"] + MSC [label="MSC/VLR"] + HLR [label="HLR/AUC"] + EIR [label="EIR"] + SMSC [label="SMSC"] + MS0->BTS0 [label="Um"] + MS1->BTS0 [label="Um"] + MS2->BTS1 [label="Um"] + MS3->BTS1 [label="Um"] + BTS0->BSC [label="Abis"] + BTS1->BSC [label="Abis"] + BSC->MSC [label="A"] + MSC->HLR [label="C"] + MSC->EIR [label="F"] + MSC->SMSC +} +---- + +[[fig-gsm-nitb]] +.GSM system architecture using OsmoNITB +[graphviz] +---- +digraph G { + + rankdir=LR; + MS0 [label="MS"]; + MS1 [label="MS"]; + MS2 [label="MS"]; + MS3 [label="MS"]; + BTS0 [label="BTS"]; + BTS1 [label="BTS"]; + MS0->BTS0 [label="Um"]; + MS1->BTS0 [label="Um"]; + MS2->BTS1 [label="Um"]; + MS3->BTS1 [label="Um"]; + BTS0->BSC [label="Abis"]; + BTS1->BSC [label="Abis"]; + subgraph cluster_nitb { + label = "OsmoNITB"; + BSC [label="BSC"]; + MSC [label="MSC/VLR"]; + HLR [label="HLR/AUC"]; + EIR [label="EIR"]; + SMSC [label="SMSC"]; + BSC->MSC; + MSC->HLR; + MSC->EIR; + MSC->SMSC; + } + + subgraph cluster_extmncc{ + label="Linux Call Router / SoftSwitch / PBX"; + + } + + MSC -> "Linux Call Router / SoftSwitch / PBX" [label="MNCC"] + + +} +---- + === Software Components diff --git a/OsmoBTS/chapters/interfaces.adoc b/OsmoBTS/chapters/interfaces.adoc index 242fa23..a387aec 100644 --- a/OsmoBTS/chapters/interfaces.adoc +++ b/OsmoBTS/chapters/interfaces.adoc @@ -113,6 +113,32 @@ co-locate the PCU with the BSC. However, the GSM specifications keep the location up to the implementor. +The GPRS network architecture including PCU in BTS is shown in +<>. + +[[fig-gprs-pcubts]] +.GPRS network architecture with PCU in BTS +[graphviz] +---- +digraph G { + rankdir=LR; + MS0 [label="MS"] + MS1 [label="MS"] + BTS [label="BTS"] + BSC [label="BSC"] + MSC [label="MSC"] + PCU [label="PCU"] + SGSN [label="SGSN"] + MS0->BTS [label="Um"] + MS1->BTS [label="Um"] + BTS->BSC [label="Abis"] + BSC->MSC [label="A"] + BTS->PCU [label="pcu_sock"] + PCU->SGSN [label="Gb"] + SGSN->GGSN [label="GTP"] +} +---- + The PCU socket interface serves the following purposes: * to pass PCU relevant configuration from BTS to PCU -- To view, visit https://gerrit.osmocom.org/1514 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0eb09706efb768fa4f6810872fb6568cbc9838cb Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: ikostov Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Jan 3 19:22:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 3 Jan 2017 19:22:52 +0000 Subject: libosmo-abis[master]: osmo_ortp: use ortp_set_log_level_mask In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 we typcically don't introduce dependencies/requirements for new versions without a pressing need, particularly not later versions as those shipping in debian stable. if you want to build against more recent versions, autoconf and ifdefs appear to be needed. -- To view, visit https://gerrit.osmocom.org/1527 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icc87dbcd406906d8e2ef86b39360ff01efa38a9b Gerrit-PatchSet: 2 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 3 19:25:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 3 Jan 2017 19:25:37 +0000 Subject: libosmo-abis[master]: osmo_ortp: use ortp_set_log_level_mask In-Reply-To: References: Message-ID: Patch Set 2: we typcically don't introduce dependencies/requirements for new versions without a pressing need, particularly not later versions as those shipping in debian stable. if you want to build against more recent versions, autoconf and ifdefs appear to be needed. -- To view, visit https://gerrit.osmocom.org/1527 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icc87dbcd406906d8e2ef86b39360ff01efa38a9b Gerrit-PatchSet: 2 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 3 19:25:46 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 3 Jan 2017 19:25:46 +0000 Subject: libosmo-abis[master]: osmo_ortp: use ortp_set_log_level_mask In-Reply-To: References: Message-ID: Patch Set 2: we typcically don't introduce dependencies/requirements for new versions without a pressing need, particularly not later versions as those shipping in debian stable. if you want to build against more recent versions, autoconf and ifdefs appear to be needed. -- To view, visit https://gerrit.osmocom.org/1527 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icc87dbcd406906d8e2ef86b39360ff01efa38a9b Gerrit-PatchSet: 2 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 3 19:29:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 3 Jan 2017 19:29:12 +0000 Subject: libosmo-abis[master]: osmo_ortp: use ortp_set_log_level_mask In-Reply-To: References: Message-ID: Patch Set 2: Regarding version checking, what's wrong with `pkg-config --version ortp` ? Also, there might be some autoconf macro that checks for the number of function arguments, rather than just the existance of a function (like AC_CHECK_FUNC) -- To view, visit https://gerrit.osmocom.org/1527 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icc87dbcd406906d8e2ef86b39360ff01efa38a9b Gerrit-PatchSet: 2 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 3 20:25:56 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 3 Jan 2017 20:25:56 +0000 Subject: libosmocore[master]: libosmocoding: migrate transcoding routines from OsmoBTS In-Reply-To: References: Message-ID: Patch Set 9: > Regarding your question: can we have both? I mean smth like "pdtch" > and "pdtch_punctured" and let application choose which one to use? Hmm, let's see what others think about such approach. I think since we already have punctured code definitions, which correspond to the GSM 05.03 specification, it would be better to keep them 'as is' and add non-punctured equivalents named somehow like 'csX_non_punctured'. Another (I hope, the last) question is where to place such non-punctured definitions? - utils/conv_codes_gsm.py: the common place for all code definitions, but I am not sure that non-punctured codes could be used somewhere else... - src/coding/gsm0503_coding.c: as static structures near the gsm0503_pdtch_{en/de}code. I prefer this place. static const struct osmo_conv_code gsm0503_cs2_np = { .N = 2, .K = 5, .len = 290, .next_output = gsm0503_xcch.next_output, .next_state = gsm0503_xcch.next_state, }; static const struct osmo_conv_code gsm0503_cs3_np = { .N = 2, .K = 5, .len = 334, .next_output = gsm0503_xcch.next_output, .next_state = gsm0503_xcch.next_state, }; Also, could someone please retrigger Jenkins? Thanks! -- To view, visit https://gerrit.osmocom.org/933 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0c3256b87686d878e4e716d12393cad5924fdfa1 Gerrit-PatchSet: 9 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Tom Tsou Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 3 21:28:47 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 3 Jan 2017 21:28:47 +0000 Subject: libosmocore[master]: libosmocoding: migrate transcoding routines from OsmoBTS In-Reply-To: References: Message-ID: Patch Set 9: > Also, could someone please retrigger Jenkins? Thanks! can do, but since this needs a merge conflict resolved apparently, just push a new patch version to trigger a build? -- To view, visit https://gerrit.osmocom.org/933 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0c3256b87686d878e4e716d12393cad5924fdfa1 Gerrit-PatchSet: 9 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Tom Tsou Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 3 21:31:15 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 3 Jan 2017 21:31:15 +0000 Subject: [PATCH] osmo-pcu[master]: fix segfault: check for NULL tbf in sched_select_ctrl_msg() In-Reply-To: References: Message-ID: Hello Max, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1510 to look at the new patch set (#2). fix segfault: check for NULL tbf in sched_select_ctrl_msg() Apparently fixes a corrupted stack looking like this on sysmobts: (gdb) run Starting program: /usr/bin/osmo-pcu -c /etc/osmocom/osmo-pcu.cfg [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/libthread_db.so.1". <000b> telnet_interface.c:95 telnet at 127.0.0.1 4240 <0001> osmobts_sock.cpp:227 Opening OsmoPCU L1 interface to OsmoBTS <0001> osmobts_sock.cpp:285 osmo-bts PCU socket has been connected <0001> pcu_l1_if.cpp:368 BTS available <0008> gprs_ns.c:233 NSVCI=65534 Creating NS-VC <0008> gprs_ns.c:233 NSVCI=100 Creating NS-VC <0008> gprs_ns.c:1568 NSEI=100 RESET procedure based on API request <0008> gprs_ns.c:393 NSEI=100 Tx NS RESET (NSVCI=100, cause=O&M intervention) <0001> pcu_l1_if.cpp:83 Sending activate request: trx=0 ts=2 <0001> pcu_l1_if.cpp:495 PDCH: trx=0 ts=2 <0001> pcu_l1_if.cpp:83 Sending activate request: trx=0 ts=3 <0001> pcu_l1_if.cpp:495 PDCH: trx=0 ts=3 <0001> pcu_l1_if.cpp:83 Sending activate request: trx=0 ts=4 <0001> pcu_l1_if.cpp:495 PDCH: trx=0 ts=4 <0001> pcu_l1_if.cpp:83 Sending activate request: trx=0 ts=5 <0001> pcu_l1_if.cpp:495 PDCH: trx=0 ts=5 <0001> pcu_l1_if.cpp:83 Sending activate request: trx=0 ts=6 <0001> pcu_l1_if.cpp:495 PDCH: trx=0 ts=6 <0001> pcu_l1_if.cpp:83 Sending activate request: trx=0 ts=7 <0001> pcu_l1_if.cpp:495 PDCH: trx=0 ts=7 <0001> pcu_l1_if.cpp:319 RACH request received: sapi=1 qta=0, ra=120, fn=103198 <0009> tbf_ul.cpp:373 LLC [PCU -> SGSN] TBF(TFI=0 TLLI=0x7f2dd569 DIR=UL STATE=FLOW) len=6 <0008> gprs_ns.c:684 All NS-VCs for NSEI 100 are either dead or blocked! Program received signal SIGSEGV, Segmentation fault. gprs_rlcmac_rcv_rts_block (bts=0x60a08, trx=trx at entry=0 '\000', ts=ts at entry=4 '\004', fn=7, fn at entry=103272, block_nr=block_nr at entry=0 '\000') at gprs_rlcmac_sched.cpp:349 349 gprs_rlcmac_sched.cpp: No such file or directory. (gdb) bt #0 gprs_rlcmac_rcv_rts_block (bts=0x60a08, trx=trx at entry=0 '\000', ts=ts at entry=4 '\004', fn=7, fn at entry=103272, block_nr=block_nr at entry=0 '\000') at gprs_rlcmac_sched.cpp:349 #1 0x0001151c in pcu_rx_rts_req_pdtch (trx=, ts=, fn=103272, block_nr=) at pcu_l1_if.cpp:279 #2 0x0000bfcc in handle_ph_readytosend_ind (fl1h=0xafa40, rts_ind=0xb03f8) at osmo-bts-sysmo/sysmo_l1_if.c:142 #3 l1if_handle_l1prim (wq=, fl1h=0xafa40, msg=0xb0330) at osmo-bts-sysmo/sysmo_l1_if.c:259 #4 0x4fcd6330 in osmo_fd_disp_fds (_eset=0xbefffb68, _wset=0xbefffae8, _rset=0xbefffa68) at select.c:149 #5 osmo_select_main (polling=) at select.c:189 #6 0x0000b2a0 in main (argc=, argv=0x66628 <_ZStL8__ioinit>) at pcu_main.cpp:295 Fixes: coverity CID#158969 Related: https://lists.osmocom.org/pipermail/osmocom-net-gprs/2016-December/000785.html Change-Id: I357492e558e98cfdbf5bb3438b5013029195b02b --- M src/gprs_rlcmac_sched.cpp 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/10/1510/2 diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp index fdda79d..8b27cac 100644 --- a/src/gprs_rlcmac_sched.cpp +++ b/src/gprs_rlcmac_sched.cpp @@ -173,6 +173,9 @@ } } + if (!tbf) + return NULL; + /* any message */ if (msg) { tbf->rotate_in_list(); -- To view, visit https://gerrit.osmocom.org/1510 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I357492e558e98cfdbf5bb3438b5013029195b02b Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Tue Jan 3 22:06:33 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 3 Jan 2017 22:06:33 +0000 Subject: osmo-gsm-manuals[master]: BSC, BTS: add diagrams of PCU-BTS-NITB-SGSN relationships In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 (8 comments) more cosmetics... https://gerrit.osmocom.org/#/c/1514/2/OsmoBSC/chapters/overview.adoc File OsmoBSC/chapters/overview.adoc: Line 32: BSC [label="BSC"] either use tabs everywhere or spaces everywhere, please don't mix whitespace kinds (numerous more below) Line 35: EIR [label="EIR"] if the item and label are identical, just drop the "[label=...]" part. Line 36: SMSC [label="SMSC"] whitespace at end of line (three more below) Line 57: MS0 [label="MS"]; interesting, digraph works both with-semicolon and without-semicolon at the line end? let's decide for one way and have it the same everywhere. Apparently all other digraphs in the osmo-gsm-manuals are written *with* semicolon. That means above digraph script should also have semicoli. Line 75: SMSC [label="SMSC"]; hmm weird, even though HLR, EIR, SMSC appear in the same order as above, the graph is rendered in the opposite order. I'd rather reverse the order here to first SMSC, then EIR, then HLR, so that the graph is rendered the same as above. Seems to be a digraph "bug"? Line 87: MSC -> "Linux Call Router / SoftSwitch / PBX" [label="MNCC"] this is bloated. * above, declare: EXTMNCC [label="Linux Call Router / SoftSwitch / PBX\n(optional)"]; * Here, instead of the second subgraph and repeated long label, simply write: MSC -> EXTMNCC [label="external MNCC"]; https://gerrit.osmocom.org/#/c/1514/2/OsmoBTS/chapters/interfaces.adoc File OsmoBTS/chapters/interfaces.adoc: Line 124: rankdir=LR; add semicoli below? Line 131: SGSN [label="SGSN"] GGSN is also still missing. Drop "[label=...]" part for identically named items. -- To view, visit https://gerrit.osmocom.org/1514 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0eb09706efb768fa4f6810872fb6568cbc9838cb Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: ikostov Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Jan 4 03:23:36 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 4 Jan 2017 03:23:36 +0000 Subject: [PATCH] libosmocore[master]: Revert "Revert "gsm0408: add chreq_type for CHREQ_T_PDCH_ONE... In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1361 to look at the new patch set (#2). Revert "Revert "gsm0408: add chreq_type for CHREQ_T_PDCH_ONE_PHASE and CHREQ_T_PDCH_TWO_PHASE"" This patch needs to be applied at the same time as openbsc change-id Ie7f4ed000cf1b40d269873cf0ddf5ff9f5bbc18a -- it was reverted to avoid a breakage in openbsc until the openbsc patch is ready. This revert-of-the-revert puts the patch back in line to be applied along with its openbsc counterpart. This reverts commit 909cbecbb9d3223b3b372849564600bb9be7fbda. Change-Id: I6676105507fe4e5627f740dfe4c2770f766ad068 --- M include/osmocom/gsm/protocol/gsm_04_08.h 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/61/1361/2 diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h index 767aa3d..c05b62e 100644 --- a/include/osmocom/gsm/protocol/gsm_04_08.h +++ b/include/osmocom/gsm/protocol/gsm_04_08.h @@ -1456,6 +1456,8 @@ CHREQ_T_PAG_R_TCH_F, CHREQ_T_PAG_R_TCH_FH, CHREQ_T_LMU, + CHREQ_T_PDCH_ONE_PHASE, + CHREQ_T_PDCH_TWO_PHASE, CHREQ_T_RESERVED_SDCCH, CHREQ_T_RESERVED_IGNORE, }; -- To view, visit https://gerrit.osmocom.org/1361 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I6676105507fe4e5627f740dfe4c2770f766ad068 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Wed Jan 4 03:30:49 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 4 Jan 2017 03:30:49 +0000 Subject: libosmocore[master]: Revert "Revert "gsm0408: add chreq_type for CHREQ_T_PDCH_ONE... In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 To have this ready, adding my +2, but please don't apply on its own, make sure the openbsc counterpart is also ready. i.e. first collect a CR+2 there, then apply this, immediately trigger a V+1 there and apply as soon as possible. -- To view, visit https://gerrit.osmocom.org/1361 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6676105507fe4e5627f740dfe4c2770f766ad068 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 4 07:19:44 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 4 Jan 2017 07:19:44 +0000 Subject: [PATCH] libosmocore[master]: libosmocoding: migrate transcoding routines from OsmoBTS In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/933 to look at the new patch set (#10). libosmocoding: migrate transcoding routines from OsmoBTS There are some projects, such as GR-GSM and OsmocomBB, which would benefit from using one shared implementation of GSM 05.03 code. So, this commit introduces a new sub-library called libosmocoding, which (for now) provides GSM, GPRS and EDGE transcoding routines, migrated from OsmoBTS. The original GSM 05.03 code from OsmoBTS was relicensed under GPLv2-or-later with permission of copyright holders (Andreas Eversberg, Alexander Chemeris and Tom Tsou). The following data types are currently supported: - xCCH - PDTCH (CS 1-4 and MCS 1-9) - TCH/FR - TCH/HR - TCH/AFS - RCH/AHS - RACH - SCH Change-Id: I0c3256b87686d878e4e716d12393cad5924fdfa1 --- M .gitignore A Doxyfile.coding.in M Makefile.am M configure.ac M debian/control M include/Makefile.am A include/osmocom/coding/gsm0503_coding.h A include/osmocom/coding/gsm0503_interleaving.h A include/osmocom/coding/gsm0503_mapping.h A include/osmocom/coding/gsm0503_parity.h A include/osmocom/coding/gsm0503_tables.h M include/osmocom/gsm/gsm0503.h A libosmocoding.pc.in A src/coding/Makefile.am A src/coding/gsm0503_coding.c A src/coding/gsm0503_interleaving.c A src/coding/gsm0503_mapping.c A src/coding/gsm0503_parity.c A src/coding/gsm0503_tables.c A src/coding/libosmocoding.map M src/gsm/libosmogsm.map M tests/Makefile.am A tests/coding/coding_test.c A tests/coding/coding_test.ok M tests/testsuite.at M utils/conv_codes_gsm.py 26 files changed, 8,109 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/33/933/10 -- To view, visit https://gerrit.osmocom.org/933 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0c3256b87686d878e4e716d12393cad5924fdfa1 Gerrit-PatchSet: 10 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Tom Tsou Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt From gerrit-no-reply at lists.osmocom.org Wed Jan 4 07:44:43 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 4 Jan 2017 07:44:43 +0000 Subject: libosmocore[master]: libosmocoding: migrate transcoding routines from OsmoBTS In-Reply-To: References: Message-ID: Patch Set 10: > > Also, could someone please retrigger Jenkins? Thanks! > > can do, but since this needs a merge conflict resolved apparently, > just push a new patch version to trigger a build? Done! Well, strange things still happen... Jenkins check fails on both machines... -tch_hr_decode: n_errors=11 n_bits_total=211 ber=0.05 +tch_hr_decode: n_errors=10 n_bits_total=211 ber=0.05 I don't know why, but on my development machine both: make check and make distcheck are successful. Tested on: - gcc version 4.8.4 - gcc version 5.4.0 - clang-3.6 -- To view, visit https://gerrit.osmocom.org/933 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0c3256b87686d878e4e716d12393cad5924fdfa1 Gerrit-PatchSet: 10 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Tom Tsou Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 4 08:55:45 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 4 Jan 2017 08:55:45 +0000 Subject: libosmocore[master]: libosmocoding: migrate transcoding routines from OsmoBTS In-Reply-To: References: Message-ID: Patch Set 10: > > > Also, could someone please retrigger Jenkins? Thanks! > > > > can do, but since this needs a merge conflict resolved > apparently, > > just push a new patch version to trigger a build? > > Done! > > Well, strange things still happen... > Jenkins check fails on both machines... > > -tch_hr_decode: n_errors=11 n_bits_total=211 ber=0.05 > +tch_hr_decode: n_errors=10 n_bits_total=211 ber=0.05 > > I don't know why, but on my development machine both: > make check and make distcheck are successful. Tested on: > > - gcc version 4.8.4 > - gcc version 5.4.0 > - clang-3.6 I think it's due to --enable-sanitize, because when I am trying to compile libosmocore this way: ./configure --enable-static --enable-sanitize make check Some other tests fail (current master version, clang-3.6): Regression tests. 1: a5 ok 2: kasumi ok 3: bits ok 4: bitvec ok 5: bitcomp ok 6: conv ok 7: msgb ok 8: gea FAILED (testsuite.at:51) 9: msgfile FAILED (testsuite.at:59) 10: sms ok 11: smscb ok 12: ussd ok 13: auth ok 14: comp128 ok 15: lapd FAILED (testsuite.at:96) 16: gsm0808 FAILED (testsuite.at:102) 17: gsm0408 FAILED (testsuite.at:108) 18: gprs ok 19: logging ok 20: codec ok 21: fr ok 22: loggingrb ok 23: strrb ok 24: vty ok 25: gprs-bssgp ok 26: gprs-ns ok 27: utils ok 28: stats ok 29: write_queue ok 30: bssgp-fc FAILED (testsuite.at:190) 31: sim ok 32: timer ok 33: tlv ok 34: gsup ok 35: fsm ok 36: oap ok -- To view, visit https://gerrit.osmocom.org/933 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0c3256b87686d878e4e716d12393cad5924fdfa1 Gerrit-PatchSet: 10 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Tom Tsou Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 4 09:14:11 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 4 Jan 2017 09:14:11 +0000 Subject: [PATCH] libosmocore[master]: gitignore: ignore tests/oap/oap_test Message-ID: Review at https://gerrit.osmocom.org/1528 gitignore: ignore tests/oap/oap_test Change-Id: Iccb8c46a721d5389058c5cf36621820bcd861b7b --- M .gitignore 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/28/1528/1 diff --git a/.gitignore b/.gitignore index 50209b0..d333b27 100644 --- a/.gitignore +++ b/.gitignore @@ -96,6 +96,7 @@ tests/tlv/tlv_test tests/fsm/fsm_test tests/write_queue/wqueue_test +tests/oap/oap_test utils/osmo-arfcn utils/osmo-auc-gen -- To view, visit https://gerrit.osmocom.org/1528 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iccb8c46a721d5389058c5cf36621820bcd861b7b Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Wed Jan 4 09:14:11 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 4 Jan 2017 09:14:11 +0000 Subject: [PATCH] libosmocore[master]: gitignore: ignore *.pyc files Message-ID: Review at https://gerrit.osmocom.org/1529 gitignore: ignore *.pyc files Change-Id: I148584e1664b20741c0ade02cbda635c24268d2e --- M .gitignore 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/29/1529/1 diff --git a/.gitignore b/.gitignore index d333b27..fb159c3 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ *.lo *.la *.pc +*.pyc aclocal.m4 acinclude.m4 aminclude.am -- To view, visit https://gerrit.osmocom.org/1529 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I148584e1664b20741c0ade02cbda635c24268d2e Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Wed Jan 4 09:19:40 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 4 Jan 2017 09:19:40 +0000 Subject: libosmocore[master]: gitignore: ignore *.pyc files In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1529 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I148584e1664b20741c0ade02cbda635c24268d2e Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 4 09:19:50 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 4 Jan 2017 09:19:50 +0000 Subject: libosmocore[master]: gitignore: ignore tests/oap/oap_test In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1528 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iccb8c46a721d5389058c5cf36621820bcd861b7b Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 4 09:27:30 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 4 Jan 2017 09:27:30 +0000 Subject: libosmo-abis[master]: osmo_ortp: use ortp_set_log_level_mask In-Reply-To: References: Message-ID: Patch Set 2: Curious: pkg-config --version ortp gives me 0.29.1 but I don't need this patch to compile libosmo-abis. Could be some ubuntu-specific mods though. -- To view, visit https://gerrit.osmocom.org/1527 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icc87dbcd406906d8e2ef86b39360ff01efa38a9b Gerrit-PatchSet: 2 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 4 10:25:49 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 4 Jan 2017 10:25:49 +0000 Subject: [PATCH] libosmocore[master]: gprs_cipher_core: Use typecase to avoid sanitizer error Message-ID: Review at https://gerrit.osmocom.org/1530 gprs_cipher_core: Use typecase to avoid sanitizer error This resolves gprs_cipher_core.c:118:37: runtime error: left shift of 1 by 31 places cannot be represented in type 'int' Change-Id: Ib1866595030ad9d11c886621ce69632462befa3a --- M src/gsm/gprs_cipher_core.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/30/1530/1 diff --git a/src/gsm/gprs_cipher_core.c b/src/gsm/gprs_cipher_core.c index 8f020b3..da6e0a8 100644 --- a/src/gsm/gprs_cipher_core.c +++ b/src/gsm/gprs_cipher_core.c @@ -115,7 +115,7 @@ /* GSM TS 04.64 / Section A.2.1 : Generation of 'input' */ uint32_t gprs_cipher_gen_input_ui(uint32_t iov_ui, uint8_t sapi, uint32_t lfn, uint32_t oc) { - uint32_t sx = ((1<<27) * sapi) + (1<<31); + uint32_t sx = ((1<<27) * sapi) + ((uint32_t ) 1<<31); return (iov_ui ^ sx) + lfn + oc; } -- To view, visit https://gerrit.osmocom.org/1530 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib1866595030ad9d11c886621ce69632462befa3a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Wed Jan 4 10:25:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 4 Jan 2017 10:25:50 +0000 Subject: [PATCH] libosmocore[master]: lapd_test: avoid calling memcpy with NULL source Message-ID: Review at https://gerrit.osmocom.org/1531 lapd_test: avoid calling memcpy with NULL source fixes lapd/lapd_test.c:54:2: runtime error: null pointer passed as argument 2, which is declared to never be null Change-Id: I7030729f4f4c867adecc7afc15bb5ca9beff0030 --- M tests/lapd/lapd_test.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/31/1531/1 diff --git a/tests/lapd/lapd_test.c b/tests/lapd/lapd_test.c index 18ea1dc..e322314 100644 --- a/tests/lapd/lapd_test.c +++ b/tests/lapd/lapd_test.c @@ -51,7 +51,8 @@ { struct msgb *msg = msgb_alloc_headroom(4096, 128, "data"); msg->l3h = msgb_put(msg, len); - memcpy(msg->l3h, data, len); + if (data && len) + memcpy(msg->l3h, data, len); return msg; } -- To view, visit https://gerrit.osmocom.org/1531 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7030729f4f4c867adecc7afc15bb5ca9beff0030 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Wed Jan 4 10:26:11 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 4 Jan 2017 10:26:11 +0000 Subject: [PATCH] osmo-bts[master]: DTX AMR HR: fix inhibition In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1508 to look at the new patch set (#4). DTX AMR HR: fix inhibition * Unlike in AMR FR, in AMR HR incoming ONSET have to be treated differently depending on whether we've recently sent SID UPDATE or EMPTY frame. Split ST_SID_U FSM state into 2 states to accommodate for that and make sure that additional states specific to AMR HR are not used for AMR FR. * Avoid sending E_VOICE and E_SID_U in corresponding states as those do not initiate FSM state transitions anyway. This decrease extra load from FSM signalling which otherwise would be triggered on per-frame basis. * Introduce separate signal for SID First P1 -> P2 transition to avoid confusion with E_COMPL and E_SID_U initiated transitions from P1 state. * Don't init DTX FSM for SDCCH channels. Change-Id: I229ba39a38a223fada4881fc9aca35d3639371f8 Related: OS#1801 --- M include/osmo-bts/dtx_dl_amr_fsm.h M include/osmo-bts/msg_utils.h M src/common/bts.c M src/common/dtx_dl_amr_fsm.c M src/common/l1sap.c M src/common/msg_utils.c M src/osmo-bts-litecell15/l1_if.c M src/osmo-bts-litecell15/tch.c M src/osmo-bts-sysmo/l1_if.c M src/osmo-bts-sysmo/tch.c 10 files changed, 135 insertions(+), 42 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/08/1508/4 diff --git a/include/osmo-bts/dtx_dl_amr_fsm.h b/include/osmo-bts/dtx_dl_amr_fsm.h index 4fb2f25..f747f9f 100644 --- a/include/osmo-bts/dtx_dl_amr_fsm.h +++ b/include/osmo-bts/dtx_dl_amr_fsm.h @@ -14,6 +14,7 @@ ST_SID_F2, ST_F1_INH, ST_U_INH, + ST_U_NOINH, ST_F1_INH_REC, ST_U_INH_REC, ST_SID_U, @@ -29,6 +30,7 @@ E_ONSET, E_FACCH, E_COMPL, + E_FIRST, E_INHIB, E_SID_F, E_SID_U, diff --git a/include/osmo-bts/msg_utils.h b/include/osmo-bts/msg_utils.h index 55e8475..7ddbe88 100644 --- a/include/osmo-bts/msg_utils.h +++ b/include/osmo-bts/msg_utils.h @@ -37,6 +37,7 @@ void dtx_dispatch(struct gsm_lchan *lchan, enum dtx_dl_amr_fsm_events e); bool dtx_recursion(const struct gsm_lchan *lchan); void dtx_int_signal(struct gsm_lchan *lchan); +bool dtx_is_first_p1(const struct gsm_lchan *lchan); void dtx_cache_payload(struct gsm_lchan *lchan, const uint8_t *l1_payload, size_t length, uint32_t fn, int update); int dtx_dl_amr_fsm_step(struct gsm_lchan *lchan, const uint8_t *rtp_pl, diff --git a/src/common/bts.c b/src/common/bts.c index 9c2f0e0..d249137 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -45,6 +45,7 @@ #include #include #include +#include #define MIN_QUAL_RACH 5.0f /* at least 5 dB C/I */ #define MIN_QUAL_NORM -0.5f /* at least -1 dB C/I */ diff --git a/src/common/dtx_dl_amr_fsm.c b/src/common/dtx_dl_amr_fsm.c index d903b0c..832e8b4 100644 --- a/src/common/dtx_dl_amr_fsm.c +++ b/src/common/dtx_dl_amr_fsm.c @@ -47,7 +47,7 @@ Was observed during testing, let's just ignore it for now */ break; case E_SID_U: - osmo_fsm_inst_state_chg(fi, ST_SID_U, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_U_NOINH, 0, 0); break; case E_VOICE: osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); @@ -55,7 +55,7 @@ case E_FACCH: osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); break; - case E_COMPL: + case E_FIRST: osmo_fsm_inst_state_chg(fi, ST_SID_F2, 0, 0); break; case E_INHIB: @@ -74,7 +74,7 @@ void dtx_fsm_sid_f2(struct osmo_fsm_inst *fi, uint32_t event, void *data) { switch (event) { - case E_SID_U: + case E_COMPL: osmo_fsm_inst_state_chg(fi, ST_SID_U, 0, 0); break; case E_VOICE: @@ -145,6 +145,33 @@ } } +void dtx_fsm_u_noinh(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_FACCH: + osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + break; + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); + break; + case E_COMPL: + osmo_fsm_inst_state_chg(fi, ST_SID_U, 0, 0); + break; + case E_SID_U: + case E_SID_F: +/* FIXME: what shall we do if we get SID-FIRST _after_ sending SID-UPDATE? + Was observed during testing, let's just ignore it for now */ + break; + case E_ONSET: + osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + void dtx_fsm_sid_upd(struct osmo_fsm_inst *fi, uint32_t event, void *data) { switch (event) { @@ -159,11 +186,7 @@ break; case E_SID_U: case E_SID_F: -/* FIXME: what shall we do if we get SID-FIRST _after_ sending SID-UPDATE? - Was observed during testing, let's just ignore it for now */ - break; - case E_ONSET: - osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_U_NOINH, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -255,15 +278,15 @@ /* SID-FIRST or SID-FIRST-P1 in case of AMR HR: start of silence period (might be interrupted in case of AMR HR) */ [ST_SID_F1]= { - .in_event_mask = X(E_SID_F) | X(E_SID_U) | X(E_VOICE) | X(E_FACCH) | X(E_COMPL) | X(E_INHIB) | X(E_ONSET), - .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_ONSET_F) | X(ST_SID_F2) | X(ST_F1_INH) | X(ST_ONSET_V), + .in_event_mask = X(E_SID_F) | X(E_SID_U) | X(E_VOICE) | X(E_FACCH) | X(E_FIRST) | X(E_INHIB) | X(E_ONSET), + .out_state_mask = X(ST_U_NOINH) | X(ST_VOICE) | X(ST_ONSET_F) | X(ST_SID_F2) | X(ST_F1_INH) | X(ST_ONSET_V), .name = "SID-FIRST (P1)", .action = dtx_fsm_sid_f1, }, /* SID-FIRST P2 (only for AMR HR): actual start of silence period in case of AMR HR */ [ST_SID_F2]= { - .in_event_mask = X(E_SID_U) | X(E_VOICE) | X(E_FACCH) | X(E_ONSET), + .in_event_mask = X(E_COMPL) | X(E_VOICE) | X(E_FACCH) | X(E_ONSET), .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_ONSET_F) | X(ST_ONSET_V), .name = "SID-FIRST (P2)", .action = dtx_fsm_sid_f2, @@ -281,6 +304,13 @@ .out_state_mask = X(ST_U_INH_REC), .name = "SID-UPDATE (Inh)", .action = dtx_fsm_u_inh, + }, + /* SID-UPDATE: Inhibited not allowed (only for AMR HR) */ + [ST_U_NOINH]= { + .in_event_mask = X(E_FACCH) | X(E_VOICE) | X(E_COMPL) | X(E_SID_U) | X(E_SID_F) | X(E_ONSET), + .out_state_mask = X(ST_ONSET_F) | X(ST_VOICE) | X(ST_SID_U) | X(ST_ONSET_V), + .name = "SID-UPDATE (NoInh)", + .action = dtx_fsm_u_noinh, }, /* SID-FIRST Inhibition recursion in progress: Inhibit itself was already sent, now have to send the voice that caused it */ @@ -300,9 +330,9 @@ }, /* Silence period with periodic comfort noise data updates */ [ST_SID_U]= { - .in_event_mask = X(E_FACCH) | X(E_VOICE) | X(E_INHIB) | X(E_SID_U) | X(E_SID_F) | X(E_ONSET), - .out_state_mask = X(ST_ONSET_F) | X(ST_VOICE) | X(ST_U_INH) | X(ST_SID_U) | X(ST_ONSET_V), - .name = "SID-UPDATE", + .in_event_mask = X(E_FACCH) | X(E_VOICE) | X(E_INHIB) | X(E_SID_U) | X(E_SID_F), + .out_state_mask = X(ST_ONSET_F) | X(ST_VOICE) | X(ST_U_INH) | X(ST_U_NOINH), + .name = "SID-UPDATE (AMR/HR)", .action = dtx_fsm_sid_upd, }, /* ONSET - end of silent period due to incoming SPEECH frame */ @@ -350,6 +380,7 @@ { E_ONSET, "ONSET" }, { E_FACCH, "FACCH" }, { E_COMPL, "Complete" }, + { E_FIRST, "FIRST P1->P2" }, { E_INHIB, "Inhibit" }, { E_SID_F, "SID-FIRST" }, { E_SID_U, "SID-UPDATE" }, diff --git a/src/common/l1sap.c b/src/common/l1sap.c index e9c94f0..e6e53db 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -1161,8 +1161,7 @@ return -RSL_ERR_EQUIPMENT_FAIL; /* Init DTX DL FSM if necessary */ - //FIXME: only do it for AMR TCH/* - if (trx->bts->dtxd) + if (trx->bts->dtxd && lchan->type != GSM_LCHAN_SDCCH) lchan->tch.dtx.dl_amr_fsm = osmo_fsm_inst_alloc(&dtx_dl_amr_fsm, tall_bts_ctx, lchan, diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index 9de9b6d..062f5e3 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -93,6 +93,28 @@ return type; } +/* check that DTX is in the middle of silence */ +static inline bool dtx_is_update(const struct gsm_lchan *lchan) +{ + if (!dtx_dl_amr_enabled(lchan)) + return false; + if (lchan->tch.dtx.dl_amr_fsm->state == ST_SID_U || + lchan->tch.dtx.dl_amr_fsm->state == ST_U_NOINH) + return true; + return false; +} + +/* check that DTX is in the beginning of silence for AMR HR */ +bool dtx_is_first_p1(const struct gsm_lchan *lchan) +{ + if (!dtx_dl_amr_enabled(lchan)) + return false; + if ((lchan->type == GSM_LCHAN_TCH_H && + lchan->tch.dtx.dl_amr_fsm->state == ST_SID_F1)) + return true; + return false; +} + /* update lchan SID status */ void lchan_set_marker(bool t, struct gsm_lchan *lchan) { @@ -123,9 +145,7 @@ if (update == 0) { lchan->tch.dtx.is_update = false; /* Mark SID FIRST explicitly */ /* for non-AMR case - always update FN for incoming SID FIRST */ - if (!amr || - (dtx_dl_amr_enabled(lchan) && - lchan->tch.dtx.dl_amr_fsm->state != ST_SID_U)) + if (!amr || !dtx_is_update(lchan)) lchan->tch.dtx.fn = fn; /* for AMR case - do not update FN if SID FIRST arrives in a middle of silence: this should not be happening according to @@ -157,12 +177,24 @@ int rc; if (dtx_dl_amr_enabled(lchan)) { - if (lchan->type == GSM_LCHAN_TCH_H && - lchan->tch.dtx.dl_amr_fsm->state == ST_SID_F2 && !rtp_pl) { - *len = 3; /* SID-FIRST P1 -> P2 completion */ - memcpy(l1_payload, lchan->tch.dtx.cache, 2); - dtx_dispatch(lchan, E_SID_U); - return 0; + if (lchan->type == GSM_LCHAN_TCH_H && !rtp_pl) { + /* we're called by gen_empty_tch_msg() to handle states + specific to AMR HR DTX */ + switch (lchan->tch.dtx.dl_amr_fsm->state) { + case ST_SID_F2: + *len = 3; /* SID-FIRST P1 -> P2 completion */ + memcpy(l1_payload, lchan->tch.dtx.cache, 2); + rc = 0; + dtx_dispatch(lchan, E_COMPL); + break; + case ST_SID_U: + rc = -EBADMSG; + dtx_dispatch(lchan, E_SID_U); + break; + default: + rc = -EBADMSG; + } + return rc; } } @@ -171,8 +203,8 @@ rc = osmo_amr_rtp_dec(rtp_pl, rtp_pl_len, &cmr, &cmi, &ft, &bfi, &sti); if (rc < 0) { - LOGP(DRTP, LOGL_ERROR, "failed to decode AMR RTP (length %zu)\n", - rtp_pl_len); + LOGP(DRTP, LOGL_ERROR, "failed to decode AMR RTP (length %zu, " + "%p)\n", rtp_pl_len, rtp_pl); return rc; } @@ -197,19 +229,29 @@ return 0; if (osmo_amr_is_speech(ft)) { - /* AMR HR - Inhibition */ - if (lchan->type == GSM_LCHAN_TCH_H && marker && - lchan->tch.dtx.dl_amr_fsm->state == ST_SID_F1) + /* AMR HR - SID-FIRST_P1 Inhibition */ + if (marker && dtx_is_first_p1(lchan)) return osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, E_INHIB, (void *)lchan); + + /* AMR HR - SID-UPDATE Inhibition */ + if (marker && lchan->type == GSM_LCHAN_TCH_H && + lchan->tch.dtx.dl_amr_fsm->state == ST_SID_U) + return osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, + E_INHIB, (void *)lchan); + /* AMR FR & HR - generic */ if (marker && (lchan->tch.dtx.dl_amr_fsm->state == ST_SID_F1 || lchan->tch.dtx.dl_amr_fsm->state == ST_SID_F2 || - lchan->tch.dtx.dl_amr_fsm->state == ST_SID_U )) + lchan->tch.dtx.dl_amr_fsm->state == ST_U_NOINH)) return osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, E_ONSET, (void *)lchan); - return osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, E_VOICE, - (void *)lchan); + + if (lchan->tch.dtx.dl_amr_fsm->state != ST_VOICE) + return osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, + E_VOICE, (void *)lchan); + + return 0; } if (ft == AMR_SID) { @@ -220,8 +262,11 @@ dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, false); return osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, E_SID_F, (void *)lchan); - } else + } else if (lchan->tch.dtx.dl_amr_fsm->state != ST_FACCH) dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, sti); + if (lchan->tch.dtx.dl_amr_fsm->state == ST_SID_F2) + return osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, + E_COMPL, (void *)lchan); return osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, sti ? E_SID_U : E_SID_F, (void *)lchan); @@ -357,6 +402,7 @@ return false; if (lchan->tch.dtx.dl_amr_fsm->state == ST_U_INH || + lchan->tch.dtx.dl_amr_fsm->state == ST_U_INH_REC || lchan->tch.dtx.dl_amr_fsm->state == ST_F1_INH || lchan->tch.dtx.dl_amr_fsm->state == ST_ONSET_F || lchan->tch.dtx.dl_amr_fsm->state == ST_ONSET_V || @@ -389,9 +435,7 @@ if (!dtx_dl_amr_enabled(lchan)) return; - if ((lchan->type == GSM_LCHAN_TCH_H && - lchan->tch.dtx.dl_amr_fsm->state == ST_SID_F1) || - dtx_recursion(lchan)) + if (dtx_is_first_p1(lchan) || dtx_recursion(lchan)) dtx_dispatch(lchan, E_COMPL); } @@ -425,12 +469,17 @@ osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, E_SID_U, (void *)lchan); dtx_sti_unset(lchan); - } else if (lchan->tch.dtx.dl_amr_fsm->state == - ST_SID_U) { + } else if (dtx_is_update(lchan)) { /* enforce SID UPDATE for next repetition: it might have been altered by FACCH handling */ dtx_sti_set(lchan); - lchan->tch.dtx.is_update = true; + if (lchan->type == GSM_LCHAN_TCH_H && + lchan->tch.dtx.dl_amr_fsm->state == + ST_U_NOINH) + osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, + E_COMPL, + (void *)lchan); + lchan->tch.dtx.is_update = true; } } memcpy(dst, lchan->tch.dtx.cache, lchan->tch.dtx.len); diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index d959338..99533d7 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -416,6 +416,7 @@ } if (sapi == GsmL1_Sapi_FacchH) { sapi = GsmL1_Sapi_TchH; + subCh = L1SAP_CHAN2SS_TCHH(chan_nr); } if (sapi == GsmL1_Sapi_TchH || sapi == GsmL1_Sapi_TchF) { /* FACCH interruption of DTX silence */ @@ -542,7 +543,10 @@ } /* send message to DSP's queue */ osmo_wqueue_enqueue(&fl1->write_q[MQ_L1_WRITE], nmsg); - dtx_int_signal(lchan); + if (dtx_is_first_p1(lchan)) + dtx_dispatch(lchan, E_FIRST); + else + dtx_int_signal(lchan); if (dtx_recursion(lchan)) /* DTX: send voice after ONSET was sent */ return ph_tch_req(trx, l1sap->oph.msg, l1sap, true, false); diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index de3c7e3..a47a88f 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -322,6 +322,7 @@ dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); return 1; case ST_SID_U: + case ST_U_NOINH: return -EAGAIN; case ST_FACCH: return -EBADMSG; diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 2a3caf9..ad9aa64 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -411,6 +411,7 @@ } if (sapi == GsmL1_Sapi_FacchH) { sapi = GsmL1_Sapi_TchH; + subCh = L1SAP_CHAN2SS_TCHH(chan_nr); } if (sapi == GsmL1_Sapi_TchH || sapi == GsmL1_Sapi_TchF) { /* FACCH interruption of DTX silence */ @@ -537,7 +538,10 @@ } /* send message to DSP's queue */ osmo_wqueue_enqueue(&fl1->write_q[MQ_L1_WRITE], nmsg); - dtx_int_signal(lchan); + if (dtx_is_first_p1(lchan)) + dtx_dispatch(lchan, E_FIRST); + else + dtx_int_signal(lchan); if (dtx_recursion(lchan)) /* DTX: send voice after ONSET was sent */ return ph_tch_req(trx, l1sap->oph.msg, l1sap, true, false); diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index 16c2cf3..bc495d9 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -420,6 +420,7 @@ dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); return 1; case ST_SID_U: + case ST_U_NOINH: return -EAGAIN; case ST_FACCH: return -EBADMSG; -- To view, visit https://gerrit.osmocom.org/1508 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I229ba39a38a223fada4881fc9aca35d3639371f8 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jean-Francois Dionne Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Jan 4 10:31:12 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 4 Jan 2017 10:31:12 +0000 Subject: libosmocore[master]: lapd_test: avoid calling memcpy with NULL source In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1531 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7030729f4f4c867adecc7afc15bb5ca9beff0030 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 4 10:32:30 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 4 Jan 2017 10:32:30 +0000 Subject: libosmocore[master]: gprs_cipher_core: Use typecase to avoid sanitizer error In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1530 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib1866595030ad9d11c886621ce69632462befa3a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 4 10:40:19 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 4 Jan 2017 10:40:19 +0000 Subject: libosmocore[master]: libosmocoding: migrate transcoding routines from OsmoBTS In-Reply-To: References: Message-ID: Patch Set 10: You can use --enable-sanitize with gcc to better match what's used on buildhost. -- To view, visit https://gerrit.osmocom.org/933 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0c3256b87686d878e4e716d12393cad5924fdfa1 Gerrit-PatchSet: 10 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Tom Tsou Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 4 10:40:42 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 4 Jan 2017 10:40:42 +0000 Subject: openbsc[master]: fix 'osmo-nitb --version' segfault In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1509 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ice91256d72b9eabd52709352ba6cc6a42af2921b Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 4 10:41:03 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 4 Jan 2017 10:41:03 +0000 Subject: osmo-pcu[master]: fix segfault: check for NULL tbf in sched_select_ctrl_msg() In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1510 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I357492e558e98cfdbf5bb3438b5013029195b02b Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 4 12:42:47 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 4 Jan 2017 12:42:47 +0000 Subject: libosmocore[master]: gprs_cipher_core: Use typecase to avoid sanitizer error In-Reply-To: References: Message-ID: Patch Set 1: I wonder why this has not been triggering jenkins build failures? Are we using it wrong? -- To view, visit https://gerrit.osmocom.org/1530 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib1866595030ad9d11c886621ce69632462befa3a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 4 15:58:55 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 4 Jan 2017 15:58:55 +0000 Subject: osmo-bts[master]: Remove code duplication In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/1521/2//COMMIT_MSG Commit Message: Line 7: Remove code duplication more like "move to libosmocore"? Also indicate the rough area. The commit log completely lacks a hint on what this is about, "use functions and defs" is way too general. -- To view, visit https://gerrit.osmocom.org/1521 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia4980062ea88ffe9019b201f84e92e006ae3c2e3 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Jan 4 16:57:49 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 4 Jan 2017 16:57:49 +0000 Subject: [PATCH] osmo-pcu[master]: Remove duplicated code Message-ID: Review at https://gerrit.osmocom.org/1532 Remove duplicated code Functionality of osmo_gsm_timer is available in libosmocore as osmo_timer hence there is no need for local copy. Change-Id: Ic98d63e8c48fa9e0e17c90da7b0a0297d0e53d3b --- M src/Makefile.am M src/gprs_rlcmac.h D src/gsm_timer.cpp D src/gsm_timer.h M src/pcu_main.cpp M src/tbf.h 6 files changed, 9 insertions(+), 330 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/32/1532/1 diff --git a/src/Makefile.am b/src/Makefile.am index 7cc239b..6e832d6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -45,7 +45,6 @@ gprs_rlcmac_ts_alloc.cpp \ gprs_ms.cpp \ gprs_ms_storage.cpp \ - gsm_timer.cpp \ bitvector.cpp \ pcu_l1_if.cpp \ pcu_vty.c \ @@ -79,7 +78,6 @@ gprs_ms.h \ gprs_ms_storage.h \ pcu_l1_if.h \ - gsm_timer.h \ bitvector.h \ pcu_vty.h \ pcu_vty_functions.h \ diff --git a/src/gprs_rlcmac.h b/src/gprs_rlcmac.h index 589bd8f..f6aed03 100644 --- a/src/gprs_rlcmac.h +++ b/src/gprs_rlcmac.h @@ -24,7 +24,6 @@ #ifdef __cplusplus #include #include -#include extern "C" { #include diff --git a/src/gsm_timer.cpp b/src/gsm_timer.cpp deleted file mode 100644 index d3c59cb..0000000 --- a/src/gsm_timer.cpp +++ /dev/null @@ -1,238 +0,0 @@ -/* gsm_timer.cpp - * - * Copyright (C) 2012 Ivan Klyuchnikov - * - * 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 2 - * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -/* These store the amount of frame number that we wait until next timer expires. */ -static int nearest; -static int *nearest_p; - -/*! \addtogroup gsm_timer - * @{ - */ - -/*! \file gsm_timer.cpp - */ - -#include -#include -#include -#include -#include -#include - - -static struct rb_root timer_root = RB_ROOT; - -/* - * TODO: make this depend on the BTS. This means that - * all time functions schedule based on the BTS they - * are scheduled on. - */ -static int get_current_fn() -{ - return BTS::main_bts()->current_frame_number(); -} - -static void __add_gsm_timer(struct osmo_gsm_timer_list *timer) -{ - struct rb_node **new_node = &(timer_root.rb_node); - struct rb_node *parent = NULL; - - while (*new_node) { - struct osmo_gsm_timer_list *this_timer; - - this_timer = container_of(*new_node, struct osmo_gsm_timer_list, node); - - parent = *new_node; - if (timer->fn < this_timer->fn) - new_node = &((*new_node)->rb_left); - else - new_node = &((*new_node)->rb_right); - } - - rb_link_node(&timer->node, parent, new_node); - rb_insert_color(&timer->node, &timer_root); -} - -/*! \brief add a new timer to the timer management - * \param[in] timer the timer that should be added - */ -void osmo_gsm_timer_add(struct osmo_gsm_timer_list *timer) -{ - osmo_gsm_timer_del(timer); - timer->active = 1; - INIT_LLIST_HEAD(&timer->list); - __add_gsm_timer(timer); -} - -/*! \brief schedule a gsm timer at a given future relative time - * \param[in] timer the to-be-added timer - * \param[in] number of frames from now - * - * This function can be used to (re-)schedule a given timer at a - * specified number of frames in the future. It will - * internally add it to the timer management data structures, thus - * osmo_timer_add() is automatically called. - */ -void -osmo_gsm_timer_schedule(struct osmo_gsm_timer_list *timer, int fn) -{ - int current_fn; - - current_fn = get_current_fn(); - timer->fn = current_fn + fn; - osmo_gsm_timer_add(timer); -} - -/*! \brief delete a gsm timer from timer management - * \param[in] timer the to-be-deleted timer - * - * This function can be used to delete a previously added/scheduled - * timer from the timer management code. - */ -void osmo_gsm_timer_del(struct osmo_gsm_timer_list *timer) -{ - if (timer->active) { - timer->active = 0; - rb_erase(&timer->node, &timer_root); - /* make sure this is not already scheduled for removal. */ - if (!llist_empty(&timer->list)) - llist_del_init(&timer->list); - } -} - -/*! \brief check if given timer is still pending - * \param[in] timer the to-be-checked timer - * \return 1 if pending, 0 otherwise - * - * This function can be used to determine whether a given timer - * has alredy expired (returns 0) or is still pending (returns 1) - */ -int osmo_gsm_timer_pending(struct osmo_gsm_timer_list *timer) -{ - return timer->active; -} - -/* - * if we have a nearest frame number return the delta between the current - * FN and the FN of the nearest timer. - * If the nearest timer timed out return NULL and then we will - * dispatch everything after the select - */ -int *osmo_gsm_timers_nearest(void) -{ - /* nearest_p is exactly what we need already: NULL if nothing is - * waiting, {0,0} if we must dispatch immediately, and the correct - * delay if we need to wait */ - return nearest_p; -} - -static void update_nearest(int *cand, int *current) -{ - if (*cand != LONG_MAX) { - if (*cand > *current) - nearest = *cand - *current; - else { - /* loop again inmediately */ - nearest = 0; - } - nearest_p = &nearest; - } else { - nearest_p = NULL; - } -} - -/* - * Find the nearest FN and update s_nearest_time - */ -void osmo_gsm_timers_prepare(void) -{ - struct rb_node *node; - int current_fn; - - current_fn = get_current_fn(); - - node = rb_first(&timer_root); - if (node) { - struct osmo_gsm_timer_list *this_timer; - this_timer = container_of(node, struct osmo_gsm_timer_list, node); - update_nearest(&this_timer->fn, ¤t_fn); - } else { - nearest_p = NULL; - } -} - -/* - * fire all timers... and remove them - */ -int osmo_gsm_timers_update(void) -{ - int current_fn; - struct rb_node *node; - struct llist_head timer_eviction_list; - struct osmo_gsm_timer_list *this_timer; - int work = 0; - - current_fn = get_current_fn(); - - INIT_LLIST_HEAD(&timer_eviction_list); - for (node = rb_first(&timer_root); node; node = rb_next(node)) { - this_timer = container_of(node, struct osmo_gsm_timer_list, node); - - if (this_timer->fn > current_fn) - break; - - llist_add(&this_timer->list, &timer_eviction_list); - } - - /* - * The callbacks might mess with our list and in this case - * even llist_for_each_entry_safe is not safe to use. To allow - * osmo_gsm_timer_del to be called from within the callback we need - * to restart the iteration for each element scheduled for removal. - * - * The problematic scenario is the following: Given two timers A - * and B that have expired at the same time. Thus, they are both - * in the eviction list in this order: A, then B. If we remove - * timer B from the A's callback, we continue with B in the next - * iteration step, leading to an access-after-release. - */ -restart: - llist_for_each_entry(this_timer, &timer_eviction_list, list) { - osmo_gsm_timer_del(this_timer); - this_timer->cb(this_timer->data); - work = 1; - goto restart; - } - - return work; -} - -int osmo_gsm_timers_check(void) -{ - struct rb_node *node; - int i = 0; - - for (node = rb_first(&timer_root); node; node = rb_next(node)) { - i++; - } - return i; -} - -/*! }@ */ - diff --git a/src/gsm_timer.h b/src/gsm_timer.h deleted file mode 100644 index fc42caf..0000000 --- a/src/gsm_timer.h +++ /dev/null @@ -1,84 +0,0 @@ -/* gsm_timer.h - * - * Copyright (C) 2012 Ivan Klyuchnikov - * - * 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 2 - * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -/*! \defgroup timer GSM timers - * @{ - */ - -/*! \file gsm_timer.h - * \brief GSM timer handling routines - */ -#ifndef GSM_TIMER_H -#define GSM_TIMER_H - -extern "C" { -#include -#include -} -/** - * Timer management: - * - Create a struct osmo_gsm_timer_list - * - Fill out timeout and use add_gsm_timer or - * use schedule_gsm_timer to schedule a timer in - * x frames from now... - * - Use del_gsm_timer to remove the timer - * - * Internally: - * - We hook into select.c to give a frame number of the - * nearest timer. On already passed timers we give - * it a 0 to immediately fire after the select. - * - update_gsm_timers will call the callbacks and remove - * the timers. - * - */ -/*! \brief A structure representing a single instance of a gsm timer */ -struct osmo_gsm_timer_list { - struct rb_node node; /*!< \brief rb-tree node header */ - struct llist_head list; /*!< \brief internal list header */ - int fn; /*!< \brief expiration frame number */ - unsigned int active : 1; /*!< \brief is it active? */ - - void (*cb)(void*); /*!< \brief call-back called at timeout */ - void *data; /*!< \brief user data for callback */ -}; - -/** - * timer management - */ - -void osmo_gsm_timer_add(struct osmo_gsm_timer_list *timer); - -void osmo_gsm_timer_schedule(struct osmo_gsm_timer_list *timer, int fn); - -void osmo_gsm_timer_del(struct osmo_gsm_timer_list *timer); - -int osmo_gsm_timer_pending(struct osmo_gsm_timer_list *timer); - - -/* - * internal timer list management - */ -int *osmo_gsm_timers_nearest(void); -void osmo_gsm_timers_prepare(void); -int osmo_gsm_timers_update(void); -int osmo_gsm_timers_check(void); - -/*! }@ */ - -#endif // GSM_TIMER_H diff --git a/src/pcu_main.cpp b/src/pcu_main.cpp index 0a0362b..c19a173 100644 --- a/src/pcu_main.cpp +++ b/src/pcu_main.cpp @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -34,6 +33,7 @@ #include #include #include +#include #include #include } @@ -288,9 +288,9 @@ } while (!quit) { - osmo_gsm_timers_check(); - osmo_gsm_timers_prepare(); - osmo_gsm_timers_update(); + osmo_timers_check(); + osmo_timers_prepare(); + osmo_timers_update(); osmo_select_main(0); } diff --git a/src/tbf.h b/src/tbf.h index ad1ece2..7aa78c5 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -20,6 +20,10 @@ #ifdef __cplusplus +extern "C" { +#include +} + #include "gprs_rlcmac.h" #include "llc.h" #include "rlc.h" @@ -234,7 +238,7 @@ unsigned int T; /* Txxxx number */ unsigned int num_T_exp; /* number of consecutive T expirations */ - struct osmo_gsm_timer_list gsm_timer; + struct osmo_timer_list gsm_timer; unsigned int fT; /* fTxxxx number */ unsigned int num_fT_exp; /* number of consecutive fT expirations */ -- To view, visit https://gerrit.osmocom.org/1532 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic98d63e8c48fa9e0e17c90da7b0a0297d0e53d3b Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Jan 4 18:22:55 2017 From: gerrit-no-reply at lists.osmocom.org (ikostov) Date: Wed, 4 Jan 2017 18:22:55 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: BSC, BTS: add diagrams of PCU-BTS-NITB-SGSN relationships In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1514 to look at the new patch set (#3). BSC,BTS: add diagrams of PCU-BTS-NITB-SGSN relationships Change-Id: I0eb09706efb768fa4f6810872fb6568cbc9838cb --- M OsmoBSC/chapters/overview.adoc M OsmoBTS/chapters/interfaces.adoc 2 files changed, 96 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/14/1514/3 diff --git a/OsmoBSC/chapters/overview.adoc b/OsmoBSC/chapters/overview.adoc index 580a42e..c4fc0e6 100644 --- a/OsmoBSC/chapters/overview.adoc +++ b/OsmoBSC/chapters/overview.adoc @@ -13,6 +13,75 @@ GSM Base Station Controller with A-bis interface towards BTSs and A interface towards a MSC. +The difference between classic GSM network architecture and +the OsmoNITB based GSM network architecture is illustrated in +<> and <>. + +[[fig-gsm-classic]] +.Classic GSM network architecture (simplified) +[graphviz] +---- +digraph G { + rankdir=LR; + MS0 [label="MS"]; + MS1 [label="MS"]; + MS2 [label="MS"]; + MS3 [label="MS"]; + BTS0 [label="BTS"]; + BTS1 [label="BTS"]; + BSC; + MSC [label="MSC/VLR"]; + HLR [label="HLR/AUC"] + EIR; + SMSC + MS0->BTS0 [label="Um"]; + MS1->BTS0 [label="Um"]; + MS2->BTS1 [label="Um"]; + MS3->BTS1 [label="Um"]; + BTS0->BSC [label="Abis"]; + BTS1->BSC [label="Abis"]; + BSC->MSC [label="A"]; + MSC->HLR [label="C"]; + MSC->EIR [label="F"]; + MSC->SMSC; +} +---- + +[[fig-gsm-nitb]] +.GSM system architecture using OsmoNITB +[graphviz] +---- +digraph G { + rankdir=LR; + MS0 [label="MS"]; + MS1 [label="MS"]; + MS2 [label="MS"]; + MS3 [label="MS"]; + BTS0 [label="BTS"]; + BTS1 [label="BTS"]; + MS0->BTS0 [label="Um"]; + MS1->BTS0 [label="Um"]; + MS2->BTS1 [label="Um"]; + MS3->BTS1 [label="Um"]; + BTS0->BSC [label="Abis"]; + BTS1->BSC [label="Abis"]; + subgraph cluster_nitb { + label = "OsmoNITB"; + BSC; + MSC [label="MSC/VLR"]; + SMSC; + EIR; + HLR [label="HLR/AUC"]; + BSC->MSC; + MSC->HLR; + MSC->EIR; + MSC->SMSC; + } + EXTMNCC [label="Linux Call Router / SoftSwitch / PBX\n(optional)"]; + MSC -> EXTMNCC [label="external MNCC"]; +} +---- + === Software Components diff --git a/OsmoBTS/chapters/interfaces.adoc b/OsmoBTS/chapters/interfaces.adoc index 242fa23..2ed08b7 100644 --- a/OsmoBTS/chapters/interfaces.adoc +++ b/OsmoBTS/chapters/interfaces.adoc @@ -113,6 +113,33 @@ co-locate the PCU with the BSC. However, the GSM specifications keep the location up to the implementor. +The GPRS network architecture including PCU in BTS is shown in +<>. + +[[fig-gprs-pcubts]] +.GPRS network architecture with PCU in BTS +[graphviz] +---- +digraph G { + rankdir=LR; + MS0 [label="MS"]; + MS1 [label="MS"]; + BTS; + BSC; + MSC; + PCU; + SGSN; + GGSN; + MS0->BTS [label="Um"]; + MS1->BTS [label="Um"]; + BTS->BSC [label="Abis"]; + BSC->MSC [label="A"]; + BTS->PCU [label="pcu_sock"]; + PCU->SGSN [label="Gb"]; + SGSN->GGSN [label="GTP"]; +} +---- + The PCU socket interface serves the following purposes: * to pass PCU relevant configuration from BTS to PCU -- To view, visit https://gerrit.osmocom.org/1514 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0eb09706efb768fa4f6810872fb6568cbc9838cb Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: ikostov Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Jan 4 18:57:14 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 4 Jan 2017 18:57:14 +0000 Subject: [PATCH] libosmocore[master]: Remove direct logging Message-ID: Review at https://gerrit.osmocom.org/1533 Remove direct logging Drop perror() calls from GSMTAP code: it's application job to do the proper logging - library code should not write to stdout/stderr directly. Change-Id: Ifa149e65d76c6e64fda2946725c16672233aff2e --- M src/gsmtap_util.c 1 file changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/33/1533/1 diff --git a/src/gsmtap_util.c b/src/gsmtap_util.c index 66abdf1..ab4a28e 100644 --- a/src/gsmtap_util.c +++ b/src/gsmtap_util.c @@ -286,11 +286,9 @@ rc = write(ofd->fd, msg->data, msg->len); if (rc < 0) { - perror("writing msgb to gsmtap fd"); return rc; } if (rc != msg->len) { - perror("short write to gsmtap fd"); return -EIO; } @@ -308,7 +306,6 @@ rc = read(fd->fd, buf, sizeof(buf)); if (rc < 0) { - perror("reading from gsmtap sink fd"); return rc; } /* simply discard any data arriving on the socket */ -- To view, visit https://gerrit.osmocom.org/1533 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifa149e65d76c6e64fda2946725c16672233aff2e Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Jan 4 23:27:59 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 4 Jan 2017 23:27:59 +0000 Subject: osmo-gsm-manuals[master]: BSC, BTS: add diagrams of PCU-BTS-NITB-SGSN relationships In-Reply-To: References: Message-ID: Patch Set 3: Code-Review-1 (5 comments) https://gerrit.osmocom.org/#/c/1514/3/OsmoBSC/chapters/overview.adoc File OsmoBSC/chapters/overview.adoc: Line 32: BSC; you're still mixing tab indenting with space indenting Line 36: SMSC either semicoli everywhere or nowhere: consistent please Line 80: EXTMNCC [label="Linux Call Router / SoftSwitch / PBX\n(optional)"]; preferably put EXTMNCC on top with the others https://gerrit.osmocom.org/#/c/1514/3/OsmoBTS/chapters/interfaces.adoc File OsmoBTS/chapters/interfaces.adoc: Line 116: The GPRS network architecture including PCU in BTS is shown in "PCU in BTS"? Line 132: GGSN; another tab here -- To view, visit https://gerrit.osmocom.org/1514 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0eb09706efb768fa4f6810872fb6568cbc9838cb Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: ikostov Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Jan 5 09:25:01 2017 From: gerrit-no-reply at lists.osmocom.org (ikostov) Date: Thu, 5 Jan 2017 09:25:01 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: BSC, BTS: add diagrams of PCU-BTS-NITB-SGSN relationships In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1514 to look at the new patch set (#4). BSC,BTS: add diagrams of PCU-BTS-NITB-SGSN relationships Change-Id: I0eb09706efb768fa4f6810872fb6568cbc9838cb --- M OsmoBSC/chapters/overview.adoc M OsmoBTS/chapters/interfaces.adoc 2 files changed, 95 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/14/1514/4 diff --git a/OsmoBSC/chapters/overview.adoc b/OsmoBSC/chapters/overview.adoc index 580a42e..41e421c 100644 --- a/OsmoBSC/chapters/overview.adoc +++ b/OsmoBSC/chapters/overview.adoc @@ -13,6 +13,75 @@ GSM Base Station Controller with A-bis interface towards BTSs and A interface towards a MSC. +The difference between classic GSM network architecture and +the OsmoNITB based GSM network architecture is illustrated in +<> and <>. + +[[fig-gsm-classic]] +.Classic GSM network architecture (simplified) +[graphviz] +---- +digraph G { + rankdir=LR; + MS0 [label="MS"]; + MS1 [label="MS"]; + MS2 [label="MS"]; + MS3 [label="MS"]; + BTS0 [label="BTS"]; + BTS1 [label="BTS"]; + BSC; + MSC [label="MSC/VLR"]; + HLR [label="HLR/AUC"]; + EIR; + SMSC; + MS0->BTS0 [label="Um"]; + MS1->BTS0 [label="Um"]; + MS2->BTS1 [label="Um"]; + MS3->BTS1 [label="Um"]; + BTS0->BSC [label="Abis"]; + BTS1->BSC [label="Abis"]; + BSC->MSC [label="A"]; + MSC->HLR [label="C"]; + MSC->EIR [label="F"]; + MSC->SMSC; +} +---- + +[[fig-gsm-nitb]] +.GSM system architecture using OsmoNITB +[graphviz] +---- +digraph G { + rankdir=LR; + MS0 [label="MS"]; + MS1 [label="MS"]; + MS2 [label="MS"]; + MS3 [label="MS"]; + BTS0 [label="BTS"]; + BTS1 [label="BTS"]; + MS0->BTS0 [label="Um"]; + MS1->BTS0 [label="Um"]; + MS2->BTS1 [label="Um"]; + MS3->BTS1 [label="Um"]; + BTS0->BSC [label="Abis"]; + BTS1->BSC [label="Abis"]; + subgraph cluster_nitb { + label = "OsmoNITB"; + BSC; + MSC [label="MSC/VLR"]; + SMSC; + EIR; + HLR [label="HLR/AUC"]; + BSC->MSC; + MSC->HLR; + MSC->EIR; + MSC->SMSC; + EXTMNCC [label="Linux Call Router / SoftSwitch / PBX\n(optional)"]; + } + MSC -> EXTMNCC [label="external MNCC"]; +} +---- + === Software Components diff --git a/OsmoBTS/chapters/interfaces.adoc b/OsmoBTS/chapters/interfaces.adoc index 242fa23..127d4dc 100644 --- a/OsmoBTS/chapters/interfaces.adoc +++ b/OsmoBTS/chapters/interfaces.adoc @@ -113,6 +113,32 @@ co-locate the PCU with the BSC. However, the GSM specifications keep the location up to the implementor. +The GPRS network architecture is shown in <>. + +[[fig-gprs-pcubts]] +.GPRS network architecture +[graphviz] +---- +digraph G { + rankdir=LR; + MS0 [label="MS"]; + MS1 [label="MS"]; + BTS; + BSC; + MSC; + PCU; + SGSN; + GGSN; + MS0->BTS [label="Um"]; + MS1->BTS [label="Um"]; + BTS->BSC [label="Abis"]; + BSC->MSC [label="A"]; + BTS->PCU [label="pcu_sock"]; + PCU->SGSN [label="Gb"]; + SGSN->GGSN [label="GTP"]; +} +---- + The PCU socket interface serves the following purposes: * to pass PCU relevant configuration from BTS to PCU -- To view, visit https://gerrit.osmocom.org/1514 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0eb09706efb768fa4f6810872fb6568cbc9838cb Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: ikostov Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Jan 5 14:19:29 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 5 Jan 2017 14:19:29 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: BSC, BTS: add diagrams of PCU-BTS-NITB-SGSN relationships In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1514 to look at the new patch set (#5). BSC,BTS: add diagrams of PCU-BTS-NITB-SGSN relationships Change-Id: I0eb09706efb768fa4f6810872fb6568cbc9838cb --- M OsmoBSC/chapters/overview.adoc M OsmoBTS/chapters/interfaces.adoc 2 files changed, 95 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/14/1514/5 diff --git a/OsmoBSC/chapters/overview.adoc b/OsmoBSC/chapters/overview.adoc index 580a42e..3bb22cc 100644 --- a/OsmoBSC/chapters/overview.adoc +++ b/OsmoBSC/chapters/overview.adoc @@ -13,6 +13,75 @@ GSM Base Station Controller with A-bis interface towards BTSs and A interface towards a MSC. +The difference between classic GSM network architecture and +the OsmoNITB based GSM network architecture is illustrated in +<> and <>. + +[[fig-gsm-classic]] +.Classic GSM network architecture (simplified) +[graphviz] +---- +digraph G { + rankdir=LR; + MS0 [label="MS"]; + MS1 [label="MS"]; + MS2 [label="MS"]; + MS3 [label="MS"]; + BTS0 [label="BTS"]; + BTS1 [label="BTS"]; + BSC; + MSC [label="MSC/VLR"]; + HLR [label="HLR/AUC"]; + EIR; + SMSC; + MS0->BTS0 [label="Um"]; + MS1->BTS0 [label="Um"]; + MS2->BTS1 [label="Um"]; + MS3->BTS1 [label="Um"]; + BTS0->BSC [label="Abis"]; + BTS1->BSC [label="Abis"]; + BSC->MSC [label="A"]; + MSC->HLR [label="C"]; + MSC->EIR [label="F"]; + MSC->SMSC; +} +---- + +[[fig-gsm-nitb]] +.GSM system architecture using OsmoNITB +[graphviz] +---- +digraph G { + rankdir=LR; + MS0 [label="MS"]; + MS1 [label="MS"]; + MS2 [label="MS"]; + MS3 [label="MS"]; + BTS0 [label="BTS"]; + BTS1 [label="BTS"]; + EXTMNCC [label="Linux Call Router / SoftSwitch / PBX\n(optional)"]; + MS0->BTS0 [label="Um"]; + MS1->BTS0 [label="Um"]; + MS2->BTS1 [label="Um"]; + MS3->BTS1 [label="Um"]; + BTS0->BSC [label="Abis"]; + BTS1->BSC [label="Abis"]; + subgraph cluster_nitb { + label = "OsmoNITB"; + BSC; + MSC [label="MSC/VLR"]; + SMSC; + EIR; + HLR [label="HLR/AUC"]; + BSC->MSC; + MSC->HLR; + MSC->EIR; + MSC->SMSC; + } + MSC -> EXTMNCC [label="external MNCC"]; +} +---- + === Software Components diff --git a/OsmoBTS/chapters/interfaces.adoc b/OsmoBTS/chapters/interfaces.adoc index 242fa23..127d4dc 100644 --- a/OsmoBTS/chapters/interfaces.adoc +++ b/OsmoBTS/chapters/interfaces.adoc @@ -113,6 +113,32 @@ co-locate the PCU with the BSC. However, the GSM specifications keep the location up to the implementor. +The GPRS network architecture is shown in <>. + +[[fig-gprs-pcubts]] +.GPRS network architecture +[graphviz] +---- +digraph G { + rankdir=LR; + MS0 [label="MS"]; + MS1 [label="MS"]; + BTS; + BSC; + MSC; + PCU; + SGSN; + GGSN; + MS0->BTS [label="Um"]; + MS1->BTS [label="Um"]; + BTS->BSC [label="Abis"]; + BSC->MSC [label="A"]; + BTS->PCU [label="pcu_sock"]; + PCU->SGSN [label="Gb"]; + SGSN->GGSN [label="GTP"]; +} +---- + The PCU socket interface serves the following purposes: * to pass PCU relevant configuration from BTS to PCU -- To view, visit https://gerrit.osmocom.org/1514 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0eb09706efb768fa4f6810872fb6568cbc9838cb Gerrit-PatchSet: 5 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: ikostov Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Jan 5 14:19:49 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 5 Jan 2017 14:19:49 +0000 Subject: osmo-gsm-manuals[master]: BSC, BTS: add diagrams of PCU-BTS-NITB-SGSN relationships In-Reply-To: References: Message-ID: Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1514 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0eb09706efb768fa4f6810872fb6568cbc9838cb Gerrit-PatchSet: 5 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: ikostov Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 5 17:28:56 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 5 Jan 2017 17:28:56 +0000 Subject: [PATCH] osmo-pcu[master]: Improve logging Message-ID: Review at https://gerrit.osmocom.org/1534 Improve logging Add value_string describing UL and DL TBF states and use it for logging errors while freeing TBFs. Change-Id: I292ec81ab602c65ef86e6e3e85740182b63474b6 --- M src/tbf.cpp M src/tbf.h 2 files changed, 30 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/34/1534/1 diff --git a/src/tbf.cpp b/src/tbf.cpp index 0e4d6cc..657255d 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -43,6 +43,21 @@ static void tbf_timer_cb(void *_tbf); +const struct value_string gprs_rlcmac_tbf_dl_ass_state_names[] = { + OSMO_VALUE_STRING(GPRS_RLCMAC_DL_ASS_NONE), + OSMO_VALUE_STRING(GPRS_RLCMAC_DL_ASS_SEND_ASS), + OSMO_VALUE_STRING(GPRS_RLCMAC_DL_ASS_WAIT_ACK), + { 0, NULL } +}; + +const struct value_string gprs_rlcmac_tbf_ul_ass_state_names[] = { + OSMO_VALUE_STRING(GPRS_RLCMAC_UL_ASS_NONE), + OSMO_VALUE_STRING(GPRS_RLCMAC_UL_ASS_SEND_ASS), + OSMO_VALUE_STRING(GPRS_RLCMAC_UL_ASS_SEND_ASS_REJ), + OSMO_VALUE_STRING(GPRS_RLCMAC_UL_ASS_WAIT_ACK), + { 0, NULL } +}; + static const struct rate_ctr_desc tbf_ctr_description[] = { { "rlc.nacked", "RLC Nacked " }, }; @@ -435,16 +450,20 @@ LOGP(DRLCMAC, LOGL_INFO, "%s free\n", tbf_name(tbf)); if (tbf->ul_ass_state != GPRS_RLCMAC_UL_ASS_NONE) LOGP(DRLCMAC, LOGL_ERROR, "%s Software error: Pending uplink " - "assignment. This may not happen, because the " + "assignment in state %s. This may not happen, because the " "assignment message never gets transmitted. Please " "be sure not to free in this state. PLEASE FIX!\n", - tbf_name(tbf)); + tbf_name(tbf), + get_value_string(gprs_rlcmac_tbf_ul_ass_state_names, + tbf->ul_ass_state)); if (tbf->dl_ass_state != GPRS_RLCMAC_DL_ASS_NONE) LOGP(DRLCMAC, LOGL_ERROR, "%s Software error: Pending downlink " - "assignment. This may not happen, because the " + "assignment in state %s. This may not happen, because the " "assignment message never gets transmitted. Please " "be sure not to free in this state. PLEASE FIX!\n", - tbf_name(tbf)); + tbf_name(tbf), + 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" tbf_unlink_pdch(tbf); diff --git a/src/tbf.h b/src/tbf.h index ad1ece2..adb7dcc 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -27,6 +27,9 @@ #include #include +extern "C" { +#include +} struct bssgp_bvc_ctx; struct rlc_ul_header; @@ -61,6 +64,8 @@ GPRS_RLCMAC_DL_ASS_WAIT_ACK, /* wait for PACKET CONTROL ACK */ }; +extern const struct value_string gprs_rlcmac_tbf_dl_ass_state_names[]; + enum gprs_rlcmac_tbf_ul_ass_state { GPRS_RLCMAC_UL_ASS_NONE = 0, GPRS_RLCMAC_UL_ASS_SEND_ASS, /* send uplink assignment on next RTS */ @@ -68,6 +73,8 @@ GPRS_RLCMAC_UL_ASS_WAIT_ACK, /* wait for PACKET CONTROL ACK */ }; +extern const struct value_string gprs_rlcmac_tbf_ul_ass_state_names[]; + enum gprs_rlcmac_tbf_ul_ack_state { GPRS_RLCMAC_UL_ACK_NONE = 0, GPRS_RLCMAC_UL_ACK_SEND_ACK, /* send acknowledge on next RTS */ -- To view, visit https://gerrit.osmocom.org/1534 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I292ec81ab602c65ef86e6e3e85740182b63474b6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Jan 5 17:39:42 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 5 Jan 2017 17:39:42 +0000 Subject: [PATCH] osmo-pcu[master]: Improve logging In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1534 to look at the new patch set (#2). Improve logging Add value_string describing UL and DL TBF states and use it for logging errors while freeing TBFs. Change-Id: I292ec81ab602c65ef86e6e3e85740182b63474b6 --- M src/tbf.cpp M src/tbf.h M tests/tbf/TbfTest.err 3 files changed, 35 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/34/1534/2 diff --git a/src/tbf.cpp b/src/tbf.cpp index 0e4d6cc..657255d 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -43,6 +43,21 @@ static void tbf_timer_cb(void *_tbf); +const struct value_string gprs_rlcmac_tbf_dl_ass_state_names[] = { + OSMO_VALUE_STRING(GPRS_RLCMAC_DL_ASS_NONE), + OSMO_VALUE_STRING(GPRS_RLCMAC_DL_ASS_SEND_ASS), + OSMO_VALUE_STRING(GPRS_RLCMAC_DL_ASS_WAIT_ACK), + { 0, NULL } +}; + +const struct value_string gprs_rlcmac_tbf_ul_ass_state_names[] = { + OSMO_VALUE_STRING(GPRS_RLCMAC_UL_ASS_NONE), + OSMO_VALUE_STRING(GPRS_RLCMAC_UL_ASS_SEND_ASS), + OSMO_VALUE_STRING(GPRS_RLCMAC_UL_ASS_SEND_ASS_REJ), + OSMO_VALUE_STRING(GPRS_RLCMAC_UL_ASS_WAIT_ACK), + { 0, NULL } +}; + static const struct rate_ctr_desc tbf_ctr_description[] = { { "rlc.nacked", "RLC Nacked " }, }; @@ -435,16 +450,20 @@ LOGP(DRLCMAC, LOGL_INFO, "%s free\n", tbf_name(tbf)); if (tbf->ul_ass_state != GPRS_RLCMAC_UL_ASS_NONE) LOGP(DRLCMAC, LOGL_ERROR, "%s Software error: Pending uplink " - "assignment. This may not happen, because the " + "assignment in state %s. This may not happen, because the " "assignment message never gets transmitted. Please " "be sure not to free in this state. PLEASE FIX!\n", - tbf_name(tbf)); + tbf_name(tbf), + get_value_string(gprs_rlcmac_tbf_ul_ass_state_names, + tbf->ul_ass_state)); if (tbf->dl_ass_state != GPRS_RLCMAC_DL_ASS_NONE) LOGP(DRLCMAC, LOGL_ERROR, "%s Software error: Pending downlink " - "assignment. This may not happen, because the " + "assignment in state %s. This may not happen, because the " "assignment message never gets transmitted. Please " "be sure not to free in this state. PLEASE FIX!\n", - tbf_name(tbf)); + tbf_name(tbf), + 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" tbf_unlink_pdch(tbf); diff --git a/src/tbf.h b/src/tbf.h index ad1ece2..adb7dcc 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -27,6 +27,9 @@ #include #include +extern "C" { +#include +} struct bssgp_bvc_ctx; struct rlc_ul_header; @@ -61,6 +64,8 @@ GPRS_RLCMAC_DL_ASS_WAIT_ACK, /* wait for PACKET CONTROL ACK */ }; +extern const struct value_string gprs_rlcmac_tbf_dl_ass_state_names[]; + enum gprs_rlcmac_tbf_ul_ass_state { GPRS_RLCMAC_UL_ASS_NONE = 0, GPRS_RLCMAC_UL_ASS_SEND_ASS, /* send uplink assignment on next RTS */ @@ -68,6 +73,8 @@ GPRS_RLCMAC_UL_ASS_WAIT_ACK, /* wait for PACKET CONTROL ACK */ }; +extern const struct value_string gprs_rlcmac_tbf_ul_ass_state_names[]; + enum gprs_rlcmac_tbf_ul_ack_state { GPRS_RLCMAC_UL_ACK_NONE = 0, GPRS_RLCMAC_UL_ACK_SEND_ACK, /* send acknowledge on next RTS */ diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index 2647551..c6bc1aa 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -563,7 +563,7 @@ TBF(TFI=1 TLLI=0xf1000002 DIR=DL STATE=FLOW) the IMSI '001001000000002' was already assigned to another MS object: TLLI = 0xf1000001, that IMSI will be removed TBF(TFI=0 TLLI=0xf1000001 DIR=DL STATE=FLOW) changes state from FLOW to RELEASING TBF(TFI=0 TLLI=0xf1000001 DIR=DL STATE=RELEASING) free -TBF(TFI=0 TLLI=0xf1000001 DIR=DL STATE=RELEASING) Software error: Pending downlink assignment. This may not happen, because the assignment message never gets transmitted. Please be sure not to free in this state. PLEASE FIX! +TBF(TFI=0 TLLI=0xf1000001 DIR=DL STATE=RELEASING) Software error: Pending downlink assignment in state GPRS_RLCMAC_DL_ASS_SEND_ASS. This may not happen, because the assignment message never gets transmitted. Please be sure not to free in this state. PLEASE FIX! PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xf1000001 DIR=DL STATE=RELEASING), 1 TBFs, USFs = 00, TFIs = 00000002. Detaching TBF from MS object, TLLI = 0xf1000001, TBF = TBF(TFI=0 TLLI=0xf1000001 DIR=DL STATE=RELEASING) ********** TBF ends here ********** @@ -572,7 +572,7 @@ Destroying MS object, TLLI = 0x00000000 TBF(TFI=1 TLLI=0xf1000002 DIR=DL STATE=FLOW) changes state from FLOW to RELEASING TBF(TFI=1 TLLI=0xf1000002 DIR=DL STATE=RELEASING) free -TBF(TFI=1 TLLI=0xf1000002 DIR=DL STATE=RELEASING) Software error: Pending downlink assignment. This may not happen, because the assignment message never gets transmitted. Please be sure not to free in this state. PLEASE FIX! +TBF(TFI=1 TLLI=0xf1000002 DIR=DL STATE=RELEASING) Software error: Pending downlink assignment in state GPRS_RLCMAC_DL_ASS_SEND_ASS. This may not happen, because the assignment message never gets transmitted. Please be sure not to free in this state. PLEASE FIX! PDCH(TS 4, TRX 0): Detaching TBF(TFI=1 TLLI=0xf1000002 DIR=DL STATE=RELEASING), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xf1000002, TBF = TBF(TFI=1 TLLI=0xf1000002 DIR=DL STATE=RELEASING) Destroying MS object, TLLI = 0xf1000002 @@ -1971,7 +1971,7 @@ Old MS: TLLI = 0xf1223344, TA = 7, IMSI = 0011223344, LLC = 2 UL RSSI of TLLI=0xf1223344: 31 dBm TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) free -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Software error: Pending downlink assignment. This may not happen, because the assignment message never gets transmitted. Please be sure not to free in this state. PLEASE FIX! +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Software error: Pending downlink assignment in state GPRS_RLCMAC_DL_ASS_SEND_ASS. This may not happen, because the assignment message never gets transmitted. Please be sure not to free in this state. PLEASE FIX! TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) stopping timer 3169. PDCH(TS 7, TRX 0): Detaching TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) @@ -2150,7 +2150,7 @@ Old MS: TLLI = 0xf1223344, TA = 7, IMSI = 0011223344, LLC = 2 UL RSSI of TLLI=0xf1223344: 31 dBm TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) free -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Software error: Pending downlink assignment. This may not happen, because the assignment message never gets transmitted. Please be sure not to free in this state. PLEASE FIX! +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Software error: Pending downlink assignment in state GPRS_RLCMAC_DL_ASS_SEND_ASS. This may not happen, because the assignment message never gets transmitted. Please be sure not to free in this state. PLEASE FIX! TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) stopping timer 3169. PDCH(TS 7, TRX 0): Detaching TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) @@ -6636,7 +6636,7 @@ DL packet loss of IMSI= / TLLI=0xffeeddcc: 78% TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Software error: Pending downlink assignment. This may not happen, because the assignment message never gets transmitted. Please be sure not to free in this state. PLEASE FIX! +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Software error: Pending downlink assignment in state GPRS_RLCMAC_DL_ASS_SEND_ASS. This may not happen, because the assignment message never gets transmitted. Please be sure not to free in this state. PLEASE FIX! PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc -- To view, visit https://gerrit.osmocom.org/1534 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I292ec81ab602c65ef86e6e3e85740182b63474b6 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Jan 5 18:07:49 2017 From: gerrit-no-reply at lists.osmocom.org (ikostov) Date: Thu, 5 Jan 2017 18:07:49 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: BSC, BTS: add diagrams of PCU-BTS-NITB-SGSN relationships In-Reply-To: References: Message-ID: ikostov has submitted this change and it was merged. Change subject: BSC,BTS: add diagrams of PCU-BTS-NITB-SGSN relationships ...................................................................... BSC,BTS: add diagrams of PCU-BTS-NITB-SGSN relationships Change-Id: I0eb09706efb768fa4f6810872fb6568cbc9838cb --- M OsmoBSC/chapters/overview.adoc M OsmoBTS/chapters/interfaces.adoc 2 files changed, 95 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoBSC/chapters/overview.adoc b/OsmoBSC/chapters/overview.adoc index 580a42e..3bb22cc 100644 --- a/OsmoBSC/chapters/overview.adoc +++ b/OsmoBSC/chapters/overview.adoc @@ -13,6 +13,75 @@ GSM Base Station Controller with A-bis interface towards BTSs and A interface towards a MSC. +The difference between classic GSM network architecture and +the OsmoNITB based GSM network architecture is illustrated in +<> and <>. + +[[fig-gsm-classic]] +.Classic GSM network architecture (simplified) +[graphviz] +---- +digraph G { + rankdir=LR; + MS0 [label="MS"]; + MS1 [label="MS"]; + MS2 [label="MS"]; + MS3 [label="MS"]; + BTS0 [label="BTS"]; + BTS1 [label="BTS"]; + BSC; + MSC [label="MSC/VLR"]; + HLR [label="HLR/AUC"]; + EIR; + SMSC; + MS0->BTS0 [label="Um"]; + MS1->BTS0 [label="Um"]; + MS2->BTS1 [label="Um"]; + MS3->BTS1 [label="Um"]; + BTS0->BSC [label="Abis"]; + BTS1->BSC [label="Abis"]; + BSC->MSC [label="A"]; + MSC->HLR [label="C"]; + MSC->EIR [label="F"]; + MSC->SMSC; +} +---- + +[[fig-gsm-nitb]] +.GSM system architecture using OsmoNITB +[graphviz] +---- +digraph G { + rankdir=LR; + MS0 [label="MS"]; + MS1 [label="MS"]; + MS2 [label="MS"]; + MS3 [label="MS"]; + BTS0 [label="BTS"]; + BTS1 [label="BTS"]; + EXTMNCC [label="Linux Call Router / SoftSwitch / PBX\n(optional)"]; + MS0->BTS0 [label="Um"]; + MS1->BTS0 [label="Um"]; + MS2->BTS1 [label="Um"]; + MS3->BTS1 [label="Um"]; + BTS0->BSC [label="Abis"]; + BTS1->BSC [label="Abis"]; + subgraph cluster_nitb { + label = "OsmoNITB"; + BSC; + MSC [label="MSC/VLR"]; + SMSC; + EIR; + HLR [label="HLR/AUC"]; + BSC->MSC; + MSC->HLR; + MSC->EIR; + MSC->SMSC; + } + MSC -> EXTMNCC [label="external MNCC"]; +} +---- + === Software Components diff --git a/OsmoBTS/chapters/interfaces.adoc b/OsmoBTS/chapters/interfaces.adoc index 242fa23..127d4dc 100644 --- a/OsmoBTS/chapters/interfaces.adoc +++ b/OsmoBTS/chapters/interfaces.adoc @@ -113,6 +113,32 @@ co-locate the PCU with the BSC. However, the GSM specifications keep the location up to the implementor. +The GPRS network architecture is shown in <>. + +[[fig-gprs-pcubts]] +.GPRS network architecture +[graphviz] +---- +digraph G { + rankdir=LR; + MS0 [label="MS"]; + MS1 [label="MS"]; + BTS; + BSC; + MSC; + PCU; + SGSN; + GGSN; + MS0->BTS [label="Um"]; + MS1->BTS [label="Um"]; + BTS->BSC [label="Abis"]; + BSC->MSC [label="A"]; + BTS->PCU [label="pcu_sock"]; + PCU->SGSN [label="Gb"]; + SGSN->GGSN [label="GTP"]; +} +---- + The PCU socket interface serves the following purposes: * to pass PCU relevant configuration from BTS to PCU -- To view, visit https://gerrit.osmocom.org/1514 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0eb09706efb768fa4f6810872fb6568cbc9838cb Gerrit-PatchSet: 5 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: ikostov Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: ikostov From gerrit-no-reply at lists.osmocom.org Thu Jan 5 20:46:34 2017 From: gerrit-no-reply at lists.osmocom.org (tnt) Date: Thu, 5 Jan 2017 20:46:34 +0000 Subject: libosmocore[master]: core/conv: add optimized Viterbi decoding In-Reply-To: References: Message-ID: Patch Set 4: Code-Review-1 (4 comments) See my comments on http://lists.osmocom.org/pipermail/openbsc/2015-July/000315.html Those don't seem to have been addresses here. https://gerrit.osmocom.org/#/c/1337/4/src/viterbi.c File src/viterbi.c: Line 14: * Lesser General Public License for more details. > Does this license compatible with libosmocore? It'd be better to get the original author permission to relicense it to the same one if possible. Line 326: trellis = (struct vtrellis *) calloc(1, sizeof(struct vtrellis)); > Here we can use the static allocation too. Nope ... treillis is returned to the caller and the library has to support several callers at onces from different threads, there can be _NO_ shared global objects. PS4, Line 426: if (dec->recursive) : _traceback_rec(dec, state, out, len); : else : _traceback(dec, state, out, len); > What to do with "_"? As long as the naming is consistent within a file, it's fine for static function. Line 457: dec = (struct vdecoder *) calloc(1, sizeof(struct vdecoder)); > I suggest to use static memory allocation here. One can be declared inside Again, you can't have global static objects ... ever. -- To view, visit https://gerrit.osmocom.org/1337 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I74d355274b4176a7d924f91ef3c96912ce338fb2 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Alexander Chemeris Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Tom Tsou Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:03:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:03:19 +0000 Subject: libosmocore[master]: lapd_test: avoid calling memcpy with NULL source In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1531 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7030729f4f4c867adecc7afc15bb5ca9beff0030 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:03:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:03:22 +0000 Subject: libosmocore[master]: gprs_cipher_core: Use typecase to avoid sanitizer error In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1530 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib1866595030ad9d11c886621ce69632462befa3a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:03:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:03:31 +0000 Subject: [MERGED] libosmocore[master]: gprs_cipher_core: Use typecase to avoid sanitizer error In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gprs_cipher_core: Use typecase to avoid sanitizer error ...................................................................... gprs_cipher_core: Use typecase to avoid sanitizer error This resolves gprs_cipher_core.c:118:37: runtime error: left shift of 1 by 31 places cannot be represented in type 'int' Change-Id: Ib1866595030ad9d11c886621ce69632462befa3a --- M src/gsm/gprs_cipher_core.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gsm/gprs_cipher_core.c b/src/gsm/gprs_cipher_core.c index 8f020b3..da6e0a8 100644 --- a/src/gsm/gprs_cipher_core.c +++ b/src/gsm/gprs_cipher_core.c @@ -115,7 +115,7 @@ /* GSM TS 04.64 / Section A.2.1 : Generation of 'input' */ uint32_t gprs_cipher_gen_input_ui(uint32_t iov_ui, uint8_t sapi, uint32_t lfn, uint32_t oc) { - uint32_t sx = ((1<<27) * sapi) + (1<<31); + uint32_t sx = ((1<<27) * sapi) + ((uint32_t ) 1<<31); return (iov_ui ^ sx) + lfn + oc; } -- To view, visit https://gerrit.osmocom.org/1530 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib1866595030ad9d11c886621ce69632462befa3a Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:03:35 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:03:35 +0000 Subject: [MERGED] libosmocore[master]: lapd_test: avoid calling memcpy with NULL source In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: lapd_test: avoid calling memcpy with NULL source ...................................................................... lapd_test: avoid calling memcpy with NULL source fixes lapd/lapd_test.c:54:2: runtime error: null pointer passed as argument 2, which is declared to never be null Change-Id: I7030729f4f4c867adecc7afc15bb5ca9beff0030 --- M tests/lapd/lapd_test.c 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/lapd/lapd_test.c b/tests/lapd/lapd_test.c index 18ea1dc..e322314 100644 --- a/tests/lapd/lapd_test.c +++ b/tests/lapd/lapd_test.c @@ -51,7 +51,8 @@ { struct msgb *msg = msgb_alloc_headroom(4096, 128, "data"); msg->l3h = msgb_put(msg, len); - memcpy(msg->l3h, data, len); + if (data && len) + memcpy(msg->l3h, data, len); return msg; } -- To view, visit https://gerrit.osmocom.org/1531 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7030729f4f4c867adecc7afc15bb5ca9beff0030 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:04:11 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:04:11 +0000 Subject: osmo-pcu[master]: Improve logging In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1534 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I292ec81ab602c65ef86e6e3e85740182b63474b6 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:04:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:04:12 +0000 Subject: [MERGED] osmo-pcu[master]: Improve logging In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Improve logging ...................................................................... Improve logging Add value_string describing UL and DL TBF states and use it for logging errors while freeing TBFs. Change-Id: I292ec81ab602c65ef86e6e3e85740182b63474b6 --- M src/tbf.cpp M src/tbf.h M tests/tbf/TbfTest.err 3 files changed, 35 insertions(+), 9 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/tbf.cpp b/src/tbf.cpp index 0e4d6cc..657255d 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -43,6 +43,21 @@ static void tbf_timer_cb(void *_tbf); +const struct value_string gprs_rlcmac_tbf_dl_ass_state_names[] = { + OSMO_VALUE_STRING(GPRS_RLCMAC_DL_ASS_NONE), + OSMO_VALUE_STRING(GPRS_RLCMAC_DL_ASS_SEND_ASS), + OSMO_VALUE_STRING(GPRS_RLCMAC_DL_ASS_WAIT_ACK), + { 0, NULL } +}; + +const struct value_string gprs_rlcmac_tbf_ul_ass_state_names[] = { + OSMO_VALUE_STRING(GPRS_RLCMAC_UL_ASS_NONE), + OSMO_VALUE_STRING(GPRS_RLCMAC_UL_ASS_SEND_ASS), + OSMO_VALUE_STRING(GPRS_RLCMAC_UL_ASS_SEND_ASS_REJ), + OSMO_VALUE_STRING(GPRS_RLCMAC_UL_ASS_WAIT_ACK), + { 0, NULL } +}; + static const struct rate_ctr_desc tbf_ctr_description[] = { { "rlc.nacked", "RLC Nacked " }, }; @@ -435,16 +450,20 @@ LOGP(DRLCMAC, LOGL_INFO, "%s free\n", tbf_name(tbf)); if (tbf->ul_ass_state != GPRS_RLCMAC_UL_ASS_NONE) LOGP(DRLCMAC, LOGL_ERROR, "%s Software error: Pending uplink " - "assignment. This may not happen, because the " + "assignment in state %s. This may not happen, because the " "assignment message never gets transmitted. Please " "be sure not to free in this state. PLEASE FIX!\n", - tbf_name(tbf)); + tbf_name(tbf), + get_value_string(gprs_rlcmac_tbf_ul_ass_state_names, + tbf->ul_ass_state)); if (tbf->dl_ass_state != GPRS_RLCMAC_DL_ASS_NONE) LOGP(DRLCMAC, LOGL_ERROR, "%s Software error: Pending downlink " - "assignment. This may not happen, because the " + "assignment in state %s. This may not happen, because the " "assignment message never gets transmitted. Please " "be sure not to free in this state. PLEASE FIX!\n", - tbf_name(tbf)); + tbf_name(tbf), + 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" tbf_unlink_pdch(tbf); diff --git a/src/tbf.h b/src/tbf.h index ad1ece2..adb7dcc 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -27,6 +27,9 @@ #include #include +extern "C" { +#include +} struct bssgp_bvc_ctx; struct rlc_ul_header; @@ -61,6 +64,8 @@ GPRS_RLCMAC_DL_ASS_WAIT_ACK, /* wait for PACKET CONTROL ACK */ }; +extern const struct value_string gprs_rlcmac_tbf_dl_ass_state_names[]; + enum gprs_rlcmac_tbf_ul_ass_state { GPRS_RLCMAC_UL_ASS_NONE = 0, GPRS_RLCMAC_UL_ASS_SEND_ASS, /* send uplink assignment on next RTS */ @@ -68,6 +73,8 @@ GPRS_RLCMAC_UL_ASS_WAIT_ACK, /* wait for PACKET CONTROL ACK */ }; +extern const struct value_string gprs_rlcmac_tbf_ul_ass_state_names[]; + enum gprs_rlcmac_tbf_ul_ack_state { GPRS_RLCMAC_UL_ACK_NONE = 0, GPRS_RLCMAC_UL_ACK_SEND_ACK, /* send acknowledge on next RTS */ diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index 2647551..c6bc1aa 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -563,7 +563,7 @@ TBF(TFI=1 TLLI=0xf1000002 DIR=DL STATE=FLOW) the IMSI '001001000000002' was already assigned to another MS object: TLLI = 0xf1000001, that IMSI will be removed TBF(TFI=0 TLLI=0xf1000001 DIR=DL STATE=FLOW) changes state from FLOW to RELEASING TBF(TFI=0 TLLI=0xf1000001 DIR=DL STATE=RELEASING) free -TBF(TFI=0 TLLI=0xf1000001 DIR=DL STATE=RELEASING) Software error: Pending downlink assignment. This may not happen, because the assignment message never gets transmitted. Please be sure not to free in this state. PLEASE FIX! +TBF(TFI=0 TLLI=0xf1000001 DIR=DL STATE=RELEASING) Software error: Pending downlink assignment in state GPRS_RLCMAC_DL_ASS_SEND_ASS. This may not happen, because the assignment message never gets transmitted. Please be sure not to free in this state. PLEASE FIX! PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xf1000001 DIR=DL STATE=RELEASING), 1 TBFs, USFs = 00, TFIs = 00000002. Detaching TBF from MS object, TLLI = 0xf1000001, TBF = TBF(TFI=0 TLLI=0xf1000001 DIR=DL STATE=RELEASING) ********** TBF ends here ********** @@ -572,7 +572,7 @@ Destroying MS object, TLLI = 0x00000000 TBF(TFI=1 TLLI=0xf1000002 DIR=DL STATE=FLOW) changes state from FLOW to RELEASING TBF(TFI=1 TLLI=0xf1000002 DIR=DL STATE=RELEASING) free -TBF(TFI=1 TLLI=0xf1000002 DIR=DL STATE=RELEASING) Software error: Pending downlink assignment. This may not happen, because the assignment message never gets transmitted. Please be sure not to free in this state. PLEASE FIX! +TBF(TFI=1 TLLI=0xf1000002 DIR=DL STATE=RELEASING) Software error: Pending downlink assignment in state GPRS_RLCMAC_DL_ASS_SEND_ASS. This may not happen, because the assignment message never gets transmitted. Please be sure not to free in this state. PLEASE FIX! PDCH(TS 4, TRX 0): Detaching TBF(TFI=1 TLLI=0xf1000002 DIR=DL STATE=RELEASING), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xf1000002, TBF = TBF(TFI=1 TLLI=0xf1000002 DIR=DL STATE=RELEASING) Destroying MS object, TLLI = 0xf1000002 @@ -1971,7 +1971,7 @@ Old MS: TLLI = 0xf1223344, TA = 7, IMSI = 0011223344, LLC = 2 UL RSSI of TLLI=0xf1223344: 31 dBm TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) free -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Software error: Pending downlink assignment. This may not happen, because the assignment message never gets transmitted. Please be sure not to free in this state. PLEASE FIX! +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Software error: Pending downlink assignment in state GPRS_RLCMAC_DL_ASS_SEND_ASS. This may not happen, because the assignment message never gets transmitted. Please be sure not to free in this state. PLEASE FIX! TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) stopping timer 3169. PDCH(TS 7, TRX 0): Detaching TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) @@ -2150,7 +2150,7 @@ Old MS: TLLI = 0xf1223344, TA = 7, IMSI = 0011223344, LLC = 2 UL RSSI of TLLI=0xf1223344: 31 dBm TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) free -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Software error: Pending downlink assignment. This may not happen, because the assignment message never gets transmitted. Please be sure not to free in this state. PLEASE FIX! +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Software error: Pending downlink assignment in state GPRS_RLCMAC_DL_ASS_SEND_ASS. This may not happen, because the assignment message never gets transmitted. Please be sure not to free in this state. PLEASE FIX! TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) stopping timer 3169. PDCH(TS 7, TRX 0): Detaching TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) @@ -6636,7 +6636,7 @@ DL packet loss of IMSI= / TLLI=0xffeeddcc: 78% TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Software error: Pending downlink assignment. This may not happen, because the assignment message never gets transmitted. Please be sure not to free in this state. PLEASE FIX! +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Software error: Pending downlink assignment in state GPRS_RLCMAC_DL_ASS_SEND_ASS. This may not happen, because the assignment message never gets transmitted. Please be sure not to free in this state. PLEASE FIX! PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc -- To view, visit https://gerrit.osmocom.org/1534 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I292ec81ab602c65ef86e6e3e85740182b63474b6 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:06:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:06:20 +0000 Subject: osmo-pcu[master]: Remove duplicated code In-Reply-To: References: Message-ID: Patch Set 1: Are you sure the functionality exists in libosmocore? the gsm_timer functionality you remove uses the frame number (fn) as basis, not real-time like osmo_timer_* in libosmocore... -- To view, visit https://gerrit.osmocom.org/1532 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic98d63e8c48fa9e0e17c90da7b0a0297d0e53d3b Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:07:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:07:29 +0000 Subject: libosmocore[master]: Remove direct logging In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 I agree the library should not write to stderr/stdout. However, it could use the libosmocore logging framwork, as other parts of the code already do. Still, I think the patch should go in, it's relatively trivial. -- To view, visit https://gerrit.osmocom.org/1533 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifa149e65d76c6e64fda2946725c16672233aff2e Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:07:58 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:07:58 +0000 Subject: osmo-pcu[master]: fix segfault: check for NULL tbf in sched_select_ctrl_msg() In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1510 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I357492e558e98cfdbf5bb3438b5013029195b02b Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:08:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:08:09 +0000 Subject: openbsc[master]: fix 'osmo-nitb --version' segfault In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1509 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ice91256d72b9eabd52709352ba6cc6a42af2921b Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:08:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:08:16 +0000 Subject: [MERGED] openbsc[master]: fix 'osmo-nitb --version' segfault In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: fix 'osmo-nitb --version' segfault ...................................................................... fix 'osmo-nitb --version' segfault Call vty_init() before handle_options() to make sure the host.app_info is populated before --version potentially tries to print it. The segfault was introduced by 2c05f75bbf3d9a69eee1fe78eb5552acf1d7671d in a recent MSC-split merge. Change-Id: Ice91256d72b9eabd52709352ba6cc6a42af2921b --- M openbsc/src/osmo-nitb/bsc_hack.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/src/osmo-nitb/bsc_hack.c b/openbsc/src/osmo-nitb/bsc_hack.c index 992d4c8..bbcdd1b 100644 --- a/openbsc/src/osmo-nitb/bsc_hack.c +++ b/openbsc/src/osmo-nitb/bsc_hack.c @@ -269,6 +269,7 @@ osmo_init_logging(&log_info); osmo_stats_init(tall_bsc_ctx); bts_init(); + vty_init(&vty_info); /* Parse options */ handle_options(argc, argv); @@ -282,7 +283,6 @@ } /* Initialize VTY */ - vty_init(&vty_info); bsc_vty_init(&log_info, bsc_gsmnet); ctrl_vty_init(tall_bsc_ctx); -- To view, visit https://gerrit.osmocom.org/1509 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ice91256d72b9eabd52709352ba6cc6a42af2921b Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:08:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:08:56 +0000 Subject: libosmocore[master]: gitignore: ignore tests/oap/oap_test In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1528 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iccb8c46a721d5389058c5cf36621820bcd861b7b Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:08:57 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:08:57 +0000 Subject: [MERGED] libosmocore[master]: gitignore: ignore tests/oap/oap_test In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gitignore: ignore tests/oap/oap_test ...................................................................... gitignore: ignore tests/oap/oap_test Change-Id: Iccb8c46a721d5389058c5cf36621820bcd861b7b --- M .gitignore 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/.gitignore b/.gitignore index 50209b0..d333b27 100644 --- a/.gitignore +++ b/.gitignore @@ -96,6 +96,7 @@ tests/tlv/tlv_test tests/fsm/fsm_test tests/write_queue/wqueue_test +tests/oap/oap_test utils/osmo-arfcn utils/osmo-auc-gen -- To view, visit https://gerrit.osmocom.org/1528 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iccb8c46a721d5389058c5cf36621820bcd861b7b Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:09:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:09:05 +0000 Subject: libosmocore[master]: gitignore: ignore *.pyc files In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1529 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I148584e1664b20741c0ade02cbda635c24268d2e Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:09:41 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:09:41 +0000 Subject: osmo-bts[master]: DTX AMR HR: fix inhibition In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1508 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I229ba39a38a223fada4881fc9aca35d3639371f8 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jean-Francois Dionne Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:09:49 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:09:49 +0000 Subject: [MERGED] osmo-bts[master]: DTX AMR HR: fix inhibition In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: DTX AMR HR: fix inhibition ...................................................................... DTX AMR HR: fix inhibition * Unlike in AMR FR, in AMR HR incoming ONSET have to be treated differently depending on whether we've recently sent SID UPDATE or EMPTY frame. Split ST_SID_U FSM state into 2 states to accommodate for that and make sure that additional states specific to AMR HR are not used for AMR FR. * Avoid sending E_VOICE and E_SID_U in corresponding states as those do not initiate FSM state transitions anyway. This decrease extra load from FSM signalling which otherwise would be triggered on per-frame basis. * Introduce separate signal for SID First P1 -> P2 transition to avoid confusion with E_COMPL and E_SID_U initiated transitions from P1 state. * Don't init DTX FSM for SDCCH channels. Change-Id: I229ba39a38a223fada4881fc9aca35d3639371f8 Related: OS#1801 --- M include/osmo-bts/dtx_dl_amr_fsm.h M include/osmo-bts/msg_utils.h M src/common/bts.c M src/common/dtx_dl_amr_fsm.c M src/common/l1sap.c M src/common/msg_utils.c M src/osmo-bts-litecell15/l1_if.c M src/osmo-bts-litecell15/tch.c M src/osmo-bts-sysmo/l1_if.c M src/osmo-bts-sysmo/tch.c 10 files changed, 135 insertions(+), 42 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmo-bts/dtx_dl_amr_fsm.h b/include/osmo-bts/dtx_dl_amr_fsm.h index 4fb2f25..f747f9f 100644 --- a/include/osmo-bts/dtx_dl_amr_fsm.h +++ b/include/osmo-bts/dtx_dl_amr_fsm.h @@ -14,6 +14,7 @@ ST_SID_F2, ST_F1_INH, ST_U_INH, + ST_U_NOINH, ST_F1_INH_REC, ST_U_INH_REC, ST_SID_U, @@ -29,6 +30,7 @@ E_ONSET, E_FACCH, E_COMPL, + E_FIRST, E_INHIB, E_SID_F, E_SID_U, diff --git a/include/osmo-bts/msg_utils.h b/include/osmo-bts/msg_utils.h index 55e8475..7ddbe88 100644 --- a/include/osmo-bts/msg_utils.h +++ b/include/osmo-bts/msg_utils.h @@ -37,6 +37,7 @@ void dtx_dispatch(struct gsm_lchan *lchan, enum dtx_dl_amr_fsm_events e); bool dtx_recursion(const struct gsm_lchan *lchan); void dtx_int_signal(struct gsm_lchan *lchan); +bool dtx_is_first_p1(const struct gsm_lchan *lchan); void dtx_cache_payload(struct gsm_lchan *lchan, const uint8_t *l1_payload, size_t length, uint32_t fn, int update); int dtx_dl_amr_fsm_step(struct gsm_lchan *lchan, const uint8_t *rtp_pl, diff --git a/src/common/bts.c b/src/common/bts.c index 9c2f0e0..d249137 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -45,6 +45,7 @@ #include #include #include +#include #define MIN_QUAL_RACH 5.0f /* at least 5 dB C/I */ #define MIN_QUAL_NORM -0.5f /* at least -1 dB C/I */ diff --git a/src/common/dtx_dl_amr_fsm.c b/src/common/dtx_dl_amr_fsm.c index d903b0c..832e8b4 100644 --- a/src/common/dtx_dl_amr_fsm.c +++ b/src/common/dtx_dl_amr_fsm.c @@ -47,7 +47,7 @@ Was observed during testing, let's just ignore it for now */ break; case E_SID_U: - osmo_fsm_inst_state_chg(fi, ST_SID_U, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_U_NOINH, 0, 0); break; case E_VOICE: osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); @@ -55,7 +55,7 @@ case E_FACCH: osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); break; - case E_COMPL: + case E_FIRST: osmo_fsm_inst_state_chg(fi, ST_SID_F2, 0, 0); break; case E_INHIB: @@ -74,7 +74,7 @@ void dtx_fsm_sid_f2(struct osmo_fsm_inst *fi, uint32_t event, void *data) { switch (event) { - case E_SID_U: + case E_COMPL: osmo_fsm_inst_state_chg(fi, ST_SID_U, 0, 0); break; case E_VOICE: @@ -145,6 +145,33 @@ } } +void dtx_fsm_u_noinh(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_FACCH: + osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + break; + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); + break; + case E_COMPL: + osmo_fsm_inst_state_chg(fi, ST_SID_U, 0, 0); + break; + case E_SID_U: + case E_SID_F: +/* FIXME: what shall we do if we get SID-FIRST _after_ sending SID-UPDATE? + Was observed during testing, let's just ignore it for now */ + break; + case E_ONSET: + osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + void dtx_fsm_sid_upd(struct osmo_fsm_inst *fi, uint32_t event, void *data) { switch (event) { @@ -159,11 +186,7 @@ break; case E_SID_U: case E_SID_F: -/* FIXME: what shall we do if we get SID-FIRST _after_ sending SID-UPDATE? - Was observed during testing, let's just ignore it for now */ - break; - case E_ONSET: - osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_U_NOINH, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -255,15 +278,15 @@ /* SID-FIRST or SID-FIRST-P1 in case of AMR HR: start of silence period (might be interrupted in case of AMR HR) */ [ST_SID_F1]= { - .in_event_mask = X(E_SID_F) | X(E_SID_U) | X(E_VOICE) | X(E_FACCH) | X(E_COMPL) | X(E_INHIB) | X(E_ONSET), - .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_ONSET_F) | X(ST_SID_F2) | X(ST_F1_INH) | X(ST_ONSET_V), + .in_event_mask = X(E_SID_F) | X(E_SID_U) | X(E_VOICE) | X(E_FACCH) | X(E_FIRST) | X(E_INHIB) | X(E_ONSET), + .out_state_mask = X(ST_U_NOINH) | X(ST_VOICE) | X(ST_ONSET_F) | X(ST_SID_F2) | X(ST_F1_INH) | X(ST_ONSET_V), .name = "SID-FIRST (P1)", .action = dtx_fsm_sid_f1, }, /* SID-FIRST P2 (only for AMR HR): actual start of silence period in case of AMR HR */ [ST_SID_F2]= { - .in_event_mask = X(E_SID_U) | X(E_VOICE) | X(E_FACCH) | X(E_ONSET), + .in_event_mask = X(E_COMPL) | X(E_VOICE) | X(E_FACCH) | X(E_ONSET), .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_ONSET_F) | X(ST_ONSET_V), .name = "SID-FIRST (P2)", .action = dtx_fsm_sid_f2, @@ -281,6 +304,13 @@ .out_state_mask = X(ST_U_INH_REC), .name = "SID-UPDATE (Inh)", .action = dtx_fsm_u_inh, + }, + /* SID-UPDATE: Inhibited not allowed (only for AMR HR) */ + [ST_U_NOINH]= { + .in_event_mask = X(E_FACCH) | X(E_VOICE) | X(E_COMPL) | X(E_SID_U) | X(E_SID_F) | X(E_ONSET), + .out_state_mask = X(ST_ONSET_F) | X(ST_VOICE) | X(ST_SID_U) | X(ST_ONSET_V), + .name = "SID-UPDATE (NoInh)", + .action = dtx_fsm_u_noinh, }, /* SID-FIRST Inhibition recursion in progress: Inhibit itself was already sent, now have to send the voice that caused it */ @@ -300,9 +330,9 @@ }, /* Silence period with periodic comfort noise data updates */ [ST_SID_U]= { - .in_event_mask = X(E_FACCH) | X(E_VOICE) | X(E_INHIB) | X(E_SID_U) | X(E_SID_F) | X(E_ONSET), - .out_state_mask = X(ST_ONSET_F) | X(ST_VOICE) | X(ST_U_INH) | X(ST_SID_U) | X(ST_ONSET_V), - .name = "SID-UPDATE", + .in_event_mask = X(E_FACCH) | X(E_VOICE) | X(E_INHIB) | X(E_SID_U) | X(E_SID_F), + .out_state_mask = X(ST_ONSET_F) | X(ST_VOICE) | X(ST_U_INH) | X(ST_U_NOINH), + .name = "SID-UPDATE (AMR/HR)", .action = dtx_fsm_sid_upd, }, /* ONSET - end of silent period due to incoming SPEECH frame */ @@ -350,6 +380,7 @@ { E_ONSET, "ONSET" }, { E_FACCH, "FACCH" }, { E_COMPL, "Complete" }, + { E_FIRST, "FIRST P1->P2" }, { E_INHIB, "Inhibit" }, { E_SID_F, "SID-FIRST" }, { E_SID_U, "SID-UPDATE" }, diff --git a/src/common/l1sap.c b/src/common/l1sap.c index e9c94f0..e6e53db 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -1161,8 +1161,7 @@ return -RSL_ERR_EQUIPMENT_FAIL; /* Init DTX DL FSM if necessary */ - //FIXME: only do it for AMR TCH/* - if (trx->bts->dtxd) + if (trx->bts->dtxd && lchan->type != GSM_LCHAN_SDCCH) lchan->tch.dtx.dl_amr_fsm = osmo_fsm_inst_alloc(&dtx_dl_amr_fsm, tall_bts_ctx, lchan, diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index 9de9b6d..062f5e3 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -93,6 +93,28 @@ return type; } +/* check that DTX is in the middle of silence */ +static inline bool dtx_is_update(const struct gsm_lchan *lchan) +{ + if (!dtx_dl_amr_enabled(lchan)) + return false; + if (lchan->tch.dtx.dl_amr_fsm->state == ST_SID_U || + lchan->tch.dtx.dl_amr_fsm->state == ST_U_NOINH) + return true; + return false; +} + +/* check that DTX is in the beginning of silence for AMR HR */ +bool dtx_is_first_p1(const struct gsm_lchan *lchan) +{ + if (!dtx_dl_amr_enabled(lchan)) + return false; + if ((lchan->type == GSM_LCHAN_TCH_H && + lchan->tch.dtx.dl_amr_fsm->state == ST_SID_F1)) + return true; + return false; +} + /* update lchan SID status */ void lchan_set_marker(bool t, struct gsm_lchan *lchan) { @@ -123,9 +145,7 @@ if (update == 0) { lchan->tch.dtx.is_update = false; /* Mark SID FIRST explicitly */ /* for non-AMR case - always update FN for incoming SID FIRST */ - if (!amr || - (dtx_dl_amr_enabled(lchan) && - lchan->tch.dtx.dl_amr_fsm->state != ST_SID_U)) + if (!amr || !dtx_is_update(lchan)) lchan->tch.dtx.fn = fn; /* for AMR case - do not update FN if SID FIRST arrives in a middle of silence: this should not be happening according to @@ -157,12 +177,24 @@ int rc; if (dtx_dl_amr_enabled(lchan)) { - if (lchan->type == GSM_LCHAN_TCH_H && - lchan->tch.dtx.dl_amr_fsm->state == ST_SID_F2 && !rtp_pl) { - *len = 3; /* SID-FIRST P1 -> P2 completion */ - memcpy(l1_payload, lchan->tch.dtx.cache, 2); - dtx_dispatch(lchan, E_SID_U); - return 0; + if (lchan->type == GSM_LCHAN_TCH_H && !rtp_pl) { + /* we're called by gen_empty_tch_msg() to handle states + specific to AMR HR DTX */ + switch (lchan->tch.dtx.dl_amr_fsm->state) { + case ST_SID_F2: + *len = 3; /* SID-FIRST P1 -> P2 completion */ + memcpy(l1_payload, lchan->tch.dtx.cache, 2); + rc = 0; + dtx_dispatch(lchan, E_COMPL); + break; + case ST_SID_U: + rc = -EBADMSG; + dtx_dispatch(lchan, E_SID_U); + break; + default: + rc = -EBADMSG; + } + return rc; } } @@ -171,8 +203,8 @@ rc = osmo_amr_rtp_dec(rtp_pl, rtp_pl_len, &cmr, &cmi, &ft, &bfi, &sti); if (rc < 0) { - LOGP(DRTP, LOGL_ERROR, "failed to decode AMR RTP (length %zu)\n", - rtp_pl_len); + LOGP(DRTP, LOGL_ERROR, "failed to decode AMR RTP (length %zu, " + "%p)\n", rtp_pl_len, rtp_pl); return rc; } @@ -197,19 +229,29 @@ return 0; if (osmo_amr_is_speech(ft)) { - /* AMR HR - Inhibition */ - if (lchan->type == GSM_LCHAN_TCH_H && marker && - lchan->tch.dtx.dl_amr_fsm->state == ST_SID_F1) + /* AMR HR - SID-FIRST_P1 Inhibition */ + if (marker && dtx_is_first_p1(lchan)) return osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, E_INHIB, (void *)lchan); + + /* AMR HR - SID-UPDATE Inhibition */ + if (marker && lchan->type == GSM_LCHAN_TCH_H && + lchan->tch.dtx.dl_amr_fsm->state == ST_SID_U) + return osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, + E_INHIB, (void *)lchan); + /* AMR FR & HR - generic */ if (marker && (lchan->tch.dtx.dl_amr_fsm->state == ST_SID_F1 || lchan->tch.dtx.dl_amr_fsm->state == ST_SID_F2 || - lchan->tch.dtx.dl_amr_fsm->state == ST_SID_U )) + lchan->tch.dtx.dl_amr_fsm->state == ST_U_NOINH)) return osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, E_ONSET, (void *)lchan); - return osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, E_VOICE, - (void *)lchan); + + if (lchan->tch.dtx.dl_amr_fsm->state != ST_VOICE) + return osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, + E_VOICE, (void *)lchan); + + return 0; } if (ft == AMR_SID) { @@ -220,8 +262,11 @@ dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, false); return osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, E_SID_F, (void *)lchan); - } else + } else if (lchan->tch.dtx.dl_amr_fsm->state != ST_FACCH) dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, sti); + if (lchan->tch.dtx.dl_amr_fsm->state == ST_SID_F2) + return osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, + E_COMPL, (void *)lchan); return osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, sti ? E_SID_U : E_SID_F, (void *)lchan); @@ -357,6 +402,7 @@ return false; if (lchan->tch.dtx.dl_amr_fsm->state == ST_U_INH || + lchan->tch.dtx.dl_amr_fsm->state == ST_U_INH_REC || lchan->tch.dtx.dl_amr_fsm->state == ST_F1_INH || lchan->tch.dtx.dl_amr_fsm->state == ST_ONSET_F || lchan->tch.dtx.dl_amr_fsm->state == ST_ONSET_V || @@ -389,9 +435,7 @@ if (!dtx_dl_amr_enabled(lchan)) return; - if ((lchan->type == GSM_LCHAN_TCH_H && - lchan->tch.dtx.dl_amr_fsm->state == ST_SID_F1) || - dtx_recursion(lchan)) + if (dtx_is_first_p1(lchan) || dtx_recursion(lchan)) dtx_dispatch(lchan, E_COMPL); } @@ -425,12 +469,17 @@ osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, E_SID_U, (void *)lchan); dtx_sti_unset(lchan); - } else if (lchan->tch.dtx.dl_amr_fsm->state == - ST_SID_U) { + } else if (dtx_is_update(lchan)) { /* enforce SID UPDATE for next repetition: it might have been altered by FACCH handling */ dtx_sti_set(lchan); - lchan->tch.dtx.is_update = true; + if (lchan->type == GSM_LCHAN_TCH_H && + lchan->tch.dtx.dl_amr_fsm->state == + ST_U_NOINH) + osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, + E_COMPL, + (void *)lchan); + lchan->tch.dtx.is_update = true; } } memcpy(dst, lchan->tch.dtx.cache, lchan->tch.dtx.len); diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index d959338..99533d7 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -416,6 +416,7 @@ } if (sapi == GsmL1_Sapi_FacchH) { sapi = GsmL1_Sapi_TchH; + subCh = L1SAP_CHAN2SS_TCHH(chan_nr); } if (sapi == GsmL1_Sapi_TchH || sapi == GsmL1_Sapi_TchF) { /* FACCH interruption of DTX silence */ @@ -542,7 +543,10 @@ } /* send message to DSP's queue */ osmo_wqueue_enqueue(&fl1->write_q[MQ_L1_WRITE], nmsg); - dtx_int_signal(lchan); + if (dtx_is_first_p1(lchan)) + dtx_dispatch(lchan, E_FIRST); + else + dtx_int_signal(lchan); if (dtx_recursion(lchan)) /* DTX: send voice after ONSET was sent */ return ph_tch_req(trx, l1sap->oph.msg, l1sap, true, false); diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index de3c7e3..a47a88f 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -322,6 +322,7 @@ dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); return 1; case ST_SID_U: + case ST_U_NOINH: return -EAGAIN; case ST_FACCH: return -EBADMSG; diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 2a3caf9..ad9aa64 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -411,6 +411,7 @@ } if (sapi == GsmL1_Sapi_FacchH) { sapi = GsmL1_Sapi_TchH; + subCh = L1SAP_CHAN2SS_TCHH(chan_nr); } if (sapi == GsmL1_Sapi_TchH || sapi == GsmL1_Sapi_TchF) { /* FACCH interruption of DTX silence */ @@ -537,7 +538,10 @@ } /* send message to DSP's queue */ osmo_wqueue_enqueue(&fl1->write_q[MQ_L1_WRITE], nmsg); - dtx_int_signal(lchan); + if (dtx_is_first_p1(lchan)) + dtx_dispatch(lchan, E_FIRST); + else + dtx_int_signal(lchan); if (dtx_recursion(lchan)) /* DTX: send voice after ONSET was sent */ return ph_tch_req(trx, l1sap->oph.msg, l1sap, true, false); diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index 16c2cf3..bc495d9 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -420,6 +420,7 @@ dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); return 1; case ST_SID_U: + case ST_U_NOINH: return -EAGAIN; case ST_FACCH: return -EBADMSG; -- To view, visit https://gerrit.osmocom.org/1508 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I229ba39a38a223fada4881fc9aca35d3639371f8 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jean-Francois Dionne Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:12:25 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 6 Jan 2017 10:12:25 +0000 Subject: [MERGED] libosmocore[master]: Remove direct logging In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Remove direct logging ...................................................................... Remove direct logging Drop perror() calls from GSMTAP code: it's application job to do the proper logging - library code should not write to stdout/stderr directly. Change-Id: Ifa149e65d76c6e64fda2946725c16672233aff2e --- M src/gsmtap_util.c 1 file changed, 0 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gsmtap_util.c b/src/gsmtap_util.c index 66abdf1..ab4a28e 100644 --- a/src/gsmtap_util.c +++ b/src/gsmtap_util.c @@ -286,11 +286,9 @@ rc = write(ofd->fd, msg->data, msg->len); if (rc < 0) { - perror("writing msgb to gsmtap fd"); return rc; } if (rc != msg->len) { - perror("short write to gsmtap fd"); return -EIO; } @@ -308,7 +306,6 @@ rc = read(fd->fd, buf, sizeof(buf)); if (rc < 0) { - perror("reading from gsmtap sink fd"); return rc; } /* simply discard any data arriving on the socket */ -- To view, visit https://gerrit.osmocom.org/1533 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifa149e65d76c6e64fda2946725c16672233aff2e Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:14:02 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:14:02 +0000 Subject: libosmocore[master]: Add osmo_rand() function In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/1526/1/src/gsm/gsm_utils.c File src/gsm/gsm_utils.c: Line 675: return gnutls_rnd(GNUTLS_RND_NONCE, out, len); you're using the NONCE quality here, but the function name doesn't expose this property. So the API is hiding the detail that the quality of random numbers is e.g. not sufficient for e.g. key generation. So let's rename t to osmo_rand_nonce to be on the safe side? -- To view, visit https://gerrit.osmocom.org/1526 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0241b814ea4c4ce1458f7ad76e31d390383c2048 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:16:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:16:31 +0000 Subject: openbsc[master]: Migrate from OpenSSL to osmo_rand() In-Reply-To: References: Message-ID: Patch Set 6: (1 comment) https://gerrit.osmocom.org/#/c/1464/6/openbsc/src/gprs/gb_proxy.c File openbsc/src/gprs/gb_proxy.c: Line 237: if (osmo_rand((uint8_t *) &bss_ptmsi, actually, the PTMSI is not a nonce, so according to https://www.gnu.org/software/gnutls/reference/gnutls-crypto.html#gnutls-rnd-level-t it should use GNUTLS_RND_RANDOM from my understanding, as it is important for the entire session, not just for a nonec in an authentication procedure. -- To view, visit https://gerrit.osmocom.org/1464 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I270c33912bf107b3c7c217d199262cc74d56ffdb Gerrit-PatchSet: 6 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 Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:17:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:17:24 +0000 Subject: libosmocore[master]: Add OML definitions from OsmoBTS In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1517 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9c3bc15662949654e7bba6aad5488c69ee7d0c45 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:17:53 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:17:53 +0000 Subject: libosmocore[master]: Add parsed TLV helpers from OsmoBTS In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1518 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ieaaaed19da9c069fe451faa53d24c5b84d7d5615 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:18:07 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:18:07 +0000 Subject: libosmocore[master]: Add cause enum for OML fail reports In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1520 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie9ba4b53fb19a151447aec9ea309284e20613585 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:18:50 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 6 Jan 2017 10:18:50 +0000 Subject: [ABANDON] osmo-pcu[master]: Remove duplicated code In-Reply-To: References: Message-ID: Max has abandoned this change. Change subject: Remove duplicated code ...................................................................... Abandoned My mistake - I was fooled by the fact that it still works with osmo_timer which is weird. -- To view, visit https://gerrit.osmocom.org/1532 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Ic98d63e8c48fa9e0e17c90da7b0a0297d0e53d3b Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:19:06 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:19:06 +0000 Subject: libosmocore[master]: Add event cause string descriptions In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/1523/2/src/gsm/abis_nm.c File src/gsm/abis_nm.c: Line 153: const struct value_string abis_mm_event_cause_names[] = { in terms of naming: The events are all osmocom-specific, but the value_string has no 'osmo' in the name. Is that intentional, i.e. should also non-vendorspecific causes be dsecribed in this value_string? -- To view, visit https://gerrit.osmocom.org/1523 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id173c978616c98b7831fbafb5401064257f1cf73 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:20:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:20:25 +0000 Subject: libosmocore[master]: Add OML Failure Event Report support In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1519 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I58c198d8ea588432c62520928b08f0b2a7035e93 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:21:11 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 6 Jan 2017 10:21:11 +0000 Subject: [MERGED] libosmocore[master]: Add cause enum for OML fail reports In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Add cause enum for OML fail reports ...................................................................... Add cause enum for OML fail reports Add 3GPP TS 12.21 ?9.4.43 Probable Cause values of type 03 (Manufacturer specific values). Max's note: renamed to make it clear that values are vendor-specific. Related: OS#1615 Change-Id: Ie9ba4b53fb19a151447aec9ea309284e20613585 --- M include/osmocom/gsm/protocol/gsm_12_21.h 1 file changed, 18 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/gsm/protocol/gsm_12_21.h b/include/osmocom/gsm/protocol/gsm_12_21.h index ed53dc6..58bb730 100644 --- a/include/osmocom/gsm/protocol/gsm_12_21.h +++ b/include/osmocom/gsm/protocol/gsm_12_21.h @@ -256,6 +256,24 @@ NM_MT_IPACC_SET_ATTR_NACK, }; +/*! \brief OML Probable Cause (Section 9.4.43) Manufacturer specific values */ +enum abis_mm_event_causes { + /* Critical causes */ + OSMO_EVT_CRIT_SW_FATAL = 0x0000, + OSMO_EVT_CRIT_PROC_STOP = 0x0002, + OSMO_EVT_CRIT_RTP_TOUT = 0x032c, + OSMO_EVT_CRIT_BOOT_FAIL = 0x0401, + /* Major causes */ + OSMO_EVT_MAJ_UKWN_MSG = 0x0002, + OSMO_EVT_MAJ_RSL_FAIL = 0x0309, + OSMO_EVT_MAJ_UNSUP_ATTR = 0x0318, + OSMO_EVT_MAJ_NET_CONGEST = 0x032b, + /* Minor causes */ + OSMO_EVT_MIN_PAG_TAB_FULL = 0x0401, + /* Warning causes */ + OSMO_EVT_WARN_SW_WARN = 0x0001, +}; + enum abis_nm_bs11_cell_alloc { NM_BS11_CANR_GSM = 0x00, NM_BS11_CANR_DCS1800 = 0x01, -- To view, visit https://gerrit.osmocom.org/1520 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie9ba4b53fb19a151447aec9ea309284e20613585 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Minh-Quang Nguyen From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:21:12 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 6 Jan 2017 10:21:12 +0000 Subject: [MERGED] libosmocore[master]: Add parsed TLV helpers from OsmoBTS In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Add parsed TLV helpers from OsmoBTS ...................................................................... Add parsed TLV helpers from OsmoBTS Add functions to copy and merge parsed TLV structures from OsmoBTS. Change-Id: Ieaaaed19da9c069fe451faa53d24c5b84d7d5615 --- M include/osmocom/gsm/tlv.h M src/gsm/libosmogsm.map M src/gsm/tlv_parser.c 3 files changed, 64 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/gsm/tlv.h b/include/osmocom/gsm/tlv.h index cf09969..701fe68 100644 --- a/include/osmocom/gsm/tlv.h +++ b/include/osmocom/gsm/tlv.h @@ -436,6 +436,8 @@ return res; } +struct tlv_parsed *osmo_tlvp_copy(const struct tlv_parsed *tp_orig, void *ctx); +int osmo_tlvp_merge(struct tlv_parsed *dst, const struct tlv_parsed *src); int osmo_shift_v_fixed(uint8_t **data, size_t *data_len, size_t len, uint8_t **value); int osmo_match_shift_tv_fixed(uint8_t **data, size_t *data_len, diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 199d05a..b84f859 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -324,6 +324,8 @@ tvlv_att_def; vtvlv_gan_att_def; +osmo_tlvp_copy; +osmo_tlvp_merge; osmo_shift_v_fixed; osmo_match_shift_tv_fixed; osmo_shift_tlv; diff --git a/src/gsm/tlv_parser.c b/src/gsm/tlv_parser.c index e84edd9..4cc43f6 100644 --- a/src/gsm/tlv_parser.c +++ b/src/gsm/tlv_parser.c @@ -19,6 +19,7 @@ #include #include +#include #include #include @@ -43,6 +44,65 @@ return 0; } +/*! \brief Copy \ref tlv_parsed using given talloc context + * \param[in] tp_orig Parsed TLV structure + * \param[in] ctx Talloc context for allocations + * \returns NULL on errors, \ref tlv_parsed pointer otherwise + */ +struct tlv_parsed *osmo_tlvp_copy(const struct tlv_parsed *tp_orig, void *ctx) +{ + struct tlv_parsed *tp_out; + size_t i, len; + + tp_out = talloc_zero(ctx, struct tlv_parsed); + if (!tp_out) + return NULL; + + /* if the original is NULL, return empty tlvp */ + if (!tp_orig) + return tp_out; + + for (i = 0; i < ARRAY_SIZE(tp_orig->lv); i++) { + len = tp_orig->lv[i].len; + tp_out->lv[i].len = len; + if (len && tp_out->lv[i].val) { + tp_out->lv[i].val = talloc_zero_size(tp_out, len); + if (!tp_out->lv[i].val) { + talloc_free(tp_out); + return NULL; + } + memcpy((uint8_t *)tp_out->lv[i].val, tp_orig->lv[i].val, + len); + } + } + + return tp_out; +} + +/*! \brief Merge all \ref tlv_parsed attributes of 'src' into 'dst' + * \param[in] dst Parsed TLV structure to merge into + * \param[in] src Parsed TLV structure to merge from + * \returns 0 on success, negative on error + */ +int osmo_tlvp_merge(struct tlv_parsed *dst, const struct tlv_parsed *src) +{ + size_t i, len; + for (i = 0; i < ARRAY_SIZE(dst->lv); i++) { + len = src->lv[i].len; + if (len == 0 || src->lv[i].val == NULL) + continue; + if (dst->lv[i].val) { + talloc_free((uint8_t *) dst->lv[i].val); + dst->lv[i].len = 0; + } + dst->lv[i].val = talloc_zero_size(dst, len); + if (!dst->lv[i].val) + return -ENOMEM; + memcpy((uint8_t *) dst->lv[i].val, src->lv[i].val, len); + } + return 0; +} + /*! \brief Parse a single TLV encoded IE * \param[out] o_tag the tag of the IE that was found * \param[out] o_len length of the IE that was found -- To view, visit https://gerrit.osmocom.org/1518 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ieaaaed19da9c069fe451faa53d24c5b84d7d5615 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:21:12 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 6 Jan 2017 10:21:12 +0000 Subject: [MERGED] libosmocore[master]: Add OML definitions from OsmoBTS In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Add OML definitions from OsmoBTS ...................................................................... Add OML definitions from OsmoBTS Change-Id: I9c3bc15662949654e7bba6aad5488c69ee7d0c45 Related: OS#1615 --- M include/osmocom/gsm/abis_nm.h M include/osmocom/gsm/protocol/gsm_12_21.h M src/gsm/abis_nm.c M src/gsm/libosmogsm.map 4 files changed, 76 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/gsm/abis_nm.h b/include/osmocom/gsm/abis_nm.h index 04bca43..14dbc08 100644 --- a/include/osmocom/gsm/abis_nm.h +++ b/include/osmocom/gsm/abis_nm.h @@ -34,6 +34,7 @@ const char *abis_nm_avail_name(uint8_t avail); const char *abis_nm_test_name(uint8_t test); extern const struct tlv_definition abis_nm_osmo_att_tlvdef; +extern const struct tlv_definition abis_nm_att_tlvdef_ipa; /*! \brief write a human-readable OML header to the debug log * \param[in] ss Logging sub-system diff --git a/include/osmocom/gsm/protocol/gsm_12_21.h b/include/osmocom/gsm/protocol/gsm_12_21.h index 3c3a2c9..ed53dc6 100644 --- a/include/osmocom/gsm/protocol/gsm_12_21.h +++ b/include/osmocom/gsm/protocol/gsm_12_21.h @@ -615,6 +615,19 @@ uint8_t subslot; /*!< \brief E1 sub-slot */ } __attribute__ ((packed)); +/*! \brief 3GPP TS 12.21 9.4.53 T200 index */ +enum abis_nm_t200_idx { + T200_SDCCH = 0, + T200_FACCH_F = 1, + T200_FACCH_H = 2, + T200_SACCH_TCH_SAPI0 = 3, + T200_SACCH_SDCCH = 4, + T200_SDCCH_SAPI3 = 5, + T200_SACCH_TCH_SAPI3 = 6 +}; + +extern const uint8_t abis_nm_t200_ms[]; + /*! \brief Siemens BS-11 specific objects in the SienemsHW (0xA5) object class */ enum abis_bs11_objtype { BS11_OBJ_ALCO = 0x01, diff --git a/src/gsm/abis_nm.c b/src/gsm/abis_nm.c index e607d30..c085e06 100644 --- a/src/gsm/abis_nm.c +++ b/src/gsm/abis_nm.c @@ -227,6 +227,17 @@ return get_value_string(severity_names, cause); } +/*! \brief 3GPP TS 12.21 9.4.53 T200 values (in msec) */ +const uint8_t abis_nm_t200_ms[] = { + [T200_SDCCH] = 5, + [T200_FACCH_F] = 5, + [T200_FACCH_H] = 5, + [T200_SACCH_TCH_SAPI0] = 10, + [T200_SACCH_SDCCH] = 10, + [T200_SDCCH_SAPI3] = 5, + [T200_SACCH_TCH_SAPI3] = 10 +}; + /*! \brief Attributes that the BSC can set, not only get, according to Section 9.4 */ const enum abis_nm_attr abis_nm_att_settable[] = { NM_ATT_ADD_INFO, @@ -256,6 +267,55 @@ NM_ATT_MEAS_TYPE, }; +/*! \brief GSM A-bis OML IPA TLV parser definition */ +const struct tlv_definition abis_nm_att_tlvdef_ipa = { + .def = { + /* ip.access specifics */ + [NM_ATT_IPACC_DST_IP] = { TLV_TYPE_FIXED, 4 }, + [NM_ATT_IPACC_DST_IP_PORT] = { TLV_TYPE_FIXED, 2 }, + [NM_ATT_IPACC_STREAM_ID] = { TLV_TYPE_TV, }, + [NM_ATT_IPACC_SEC_OML_CFG] = { TLV_TYPE_FIXED, 6 }, + [NM_ATT_IPACC_IP_IF_CFG] = { TLV_TYPE_FIXED, 8 }, + [NM_ATT_IPACC_IP_GW_CFG] = { TLV_TYPE_FIXED, 12 }, + [NM_ATT_IPACC_IN_SERV_TIME] = { TLV_TYPE_FIXED, 4 }, + [NM_ATT_IPACC_LOCATION] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_PAGING_CFG] = { TLV_TYPE_FIXED, 2 }, + [NM_ATT_IPACC_UNIT_ID] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_UNIT_NAME] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_SNMP_CFG] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_PRIM_OML_CFG_LIST] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_NV_FLAGS] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_FREQ_CTRL] = { TLV_TYPE_FIXED, 2 }, + [NM_ATT_IPACC_PRIM_OML_FB_TOUT] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_CUR_SW_CFG] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_TIMING_BUS] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_CGI] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_RAC] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_OBJ_VERSION] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_GPRS_PAGING_CFG]= { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_NSEI] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_BVCI] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_NSVCI] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_NS_CFG] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_BSSGP_CFG] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_NS_LINK_CFG] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_RLC_CFG] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_ALM_THRESH_LIST]= { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_MONIT_VAL_LIST] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_TIB_CONTROL] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_SUPP_FEATURES] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_CODING_SCHEMES] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_RLC_CFG_2] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_HEARTB_TOUT] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_UPTIME] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_RLC_CFG_3] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_SSL_CFG] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_SEC_POSSIBLE] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_IML_SSL_STATE] = { TLV_TYPE_TL16V }, + [NM_ATT_IPACC_REVOC_DATE] = { TLV_TYPE_TL16V }, + }, +}; + /*! \brief GSM A-bis OML TLV parser definition */ const struct tlv_definition abis_nm_att_tlvdef = { .def = { diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index a3d224f..199d05a 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -10,11 +10,13 @@ abis_nm_nack_cause_name; abis_nm_nack_name; abis_nm_att_tlvdef; +abis_nm_att_tlvdef_ipa; abis_nm_osmo_att_tlvdef; abis_nm_msg_disc_names; abis_nm_obj_class_names; abis_nm_opstate_name; abis_nm_nacks; +abis_nm_t200_ms; abis_nm_no_ack_nack; abis_nm_pchan4chcomb; abis_nm_reports; -- To view, visit https://gerrit.osmocom.org/1517 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9c3bc15662949654e7bba6aad5488c69ee7d0c45 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:22:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:22:37 +0000 Subject: osmo-bts[master]: Alarm on various errors In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 (2 comments) minor changes, otherwise fine. https://gerrit.osmocom.org/#/c/1525/1/src/common/oml.c File src/common/oml.c: Line 825: if (trx){ space, please https://gerrit.osmocom.org/#/c/1525/1/src/common/rsl.c File src/common/rsl.c: Line 408: "BTS page table is full\n"); it's a paging table. The page table is part of your operating system ;) -- To view, visit https://gerrit.osmocom.org/1525 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic163bcfb6361a8ebd39e0bc0f238ef51e2cb214e Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:23:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:23:14 +0000 Subject: osmo-bts[master]: Add Abis OML failure event reporting In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1522 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib1170edca2207752984a554d7a6a57c224f6d5f5 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:25:46 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:25:46 +0000 Subject: openbsc[master]: Prevent segfault in range encoding In-Reply-To: References: Message-ID: Patch Set 5: Code-Review+1 looks fine to me, would be great to get holgers feedback on the range encoding issues. Also, I think the general preference is to first have a patch that shows the bug by making the test case fail, and then adding the fix as a separate patch. -- To view, visit https://gerrit.osmocom.org/1429 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3e049ab2d7c1c4d6c791b148f37e10636a8e43e0 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 Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:26:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:26:37 +0000 Subject: openbsc[master]: SI2q: add support for multiple UARFCNs In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1516 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If1c32e8b547a28325180faaaddd21f80c37f7337 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:28:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:28:20 +0000 Subject: osmo-pcu[master]: Enable padding support for retransmission in EGPRS DL TBF In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 yes, a bit more verbose description on the actual problem (other than "padding cases were failing") would be neccessary. I think neither Max nor I understand what the issue was with that brief description. -- To view, visit https://gerrit.osmocom.org/1513 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idaf956244aa029c4bef70ecf94163044a3c85f59 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:31:54 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:31:54 +0000 Subject: osmo-pcu[master]: Array indexing for SPB counters in bts statistics. In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1511 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9b17ca0f838a37d9405cebf2319e722a302f5ed9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: sivasankari Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:31:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:31:56 +0000 Subject: [MERGED] osmo-pcu[master]: Array indexing for SPB counters in bts statistics. In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Array indexing for SPB counters in bts statistics. ...................................................................... Array indexing for SPB counters in bts statistics. Array indexing mismatch is corrected for SPB counters. (bts_ctr_description with the bts counter declaration). Change-Id: I9b17ca0f838a37d9405cebf2319e722a302f5ed9 --- M src/bts.h 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/bts.h b/src/bts.h index 636c7ec..2932154 100644 --- a/src/bts.h +++ b/src/bts.h @@ -266,11 +266,11 @@ CTR_LLC_DL_BYTES, CTR_LLC_UL_BYTES, CTR_RACH_REQUESTS, + CTR_11BIT_RACH_REQUESTS, CTR_SPB_UL_FIRST_SEGMENT, CTR_SPB_UL_SECOND_SEGMENT, CTR_SPB_DL_FIRST_SEGMENT, CTR_SPB_DL_SECOND_SEGMENT, - CTR_11BIT_RACH_REQUESTS, CTR_IMMEDIATE_ASSIGN_UL_TBF, CTR_IMMEDIATE_ASSIGN_REJ, CTR_IMMEDIATE_ASSIGN_DL_TBF, @@ -401,11 +401,11 @@ void llc_dl_bytes(int bytes); void llc_ul_bytes(int bytes); void rach_frame(); + void rach_frame_11bit(); void spb_uplink_first_segment(); void spb_uplink_second_segment(); void spb_downlink_first_segment(); void spb_downlink_second_segment(); - void rach_frame_11bit(); void immediate_assignment_ul_tbf(); void immediate_assignment_reject(); void immediate_assignment_dl_tbf(); @@ -602,11 +602,11 @@ CREATE_COUNT_ADD_INLINE(llc_dl_bytes, CTR_LLC_DL_BYTES); CREATE_COUNT_ADD_INLINE(llc_ul_bytes, CTR_LLC_UL_BYTES); CREATE_COUNT_INLINE(rach_frame, CTR_RACH_REQUESTS); +CREATE_COUNT_INLINE(rach_frame_11bit, CTR_11BIT_RACH_REQUESTS); CREATE_COUNT_INLINE(spb_uplink_first_segment, CTR_SPB_UL_FIRST_SEGMENT); CREATE_COUNT_INLINE(spb_uplink_second_segment, CTR_SPB_UL_SECOND_SEGMENT); CREATE_COUNT_INLINE(spb_downlink_first_segment, CTR_SPB_DL_FIRST_SEGMENT); CREATE_COUNT_INLINE(spb_downlink_second_segment, CTR_SPB_DL_SECOND_SEGMENT); -CREATE_COUNT_INLINE(rach_frame_11bit, CTR_11BIT_RACH_REQUESTS); CREATE_COUNT_INLINE(immediate_assignment_ul_tbf, CTR_IMMEDIATE_ASSIGN_UL_TBF); CREATE_COUNT_INLINE(immediate_assignment_reject, CTR_IMMEDIATE_ASSIGN_REJ); CREATE_COUNT_INLINE(immediate_assignment_dl_tbf, CTR_IMMEDIATE_ASSIGN_DL_TBF); -- To view, visit https://gerrit.osmocom.org/1511 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9b17ca0f838a37d9405cebf2319e722a302f5ed9 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: sivasankari Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:32:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:32:18 +0000 Subject: osmo-bts[master]: fix: dyn ts: uplink measurement report In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1507 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id19316701fd8de6f295eeae0272eea0c315ab1b7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:32:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:32:19 +0000 Subject: [MERGED] osmo-bts[master]: fix: dyn ts: uplink measurement report In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: fix: dyn ts: uplink measurement report ...................................................................... fix: dyn ts: uplink measurement report Fix pchan value used for uplink measurement decisions for dynamic channels in TCH mode. Fixes this error log message flooding the osmo-bts log when a dyn ts is serving a voice call: <0004> ../../../src/common/measurement.c:104 (bts=0,trx=0,ts=3,ss=0) no space for uplink measurement Change-Id: Id19316701fd8de6f295eeae0272eea0c315ab1b7 --- M src/common/measurement.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/measurement.c b/src/common/measurement.c index be1d4f6..6a11888 100644 --- a/src/common/measurement.c +++ b/src/common/measurement.c @@ -144,7 +144,7 @@ int i; /* if measurement period is not complete, abort */ - if (!is_meas_complete(lchan->ts->pchan, lchan->ts->nr, + if (!is_meas_complete(ts_pchan(lchan->ts), lchan->ts->nr, lchan->nr, fn)) return 0; -- To view, visit https://gerrit.osmocom.org/1507 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id19316701fd8de6f295eeae0272eea0c315ab1b7 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:33:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:33:00 +0000 Subject: osmo-bts[master]: Add copyright for .deb packages In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1490 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4c7ef1286ba6d2f3c6aadc8ea1864be513f8cf1d Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:33:06 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:33:06 +0000 Subject: [MERGED] osmo-bts[master]: Add copyright for .deb packages In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add copyright for .deb packages ...................................................................... Add copyright for .deb packages Add debian/copyright in Debian format which should have been added in c2ecca6b0496127709dcd3afa9d366085d8bec97. Change-Id: I4c7ef1286ba6d2f3c6aadc8ea1864be513f8cf1d Related: OS#1694 --- A debian/copyright 1 file changed, 81 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..302d1d9 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,81 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: osmo-bts +Source: http://cgit.osmocom.org/osmo-bts/ + +Files: * +Copyright: 2008-2014 Harald Welte + 2009,2011,2013 Andreas Eversberg + 2010,2011 On-Waves + 2012-2015 Holger Hans Peter Freyther + 2014 sysmocom s.f.m.c. Gmbh + 2015 Alexander Chemeris +License: AGPL-3+ + +Files: src/osmo-bts-sysmo/eeprom.c + src/osmo-bts-sysmo/eeprom.h +Copyright: 2012 Nutaq +License: MIT +Comment: Yves Godin is the author + +Files: src/common/pcu_sock.c +Copyright: 2008-2010 Harald Welte + 2009-2012 Andreas Eversberg + 2012 Holger Hans Peter Freyther +License: GPL-2+ + +Files: debian/* +Copyright: 2015-2016 Ruben Undheim +License: AGPL-3+ + + +License: AGPL-3+ + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU Affero 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 Affero General Public License + along with this program. If not, see . + + +License: GPL-2+ + This package 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 2 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, see . + . + On Debian systems, the complete text of the GNU General + Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". + + +License: MIT + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do + so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. -- To view, visit https://gerrit.osmocom.org/1490 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4c7ef1286ba6d2f3c6aadc8ea1864be513f8cf1d Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:34:42 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 6 Jan 2017 10:34:42 +0000 Subject: libosmocore[master]: Add event cause string descriptions In-Reply-To: References: Message-ID: Patch Set 2: Yes, it's intentional: we could have generic event causes in the same enum in future or some other vendor-specific causes in the same enum in future. On the other hand we can have it in separate enums - in this case the name should be changed to smth with osmo_ prefix. Not sure which variant is better - functions using it have "uint16_t cause" parameter so it doesn't matter from consumer point of view. -- To view, visit https://gerrit.osmocom.org/1523 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id173c978616c98b7831fbafb5401064257f1cf73 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:36:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:36:03 +0000 Subject: osmo-pcu[master]: Refactoring write_packet_ack_nack_desc_egprs to prepare for ... In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/412 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie5c25b6ee30f2f1b613e923c234b03a6ffe12ae2 Gerrit-PatchSet: 6 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: prasadkg Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: prasadkg Gerrit-Reviewer: pravin Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:36:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:36:08 +0000 Subject: [MERGED] osmo-pcu[master]: Refactoring write_packet_ack_nack_desc_egprs to prepare for ... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Refactoring write_packet_ack_nack_desc_egprs to prepare for CRBB support ...................................................................... Refactoring write_packet_ack_nack_desc_egprs to prepare for CRBB support Change-Id: Ie5c25b6ee30f2f1b613e923c234b03a6ffe12ae2 --- M src/encoding.cpp M tests/tbf/TbfTest.err 2 files changed, 37 insertions(+), 34 deletions(-) Approvals: arvind.sirsikar: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/encoding.cpp b/src/encoding.cpp index e5a8605..8fa4bf6 100644 --- a/src/encoding.cpp +++ b/src/encoding.cpp @@ -702,14 +702,17 @@ gprs_rlc_ul_window *window, bool is_final) { int urbb_len = 0; - int crbb_len = 0; int len; bool bow = true; bool eow = true; int ssn = window->mod_sns(window->v_q() + 1); int num_blocks = window->mod_sns(window->v_r() - window->v_q()); int esn_crbb = window->mod_sns(ssn - 1); - int rest_bits = dest->data_len * 8 - wp; + /* Bit 0 at the end is mandatory Table 11.2.28.1 in 44.060 */ + int rest_bits = dest->data_len * 8 - wp - 1; + int is_compressed = 0; + bool len_coded = true; + uint8_t i; if (num_blocks > 0) /* V(Q) is NACK and omitted -> SSN = V(Q) + 1 */ @@ -717,33 +720,31 @@ if (num_blocks > window->ws()) num_blocks = window->ws(); + /* TODO Compression support */ + if (is_compressed == 0) { + /* Union bit takes 1 bit */ + /* Other fields in descr for uncompresed bitmap takes 15 bits*/ - if (num_blocks > rest_bits) { - eow = false; - urbb_len = rest_bits; - /* TODO: use compression, start encoding bits and stop when the - * space is exhausted. Use the first combination that encodes - * all bits. If there is none, use the combination that encodes - * the largest number of bits (e.g. by setting num_blocks to the - * max and repeating the construction). - */ - } else if (num_blocks > rest_bits - 9) { - /* union bit and length field take 9 bits */ - eow = false; - urbb_len = rest_bits - 9; - /* TODO: use compression (see above) */ - } else - urbb_len = num_blocks; - - if (urbb_len + crbb_len == rest_bits) - len = -1; - else if (crbb_len == 0) + if (num_blocks > rest_bits - 15 - 1) { + eow = false; + urbb_len = rest_bits - 15 - 1; + len_coded = false; + } else if (num_blocks == rest_bits - 15 - 1) { + urbb_len = rest_bits - 15 - 1; + len_coded = false; + /* Union bit takes 1 bit length field takes 8 bits*/ + } else if (num_blocks > rest_bits - 15 - 9) { + eow = false; + urbb_len = rest_bits - 15 - 9; + } else + urbb_len = num_blocks; len = urbb_len + 15; - else - len = urbb_len + crbb_len + 23; + } else { + /* TODO Compressed bitmap */ + } /* EGPRS Ack/Nack Description IE */ - if (len < 0) { + if (len_coded == false) { bitvec_write_field(dest, wp, 0, 1); // 0: don't have length } else { bitvec_write_field(dest, wp, 1, 1); // 1: have length @@ -754,17 +755,19 @@ bitvec_write_field(dest, wp, bow, 1); // BEGINNING_OF_WINDOW bitvec_write_field(dest, wp, eow, 1); // END_OF_WINDOW bitvec_write_field(dest, wp, ssn, 11); // STARTING_SEQUENCE_NUMBER - bitvec_write_field(dest, wp, 0, 1); // 0: don't have CRBB - - /* TODO: Add CRBB support */ - + if (is_compressed) { + /* TODO Add CRBB support */ + } else + bitvec_write_field(dest, wp, 0, 1); // CRBB_Exist LOGP(DRLCMACUL, LOGL_DEBUG, - " - EGPRS URBB, len = %d, SSN = %d, ESN_CRBB = %d, " + "EGPRS URBB, urbb len = %d, SSN = %d, ESN_CRBB = %d, " + "len present = %s,desc len = %d, " "SNS = %d, WS = %d, V(Q) = %d, V(R) = %d%s%s\n", - urbb_len, ssn, esn_crbb, + urbb_len, ssn, esn_crbb, len_coded ? "yes" : "No", len, window->sns(), window->ws(), window->v_q(), window->v_r(), bow ? ", BOW" : "", eow ? ", EOW" : ""); - for (int i = urbb_len; i > 0; i--) { + + for (i = urbb_len; i > 0; i--) { /* Set bit at the appropriate position (see 3GPP TS 04.60 12.3.1) */ bool is_ack = window->m_v_n.is_received(esn_crbb + i); bitvec_write_field(dest, wp, is_ack, 1); diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index c6bc1aa..38d85d9 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -6290,7 +6290,7 @@ -- Frame 1 starts at offset 0, length=37, is_complete=0 - No gaps in received block, last block: BSN=1 CV=7 Encoding Ack/Nack for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) (final=0) - - EGPRS URBB, len = 0, SSN = 3, ESN_CRBB = 2, SNS = 2048, WS = 64, V(Q) = 2, V(R) = 2, BOW, EOW +EGPRS URBB, urbb len = 0, SSN = 3, ESN_CRBB = 2, len present = yes,desc len = 15, SNS = 2048, WS = 64, V(Q) = 2, V(R) = 2, BOW, EOW Uplink Ack/Nack bit count 98, max 184, message = 40 24 01 3f 3e 24 46 68 90 87 b0 06 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b Got RLC block, coding scheme: MCS-3, length: 42 (42)) UL data: 1d 20 40 c1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -6303,7 +6303,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=37, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - Raising V(R) to 5 Encoding Ack/Nack for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) (final=0) - - EGPRS URBB, len = 2, SSN = 3, ESN_CRBB = 2, SNS = 2048, WS = 64, V(Q) = 2, V(R) = 5, BOW, EOW +EGPRS URBB, urbb len = 2, SSN = 3, ESN_CRBB = 2, len present = yes,desc len = 17, SNS = 2048, WS = 64, V(Q) = 2, V(R) = 5, BOW, EOW Uplink Ack/Nack bit count 100, max 184, message = 40 24 01 3f 3e 24 46 68 90 88 b0 06 8b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b Got 'TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS)', TA=7 Got MS: TLLI = 0xf1223344, TA = 7 -- To view, visit https://gerrit.osmocom.org/412 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie5c25b6ee30f2f1b613e923c234b03a6ffe12ae2 Gerrit-PatchSet: 7 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: prasadkg Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: prasadkg Gerrit-Reviewer: pravin From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:37:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:37:37 +0000 Subject: libosmocore[master]: Add function to get uninterrupted bit run In-Reply-To: References: Message-ID: Patch Set 11: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/415 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iae153d3639ea6b891c1fc10d7801a435c9492e26 Gerrit-PatchSet: 11 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: prasadkg Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: prasadkg Gerrit-Reviewer: pravin Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:37:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:37:42 +0000 Subject: [MERGED] libosmocore[master]: Add function to get uninterrupted bit run In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add function to get uninterrupted bit run ...................................................................... Add function to get uninterrupted bit run Function bitvec_rl_curbit added to get number of uninterrupted bits run in vector starting from the current bit till max number of bits. Test case is added to check bitvec_rl_curbit. Change-Id: Iae153d3639ea6b891c1fc10d7801a435c9492e26 --- M include/osmocom/core/bitvec.h M src/bitvec.c M tests/bitvec/bitvec_test.c M tests/bitvec/bitvec_test.ok 4 files changed, 89 insertions(+), 1 deletion(-) Approvals: arvind.sirsikar: Looks good to me, but someone else must approve; Verified Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/core/bitvec.h b/include/osmocom/core/bitvec.h index 19e2af8..0e17ba7 100644 --- a/include/osmocom/core/bitvec.h +++ b/include/osmocom/core/bitvec.h @@ -89,6 +89,7 @@ void bitvec_to_string_r(const struct bitvec *bv, char *str); void bitvec_zero(struct bitvec *bv); unsigned bitvec_rl(const struct bitvec *bv, bool b); +unsigned bitvec_rl_curbit(struct bitvec *bv, bool b, int max_bits); void bitvec_shiftl(struct bitvec *bv, unsigned int n); int16_t bitvec_get_int16_msb(const struct bitvec *bv, unsigned int num_bits); unsigned int bitvec_add_array(struct bitvec *bv, const uint32_t *array, diff --git a/src/bitvec.c b/src/bitvec.c index 38148ac..c895cff 100644 --- a/src/bitvec.c +++ b/src/bitvec.c @@ -575,6 +575,51 @@ return bv->cur_bit; } +/*! \brief Return number (bits) of uninterrupted bit run in vector + * starting from the current bit + * \param[in] bv The boolean vector to work on + * \param[in] b The boolean, sequence of 1's or 0's to be checked + * \param[in] max_bits Total Number of Uncmopresed bits + * \returns Number of consecutive bits of \p b in \p bv and cur_bit will + * \go to cur_bit + number of consecutive bit + */ +unsigned bitvec_rl_curbit(struct bitvec *bv, bool b, int max_bits) +{ + unsigned i = 0; + unsigned j = 8; + int temp_res = 0; + int count = 0; + unsigned readIndex = bv->cur_bit; + unsigned remaining_bits = max_bits % 8; + unsigned remaining_bytes = max_bits / 8; + unsigned byte_mask = 0xFF; + + if (readIndex % 8) { + for (j -= (readIndex % 8) ; j > 0 ; j--) { + if (readIndex < max_bits && bitvec_read_field(bv, &readIndex, 1) == b) + temp_res++; + else { + bv->cur_bit--; + return temp_res; + } + } + } + for (i = (readIndex / 8); + i < (remaining_bits ? remaining_bytes + 1 : remaining_bytes); + i++, count++) { + if ((b ? byte_mask : 0) != bv->data[i]) { + bv->cur_bit = (count * 8 + + leading_bits(bv->data[i], b) + readIndex); + return count * 8 + + leading_bits(bv->data[i], b) + temp_res; + } + } + bv->cur_bit = (temp_res + (count * 8)) + readIndex; + if (bv->cur_bit > max_bits) + bv->cur_bit = max_bits; + return (bv->cur_bit - readIndex + temp_res); +} + /*! \brief Shifts bitvec to the left, n MSB bits lost */ void bitvec_shiftl(struct bitvec *bv, unsigned n) { diff --git a/tests/bitvec/bitvec_test.c b/tests/bitvec/bitvec_test.c index a98a91c..d0bc30c 100644 --- a/tests/bitvec/bitvec_test.c +++ b/tests/bitvec/bitvec_test.c @@ -150,6 +150,18 @@ } } +static inline void test_bitvec_rl_curbit(struct bitvec *bv, bool b, int max_bits, + int result ) +{ + int num = 0; + int readIndex = bv->cur_bit; + OSMO_ASSERT(bv->cur_bit < max_bits); + num = bitvec_rl_curbit(bv, b, max_bits); + readIndex += num; + OSMO_ASSERT(bv->cur_bit == readIndex); + OSMO_ASSERT(num == result); +} + static void test_array() { struct bitvec b; @@ -245,7 +257,35 @@ test_array(); - printf("\nbitvec ok.\n"); + printf("\nbitvec_runlength....\n"); + bitvec_zero(&bv); + bitvec_set_uint(&bv, 0xff, 8); + bv.cur_bit -= 8; + test_bitvec_rl_curbit(&bv, 1, 64, 8); + + bitvec_zero(&bv); + bitvec_set_uint(&bv, 0xfc, 8); + bv.cur_bit -= 8; + test_bitvec_rl_curbit(&bv, 1, 64, 6); + + bitvec_zero(&bv); + test_bitvec_rl_curbit(&bv, 0, 52, 52); + + bitvec_zero(&bv); + bitvec_set_uint(&bv, 0xfc, 8); + bv.cur_bit -= 2; + test_bitvec_rl_curbit(&bv, 0, 64, 58); + + bitvec_zero(&bv); + bitvec_set_uint(&bv, 0x07, 8); + bitvec_set_uint(&bv, 0xf8, 8); + bv.cur_bit -= 11; + test_bitvec_rl_curbit(&bv, 1, 64, 8); + + bitvec_zero(&bv); + test_bitvec_rl_curbit(&bv, 1, 64, 0); + + printf("\nbitvec ok.\n"); return 0; } diff --git a/tests/bitvec/bitvec_test.ok b/tests/bitvec/bitvec_test.ok index e256108..6281973 100644 --- a/tests/bitvec/bitvec_test.ok +++ b/tests/bitvec/bitvec_test.ok @@ -166,4 +166,6 @@ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ +bitvec_runlength.... + bitvec ok. -- To view, visit https://gerrit.osmocom.org/415 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iae153d3639ea6b891c1fc10d7801a435c9492e26 Gerrit-PatchSet: 12 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: prasadkg Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: prasadkg Gerrit-Reviewer: pravin From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:39:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 10:39:08 +0000 Subject: osmo-pcu[master]: Add compression support in EGPRS PUAN In-Reply-To: References: Message-ID: Patch Set 3: the libosmocore change for getting the unterrupted bit run has been merged, but automatic rebase/cherry-pick of this patch fails. please manually rebase and re-submit. -- To view, visit https://gerrit.osmocom.org/413 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I89683e82eda6c80b7328ddb4ec2c2f55d4a687aa Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: prasadkg Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: prasadkg Gerrit-Reviewer: pravin Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 10:47:40 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 6 Jan 2017 10:47:40 +0000 Subject: [PATCH] osmo-bts[master]: Move code to libosmocore In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1521 to look at the new patch set (#3). Move code to libosmocore With libosmocore commits I9c3bc15662949654e7bba6aad5488c69ee7d0c45 and Ieaaaed19da9c069fe451faa53d24c5b84d7d5615 functions to copy and merge parsed TLV were added as well as abis_nm_att_tlvdef_ipa TLV definition with related enums. Hence we can remove it from here. Change-Id: Ia4980062ea88ffe9019b201f84e92e006ae3c2e3 --- M src/common/oml.c 1 file changed, 7 insertions(+), 128 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/21/1521/3 diff --git a/src/common/oml.c b/src/common/oml.c index c4f3d7e..0700aa2 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -42,110 +42,11 @@ #include #include -/* FIXME: move this to libosmocore */ -static struct tlv_definition abis_nm_att_tlvdef_ipa = { - .def = { - /* ip.access specifics */ - [NM_ATT_IPACC_DST_IP] = { TLV_TYPE_FIXED, 4 }, - [NM_ATT_IPACC_DST_IP_PORT] = { TLV_TYPE_FIXED, 2 }, - [NM_ATT_IPACC_STREAM_ID] = { TLV_TYPE_TV, }, - [NM_ATT_IPACC_SEC_OML_CFG] = { TLV_TYPE_FIXED, 6 }, - [NM_ATT_IPACC_IP_IF_CFG] = { TLV_TYPE_FIXED, 8 }, - [NM_ATT_IPACC_IP_GW_CFG] = { TLV_TYPE_FIXED, 12 }, - [NM_ATT_IPACC_IN_SERV_TIME] = { TLV_TYPE_FIXED, 4 }, - [NM_ATT_IPACC_LOCATION] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_PAGING_CFG] = { TLV_TYPE_FIXED, 2 }, - [NM_ATT_IPACC_UNIT_ID] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_UNIT_NAME] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_SNMP_CFG] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_PRIM_OML_CFG_LIST] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_NV_FLAGS] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_FREQ_CTRL] = { TLV_TYPE_FIXED, 2 }, - [NM_ATT_IPACC_PRIM_OML_FB_TOUT] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_CUR_SW_CFG] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_TIMING_BUS] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_CGI] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_RAC] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_OBJ_VERSION] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_GPRS_PAGING_CFG]= { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_NSEI] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_BVCI] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_NSVCI] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_NS_CFG] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_BSSGP_CFG] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_NS_LINK_CFG] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_RLC_CFG] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_ALM_THRESH_LIST]= { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_MONIT_VAL_LIST] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_TIB_CONTROL] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_SUPP_FEATURES] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_CODING_SCHEMES] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_RLC_CFG_2] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_HEARTB_TOUT] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_UPTIME] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_RLC_CFG_3] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_SSL_CFG] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_SEC_POSSIBLE] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_IML_SSL_STATE] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_REVOC_DATE] = { TLV_TYPE_TL16V }, - }, -}; - static int oml_ipa_set_attr(struct gsm_bts *bts, struct msgb *msg); /* * support */ - -struct tlv_parsed *tlvp_copy(const struct tlv_parsed *tp_orig, void *ctx) -{ - struct tlv_parsed *tp_out; - unsigned int i; - - tp_out = talloc_zero(ctx, struct tlv_parsed); - if (!tp_out) - return NULL; - - /* if the original is NULL, return empty tlvp */ - if (!tp_orig) - return tp_out; - - for (i = 0; i < ARRAY_SIZE(tp_orig->lv); i++) { - unsigned int len = tp_orig->lv[i].len; - tp_out->lv[i].len = len; - if (len && tp_out->lv[i].val) { - tp_out->lv[i].val = talloc_zero_size(tp_out, len); - if (!tp_out->lv[i].val) { - talloc_free(tp_out); - return NULL; - } - memcpy((uint8_t *)tp_out->lv[i].val, tp_orig->lv[i].val, len); - } - } - - return tp_out; -} - -/* merge all attributes of 'new' into 'out' */ -int tlvp_merge(struct tlv_parsed *out, const struct tlv_parsed *new) -{ - unsigned int i; - - for (i = 0; i < ARRAY_SIZE(out->lv); i++) { - unsigned int len = new->lv[i].len; - if (len == 0 || new->lv[i].val == NULL) - continue; - if (out->lv[i].val) { - talloc_free((uint8_t *) out->lv[i].val); - out->lv[i].len = 0; - } - out->lv[i].val = talloc_zero_size(out, len); - if (!out->lv[i].val) - return -ENOMEM; - memcpy((uint8_t *) out->lv[i].val, new->lv[i].val, len); - } - return 0; -} static int oml_tlv_parse(struct tlv_parsed *tp, const uint8_t *buf, int len) { @@ -369,28 +270,6 @@ return oml_mo_send_msg(mo, nmsg, NM_MT_SW_ACTIVATED_REP); } -/* TS 12.21 9.4.53 */ -enum abis_nm_t200_idx { - T200_SDCCH = 0, - T200_FACCH_F = 1, - T200_FACCH_H = 2, - T200_SACCH_TCH_SAPI0 = 3, - T200_SACCH_SDCCH = 4, - T200_SDCCH_SAPI3 = 5, - T200_SACCH_TCH_SAPI3 = 6 -}; - -/* TS 12.21 9.4.53 */ -static const uint8_t abis_nm_t200_mult[] = { - [T200_SDCCH] = 5, - [T200_FACCH_F] = 5, - [T200_FACCH_H] = 5, - [T200_SACCH_TCH_SAPI0] = 10, - [T200_SACCH_SDCCH] = 10, - [T200_SDCCH_SAPI3] = 5, - [T200_SACCH_TCH_SAPI3] = 10 -}; - /* the below defaults correpsond to the libocmocore default of 1s for * DCCH and 2s for ACCH. The BSC should overried this via OML anyway. */ const unsigned int oml_default_t200_ms[7] = { @@ -483,8 +362,8 @@ } /* merge existing BTS attributes with new attributes */ - tp_merged = tlvp_copy(bts->mo.nm_attr, bts); - tlvp_merge(tp_merged, &tp); + tp_merged = osmo_tlvp_copy(bts->mo.nm_attr, bts); + osmo_tlvp_merge(tp_merged, &tp); /* Ask BTS driver to validate new merged attributes */ rc = bts_model_check_oml(bts, foh->msg_type, bts->mo.nm_attr, tp_merged, bts); @@ -531,7 +410,7 @@ if (TLVP_PRESENT(&tp, NM_ATT_T200)) { payload = TLVP_VAL(&tp, NM_ATT_T200); for (i = 0; i < ARRAY_SIZE(btsb->t200_ms); i++) { - uint32_t t200_ms = payload[i] * abis_nm_t200_mult[i]; + uint32_t t200_ms = payload[i] * abis_nm_t200_ms[i]; #if 0 btsb->t200_ms[i] = t200_ms; DEBUGP(DOML, "T200[%u]: OML=%u, mult=%u => %u ms\n", @@ -619,8 +498,8 @@ return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); /* merge existing BTS attributes with new attributes */ - tp_merged = tlvp_copy(trx->mo.nm_attr, trx->bts); - tlvp_merge(tp_merged, &tp); + tp_merged = osmo_tlvp_copy(trx->mo.nm_attr, trx->bts); + osmo_tlvp_merge(tp_merged, &tp); /* Ask BTS driver to validate new merged attributes */ rc = bts_model_check_oml(trx->bts, foh->msg_type, trx->mo.nm_attr, tp_merged, trx); @@ -794,8 +673,8 @@ } /* merge existing BTS attributes with new attributes */ - tp_merged = tlvp_copy(ts->mo.nm_attr, bts); - tlvp_merge(tp_merged, &tp); + tp_merged = osmo_tlvp_copy(ts->mo.nm_attr, bts); + osmo_tlvp_merge(tp_merged, &tp); /* Call into BTS driver to check attribute values */ rc = bts_model_check_oml(bts, foh->msg_type, ts->mo.nm_attr, tp_merged, ts); -- To view, visit https://gerrit.osmocom.org/1521 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia4980062ea88ffe9019b201f84e92e006ae3c2e3 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 6 11:10:33 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 6 Jan 2017 11:10:33 +0000 Subject: openbsc[master]: Prevent segfault in range encoding In-Reply-To: References: Message-ID: Patch Set 5: > I think the general preference is to first have a patch that shows the bug by making the test case fail, and then adding the fix as a separate patch. In this case the failure is segfault so I'm not sure how to better structure this. -- To view, visit https://gerrit.osmocom.org/1429 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3e049ab2d7c1c4d6c791b148f37e10636a8e43e0 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 Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 11:13:46 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 6 Jan 2017 11:13:46 +0000 Subject: osmo-pcu[master]: fix segfault: check for NULL tbf in sched_select_ctrl_msg() In-Reply-To: References: Message-ID: Patch Set 2: Curious, I thought +1 review from different people is accumulated but it's not. Good to know. -- To view, visit https://gerrit.osmocom.org/1510 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I357492e558e98cfdbf5bb3438b5013029195b02b Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 11:25:08 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 6 Jan 2017 11:25:08 +0000 Subject: [PATCH] osmo-bts[master]: Alarm on various errors In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1525 to look at the new patch set (#2). Alarm on various errors Send OML Failure Report for unsupported BTS attributes and other errors. Change-Id: Ic163bcfb6361a8ebd39e0bc0f238ef51e2cb214e Related: OS#1615 --- M src/common/bts.c M src/common/l1sap.c M src/common/oml.c M src/common/rsl.c 4 files changed, 85 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/25/1525/2 diff --git a/src/common/bts.c b/src/common/bts.c index d249137..2d49370 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -256,6 +256,7 @@ { struct e1inp_sign_link *link = trx->rsl_link; uint8_t radio_state = link ? NM_OPSTATE_ENABLED : NM_OPSTATE_DISABLED; + int rc; LOGP(DSUM, LOGL_INFO, "RSL link (TRX %02x) state changed to %s, sending Status'.\n", trx->nr, link ? "up" : "down"); @@ -263,10 +264,13 @@ oml_mo_state_chg(&trx->mo, radio_state, NM_AVSTATE_OK); if (link) - rsl_tx_rf_res(trx); + rc = rsl_tx_rf_res(trx); else - bts_model_trx_deact_rf(trx); - + rc = bts_model_trx_deact_rf(trx); + if(rc < 0) + oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_RSL_FAIL, link ? + "Failed to establish RSL link (%d)\n" : + "Failed to deactivate RF (%d)\n", rc); return 0; } diff --git a/src/common/l1sap.c b/src/common/l1sap.c index e6e53db..968237f 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -1024,6 +1025,10 @@ default: LOGP(DL1P, LOGL_NOTICE, "unknown prim %d op %d\n", l1sap->oph.primitive, l1sap->oph.operation); + oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, + "unknown prim %d op %d\n", + l1sap->oph.primitive, + l1sap->oph.operation); break; } diff --git a/src/common/oml.c b/src/common/oml.c index 870ef3c..8ccfcc6 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -345,19 +345,28 @@ DEBUGPC(DOML, "Rx SET BTS ATTR\n"); rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); - if (rc < 0) + if (rc < 0) { + oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, + "New value for Attribute not supported\n"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); + } /* Test for globally unsupported stuff here */ if (TLVP_PRESENT(&tp, NM_ATT_BCCH_ARFCN)) { uint16_t arfcn = ntohs(tlvp_val16_unal(&tp, NM_ATT_BCCH_ARFCN)); if (arfcn > 1024) { + oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_WARN_SW_WARN, + "Given ARFCN %d is not supported.\n", + arfcn); LOGP(DOML, LOGL_NOTICE, "Given ARFCN %d is not supported.\n", arfcn); return oml_fom_ack_nack(msg, NM_NACK_FREQ_NOTAVAIL); } } /* 9.4.52 Starting Time */ if (TLVP_PRESENT(&tp, NM_ATT_START_TIME)) { + oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, + "NM_ATT_START_TIME Attribute not " + "supported\n"); return oml_fom_ack_nack(msg, NM_NACK_SPEC_IMPL_NOTSUPP); } @@ -494,8 +503,12 @@ DEBUGPC(DOML, "Rx SET RADIO CARRIER ATTR\n"); rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); - if (rc < 0) + if (rc < 0) { + oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UNSUP_ATTR, + "New value for Set Radio Attribute not" + " supported\n"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); + } /* merge existing BTS attributes with new attributes */ tp_merged = osmo_tlvp_copy(trx->mo.nm_attr, trx->bts); @@ -656,8 +669,12 @@ DEBUGPC(DOML, "Rx SET CHAN ATTR\n"); rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); - if (rc < 0) + if (rc < 0) { + oml_tx_failure_event_rep(&ts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, + "New value for Set Channel Attribute " + "not supported\n"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); + } /* 9.4.21 HSN... */ /* 9.4.27 MAIO */ @@ -791,11 +808,29 @@ if (msgb_l2len(msg) < sizeof(*foh)) { LOGP(DOML, LOGL_NOTICE, "Formatted O&M message too short\n"); + trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr); + if (trx) { + trx->mo.obj_inst.bts_nr = 0; + trx->mo.obj_inst.trx_nr = foh->obj_inst.trx_nr; + trx->mo.obj_inst.ts_nr = 0xff; + oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, + "Formatted O&M message too short\n"); + } return -EIO; } if (foh->obj_inst.bts_nr != 0 && foh->obj_inst.bts_nr != 0xff) { LOGP(DOML, LOGL_INFO, "Formatted O&M with BTS %d out of range.\n", foh->obj_inst.bts_nr); + trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr); + if (trx) { + trx->mo.obj_inst.bts_nr = 0; + trx->mo.obj_inst.trx_nr = foh->obj_inst.trx_nr; + trx->mo.obj_inst.ts_nr = 0xff; + oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, + "Formatted O&M with BTS %d out" + " of range (0:0xFF).\n", + foh->obj_inst.bts_nr); + } return oml_fom_ack_nack(msg, NM_NACK_BTSNR_UNKN); } @@ -829,6 +864,20 @@ default: LOGP(DOML, LOGL_INFO, "unknown Formatted O&M msg_type 0x%02x\n", foh->msg_type); + trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr); + if (trx) { + trx->mo.obj_inst.bts_nr = 0; + trx->mo.obj_inst.trx_nr = foh->obj_inst.trx_nr; + trx->mo.obj_inst.ts_nr = 0xff; + oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, + "unknown Formatted O&M " + "msg_type 0x%02x\n", + foh->msg_type); + } else + oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UKWN_MSG, + "unknown Formatted O&M " + "msg_type 0x%02x\n", + foh->msg_type); ret = oml_fom_ack_nack(msg, NM_NACK_MSGTYPE_INVAL); } @@ -997,8 +1046,13 @@ DEBUGPC(DOML, "Rx IPA SET ATTR\n"); rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); - if (rc < 0) + if (rc < 0) { + mo = gsm_objclass2mo(bts, foh->obj_class, &foh->obj_inst); + oml_tx_failure_event_rep(mo, OSMO_EVT_MAJ_UNSUP_ATTR, + "New value for IPAC Set Attribute not " + "supported\n"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); + } /* Resolve MO by obj_class/obj_inst */ mo = gsm_objclass2mo(bts, foh->obj_class, &foh->obj_inst); diff --git a/src/common/rsl.c b/src/common/rsl.c index 9e9cbb6..2e98c33 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -401,7 +401,11 @@ rc = paging_add_identity(btsb->paging_state, paging_group, identity_lv, chan_needed); if (rc < 0) { - /* FIXME: notfiy the BSC somehow ?*/ + /* FIXME: notfiy the BSC on other errors? */ + if(rc == -ENOSPC && trx) + oml_tx_failure_event_rep(&trx->mo, + OSMO_EVT_MIN_PAG_TAB_FULL, + "BTS paging table is full\n"); } pcu_tx_pag_req(identity_lv, chan_needed); @@ -1649,6 +1653,11 @@ LOGP(DRSL, LOGL_ERROR, "%s IPAC Failed to create RTP/RTCP sockets\n", gsm_lchan_name(lchan)); + oml_tx_failure_event_rep(&lchan->ts->trx->mo, + OSMO_EVT_CRIT_RTP_TOUT, + "%s IPAC Failed to create " + "RTP/RTCP sockets\n", + gsm_lchan_name(lchan)); return tx_ipac_XXcx_nack(lchan, RSL_ERR_RES_UNAVAIL, inc_ip_port, dch->c.msg_type); } @@ -1688,6 +1697,11 @@ LOGP(DRSL, LOGL_ERROR, "%s IPAC Failed to bind RTP/RTCP sockets\n", gsm_lchan_name(lchan)); + oml_tx_failure_event_rep(&lchan->ts->trx->mo, + OSMO_EVT_CRIT_RTP_TOUT, + "%s IPAC Failed to bind " + "RTP/RTCP sockets\n", + gsm_lchan_name(lchan)); osmo_rtp_socket_free(lchan->abis_ip.rtp_socket); lchan->abis_ip.rtp_socket = NULL; msgb_queue_flush(&lchan->dl_tch_queue); -- To view, visit https://gerrit.osmocom.org/1525 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic163bcfb6361a8ebd39e0bc0f238ef51e2cb214e Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Minh-Quang Nguyen From gerrit-no-reply at lists.osmocom.org Fri Jan 6 11:34:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 11:34:29 +0000 Subject: [PATCH] osmo-bts[master]: Alarm on various errors In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1525 to look at the new patch set (#3). Alarm on various errors Send OML Failure Report for unsupported BTS attributes and other errors. Change-Id: Ic163bcfb6361a8ebd39e0bc0f238ef51e2cb214e Related: OS#1615 --- M src/common/bts.c M src/common/l1sap.c M src/common/oml.c M src/common/rsl.c 4 files changed, 85 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/25/1525/3 diff --git a/src/common/bts.c b/src/common/bts.c index d249137..efefb86 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -256,6 +256,7 @@ { struct e1inp_sign_link *link = trx->rsl_link; uint8_t radio_state = link ? NM_OPSTATE_ENABLED : NM_OPSTATE_DISABLED; + int rc; LOGP(DSUM, LOGL_INFO, "RSL link (TRX %02x) state changed to %s, sending Status'.\n", trx->nr, link ? "up" : "down"); @@ -263,10 +264,13 @@ oml_mo_state_chg(&trx->mo, radio_state, NM_AVSTATE_OK); if (link) - rsl_tx_rf_res(trx); + rc = rsl_tx_rf_res(trx); else - bts_model_trx_deact_rf(trx); - + rc = bts_model_trx_deact_rf(trx); + if (rc < 0) + oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_RSL_FAIL, link ? + "Failed to establish RSL link (%d)\n" : + "Failed to deactivate RF (%d)\n", rc); return 0; } diff --git a/src/common/l1sap.c b/src/common/l1sap.c index e6e53db..968237f 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -1024,6 +1025,10 @@ default: LOGP(DL1P, LOGL_NOTICE, "unknown prim %d op %d\n", l1sap->oph.primitive, l1sap->oph.operation); + oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, + "unknown prim %d op %d\n", + l1sap->oph.primitive, + l1sap->oph.operation); break; } diff --git a/src/common/oml.c b/src/common/oml.c index 870ef3c..8ccfcc6 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -345,19 +345,28 @@ DEBUGPC(DOML, "Rx SET BTS ATTR\n"); rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); - if (rc < 0) + if (rc < 0) { + oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, + "New value for Attribute not supported\n"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); + } /* Test for globally unsupported stuff here */ if (TLVP_PRESENT(&tp, NM_ATT_BCCH_ARFCN)) { uint16_t arfcn = ntohs(tlvp_val16_unal(&tp, NM_ATT_BCCH_ARFCN)); if (arfcn > 1024) { + oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_WARN_SW_WARN, + "Given ARFCN %d is not supported.\n", + arfcn); LOGP(DOML, LOGL_NOTICE, "Given ARFCN %d is not supported.\n", arfcn); return oml_fom_ack_nack(msg, NM_NACK_FREQ_NOTAVAIL); } } /* 9.4.52 Starting Time */ if (TLVP_PRESENT(&tp, NM_ATT_START_TIME)) { + oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, + "NM_ATT_START_TIME Attribute not " + "supported\n"); return oml_fom_ack_nack(msg, NM_NACK_SPEC_IMPL_NOTSUPP); } @@ -494,8 +503,12 @@ DEBUGPC(DOML, "Rx SET RADIO CARRIER ATTR\n"); rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); - if (rc < 0) + if (rc < 0) { + oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UNSUP_ATTR, + "New value for Set Radio Attribute not" + " supported\n"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); + } /* merge existing BTS attributes with new attributes */ tp_merged = osmo_tlvp_copy(trx->mo.nm_attr, trx->bts); @@ -656,8 +669,12 @@ DEBUGPC(DOML, "Rx SET CHAN ATTR\n"); rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); - if (rc < 0) + if (rc < 0) { + oml_tx_failure_event_rep(&ts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, + "New value for Set Channel Attribute " + "not supported\n"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); + } /* 9.4.21 HSN... */ /* 9.4.27 MAIO */ @@ -791,11 +808,29 @@ if (msgb_l2len(msg) < sizeof(*foh)) { LOGP(DOML, LOGL_NOTICE, "Formatted O&M message too short\n"); + trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr); + if (trx) { + trx->mo.obj_inst.bts_nr = 0; + trx->mo.obj_inst.trx_nr = foh->obj_inst.trx_nr; + trx->mo.obj_inst.ts_nr = 0xff; + oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, + "Formatted O&M message too short\n"); + } return -EIO; } if (foh->obj_inst.bts_nr != 0 && foh->obj_inst.bts_nr != 0xff) { LOGP(DOML, LOGL_INFO, "Formatted O&M with BTS %d out of range.\n", foh->obj_inst.bts_nr); + trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr); + if (trx) { + trx->mo.obj_inst.bts_nr = 0; + trx->mo.obj_inst.trx_nr = foh->obj_inst.trx_nr; + trx->mo.obj_inst.ts_nr = 0xff; + oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, + "Formatted O&M with BTS %d out" + " of range (0:0xFF).\n", + foh->obj_inst.bts_nr); + } return oml_fom_ack_nack(msg, NM_NACK_BTSNR_UNKN); } @@ -829,6 +864,20 @@ default: LOGP(DOML, LOGL_INFO, "unknown Formatted O&M msg_type 0x%02x\n", foh->msg_type); + trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr); + if (trx) { + trx->mo.obj_inst.bts_nr = 0; + trx->mo.obj_inst.trx_nr = foh->obj_inst.trx_nr; + trx->mo.obj_inst.ts_nr = 0xff; + oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, + "unknown Formatted O&M " + "msg_type 0x%02x\n", + foh->msg_type); + } else + oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UKWN_MSG, + "unknown Formatted O&M " + "msg_type 0x%02x\n", + foh->msg_type); ret = oml_fom_ack_nack(msg, NM_NACK_MSGTYPE_INVAL); } @@ -997,8 +1046,13 @@ DEBUGPC(DOML, "Rx IPA SET ATTR\n"); rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); - if (rc < 0) + if (rc < 0) { + mo = gsm_objclass2mo(bts, foh->obj_class, &foh->obj_inst); + oml_tx_failure_event_rep(mo, OSMO_EVT_MAJ_UNSUP_ATTR, + "New value for IPAC Set Attribute not " + "supported\n"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); + } /* Resolve MO by obj_class/obj_inst */ mo = gsm_objclass2mo(bts, foh->obj_class, &foh->obj_inst); diff --git a/src/common/rsl.c b/src/common/rsl.c index 9e9cbb6..be1861c 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -401,7 +401,11 @@ rc = paging_add_identity(btsb->paging_state, paging_group, identity_lv, chan_needed); if (rc < 0) { - /* FIXME: notfiy the BSC somehow ?*/ + /* FIXME: notfiy the BSC on other errors? */ + if (rc == -ENOSPC && trx) + oml_tx_failure_event_rep(&trx->mo, + OSMO_EVT_MIN_PAG_TAB_FULL, + "BTS paging table is full\n"); } pcu_tx_pag_req(identity_lv, chan_needed); @@ -1649,6 +1653,11 @@ LOGP(DRSL, LOGL_ERROR, "%s IPAC Failed to create RTP/RTCP sockets\n", gsm_lchan_name(lchan)); + oml_tx_failure_event_rep(&lchan->ts->trx->mo, + OSMO_EVT_CRIT_RTP_TOUT, + "%s IPAC Failed to create " + "RTP/RTCP sockets\n", + gsm_lchan_name(lchan)); return tx_ipac_XXcx_nack(lchan, RSL_ERR_RES_UNAVAIL, inc_ip_port, dch->c.msg_type); } @@ -1688,6 +1697,11 @@ LOGP(DRSL, LOGL_ERROR, "%s IPAC Failed to bind RTP/RTCP sockets\n", gsm_lchan_name(lchan)); + oml_tx_failure_event_rep(&lchan->ts->trx->mo, + OSMO_EVT_CRIT_RTP_TOUT, + "%s IPAC Failed to bind " + "RTP/RTCP sockets\n", + gsm_lchan_name(lchan)); osmo_rtp_socket_free(lchan->abis_ip.rtp_socket); lchan->abis_ip.rtp_socket = NULL; msgb_queue_flush(&lchan->dl_tch_queue); -- To view, visit https://gerrit.osmocom.org/1525 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic163bcfb6361a8ebd39e0bc0f238ef51e2cb214e Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Minh-Quang Nguyen From gerrit-no-reply at lists.osmocom.org Fri Jan 6 11:34:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 11:34:42 +0000 Subject: osmo-bts[master]: Alarm on various errors In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1525 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic163bcfb6361a8ebd39e0bc0f238ef51e2cb214e Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 11:35:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 11:35:22 +0000 Subject: osmo-bts[master]: Move code to libosmocore In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1521 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia4980062ea88ffe9019b201f84e92e006ae3c2e3 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 11:35:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 11:35:44 +0000 Subject: libosmocore[master]: Add event cause string descriptions In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1523 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id173c978616c98b7831fbafb5401064257f1cf73 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 11:37:09 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 6 Jan 2017 11:37:09 +0000 Subject: [MERGED] libosmocore[master]: Add event cause string descriptions In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Add event cause string descriptions ...................................................................... Add event cause string descriptions Add human-readable descriptions to event causes from 3GPP TS 12.21 ? 9.4.43. Change-Id: Id173c978616c98b7831fbafb5401064257f1cf73 Related: OS#1615 --- M include/osmocom/gsm/protocol/gsm_12_21.h M src/gsm/abis_nm.c M src/gsm/libosmogsm.map 3 files changed, 18 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/gsm/protocol/gsm_12_21.h b/include/osmocom/gsm/protocol/gsm_12_21.h index 58bb730..6a37392 100644 --- a/include/osmocom/gsm/protocol/gsm_12_21.h +++ b/include/osmocom/gsm/protocol/gsm_12_21.h @@ -274,6 +274,8 @@ OSMO_EVT_WARN_SW_WARN = 0x0001, }; +extern const struct value_string abis_mm_event_cause_names[]; + enum abis_nm_bs11_cell_alloc { NM_BS11_CANR_GSM = 0x00, NM_BS11_CANR_DCS1800 = 0x01, diff --git a/src/gsm/abis_nm.c b/src/gsm/abis_nm.c index c085e06..87d05ab 100644 --- a/src/gsm/abis_nm.c +++ b/src/gsm/abis_nm.c @@ -149,6 +149,21 @@ return get_value_string(nack_names, nack); } +/* Section 9.4.43: Manufacturer specific values */ +const struct value_string abis_mm_event_cause_names[] = { + { OSMO_EVT_CRIT_SW_FATAL, "Fatal software error" }, + { OSMO_EVT_CRIT_PROC_STOP, "Process stopped" }, + { OSMO_EVT_CRIT_RTP_TOUT, "RTP error" }, + { OSMO_EVT_CRIT_BOOT_FAIL, "Boot failure" }, + { OSMO_EVT_MAJ_UKWN_MSG, "Unknown message" }, + { OSMO_EVT_MAJ_RSL_FAIL, "RSL failure" }, + { OSMO_EVT_MAJ_UNSUP_ATTR, "Unsupported attribute" }, + { OSMO_EVT_MAJ_NET_CONGEST, "Network congestion" }, + { OSMO_EVT_MIN_PAG_TAB_FULL, "Paging table full" }, + { OSMO_EVT_WARN_SW_WARN, "Software warning" }, + { 0, NULL } +}; + /* Chapter 9.4.36 */ static const struct value_string nack_cause_names[] = { /* General Nack Causes */ diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index b84f859..c876d2b 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -25,6 +25,7 @@ abis_nm_test_name; abis_nm_osmo_magic; abis_nm_ipa_magic; +abis_nm_event_cause_names; osmo_sitype_strs; osmo_c4; -- To view, visit https://gerrit.osmocom.org/1523 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id173c978616c98b7831fbafb5401064257f1cf73 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Minh-Quang Nguyen From gerrit-no-reply at lists.osmocom.org Fri Jan 6 11:37:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 11:37:31 +0000 Subject: openbsc[master]: Cosmetic fixes around SI generation In-Reply-To: References: Message-ID: Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1372 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If5b717445c8b24668bad0e78fd5bb51f66c4d18e 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-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 11:37:48 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 6 Jan 2017 11:37:48 +0000 Subject: openbsc[master]: Prevent segfault in range encoding In-Reply-To: References: Message-ID: Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1429 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3e049ab2d7c1c4d6c791b148f37e10636a8e43e0 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 Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 11:37:52 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 6 Jan 2017 11:37:52 +0000 Subject: [MERGED] openbsc[master]: Cosmetic fixes around SI generation In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Cosmetic fixes around SI generation ...................................................................... Cosmetic fixes around SI generation * add missing spaces after comma and minus * prevent useless recursion calls * mark static functions as such * name and explicitly use enum for ARFCN range Change-Id: If5b717445c8b24668bad0e78fd5bb51f66c4d18e --- M openbsc/include/openbsc/arfcn_range_encode.h M openbsc/include/openbsc/system_information.h M openbsc/src/libbsc/arfcn_range_encode.c M openbsc/src/libbsc/bsc_init.c M openbsc/src/libbsc/system_information.c 5 files changed, 12 insertions(+), 11 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/include/openbsc/arfcn_range_encode.h b/openbsc/include/openbsc/arfcn_range_encode.h index bd85d6a..7ec710c 100644 --- a/openbsc/include/openbsc/arfcn_range_encode.h +++ b/openbsc/include/openbsc/arfcn_range_encode.h @@ -3,7 +3,7 @@ #include -enum { +enum gsm48_range { ARFCN_RANGE_INVALID = -1, ARFCN_RANGE_128 = 127, ARFCN_RANGE_256 = 255, @@ -14,8 +14,8 @@ #define RANGE_ENC_MAX_ARFCNS 29 int range_enc_determine_range(const int *arfcns, int size, int *f0_out); -int range_enc_arfcns(const int rng, const int *arfcns, int sze, int *out, int idx); -int range_enc_find_index(const int rng, const int *arfcns, int size); +int range_enc_arfcns(enum gsm48_range rng, const int *arfcns, int sze, int *out, int idx); +int range_enc_find_index(enum gsm48_range rng, const int *arfcns, int size); int range_enc_filter_arfcns(int *arfcns, const int sze, const int f0, int *f0_included); int range_enc_range128(uint8_t *chan_list, int f0, int *w); diff --git a/openbsc/include/openbsc/system_information.h b/openbsc/include/openbsc/system_information.h index 7e3ceaa..ebc3afd 100644 --- a/openbsc/include/openbsc/system_information.h +++ b/openbsc/include/openbsc/system_information.h @@ -6,7 +6,6 @@ struct gsm_bts; int gsm_generate_si(struct gsm_bts *bts, enum osmo_sysinfo_type type); -uint16_t encode_fdd(uint16_t scramble, bool diversity); unsigned uarfcn_size(const uint16_t *u, const uint16_t *sc, size_t u_len); unsigned earfcn_size(const struct osmo_earfcn_si2q *e); unsigned range1024_p(unsigned n); diff --git a/openbsc/src/libbsc/arfcn_range_encode.c b/openbsc/src/libbsc/arfcn_range_encode.c index e67bf0a..9918838 100644 --- a/openbsc/src/libbsc/arfcn_range_encode.c +++ b/openbsc/src/libbsc/arfcn_range_encode.c @@ -27,7 +27,7 @@ #include -int greatest_power_of_2_lesser_or_equal_to(int index) +static inline int greatest_power_of_2_lesser_or_equal_to(int index) { int power_of_2 = 1; @@ -52,7 +52,7 @@ * equally size partition for the given range. Return -1 if * no such partition exists. */ -int range_enc_find_index(const int range, const int *freqs, const int size) +int range_enc_find_index(enum gsm48_range range, const int *freqs, const int size) { int i, j, n; @@ -79,7 +79,7 @@ * \param size The size of the list of ARFCNs * \param out Place to store the W(i) output. */ -int range_enc_arfcns(const int range, +int range_enc_arfcns(enum gsm48_range range, const int *arfcns, int size, int *out, const int index) { @@ -127,9 +127,11 @@ * Now recurse and we need to make this iterative... but as the * tree is balanced the stack will not be too deep. */ - range_enc_arfcns(range / 2, arfcns_left, l_size, + if (l_size) + range_enc_arfcns(range / 2, arfcns_left, l_size, out, index + greatest_power_of_2_lesser_or_equal_to(index + 1)); - range_enc_arfcns((range -1 ) / 2, arfcns_right, r_size, + if (r_size) + range_enc_arfcns((range - 1) / 2, arfcns_right, r_size, out, index + (2 * greatest_power_of_2_lesser_or_equal_to(index + 1))); return 0; } diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c index 9e913d6..b17ff79 100644 --- a/openbsc/src/libbsc/bsc_init.c +++ b/openbsc/src/libbsc/bsc_init.c @@ -193,7 +193,7 @@ return 0; err_out: - LOGP(DRR, LOGL_ERROR, "Cannot generate SI%s for BTS %u: error <%s>," + LOGP(DRR, LOGL_ERROR, "Cannot generate SI%s for BTS %u: error <%s>, " "most likely a problem with neighbor cell list generation\n", get_value_string(osmo_sitype_strs, i), bts->nr, strerror(-rc)); return rc; diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c index 6c601e4..3d55d1a 100644 --- a/openbsc/src/libbsc/system_information.c +++ b/openbsc/src/libbsc/system_information.c @@ -149,7 +149,7 @@ } /* 3GPP TS 44.018, Table 9.1.54.1 - prepend diversity bit to scrambling code */ -uint16_t encode_fdd(uint16_t scramble, bool diversity) +static inline uint16_t encode_fdd(uint16_t scramble, bool diversity) { if (diversity) return scramble | (1 << 9); -- To view, visit https://gerrit.osmocom.org/1372 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If5b717445c8b24668bad0e78fd5bb51f66c4d18e Gerrit-PatchSet: 6 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Fri Jan 6 12:02:16 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 6 Jan 2017 12:02:16 +0000 Subject: openbsc[master]: Prevent segfault in range encoding In-Reply-To: References: Message-ID: Patch Set 6: In general this patch looks good. I need to have another round to look more closely. -- To view, visit https://gerrit.osmocom.org/1429 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3e049ab2d7c1c4d6c791b148f37e10636a8e43e0 Gerrit-PatchSet: 6 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 12:32:46 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 6 Jan 2017 12:32:46 +0000 Subject: libosmocore[master]: gprs_cipher_core: Use typecase to avoid sanitizer error In-Reply-To: References: Message-ID: Patch Set 2: You could use 1u<<31 as well -- To view, visit https://gerrit.osmocom.org/1530 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib1866595030ad9d11c886621ce69632462befa3a Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 12:58:49 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 6 Jan 2017 12:58:49 +0000 Subject: [MERGED] osmo-bts[master]: Move code to libosmocore In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Move code to libosmocore ...................................................................... Move code to libosmocore With libosmocore commits I9c3bc15662949654e7bba6aad5488c69ee7d0c45 and Ieaaaed19da9c069fe451faa53d24c5b84d7d5615 functions to copy and merge parsed TLV were added as well as abis_nm_att_tlvdef_ipa TLV definition with related enums. Hence we can remove it from here. Change-Id: Ia4980062ea88ffe9019b201f84e92e006ae3c2e3 --- M src/common/oml.c 1 file changed, 7 insertions(+), 128 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/oml.c b/src/common/oml.c index c4f3d7e..0700aa2 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -42,110 +42,11 @@ #include #include -/* FIXME: move this to libosmocore */ -static struct tlv_definition abis_nm_att_tlvdef_ipa = { - .def = { - /* ip.access specifics */ - [NM_ATT_IPACC_DST_IP] = { TLV_TYPE_FIXED, 4 }, - [NM_ATT_IPACC_DST_IP_PORT] = { TLV_TYPE_FIXED, 2 }, - [NM_ATT_IPACC_STREAM_ID] = { TLV_TYPE_TV, }, - [NM_ATT_IPACC_SEC_OML_CFG] = { TLV_TYPE_FIXED, 6 }, - [NM_ATT_IPACC_IP_IF_CFG] = { TLV_TYPE_FIXED, 8 }, - [NM_ATT_IPACC_IP_GW_CFG] = { TLV_TYPE_FIXED, 12 }, - [NM_ATT_IPACC_IN_SERV_TIME] = { TLV_TYPE_FIXED, 4 }, - [NM_ATT_IPACC_LOCATION] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_PAGING_CFG] = { TLV_TYPE_FIXED, 2 }, - [NM_ATT_IPACC_UNIT_ID] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_UNIT_NAME] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_SNMP_CFG] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_PRIM_OML_CFG_LIST] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_NV_FLAGS] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_FREQ_CTRL] = { TLV_TYPE_FIXED, 2 }, - [NM_ATT_IPACC_PRIM_OML_FB_TOUT] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_CUR_SW_CFG] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_TIMING_BUS] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_CGI] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_RAC] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_OBJ_VERSION] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_GPRS_PAGING_CFG]= { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_NSEI] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_BVCI] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_NSVCI] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_NS_CFG] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_BSSGP_CFG] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_NS_LINK_CFG] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_RLC_CFG] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_ALM_THRESH_LIST]= { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_MONIT_VAL_LIST] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_TIB_CONTROL] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_SUPP_FEATURES] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_CODING_SCHEMES] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_RLC_CFG_2] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_HEARTB_TOUT] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_UPTIME] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_RLC_CFG_3] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_SSL_CFG] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_SEC_POSSIBLE] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_IML_SSL_STATE] = { TLV_TYPE_TL16V }, - [NM_ATT_IPACC_REVOC_DATE] = { TLV_TYPE_TL16V }, - }, -}; - static int oml_ipa_set_attr(struct gsm_bts *bts, struct msgb *msg); /* * support */ - -struct tlv_parsed *tlvp_copy(const struct tlv_parsed *tp_orig, void *ctx) -{ - struct tlv_parsed *tp_out; - unsigned int i; - - tp_out = talloc_zero(ctx, struct tlv_parsed); - if (!tp_out) - return NULL; - - /* if the original is NULL, return empty tlvp */ - if (!tp_orig) - return tp_out; - - for (i = 0; i < ARRAY_SIZE(tp_orig->lv); i++) { - unsigned int len = tp_orig->lv[i].len; - tp_out->lv[i].len = len; - if (len && tp_out->lv[i].val) { - tp_out->lv[i].val = talloc_zero_size(tp_out, len); - if (!tp_out->lv[i].val) { - talloc_free(tp_out); - return NULL; - } - memcpy((uint8_t *)tp_out->lv[i].val, tp_orig->lv[i].val, len); - } - } - - return tp_out; -} - -/* merge all attributes of 'new' into 'out' */ -int tlvp_merge(struct tlv_parsed *out, const struct tlv_parsed *new) -{ - unsigned int i; - - for (i = 0; i < ARRAY_SIZE(out->lv); i++) { - unsigned int len = new->lv[i].len; - if (len == 0 || new->lv[i].val == NULL) - continue; - if (out->lv[i].val) { - talloc_free((uint8_t *) out->lv[i].val); - out->lv[i].len = 0; - } - out->lv[i].val = talloc_zero_size(out, len); - if (!out->lv[i].val) - return -ENOMEM; - memcpy((uint8_t *) out->lv[i].val, new->lv[i].val, len); - } - return 0; -} static int oml_tlv_parse(struct tlv_parsed *tp, const uint8_t *buf, int len) { @@ -369,28 +270,6 @@ return oml_mo_send_msg(mo, nmsg, NM_MT_SW_ACTIVATED_REP); } -/* TS 12.21 9.4.53 */ -enum abis_nm_t200_idx { - T200_SDCCH = 0, - T200_FACCH_F = 1, - T200_FACCH_H = 2, - T200_SACCH_TCH_SAPI0 = 3, - T200_SACCH_SDCCH = 4, - T200_SDCCH_SAPI3 = 5, - T200_SACCH_TCH_SAPI3 = 6 -}; - -/* TS 12.21 9.4.53 */ -static const uint8_t abis_nm_t200_mult[] = { - [T200_SDCCH] = 5, - [T200_FACCH_F] = 5, - [T200_FACCH_H] = 5, - [T200_SACCH_TCH_SAPI0] = 10, - [T200_SACCH_SDCCH] = 10, - [T200_SDCCH_SAPI3] = 5, - [T200_SACCH_TCH_SAPI3] = 10 -}; - /* the below defaults correpsond to the libocmocore default of 1s for * DCCH and 2s for ACCH. The BSC should overried this via OML anyway. */ const unsigned int oml_default_t200_ms[7] = { @@ -483,8 +362,8 @@ } /* merge existing BTS attributes with new attributes */ - tp_merged = tlvp_copy(bts->mo.nm_attr, bts); - tlvp_merge(tp_merged, &tp); + tp_merged = osmo_tlvp_copy(bts->mo.nm_attr, bts); + osmo_tlvp_merge(tp_merged, &tp); /* Ask BTS driver to validate new merged attributes */ rc = bts_model_check_oml(bts, foh->msg_type, bts->mo.nm_attr, tp_merged, bts); @@ -531,7 +410,7 @@ if (TLVP_PRESENT(&tp, NM_ATT_T200)) { payload = TLVP_VAL(&tp, NM_ATT_T200); for (i = 0; i < ARRAY_SIZE(btsb->t200_ms); i++) { - uint32_t t200_ms = payload[i] * abis_nm_t200_mult[i]; + uint32_t t200_ms = payload[i] * abis_nm_t200_ms[i]; #if 0 btsb->t200_ms[i] = t200_ms; DEBUGP(DOML, "T200[%u]: OML=%u, mult=%u => %u ms\n", @@ -619,8 +498,8 @@ return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); /* merge existing BTS attributes with new attributes */ - tp_merged = tlvp_copy(trx->mo.nm_attr, trx->bts); - tlvp_merge(tp_merged, &tp); + tp_merged = osmo_tlvp_copy(trx->mo.nm_attr, trx->bts); + osmo_tlvp_merge(tp_merged, &tp); /* Ask BTS driver to validate new merged attributes */ rc = bts_model_check_oml(trx->bts, foh->msg_type, trx->mo.nm_attr, tp_merged, trx); @@ -794,8 +673,8 @@ } /* merge existing BTS attributes with new attributes */ - tp_merged = tlvp_copy(ts->mo.nm_attr, bts); - tlvp_merge(tp_merged, &tp); + tp_merged = osmo_tlvp_copy(ts->mo.nm_attr, bts); + osmo_tlvp_merge(tp_merged, &tp); /* Call into BTS driver to check attribute values */ rc = bts_model_check_oml(bts, foh->msg_type, ts->mo.nm_attr, tp_merged, ts); -- To view, visit https://gerrit.osmocom.org/1521 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia4980062ea88ffe9019b201f84e92e006ae3c2e3 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 6 13:40:47 2017 From: gerrit-no-reply at lists.osmocom.org (ikostov) Date: Fri, 6 Jan 2017 13:40:47 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: SGSN: add Auth. policy, NS Statistics and BSSGP state examples Message-ID: Review at https://gerrit.osmocom.org/1535 SGSN: add Auth. policy, NS Statistics and BSSGP state examples Change-Id: I0164f418e453672321eed00bbc454c1e223ea158 --- M OsmoSGSN/chapters/configuration.adoc M OsmoSGSN/chapters/overview.adoc M common/chapters/gb.adoc 3 files changed, 82 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/35/1535/1 diff --git a/OsmoSGSN/chapters/configuration.adoc b/OsmoSGSN/chapters/configuration.adoc index 8b259ed..2c82639 100644 --- a/OsmoSGSN/chapters/configuration.adoc +++ b/OsmoSGSN/chapters/configuration.adoc @@ -67,6 +67,50 @@ <2> Enable the dynamic GGSN resolving mode <3> Specify the IP address of a DNS server for APN resolution +[[auth-pol]] +=== Authorization Policy + +Authorization determines whether particular subscriber can access +your network or not. + +The following 4 authorization policy options are available: + +`accept-all`: When this option is selected then all IMSIs will +be accepted. Using this policy option can be dangerous. + +`acl-only`: In this case you will allow SGSN to accept only IMSIs, +which are explicitly white-listed by the Access Control List (ACL) and +the rest will be rejected. +2 +`closed`: This option allows you to accept only home network subscribers +either the ones, which are in the ACL or MCC/MNC match. +(i.e. MCC 901, MNC 700, IMSI 901700000003080). + +`remote`: When this authorization option is selected then the GSUP protocol +to remotely access a HLR will be used. Remote subscription data +only will be used. + + +.Example: How to assign or change current authorization policy follows: +---- +OsmoSGSN> enable +OsmoSGSN# configure terminal +OsmoSGSN(config)# sgsn +OsmoSGSN(config-sgsn)# auth-policy acl-only <1> +OsmoSGSN(config-sgsn)# write <2> +Configuration saved to sgsn.cfg +OsmoSGSN(config-sgsn)# exit +OsmoSGSN(config)# exit +OsmoSGSN# disable +OsmoSGSN> +---- +<1> 'acl-olny' is selected as authorization policy +<2> Saves current changes to cofiguration file to make this policy +persistent + +Other authorization policy option can be selected by using +the above given example. Just state which policy option you would like +to use. === Subscriber Configuration diff --git a/OsmoSGSN/chapters/overview.adoc b/OsmoSGSN/chapters/overview.adoc index 566124a..396839f 100644 --- a/OsmoSGSN/chapters/overview.adoc +++ b/OsmoSGSN/chapters/overview.adoc @@ -23,16 +23,16 @@ [graphviz] ---- digraph G { - rankdir=LR; - MS0 [label="MS"] - MS1 [label="MS"] - MS0->BTS [label="Um"] - MS1->BTS [label="Um"] - BTS->BSC [label="Abis"] - BSC->MSC [label="A"] - BTS->PCU [label="pcu_sock"] - PCU->SGSN [label="Gb"] - SGSN->GGSN [label="GTP"] + rankdir=LR; + MS0 [label="MS"]; + MS1 [label="MS"]; + MS0->BTS [label="Um"]; + MS1->BTS [label="Um"]; + BTS->BSC [label="Abis"]; + BSC->MSC [label="A"]; + BTS->PCU [label="pcu_sock"]; + PCU->SGSN [label="Gb"]; + SGSN->GGSN [label="GTP"]; } ---- @@ -58,7 +58,7 @@ ==== GTP Implementation -OsmoSGSN uses the libgtp implementation originating from OpenGGSN. It +OsmoSGSN uses the libgtp implementation originating from OpenGGSN.It supports both GTPv0 and GTPv1. @@ -68,13 +68,8 @@ point. It supports the GPRS ATTACH and GPRS ROUTING AREA UPDATE procedures, as well as GPRS ATTACH and GPRS DETACH. -However, as the SGSN currently does not implement any type of HLR -access, it is not able to authenticate a subscriber or even check if the -subscriber exists at all. As such, all non-roaming subscribes are -allowed to attach to OsmoSGSN. Non-roaming means that the first 5 -digits of the IMSI must match the MCC and MNC of the cell that the -subscriber is registering to. - +Please refer to <> for more details how the Authorization +policy is handled. ==== LLC Implementation diff --git a/common/chapters/gb.adoc b/common/chapters/gb.adoc index d01fa9b..199ef2c 100644 --- a/common/chapters/gb.adoc +++ b/common/chapters/gb.adoc @@ -67,14 +67,36 @@ Encapsulation NS-UDP-IP Local IP: 127.0.0.1, UDP Port: 23000 Encapsulation NS-FR-GRE-IP Local IP: 0.0.0.0 ---- -FIXME -FIXME: show ns stats +.Example: Inspecting NS statistics +---- +OsmoSGSN> show ns stats +Encapsulation NS-UDP-IP Local IP: 10.9.1.198, UDP Port: 23000 +Encapsulation NS-FR-GRE-IP Local IP: 0.0.0.0 +NSEI 101, NS-VC 101, Remote: BSS, ALIVE UNBLOCKED, UDP 10.9.1.119:23000 + NSVC Peer Statistics: + Packets at NS Level ( In): 1024 (2/s 123/m 911/h 0/d) + Packets at NS Level (Out): 1034 (0/s 151/m 894/h 0/d) + Bytes at NS Level ( In): 296638 (1066/s 22222/m 274244/h 0/d) + Bytes at NS Level (Out): 139788 (0/s 48225/m 91710/h 0/d) + NS-VC Block count : 0 (0/s 0/m 0/h 0/d) + NS-VC gone dead count : 0 (0/s 0/m 0/h 0/d) + NS-VC replaced other count: 0 (0/s 0/m 0/h 0/d) + NS-VC changed NSEI count : 0 (0/s 0/m 0/h 0/d) + NS-VCI was invalid count : 0 (0/s 0/m 0/h 0/d) + NSEI was invalid count : 0 (0/s 0/m 0/h 0/d) + ALIVE ACK missing count : 0 (0/s 0/m 0/h 0/d) + RESET ACK missing count : 0 (0/s 0/m 0/h 0/d) + NSVC Peer Statistics: + ALIVE reponse time : 0 ms +---- .Example: Inspecting BSSGP state ---- +OsmoSGSN> show bssgp +NSEI 101, BVCI 2, RA-ID: 1-2-1-0, CID: 0, STATE: UNBLOCKED +NSEI 101, BVCI 0, RA-ID: 0-0-0-0, CID: 0, STATE: UNBLOCKED ---- -FIXME FIXME: show nse -- To view, visit https://gerrit.osmocom.org/1535 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0164f418e453672321eed00bbc454c1e223ea158 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: ikostov From gerrit-no-reply at lists.osmocom.org Fri Jan 6 13:54:02 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 6 Jan 2017 13:54:02 +0000 Subject: osmo-pcu[master]: fix segfault: check for NULL tbf in sched_select_ctrl_msg() In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 yes, I thought the same at first... -- To view, visit https://gerrit.osmocom.org/1510 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I357492e558e98cfdbf5bb3438b5013029195b02b Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 13:54:04 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 6 Jan 2017 13:54:04 +0000 Subject: [MERGED] osmo-pcu[master]: fix segfault: check for NULL tbf in sched_select_ctrl_msg() In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: fix segfault: check for NULL tbf in sched_select_ctrl_msg() ...................................................................... fix segfault: check for NULL tbf in sched_select_ctrl_msg() Apparently fixes a corrupted stack looking like this on sysmobts: (gdb) run Starting program: /usr/bin/osmo-pcu -c /etc/osmocom/osmo-pcu.cfg [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/libthread_db.so.1". <000b> telnet_interface.c:95 telnet at 127.0.0.1 4240 <0001> osmobts_sock.cpp:227 Opening OsmoPCU L1 interface to OsmoBTS <0001> osmobts_sock.cpp:285 osmo-bts PCU socket has been connected <0001> pcu_l1_if.cpp:368 BTS available <0008> gprs_ns.c:233 NSVCI=65534 Creating NS-VC <0008> gprs_ns.c:233 NSVCI=100 Creating NS-VC <0008> gprs_ns.c:1568 NSEI=100 RESET procedure based on API request <0008> gprs_ns.c:393 NSEI=100 Tx NS RESET (NSVCI=100, cause=O&M intervention) <0001> pcu_l1_if.cpp:83 Sending activate request: trx=0 ts=2 <0001> pcu_l1_if.cpp:495 PDCH: trx=0 ts=2 <0001> pcu_l1_if.cpp:83 Sending activate request: trx=0 ts=3 <0001> pcu_l1_if.cpp:495 PDCH: trx=0 ts=3 <0001> pcu_l1_if.cpp:83 Sending activate request: trx=0 ts=4 <0001> pcu_l1_if.cpp:495 PDCH: trx=0 ts=4 <0001> pcu_l1_if.cpp:83 Sending activate request: trx=0 ts=5 <0001> pcu_l1_if.cpp:495 PDCH: trx=0 ts=5 <0001> pcu_l1_if.cpp:83 Sending activate request: trx=0 ts=6 <0001> pcu_l1_if.cpp:495 PDCH: trx=0 ts=6 <0001> pcu_l1_if.cpp:83 Sending activate request: trx=0 ts=7 <0001> pcu_l1_if.cpp:495 PDCH: trx=0 ts=7 <0001> pcu_l1_if.cpp:319 RACH request received: sapi=1 qta=0, ra=120, fn=103198 <0009> tbf_ul.cpp:373 LLC [PCU -> SGSN] TBF(TFI=0 TLLI=0x7f2dd569 DIR=UL STATE=FLOW) len=6 <0008> gprs_ns.c:684 All NS-VCs for NSEI 100 are either dead or blocked! Program received signal SIGSEGV, Segmentation fault. gprs_rlcmac_rcv_rts_block (bts=0x60a08, trx=trx at entry=0 '\000', ts=ts at entry=4 '\004', fn=7, fn at entry=103272, block_nr=block_nr at entry=0 '\000') at gprs_rlcmac_sched.cpp:349 349 gprs_rlcmac_sched.cpp: No such file or directory. (gdb) bt #0 gprs_rlcmac_rcv_rts_block (bts=0x60a08, trx=trx at entry=0 '\000', ts=ts at entry=4 '\004', fn=7, fn at entry=103272, block_nr=block_nr at entry=0 '\000') at gprs_rlcmac_sched.cpp:349 #1 0x0001151c in pcu_rx_rts_req_pdtch (trx=, ts=, fn=103272, block_nr=) at pcu_l1_if.cpp:279 #2 0x0000bfcc in handle_ph_readytosend_ind (fl1h=0xafa40, rts_ind=0xb03f8) at osmo-bts-sysmo/sysmo_l1_if.c:142 #3 l1if_handle_l1prim (wq=, fl1h=0xafa40, msg=0xb0330) at osmo-bts-sysmo/sysmo_l1_if.c:259 #4 0x4fcd6330 in osmo_fd_disp_fds (_eset=0xbefffb68, _wset=0xbefffae8, _rset=0xbefffa68) at select.c:149 #5 osmo_select_main (polling=) at select.c:189 #6 0x0000b2a0 in main (argc=, argv=0x66628 <_ZStL8__ioinit>) at pcu_main.cpp:295 Fixes: coverity CID#158969 Related: https://lists.osmocom.org/pipermail/osmocom-net-gprs/2016-December/000785.html Change-Id: I357492e558e98cfdbf5bb3438b5013029195b02b --- M src/gprs_rlcmac_sched.cpp 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Neels Hofmeyr: Looks good to me, approved Harald Welte: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp index fdda79d..8b27cac 100644 --- a/src/gprs_rlcmac_sched.cpp +++ b/src/gprs_rlcmac_sched.cpp @@ -173,6 +173,9 @@ } } + if (!tbf) + return NULL; + /* any message */ if (msg) { tbf->rotate_in_list(); -- To view, visit https://gerrit.osmocom.org/1510 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I357492e558e98cfdbf5bb3438b5013029195b02b Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 6 15:59:39 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 6 Jan 2017 15:59:39 +0000 Subject: libosmocore[master]: Add OML Failure Event Report support In-Reply-To: References: Message-ID: Patch Set 4: That's odd - test build succeeded but status has not been updated. What can we do now? -- To view, visit https://gerrit.osmocom.org/1519 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I58c198d8ea588432c62520928b08f0b2a7035e93 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 16:08:04 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 6 Jan 2017 16:08:04 +0000 Subject: [PATCH] libosmocore[master]: Add osmo_rand() function In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1526 to look at the new patch set (#2). Add osmo_rand() function Add osmo_rand() as a tiny wrapper around corresponding GnuTLS function and use it for osmo-auc-gen tool (with fallback to weak random numbers used previously). Change-Id: I0241b814ea4c4ce1458f7ad76e31d390383c2048 Related: OS#1694 --- M configure.ac M debian/control M include/osmocom/gsm/gsm_utils.h M src/gsm/Makefile.am M src/gsm/gsm_utils.c M src/gsm/libosmogsm.map M tests/Makefile.am M utils/osmo-auc-gen.c 8 files changed, 36 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/26/1526/2 diff --git a/configure.ac b/configure.ac index ec03c26..cf4e868 100644 --- a/configure.ac +++ b/configure.ac @@ -35,6 +35,10 @@ fi PKG_PROG_PKG_CONFIG([0.20]) +PKG_CHECK_MODULES(LIBGNUTLS, gnutls >= 3.3.0) +AC_SUBST(LIBGNUTLS_CFLAGS) +AC_SUBST(LIBGNUTLS_LIBS) + dnl check os: some linker flags not available on osx case $host in *-darwin*) diff --git a/debian/control b/debian/control index 4cdb672..d61fdd3 100644 --- a/debian/control +++ b/debian/control @@ -12,6 +12,7 @@ git, doxygen, libpcsclite-dev, + libgnutls28-dev, pkg-config, libtalloc-dev, python (>= 2.7.6) diff --git a/include/osmocom/gsm/gsm_utils.h b/include/osmocom/gsm/gsm_utils.h index 1ffe579..b41f992 100644 --- a/include/osmocom/gsm/gsm_utils.h +++ b/include/osmocom/gsm/gsm_utils.h @@ -103,6 +103,8 @@ */ int gsm_7bit_encode_n_ussd(uint8_t *result, size_t n, const char *data, int *octets_written); +int osmo_rand(uint8_t *out, size_t len); + /* the four functions below are helper functions and here for the unit test */ int gsm_septets2octets(uint8_t *result, const uint8_t *rdata, uint8_t septet_len, uint8_t padding); int gsm_septet_encode(uint8_t *result, const char *data); diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am index 4ec441f..92da071 100644 --- a/src/gsm/Makefile.am +++ b/src/gsm/Makefile.am @@ -3,7 +3,7 @@ # before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html LIBVERSION=7:0:1 -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(TALLOC_CFLAGS) +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(TALLOC_CFLAGS) $(LIBGNUTLS_CFLAGS) AM_CFLAGS = -Wall ${GCC_FVISIBILITY_HIDDEN} # FIXME: this should eventually go into a milenage/Makefile.am @@ -24,11 +24,11 @@ milenage/aes-internal.c milenage/aes-internal-enc.c \ milenage/milenage.c gan.c ipa.c gsm0341.c apn.c \ gsup.c gprs_gea.c gsm0503_conv.c oap.c -libgsmint_la_LDFLAGS = -no-undefined +libgsmint_la_LDFLAGS = $(LIBGNUTLS_LIBS) -no-undefined libgsmint_la_LIBADD = $(top_builddir)/src/libosmocore.la libosmogsm_la_SOURCES = -libosmogsm_la_LDFLAGS = $(LTLDFLAGS_OSMOGSM) -version-info $(LIBVERSION) -no-undefined $(TALLOC_LIBS) +libosmogsm_la_LDFLAGS = $(LTLDFLAGS_OSMOGSM) -version-info $(LIBVERSION) -no-undefined $(TALLOC_LIBS) $(LIBGNUTLS_LIBS) libosmogsm_la_LIBADD = libgsmint.la EXTRA_DIST = libosmogsm.map diff --git a/src/gsm/gsm_utils.c b/src/gsm/gsm_utils.c index 7365ab7..e0f9e3d 100644 --- a/src/gsm/gsm_utils.c +++ b/src/gsm/gsm_utils.c @@ -77,6 +77,9 @@ #include #include +#include +#include + #include "../../config.h" /* ETSI GSM 03.38 6.2.1 and 6.2.1.1 default alphabet @@ -662,6 +665,16 @@ return arfcn; } +/*! \brief Generate random bytes + * \param[out] out Buffer to be filled with random data + * \param[in] len Number of random bytes required + * \returns Zero on success, or a negative error code on error. + */ +int osmo_rand(uint8_t *out, size_t len) +{ + return gnutls_rnd(GNUTLS_RND_KEY, out, len); +} + void gsm_fn2gsmtime(struct gsm_time *time, uint32_t fn) { time->fn = fn; diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index a3d224f..1c3046b 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -26,6 +26,7 @@ osmo_sitype_strs; osmo_c4; +osmo_rand; bitvec_add_range1024; comp128; dbm2rxlev; diff --git a/tests/Makefile.am b/tests/Makefile.am index b9eb8f2..743e42a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,6 +1,6 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include AM_CFLAGS = -Wall $(TALLOC_CFLAGS) -AM_LDFLAGS = $(TALLOC_LIBS) +AM_LDFLAGS = $(TALLOC_LIBS) $(LIBGNUTLS_LIBS) check_PROGRAMS = timer/timer_test sms/sms_test ussd/ussd_test \ smscb/smscb_test bits/bitrev_test a5/a5_test \ diff --git a/utils/osmo-auc-gen.c b/utils/osmo-auc-gen.c index 3b3e557..99341a8 100644 --- a/utils/osmo-auc-gen.c +++ b/utils/osmo-auc-gen.c @@ -33,6 +33,7 @@ #include #include +#include static void dump_triplets_dat(struct osmo_auth_vector *vec) { @@ -214,17 +215,18 @@ } } - if (!rand_is_set) { - int i; - printf("WARNING: We're using really weak random numbers!\n\n"); - srand(time(NULL)); + if (!rand_is_set) + if (osmo_rand(_rand, 16) < 0) { + int i; + printf("WARNING: We're using really weak random numbers!\n\n"); + srand(time(NULL)); - for (i = 0; i < 4; ++i) { - uint32_t r; - r = rand(); - memcpy(&_rand[i*4], &r, 4); + for (i = 0; i < 4; ++i) { + uint32_t r; + r = rand(); + memcpy(&_rand[i*4], &r, 4); + } } - } if (test_aud.type == OSMO_AUTH_TYPE_NONE || test_aud.algo == OSMO_AUTH_ALG_NONE) { -- To view, visit https://gerrit.osmocom.org/1526 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0241b814ea4c4ce1458f7ad76e31d390383c2048 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Fri Jan 6 16:08:31 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 6 Jan 2017 16:08:31 +0000 Subject: libosmocore[master]: Add osmo_rand() function In-Reply-To: References: Message-ID: Patch Set 1: We can just use _KEY instead. -- To view, visit https://gerrit.osmocom.org/1526 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0241b814ea4c4ce1458f7ad76e31d390383c2048 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 6 16:21:35 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 6 Jan 2017 16:21:35 +0000 Subject: [PATCH] osmo-pcu[master]: Log socket path on connection Message-ID: Review at https://gerrit.osmocom.org/1536 Log socket path on connection Change-Id: I81c5c1068a8b59ee30399dac90b0f7e730fc19f4 --- M src/osmobts_sock.cpp 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/36/1536/1 diff --git a/src/osmobts_sock.cpp b/src/osmobts_sock.cpp index f589dc2..d542b66 100644 --- a/src/osmobts_sock.cpp +++ b/src/osmobts_sock.cpp @@ -282,7 +282,8 @@ return rc; } - LOGP(DL1IF, LOGL_NOTICE, "osmo-bts PCU socket has been connected\n"); + LOGP(DL1IF, LOGL_NOTICE, "osmo-bts PCU socket %s has been connected\n", + local.sun_path); pcu_sock_state = state; -- To view, visit https://gerrit.osmocom.org/1536 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I81c5c1068a8b59ee30399dac90b0f7e730fc19f4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Jan 6 16:30:36 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 6 Jan 2017 16:30:36 +0000 Subject: [PATCH] osmo-bts[master]: Log socket path on error Message-ID: Review at https://gerrit.osmocom.org/1537 Log socket path on error Change-Id: If912ac0bc815986de2a231facb5cf317a677be68 --- M src/common/pcu_sock.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/37/1537/1 diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c index 62f18a7..afd880f 100644 --- a/src/common/pcu_sock.c +++ b/src/common/pcu_sock.c @@ -861,8 +861,8 @@ bfd->fd = osmo_sock_unix_init(SOCK_SEQPACKET, 0, path, OSMO_SOCK_F_BIND); if (bfd->fd < 0) { - LOGP(DPCU, LOGL_ERROR, "Could not create unix socket: %s\n", - strerror(errno)); + LOGP(DPCU, LOGL_ERROR, "Could not create %s unix socket: %s\n", + path, strerror(errno)); talloc_free(state); return -1; } -- To view, visit https://gerrit.osmocom.org/1537 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If912ac0bc815986de2a231facb5cf317a677be68 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Jan 6 17:21:12 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 6 Jan 2017 17:21:12 +0000 Subject: [PATCH] libosmocore[master]: Extend Kc buffer Message-ID: Review at https://gerrit.osmocom.org/1538 Extend Kc buffer Double the Kc buffer to match the requirements of A5/4 and GEA4. Change-Id: I8d347bbeadc14cbc7306ea6e9b73e4a1c8c8cb21 --- M TODO-RELEASE M include/osmocom/crypt/auth.h 2 files changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/38/1538/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index fb0bfea..55ee40c 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,3 +7,4 @@ # If any interfaces have been added since the last public release: c:r:a + 1. # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line +libosmogsm osmo_auth_vector expand kc[] field to accommodate for GEA4 and A5/4 key sizes diff --git a/include/osmocom/crypt/auth.h b/include/osmocom/crypt/auth.h index 37b8a8a..4c3bad7 100644 --- a/include/osmocom/crypt/auth.h +++ b/include/osmocom/crypt/auth.h @@ -54,7 +54,7 @@ uint8_t ik[16]; /*!< integrity key */ uint8_t res[16]; /*!< authentication result */ uint8_t res_len; /*!< length (in bytes) of res */ - uint8_t kc[8]; /*!< Kc for GSM encryption (A5) */ + uint8_t kc[16]; /*!< Kc for GSM/GPRS encryption (A5 & GEA) */ uint8_t sres[4]; /*!< authentication result for GSM */ uint32_t auth_types; /*!< bitmask of OSMO_AUTH_TYPE_* */ }; -- To view, visit https://gerrit.osmocom.org/1538 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8d347bbeadc14cbc7306ea6e9b73e4a1c8c8cb21 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Jan 6 20:41:03 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 6 Jan 2017 20:41:03 +0000 Subject: libosmocore[master]: libosmocoding: migrate transcoding routines from OsmoBTS In-Reply-To: References: Message-ID: Patch Set 10: > You can use --enable-sanitize with gcc to better match what's used > on buildhost. I just asked my friend to build the library on his host and... he got the same test failed as Jenkins. So, now I'll be able to debug the code :) -- To view, visit https://gerrit.osmocom.org/933 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0c3256b87686d878e4e716d12393cad5924fdfa1 Gerrit-PatchSet: 10 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Tom Tsou Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Jan 7 11:53:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 7 Jan 2017 11:53:56 +0000 Subject: [PATCH] libosmocore[master]: vty: OSMO_ASSERT() if two identical commands are installed Message-ID: Review at https://gerrit.osmocom.org/1539 vty: OSMO_ASSERT() if two identical commands are installed When the caller installs two identical commands at a given VTY node, the result is that neither of the two commands can ever be executed: The VTY would always complain about "Ambiguous command.". Let's fail fast at program start when two identical commands are intalled. Change-Id: I85ff4640ebb3d8b75a6a9ab5d2f668edb5b7189e --- M src/vty/command.c 1 file changed, 19 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/39/1539/1 diff --git a/src/vty/command.c b/src/vty/command.c index 9d8bf31..587bd62 100644 --- a/src/vty/command.c +++ b/src/vty/command.c @@ -594,6 +594,22 @@ return 0; } +/* \brief Check if a command with given string exists at given node */ +static int check_element_exists(struct cmd_node *cnode, const char *cmdstring) +{ + int i; + + for (i = 0; i < vector_active(cnode->cmd_vector); ++i) { + struct cmd_element *elem; + elem = vector_slot(cnode->cmd_vector, i); + if (!elem->string) + continue; + if (!strcmp(elem->string, cmdstring)) + return 1; + } + return 0; +} + /*! \brief Install a command into a node * \param[in] ntype Node Type * \param[cmd] element to be installed @@ -605,6 +621,9 @@ cnode = vector_slot(cmdvec, ntype); OSMO_ASSERT(cnode); + /* ensure no _identical_ command has been registered at this + * node so far */ + OSMO_ASSERT(!check_element_exists(cnode, cmd->string)); vector_set(cnode->cmd_vector, cmd); -- To view, visit https://gerrit.osmocom.org/1539 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I85ff4640ebb3d8b75a6a9ab5d2f668edb5b7189e Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Jan 7 12:13:40 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 7 Jan 2017 12:13:40 +0000 Subject: [PATCH] libosmocore[master]: Add osmo_fsm_find_by_name() and avoid registering FSM with s... Message-ID: Review at https://gerrit.osmocom.org/1540 Add osmo_fsm_find_by_name() and avoid registering FSM with same name This addresses a FIXME in the fsm.c code: osmo_fsm_register() should fail in case a FSM with the given name already exists. Change-Id: I5fd882939859c79581eba70c14cbafd64560b583 --- M include/osmocom/core/fsm.h M src/fsm.c 2 files changed, 14 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/40/1540/1 diff --git a/include/osmocom/core/fsm.h b/include/osmocom/core/fsm.h index a2c20b7..952f82f 100644 --- a/include/osmocom/core/fsm.h +++ b/include/osmocom/core/fsm.h @@ -140,6 +140,7 @@ int osmo_fsm_register(struct osmo_fsm *fsm); void osmo_fsm_unregister(struct osmo_fsm *fsm); +struct osmo_fsm *osmo_fsm_find_by_name(const char *name); struct osmo_fsm_inst *osmo_fsm_inst_alloc(struct osmo_fsm *fsm, void *ctx, void *priv, int log_level, const char *id); struct osmo_fsm_inst *osmo_fsm_inst_alloc_child(struct osmo_fsm *fsm, diff --git a/src/fsm.c b/src/fsm.c index 19705b9..666dbe3 100644 --- a/src/fsm.c +++ b/src/fsm.c @@ -20,6 +20,7 @@ #include #include +#include #include #include @@ -102,6 +103,16 @@ fsm_log_addr = log_addr; } +struct osmo_fsm *osmo_fsm_find_by_name(const char *name) +{ + struct osmo_fsm *fsm; + llist_for_each_entry(fsm, &g_fsms, list) { + if (!strcmp(name, fsm->name)) + return fsm; + } + return NULL; +} + /*! \brief register a FSM with the core * * A FSM descriptor needs to be registered with the core before any @@ -112,7 +123,8 @@ */ int osmo_fsm_register(struct osmo_fsm *fsm) { - /* FIXME:check for duplicate name? */ + if (osmo_fsm_find_by_name(fsm->name)) + return -EEXIST; llist_add_tail(&fsm->list, &g_fsms); INIT_LLIST_HEAD(&fsm->instances); -- To view, visit https://gerrit.osmocom.org/1540 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5fd882939859c79581eba70c14cbafd64560b583 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Jan 7 12:13:41 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 7 Jan 2017 12:13:41 +0000 Subject: [PATCH] libosmocore[master]: fsm: Add VTY introspection of osmo_fsm and their instances Message-ID: Review at https://gerrit.osmocom.org/1541 fsm: Add VTY introspection of osmo_fsm and their instances Change-Id: I89212e4f149f019099115a85bab353c04170df90 --- M include/osmocom/vty/misc.h M src/fsm.c M src/vty/Makefile.am A src/vty/fsm_vty.c 4 files changed, 189 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/41/1541/1 diff --git a/include/osmocom/vty/misc.h b/include/osmocom/vty/misc.h index 97ad4a5..b3fb644 100644 --- a/include/osmocom/vty/misc.h +++ b/include/osmocom/vty/misc.h @@ -20,5 +20,13 @@ void vty_out_statistics_partial(struct vty *vty, const char *prefix, int max_level); + +struct osmo_fsm; +struct osmo_fsm_inst; +void vty_out_fsm(struct vty *vty, struct osmo_fsm *fsm); +void vty_out_fsm_inst(struct vty *vty, struct osmo_fsm_inst *fsmi); +void osmo_fsm_vty_add_cmds(void); + + int osmo_vty_write_config_file(const char *filename); int osmo_vty_save_config_file(void); diff --git a/src/fsm.c b/src/fsm.c index 666dbe3..0e2c9be 100644 --- a/src/fsm.c +++ b/src/fsm.c @@ -87,7 +87,7 @@ * */ -static LLIST_HEAD(g_fsms); +LLIST_HEAD(osmo_g_fsms); static bool fsm_log_addr = true; /*! \brief specify if FSM instance addresses should be logged or not @@ -106,7 +106,7 @@ struct osmo_fsm *osmo_fsm_find_by_name(const char *name) { struct osmo_fsm *fsm; - llist_for_each_entry(fsm, &g_fsms, list) { + llist_for_each_entry(fsm, &osmo_g_fsms, list) { if (!strcmp(name, fsm->name)) return fsm; } @@ -125,7 +125,7 @@ { if (osmo_fsm_find_by_name(fsm->name)) return -EEXIST; - llist_add_tail(&fsm->list, &g_fsms); + llist_add_tail(&fsm->list, &osmo_g_fsms); INIT_LLIST_HEAD(&fsm->instances); return 0; diff --git a/src/vty/Makefile.am b/src/vty/Makefile.am index 52cdc8e..e083a1c 100644 --- a/src/vty/Makefile.am +++ b/src/vty/Makefile.am @@ -10,7 +10,7 @@ lib_LTLIBRARIES = libosmovty.la libosmovty_la_SOURCES = buffer.c command.c vty.c vector.c utils.c \ - telnet_interface.c logging_vty.c stats_vty.c + telnet_interface.c logging_vty.c stats_vty.c fsm_vty.c libosmovty_la_LDFLAGS = -version-info $(LIBVERSION) -no-undefined $(TALLOC_LIBS) libosmovty_la_LIBADD = $(top_builddir)/src/libosmocore.la endif diff --git a/src/vty/fsm_vty.c b/src/vty/fsm_vty.c new file mode 100644 index 0000000..422de9d --- /dev/null +++ b/src/vty/fsm_vty.c @@ -0,0 +1,177 @@ +/* Osmocom FSM introspection via VTY */ +/* (C) 2016 by Harald Welte + * 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 2 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. + * + */ + +#include +#include + +#include "../../config.h" + +#include +#include +#include +#include +#include + +#include +#include +#include + +/* we don't want to add this to a public header file; this is simply + * exported by libosmocore and used by libmsomvty but not for public + * consumption. */ +extern struct llist_head osmo_g_fsms; + +/*! \brief Print information about a FSM [class] to the given VTY + * \param vty The VTY to which to print + * \param[in] fsm The FSM class to print + */ +void vty_out_fsm(struct vty *vty, struct osmo_fsm *fsm) +{ + unsigned int i; + const struct value_string *evt_name; + + vty_out(vty, "FSM Name: '%s', Log Subsys: '%s'%s", fsm->name, + log_category_name(fsm->log_subsys), VTY_NEWLINE); + /* list the events */ + for (evt_name = fsm->event_names; evt_name->str != NULL; evt_name++) { + vty_out(vty, " Event %02u (0x%08x): '%s'%s", evt_name->value, + (1 << evt_name->value), evt_name->str, VTY_NEWLINE); + } + /* list the states */ + vty_out(vty, " Number of States: %u%s", fsm->num_states, VTY_NEWLINE); + for (i = 0; i < fsm->num_states; i++) { + const struct osmo_fsm_state *state = &fsm->states[i]; + vty_out(vty, " State %-20s InEvtMask: 0x%08x, OutStateMask: 0x%08x%s", + state->name, state->in_event_mask, state->out_state_mask, + VTY_NEWLINE); + } +} + +/*! \brief Print a FSM instance to the given VTY + * \param vty The VTY to which to print + * \param[in] fsmi The FSM instance to print + */ +void vty_out_fsm_inst(struct vty *vty, struct osmo_fsm_inst *fsmi) +{ + struct osmo_fsm_inst *child; + + vty_out(vty, "FSM Instance Name: '%s', ID: '%s'%s", + fsmi->name, fsmi->id, VTY_NEWLINE); + vty_out(vty, " Log-Level: '%s', State: '%s'%s", + log_level_str(fsmi->log_level), + osmo_fsm_state_name(fsmi->fsm, fsmi->state), + VTY_NEWLINE); + if (fsmi->T) + vty_out(vty, " Timer: %u%s", fsmi->T, VTY_NEWLINE); + if (fsmi->proc.parent) { + vty_out(vty, " Parent: '%s', Term-Event: '%s'%s", + fsmi->proc.parent->name, + osmo_fsm_event_name(fsmi->proc.parent->fsm, + fsmi->proc.parent_term_event), + VTY_NEWLINE); + } + llist_for_each_entry(child, &fsmi->proc.children, list) { + vty_out(vty, " Child: '%s'%s", child->name, VTY_NEWLINE); + } +} + +#define SH_FSM_STR SHOW_STR "Show information about finite state machines\n" +#define SH_FSMI_STR SHOW_STR "Show information about finite state machine instances\n" + +DEFUN(show_fsms, show_fsms_cmd, + "show fsm all", + SH_FSM_STR + "Display a list of all registered finite state machines\n") +{ + struct osmo_fsm *fsm; + + llist_for_each_entry(fsm, &osmo_g_fsms, list) + vty_out_fsm(vty, fsm); + + return CMD_SUCCESS; +} + +DEFUN(show_fsm, show_fsm_cmd, + "show fsm NAME", + SH_FSM_STR + "Display information about a single named finite state machine\n") +{ + struct osmo_fsm *fsm; + + fsm = osmo_fsm_find_by_name(argv[0]); + if (!fsm) { + vty_out(vty, "Error: FSM with name '%s' doesn't exist!%s", + argv[0], VTY_NEWLINE); + return CMD_WARNING; + } + + vty_out_fsm(vty, fsm); + + return CMD_SUCCESS; +} + +DEFUN(show_fsm_insts, show_fsm_insts_cmd, + "show fsm-instances all", + SH_FSMI_STR + "Display a list of all FSM instances of all finite state machine") +{ + struct osmo_fsm *fsm; + + llist_for_each_entry(fsm, &osmo_g_fsms, list) { + struct osmo_fsm_inst *fsmi; + llist_for_each_entry(fsmi, &fsm->instances, list) + vty_out_fsm_inst(vty, fsmi); + } + + return CMD_SUCCESS; +} + +DEFUN(show_fsm_inst, show_fsm_inst_cmd, + "show fsm-instances NAME", + SH_FSMI_STR + "Display a list of all FSM instances of the named finite state machine") +{ + struct osmo_fsm *fsm; + struct osmo_fsm_inst *fsmi; + + fsm = osmo_fsm_find_by_name(argv[0]); + if (!fsm) { + vty_out(vty, "Error: FSM with name '%s' doesn't exist!%s", + argv[0], VTY_NEWLINE); + return CMD_WARNING; + } + + llist_for_each_entry(fsmi, &fsm->instances, list) + vty_out_fsm_inst(vty, fsmi); + + return CMD_SUCCESS; +} + +/*! \brief Install VTY commands for FSM introspection + * This installs a couple of VTY commands for introspection of FSM + * classes as well as FSM instances. Call this once from your + * application if you want to support those commands. */ +void osmo_fsm_vty_add_cmds(void) +{ + install_element_ve(&show_fsm_cmd); + install_element_ve(&show_fsms_cmd); + install_element_ve(&show_fsm_inst_cmd); + install_element_ve(&show_fsm_insts_cmd); +} -- To view, visit https://gerrit.osmocom.org/1541 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I89212e4f149f019099115a85bab353c04170df90 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Jan 7 12:14:06 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 7 Jan 2017 12:14:06 +0000 Subject: [MERGED] libosmocore[master]: Add OML Failure Event Report support In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add OML Failure Event Report support ...................................................................... Add OML Failure Event Report support Add 3GPP TS 12.21 ? 8.8.2 Failure Event Report function which pack given vararg string and parameters into msgb. Change-Id: I58c198d8ea588432c62520928b08f0b2a7035e93 Related: OS#1615 --- M include/osmocom/gsm/protocol/gsm_12_21.h M src/gsm/abis_nm.c M src/gsm/libosmogsm.map 3 files changed, 46 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/gsm/protocol/gsm_12_21.h b/include/osmocom/gsm/protocol/gsm_12_21.h index 6a37392..deca2df 100644 --- a/include/osmocom/gsm/protocol/gsm_12_21.h +++ b/include/osmocom/gsm/protocol/gsm_12_21.h @@ -45,6 +45,9 @@ uint8_t data[0]; } __attribute__ ((packed)); +#define ABIS_NM_MSG_SIZE 1024 +#define ABIS_NM_MSG_HEADROOM 128 + /*! \brief Message Discriminator for Formatted Object Messages */ #define ABIS_OM_MDISC_FOM 0x80 /*! \brief Message Discriminator for Man Machine Interface */ @@ -781,4 +784,8 @@ IPAC_BINF_CELL_ALLOC = (1 << 2), }; +struct msgb *abis_nm_fail_evt_rep(enum abis_nm_event_type t, + enum abis_nm_severity s, + enum abis_nm_pcause_type ct, + uint16_t cause_value, const char *fmt, ...); /*! @} */ diff --git a/src/gsm/abis_nm.c b/src/gsm/abis_nm.c index 87d05ab..2de4941 100644 --- a/src/gsm/abis_nm.c +++ b/src/gsm/abis_nm.c @@ -517,6 +517,44 @@ /* FIXME: bounds check */ }; +/*! \brief Pack 3GPP TS 12.21 ? 8.8.2 Failure Event Report into msgb */ +struct msgb *abis_nm_fail_evt_rep(enum abis_nm_event_type t, + enum abis_nm_severity s, + enum abis_nm_pcause_type ct, + uint16_t cause_value, const char *fmt, ...) +{ + uint8_t cause[3]; + int len; + va_list ap; + char add_text[ABIS_NM_MSG_HEADROOM]; + struct msgb *nmsg = msgb_alloc_headroom(ABIS_NM_MSG_SIZE, + ABIS_NM_MSG_HEADROOM, + "OML FAIL EV. REP."); + if (!nmsg) + return NULL; + + msgb_tv_put(nmsg, NM_ATT_EVENT_TYPE, t); + msgb_tv_put(nmsg, NM_ATT_SEVERITY, s); + + cause[0] = ct; + osmo_store16be(cause_value, cause + 1); + + msgb_tv_fixed_put(nmsg, NM_ATT_PROB_CAUSE, 3, cause); + + va_start(ap, fmt); + len = vsnprintf(add_text, ABIS_NM_MSG_HEADROOM, fmt, ap); + va_end(ap); + + if (len < 0) { + msgb_free(nmsg); + return NULL; + } + if (len) + msgb_tl16v_put(nmsg, NM_ATT_ADD_TEXT, len, add_text); + + return nmsg; +} + /*! \brief Obtain OML Channel Combination for phnsical channel config */ int abis_nm_chcomb4pchan(enum gsm_phys_chan_config pchan) { diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index c876d2b..0c37d1c 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -4,6 +4,7 @@ abis_nm_adm_state_names; abis_nm_att_settable; abis_nm_avail_name; +abis_nm_fail_evt_rep; abis_nm_chcomb4pchan; abis_nm_debugp_foh; abis_nm_event_type_name; -- To view, visit https://gerrit.osmocom.org/1519 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I58c198d8ea588432c62520928b08f0b2a7035e93 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Minh-Quang Nguyen From gerrit-no-reply at lists.osmocom.org Sat Jan 7 12:14:46 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 7 Jan 2017 12:14:46 +0000 Subject: libosmocore[master]: vty: OSMO_ASSERT() if two identical commands are installed In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1539 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I85ff4640ebb3d8b75a6a9ab5d2f668edb5b7189e Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Jan 7 12:14:48 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 7 Jan 2017 12:14:48 +0000 Subject: [MERGED] libosmocore[master]: vty: OSMO_ASSERT() if two identical commands are installed In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: vty: OSMO_ASSERT() if two identical commands are installed ...................................................................... vty: OSMO_ASSERT() if two identical commands are installed When the caller installs two identical commands at a given VTY node, the result is that neither of the two commands can ever be executed: The VTY would always complain about "Ambiguous command.". Let's fail fast at program start when two identical commands are intalled. Change-Id: I85ff4640ebb3d8b75a6a9ab5d2f668edb5b7189e --- M src/vty/command.c 1 file changed, 19 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/vty/command.c b/src/vty/command.c index 9d8bf31..587bd62 100644 --- a/src/vty/command.c +++ b/src/vty/command.c @@ -594,6 +594,22 @@ return 0; } +/* \brief Check if a command with given string exists at given node */ +static int check_element_exists(struct cmd_node *cnode, const char *cmdstring) +{ + int i; + + for (i = 0; i < vector_active(cnode->cmd_vector); ++i) { + struct cmd_element *elem; + elem = vector_slot(cnode->cmd_vector, i); + if (!elem->string) + continue; + if (!strcmp(elem->string, cmdstring)) + return 1; + } + return 0; +} + /*! \brief Install a command into a node * \param[in] ntype Node Type * \param[cmd] element to be installed @@ -605,6 +621,9 @@ cnode = vector_slot(cmdvec, ntype); OSMO_ASSERT(cnode); + /* ensure no _identical_ command has been registered at this + * node so far */ + OSMO_ASSERT(!check_element_exists(cnode, cmd->string)); vector_set(cnode->cmd_vector, cmd); -- To view, visit https://gerrit.osmocom.org/1539 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I85ff4640ebb3d8b75a6a9ab5d2f668edb5b7189e Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Jan 7 12:15:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 7 Jan 2017 12:15:12 +0000 Subject: osmo-bts[master]: Log socket path on error In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1537 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If912ac0bc815986de2a231facb5cf317a677be68 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Jan 7 12:15:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 7 Jan 2017 12:15:14 +0000 Subject: osmo-pcu[master]: Log socket path on connection In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1536 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I81c5c1068a8b59ee30399dac90b0f7e730fc19f4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Jan 7 12:15:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 7 Jan 2017 12:15:21 +0000 Subject: [MERGED] osmo-pcu[master]: Log socket path on connection In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Log socket path on connection ...................................................................... Log socket path on connection Change-Id: I81c5c1068a8b59ee30399dac90b0f7e730fc19f4 --- M src/osmobts_sock.cpp 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmobts_sock.cpp b/src/osmobts_sock.cpp index f589dc2..d542b66 100644 --- a/src/osmobts_sock.cpp +++ b/src/osmobts_sock.cpp @@ -282,7 +282,8 @@ return rc; } - LOGP(DL1IF, LOGL_NOTICE, "osmo-bts PCU socket has been connected\n"); + LOGP(DL1IF, LOGL_NOTICE, "osmo-bts PCU socket %s has been connected\n", + local.sun_path); pcu_sock_state = state; -- To view, visit https://gerrit.osmocom.org/1536 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I81c5c1068a8b59ee30399dac90b0f7e730fc19f4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Jan 7 12:15:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 7 Jan 2017 12:15:31 +0000 Subject: [MERGED] osmo-bts[master]: Log socket path on error In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Log socket path on error ...................................................................... Log socket path on error Change-Id: If912ac0bc815986de2a231facb5cf317a677be68 --- M src/common/pcu_sock.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c index 62f18a7..afd880f 100644 --- a/src/common/pcu_sock.c +++ b/src/common/pcu_sock.c @@ -861,8 +861,8 @@ bfd->fd = osmo_sock_unix_init(SOCK_SEQPACKET, 0, path, OSMO_SOCK_F_BIND); if (bfd->fd < 0) { - LOGP(DPCU, LOGL_ERROR, "Could not create unix socket: %s\n", - strerror(errno)); + LOGP(DPCU, LOGL_ERROR, "Could not create %s unix socket: %s\n", + path, strerror(errno)); talloc_free(state); return -1; } -- To view, visit https://gerrit.osmocom.org/1537 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If912ac0bc815986de2a231facb5cf317a677be68 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Jan 7 12:15:53 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 7 Jan 2017 12:15:53 +0000 Subject: libosmocore[master]: Add osmo_fsm_find_by_name() and avoid registering FSM with s... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1540 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5fd882939859c79581eba70c14cbafd64560b583 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Jan 7 12:16:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 7 Jan 2017 12:16:29 +0000 Subject: libosmocore[master]: fsm: Add VTY introspection of osmo_fsm and their instances In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1541 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I89212e4f149f019099115a85bab353c04170df90 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Jan 7 12:19:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 7 Jan 2017 12:19:12 +0000 Subject: osmo-gsm-manuals[master]: SGSN: add Auth. policy, NS Statistics and BSSGP state examples In-Reply-To: References: Message-ID: Patch Set 1: (3 comments) https://gerrit.osmocom.org/#/c/1535/1/OsmoSGSN/chapters/configuration.adoc File OsmoSGSN/chapters/configuration.adoc: PS1, Line 84: 2 what is this '2' for here? Maybe some asciidoc syntax I don't know? Line 107: <1> 'acl-olny' is selected as authorization policy only (spelling) https://gerrit.osmocom.org/#/c/1535/1/common/chapters/gb.adoc File common/chapters/gb.adoc: Line 71: .Example: Inspecting NS statistics would be great to not only have an example output, but some additional explanation how to interpret tha data. This can and probably should be in a follow-up commit to not further delay this one. -- To view, visit https://gerrit.osmocom.org/1535 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0164f418e453672321eed00bbc454c1e223ea158 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: ikostov Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sat Jan 7 12:19:47 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 7 Jan 2017 12:19:47 +0000 Subject: libosmocore[master]: Add osmo_rand() function In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1526 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0241b814ea4c4ce1458f7ad76e31d390383c2048 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Jan 7 12:21:02 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 7 Jan 2017 12:21:02 +0000 Subject: libosmocore[master]: Add osmo_fsm_find_by_name() and avoid registering FSM with s... In-Reply-To: References: Message-ID: Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/1540 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5fd882939859c79581eba70c14cbafd64560b583 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Jan 7 12:21:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 7 Jan 2017 12:21:03 +0000 Subject: [MERGED] libosmocore[master]: Add osmo_fsm_find_by_name() and avoid registering FSM with s... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add osmo_fsm_find_by_name() and avoid registering FSM with same name ...................................................................... Add osmo_fsm_find_by_name() and avoid registering FSM with same name This addresses a FIXME in the fsm.c code: osmo_fsm_register() should fail in case a FSM with the given name already exists. Change-Id: I5fd882939859c79581eba70c14cbafd64560b583 --- M include/osmocom/core/fsm.h M src/fsm.c 2 files changed, 14 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/include/osmocom/core/fsm.h b/include/osmocom/core/fsm.h index a2c20b7..952f82f 100644 --- a/include/osmocom/core/fsm.h +++ b/include/osmocom/core/fsm.h @@ -140,6 +140,7 @@ int osmo_fsm_register(struct osmo_fsm *fsm); void osmo_fsm_unregister(struct osmo_fsm *fsm); +struct osmo_fsm *osmo_fsm_find_by_name(const char *name); struct osmo_fsm_inst *osmo_fsm_inst_alloc(struct osmo_fsm *fsm, void *ctx, void *priv, int log_level, const char *id); struct osmo_fsm_inst *osmo_fsm_inst_alloc_child(struct osmo_fsm *fsm, diff --git a/src/fsm.c b/src/fsm.c index 19705b9..666dbe3 100644 --- a/src/fsm.c +++ b/src/fsm.c @@ -20,6 +20,7 @@ #include #include +#include #include #include @@ -102,6 +103,16 @@ fsm_log_addr = log_addr; } +struct osmo_fsm *osmo_fsm_find_by_name(const char *name) +{ + struct osmo_fsm *fsm; + llist_for_each_entry(fsm, &g_fsms, list) { + if (!strcmp(name, fsm->name)) + return fsm; + } + return NULL; +} + /*! \brief register a FSM with the core * * A FSM descriptor needs to be registered with the core before any @@ -112,7 +123,8 @@ */ int osmo_fsm_register(struct osmo_fsm *fsm) { - /* FIXME:check for duplicate name? */ + if (osmo_fsm_find_by_name(fsm->name)) + return -EEXIST; llist_add_tail(&fsm->list, &g_fsms); INIT_LLIST_HEAD(&fsm->instances); -- To view, visit https://gerrit.osmocom.org/1540 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5fd882939859c79581eba70c14cbafd64560b583 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Jan 7 12:41:53 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 7 Jan 2017 12:41:53 +0000 Subject: [PATCH] libosmocore[master]: libosmocoding: migrate transcoding routines from OsmoBTS In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/933 to look at the new patch set (#11). libosmocoding: migrate transcoding routines from OsmoBTS There are some projects, such as GR-GSM and OsmocomBB, which would benefit from using one shared implementation of GSM 05.03 code. So, this commit introduces a new sub-library called libosmocoding, which (for now) provides GSM, GPRS and EDGE transcoding routines, migrated from OsmoBTS. The original GSM 05.03 code from OsmoBTS was relicensed under GPLv2-or-later with permission of copyright holders (Andreas Eversberg, Alexander Chemeris and Tom Tsou). The following data types are currently supported: - xCCH - PDTCH (CS 1-4 and MCS 1-9) - TCH/FR - TCH/HR - TCH/AFS - RCH/AHS - RACH - SCH Change-Id: I0c3256b87686d878e4e716d12393cad5924fdfa1 --- M .gitignore A Doxyfile.coding.in M Makefile.am M configure.ac M debian/control M include/Makefile.am A include/osmocom/coding/gsm0503_coding.h A include/osmocom/coding/gsm0503_interleaving.h A include/osmocom/coding/gsm0503_mapping.h A include/osmocom/coding/gsm0503_parity.h A include/osmocom/coding/gsm0503_tables.h M include/osmocom/gsm/gsm0503.h A libosmocoding.pc.in A src/coding/Makefile.am A src/coding/gsm0503_coding.c A src/coding/gsm0503_interleaving.c A src/coding/gsm0503_mapping.c A src/coding/gsm0503_parity.c A src/coding/gsm0503_tables.c A src/coding/libosmocoding.map M src/gsm/libosmogsm.map M tests/Makefile.am A tests/coding/coding_test.c A tests/coding/coding_test.ok M tests/testsuite.at M utils/conv_codes_gsm.py 26 files changed, 8,112 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/33/933/11 -- To view, visit https://gerrit.osmocom.org/933 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0c3256b87686d878e4e716d12393cad5924fdfa1 Gerrit-PatchSet: 11 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Tom Tsou Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt From gerrit-no-reply at lists.osmocom.org Sat Jan 7 12:42:46 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 7 Jan 2017 12:42:46 +0000 Subject: libosmocore[master]: fsm: Add VTY introspection of osmo_fsm and their instances In-Reply-To: References: Message-ID: Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/1541 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I89212e4f149f019099115a85bab353c04170df90 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Jan 7 12:42:48 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 7 Jan 2017 12:42:48 +0000 Subject: [MERGED] libosmocore[master]: fsm: Add VTY introspection of osmo_fsm and their instances In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: fsm: Add VTY introspection of osmo_fsm and their instances ...................................................................... fsm: Add VTY introspection of osmo_fsm and their instances Change-Id: I89212e4f149f019099115a85bab353c04170df90 --- M include/osmocom/vty/misc.h M src/fsm.c M src/vty/Makefile.am A src/vty/fsm_vty.c 4 files changed, 189 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/include/osmocom/vty/misc.h b/include/osmocom/vty/misc.h index 97ad4a5..b3fb644 100644 --- a/include/osmocom/vty/misc.h +++ b/include/osmocom/vty/misc.h @@ -20,5 +20,13 @@ void vty_out_statistics_partial(struct vty *vty, const char *prefix, int max_level); + +struct osmo_fsm; +struct osmo_fsm_inst; +void vty_out_fsm(struct vty *vty, struct osmo_fsm *fsm); +void vty_out_fsm_inst(struct vty *vty, struct osmo_fsm_inst *fsmi); +void osmo_fsm_vty_add_cmds(void); + + int osmo_vty_write_config_file(const char *filename); int osmo_vty_save_config_file(void); diff --git a/src/fsm.c b/src/fsm.c index 666dbe3..0e2c9be 100644 --- a/src/fsm.c +++ b/src/fsm.c @@ -87,7 +87,7 @@ * */ -static LLIST_HEAD(g_fsms); +LLIST_HEAD(osmo_g_fsms); static bool fsm_log_addr = true; /*! \brief specify if FSM instance addresses should be logged or not @@ -106,7 +106,7 @@ struct osmo_fsm *osmo_fsm_find_by_name(const char *name) { struct osmo_fsm *fsm; - llist_for_each_entry(fsm, &g_fsms, list) { + llist_for_each_entry(fsm, &osmo_g_fsms, list) { if (!strcmp(name, fsm->name)) return fsm; } @@ -125,7 +125,7 @@ { if (osmo_fsm_find_by_name(fsm->name)) return -EEXIST; - llist_add_tail(&fsm->list, &g_fsms); + llist_add_tail(&fsm->list, &osmo_g_fsms); INIT_LLIST_HEAD(&fsm->instances); return 0; diff --git a/src/vty/Makefile.am b/src/vty/Makefile.am index 52cdc8e..e083a1c 100644 --- a/src/vty/Makefile.am +++ b/src/vty/Makefile.am @@ -10,7 +10,7 @@ lib_LTLIBRARIES = libosmovty.la libosmovty_la_SOURCES = buffer.c command.c vty.c vector.c utils.c \ - telnet_interface.c logging_vty.c stats_vty.c + telnet_interface.c logging_vty.c stats_vty.c fsm_vty.c libosmovty_la_LDFLAGS = -version-info $(LIBVERSION) -no-undefined $(TALLOC_LIBS) libosmovty_la_LIBADD = $(top_builddir)/src/libosmocore.la endif diff --git a/src/vty/fsm_vty.c b/src/vty/fsm_vty.c new file mode 100644 index 0000000..422de9d --- /dev/null +++ b/src/vty/fsm_vty.c @@ -0,0 +1,177 @@ +/* Osmocom FSM introspection via VTY */ +/* (C) 2016 by Harald Welte + * 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 2 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. + * + */ + +#include +#include + +#include "../../config.h" + +#include +#include +#include +#include +#include + +#include +#include +#include + +/* we don't want to add this to a public header file; this is simply + * exported by libosmocore and used by libmsomvty but not for public + * consumption. */ +extern struct llist_head osmo_g_fsms; + +/*! \brief Print information about a FSM [class] to the given VTY + * \param vty The VTY to which to print + * \param[in] fsm The FSM class to print + */ +void vty_out_fsm(struct vty *vty, struct osmo_fsm *fsm) +{ + unsigned int i; + const struct value_string *evt_name; + + vty_out(vty, "FSM Name: '%s', Log Subsys: '%s'%s", fsm->name, + log_category_name(fsm->log_subsys), VTY_NEWLINE); + /* list the events */ + for (evt_name = fsm->event_names; evt_name->str != NULL; evt_name++) { + vty_out(vty, " Event %02u (0x%08x): '%s'%s", evt_name->value, + (1 << evt_name->value), evt_name->str, VTY_NEWLINE); + } + /* list the states */ + vty_out(vty, " Number of States: %u%s", fsm->num_states, VTY_NEWLINE); + for (i = 0; i < fsm->num_states; i++) { + const struct osmo_fsm_state *state = &fsm->states[i]; + vty_out(vty, " State %-20s InEvtMask: 0x%08x, OutStateMask: 0x%08x%s", + state->name, state->in_event_mask, state->out_state_mask, + VTY_NEWLINE); + } +} + +/*! \brief Print a FSM instance to the given VTY + * \param vty The VTY to which to print + * \param[in] fsmi The FSM instance to print + */ +void vty_out_fsm_inst(struct vty *vty, struct osmo_fsm_inst *fsmi) +{ + struct osmo_fsm_inst *child; + + vty_out(vty, "FSM Instance Name: '%s', ID: '%s'%s", + fsmi->name, fsmi->id, VTY_NEWLINE); + vty_out(vty, " Log-Level: '%s', State: '%s'%s", + log_level_str(fsmi->log_level), + osmo_fsm_state_name(fsmi->fsm, fsmi->state), + VTY_NEWLINE); + if (fsmi->T) + vty_out(vty, " Timer: %u%s", fsmi->T, VTY_NEWLINE); + if (fsmi->proc.parent) { + vty_out(vty, " Parent: '%s', Term-Event: '%s'%s", + fsmi->proc.parent->name, + osmo_fsm_event_name(fsmi->proc.parent->fsm, + fsmi->proc.parent_term_event), + VTY_NEWLINE); + } + llist_for_each_entry(child, &fsmi->proc.children, list) { + vty_out(vty, " Child: '%s'%s", child->name, VTY_NEWLINE); + } +} + +#define SH_FSM_STR SHOW_STR "Show information about finite state machines\n" +#define SH_FSMI_STR SHOW_STR "Show information about finite state machine instances\n" + +DEFUN(show_fsms, show_fsms_cmd, + "show fsm all", + SH_FSM_STR + "Display a list of all registered finite state machines\n") +{ + struct osmo_fsm *fsm; + + llist_for_each_entry(fsm, &osmo_g_fsms, list) + vty_out_fsm(vty, fsm); + + return CMD_SUCCESS; +} + +DEFUN(show_fsm, show_fsm_cmd, + "show fsm NAME", + SH_FSM_STR + "Display information about a single named finite state machine\n") +{ + struct osmo_fsm *fsm; + + fsm = osmo_fsm_find_by_name(argv[0]); + if (!fsm) { + vty_out(vty, "Error: FSM with name '%s' doesn't exist!%s", + argv[0], VTY_NEWLINE); + return CMD_WARNING; + } + + vty_out_fsm(vty, fsm); + + return CMD_SUCCESS; +} + +DEFUN(show_fsm_insts, show_fsm_insts_cmd, + "show fsm-instances all", + SH_FSMI_STR + "Display a list of all FSM instances of all finite state machine") +{ + struct osmo_fsm *fsm; + + llist_for_each_entry(fsm, &osmo_g_fsms, list) { + struct osmo_fsm_inst *fsmi; + llist_for_each_entry(fsmi, &fsm->instances, list) + vty_out_fsm_inst(vty, fsmi); + } + + return CMD_SUCCESS; +} + +DEFUN(show_fsm_inst, show_fsm_inst_cmd, + "show fsm-instances NAME", + SH_FSMI_STR + "Display a list of all FSM instances of the named finite state machine") +{ + struct osmo_fsm *fsm; + struct osmo_fsm_inst *fsmi; + + fsm = osmo_fsm_find_by_name(argv[0]); + if (!fsm) { + vty_out(vty, "Error: FSM with name '%s' doesn't exist!%s", + argv[0], VTY_NEWLINE); + return CMD_WARNING; + } + + llist_for_each_entry(fsmi, &fsm->instances, list) + vty_out_fsm_inst(vty, fsmi); + + return CMD_SUCCESS; +} + +/*! \brief Install VTY commands for FSM introspection + * This installs a couple of VTY commands for introspection of FSM + * classes as well as FSM instances. Call this once from your + * application if you want to support those commands. */ +void osmo_fsm_vty_add_cmds(void) +{ + install_element_ve(&show_fsm_cmd); + install_element_ve(&show_fsms_cmd); + install_element_ve(&show_fsm_inst_cmd); + install_element_ve(&show_fsm_insts_cmd); +} -- To view, visit https://gerrit.osmocom.org/1541 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I89212e4f149f019099115a85bab353c04170df90 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Jan 7 12:44:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 7 Jan 2017 12:44:05 +0000 Subject: libosmocore[master]: Extend Kc buffer In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 I'm not quite sure if it is worth introducing potential breakage right now as long as we don't yet have any actual A5/4 or GEA4 implementation that follows right after this patch. -- To view, visit https://gerrit.osmocom.org/1538 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8d347bbeadc14cbc7306ea6e9b73e4a1c8c8cb21 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Jan 7 14:56:28 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 7 Jan 2017 14:56:28 +0000 Subject: [PATCH] libosmocore[master]: libosmocoding: migrate transcoding routines from OsmoBTS In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/933 to look at the new patch set (#12). libosmocoding: migrate transcoding routines from OsmoBTS There are some projects, such as GR-GSM and OsmocomBB, which would benefit from using one shared implementation of GSM 05.03 code. So, this commit introduces a new sub-library called libosmocoding, which (for now) provides GSM, GPRS and EDGE transcoding routines, migrated from OsmoBTS. The original GSM 05.03 code from OsmoBTS was relicensed under GPLv2-or-later with permission of copyright holders (Andreas Eversberg, Alexander Chemeris and Tom Tsou). The following data types are currently supported: - xCCH - PDTCH (CS 1-4 and MCS 1-9) - TCH/FR - TCH/HR - TCH/AFS - RCH/AHS - RACH - SCH Change-Id: I0c3256b87686d878e4e716d12393cad5924fdfa1 --- M .gitignore A Doxyfile.coding.in M Makefile.am M configure.ac M debian/control M include/Makefile.am A include/osmocom/coding/gsm0503_coding.h A include/osmocom/coding/gsm0503_interleaving.h A include/osmocom/coding/gsm0503_mapping.h A include/osmocom/coding/gsm0503_parity.h A include/osmocom/coding/gsm0503_tables.h M include/osmocom/gsm/gsm0503.h A libosmocoding.pc.in A src/coding/Makefile.am A src/coding/gsm0503_coding.c A src/coding/gsm0503_interleaving.c A src/coding/gsm0503_mapping.c A src/coding/gsm0503_parity.c A src/coding/gsm0503_tables.c A src/coding/libosmocoding.map M src/gsm/libosmogsm.map M tests/Makefile.am A tests/coding/coding_test.c A tests/coding/coding_test.ok M tests/testsuite.at M utils/conv_codes_gsm.py 26 files changed, 8,112 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/33/933/12 -- To view, visit https://gerrit.osmocom.org/933 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0c3256b87686d878e4e716d12393cad5924fdfa1 Gerrit-PatchSet: 12 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Tom Tsou Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt From gerrit-no-reply at lists.osmocom.org Sat Jan 7 17:22:55 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 7 Jan 2017 17:22:55 +0000 Subject: [PATCH] libosmocore[master]: libosmocoding: migrate transcoding routines from OsmoBTS In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/933 to look at the new patch set (#13). libosmocoding: migrate transcoding routines from OsmoBTS There are some projects, such as GR-GSM and OsmocomBB, which would benefit from using one shared implementation of GSM 05.03 code. So, this commit introduces a new sub-library called libosmocoding, which (for now) provides GSM, GPRS and EDGE transcoding routines, migrated from OsmoBTS. The original GSM 05.03 code from OsmoBTS was relicensed under GPLv2-or-later with permission of copyright holders (Andreas Eversberg, Alexander Chemeris and Tom Tsou). The following data types are currently supported: - xCCH - PDTCH (CS 1-4 and MCS 1-9) - TCH/FR - TCH/HR - TCH/AFS - RCH/AHS - RACH - SCH Change-Id: I0c3256b87686d878e4e716d12393cad5924fdfa1 --- M .gitignore A Doxyfile.coding.in M Makefile.am M configure.ac M debian/control M include/Makefile.am A include/osmocom/coding/gsm0503_coding.h A include/osmocom/coding/gsm0503_interleaving.h A include/osmocom/coding/gsm0503_mapping.h A include/osmocom/coding/gsm0503_parity.h A include/osmocom/coding/gsm0503_tables.h M include/osmocom/gsm/gsm0503.h A libosmocoding.pc.in A src/coding/Makefile.am A src/coding/gsm0503_coding.c A src/coding/gsm0503_interleaving.c A src/coding/gsm0503_mapping.c A src/coding/gsm0503_parity.c A src/coding/gsm0503_tables.c A src/coding/libosmocoding.map M src/gsm/libosmogsm.map M tests/Makefile.am A tests/coding/coding_test.c A tests/coding/coding_test.ok M tests/testsuite.at M utils/conv_codes_gsm.py 26 files changed, 8,126 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/33/933/13 -- To view, visit https://gerrit.osmocom.org/933 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0c3256b87686d878e4e716d12393cad5924fdfa1 Gerrit-PatchSet: 13 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Tom Tsou Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt From gerrit-no-reply at lists.osmocom.org Sat Jan 7 17:46:16 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 7 Jan 2017 17:46:16 +0000 Subject: [PATCH] libosmocore[master]: libosmocoding: migrate transcoding routines from OsmoBTS In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/933 to look at the new patch set (#14). libosmocoding: migrate transcoding routines from OsmoBTS There are some projects, such as GR-GSM and OsmocomBB, which would benefit from using one shared implementation of GSM 05.03 code. So, this commit introduces a new sub-library called libosmocoding, which (for now) provides GSM, GPRS and EDGE transcoding routines, migrated from OsmoBTS. The original GSM 05.03 code from OsmoBTS was relicensed under GPLv2-or-later with permission of copyright holders (Andreas Eversberg, Alexander Chemeris and Tom Tsou). The following data types are currently supported: - xCCH - PDTCH (CS 1-4 and MCS 1-9) - TCH/FR - TCH/HR - TCH/AFS - RCH/AHS - RACH - SCH Change-Id: I0c3256b87686d878e4e716d12393cad5924fdfa1 --- M .gitignore A Doxyfile.coding.in M Makefile.am M configure.ac M debian/control M include/Makefile.am A include/osmocom/coding/gsm0503_coding.h A include/osmocom/coding/gsm0503_interleaving.h A include/osmocom/coding/gsm0503_mapping.h A include/osmocom/coding/gsm0503_parity.h A include/osmocom/coding/gsm0503_tables.h M include/osmocom/gsm/gsm0503.h A libosmocoding.pc.in A src/coding/Makefile.am A src/coding/gsm0503_coding.c A src/coding/gsm0503_interleaving.c A src/coding/gsm0503_mapping.c A src/coding/gsm0503_parity.c A src/coding/gsm0503_tables.c A src/coding/libosmocoding.map M src/gsm/libosmogsm.map M tests/Makefile.am A tests/coding/coding_test.c A tests/coding/coding_test.ok M tests/testsuite.at M utils/conv_codes_gsm.py 26 files changed, 8,126 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/33/933/14 -- To view, visit https://gerrit.osmocom.org/933 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0c3256b87686d878e4e716d12393cad5924fdfa1 Gerrit-PatchSet: 14 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Tom Tsou Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt From gerrit-no-reply at lists.osmocom.org Sun Jan 8 11:03:39 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Sun, 8 Jan 2017 11:03:39 +0000 Subject: [MERGED] osmo-bts[master]: Add Abis OML failure event reporting In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Add Abis OML failure event reporting ...................................................................... Add Abis OML failure event reporting Send 3GPP TS 12.21 ? 8.8.2 Abis/OML failure event report. Change-Id: Ib1170edca2207752984a554d7a6a57c224f6d5f5 Related: OS#1615 --- M include/osmo-bts/oml.h M src/common/main.c M src/common/oml.c 3 files changed, 35 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmo-bts/oml.h b/include/osmo-bts/oml.h index 9f49444..217ec64 100644 --- a/include/osmo-bts/oml.h +++ b/include/osmo-bts/oml.h @@ -1,6 +1,8 @@ #ifndef _OML_H #define _OML_H +#include + struct gsm_bts; struct gsm_abis_mo; struct msgb; @@ -42,4 +44,8 @@ int oml_set_lchan_t200(struct gsm_lchan *lchan); extern const unsigned int oml_default_t200_ms[7]; +/* Transmit failure event report */ +int oml_tx_failure_event_rep(struct gsm_abis_mo *mo, uint16_t cause_value, + const char *fmt, ...); + #endif // _OML_H */ diff --git a/src/common/main.c b/src/common/main.c index 1b2549e..f99f196 100644 --- a/src/common/main.c +++ b/src/common/main.c @@ -50,6 +50,7 @@ #include #include #include +#include int quit = 0; static const char *config_file = "osmo-bts.cfg"; @@ -181,13 +182,21 @@ switch (signal) { case SIGINT: //osmo_signal_dispatch(SS_GLOBAL, S_GLOBAL_SHUTDOWN, NULL); - if (!quit) + if (!quit) { + oml_tx_failure_event_rep(&bts->mo, + OSMO_EVT_CRIT_PROC_STOP, + "BTS: SIGINT received -> " + "shutdown\n"); bts_shutdown(bts, "SIGINT"); + } quit++; break; case SIGABRT: case SIGUSR1: case SIGUSR2: + oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_CRIT_PROC_STOP, + "BTS: signal %s received\n", + strsignal(signal)); talloc_report_full(tall_bts_ctx, stderr); break; default: diff --git a/src/common/oml.c b/src/common/oml.c index 0700aa2..870ef3c 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -1140,6 +1140,25 @@ return ret; } +/* 3GPP TS 12.21 ? 8.8.2 */ +int oml_tx_failure_event_rep(struct gsm_abis_mo *mo, uint16_t cause_value, + const char *fmt, ...) +{ + struct msgb *nmsg; + va_list ap; + + va_start(ap, fmt); + nmsg = abis_nm_fail_evt_rep(NM_EVT_PROC_FAIL, NM_SEVER_CRITICAL, + NM_PCAUSE_T_MANUF, cause_value, fmt, ap); + LOGP(DOML, LOGL_INFO, fmt, ap); + va_end(ap); + + if (!nmsg) + return -ENOMEM; + + return oml_mo_send_msg(mo, nmsg, NM_MT_FAILURE_EVENT_REP); +} + int oml_init(void) { DEBUGP(DOML, "Initializing OML attribute definitions\n"); -- To view, visit https://gerrit.osmocom.org/1522 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib1170edca2207752984a554d7a6a57c224f6d5f5 Gerrit-PatchSet: 5 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Minh-Quang Nguyen From gerrit-no-reply at lists.osmocom.org Sun Jan 8 11:15:28 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Sun, 8 Jan 2017 11:15:28 +0000 Subject: [MERGED] osmo-bts[master]: Alarm on various errors In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Alarm on various errors ...................................................................... Alarm on various errors Send OML Failure Report for unsupported BTS attributes and other errors. Change-Id: Ic163bcfb6361a8ebd39e0bc0f238ef51e2cb214e Related: OS#1615 --- M src/common/bts.c M src/common/l1sap.c M src/common/oml.c M src/common/rsl.c 4 files changed, 85 insertions(+), 8 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/bts.c b/src/common/bts.c index d249137..efefb86 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -256,6 +256,7 @@ { struct e1inp_sign_link *link = trx->rsl_link; uint8_t radio_state = link ? NM_OPSTATE_ENABLED : NM_OPSTATE_DISABLED; + int rc; LOGP(DSUM, LOGL_INFO, "RSL link (TRX %02x) state changed to %s, sending Status'.\n", trx->nr, link ? "up" : "down"); @@ -263,10 +264,13 @@ oml_mo_state_chg(&trx->mo, radio_state, NM_AVSTATE_OK); if (link) - rsl_tx_rf_res(trx); + rc = rsl_tx_rf_res(trx); else - bts_model_trx_deact_rf(trx); - + rc = bts_model_trx_deact_rf(trx); + if (rc < 0) + oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_RSL_FAIL, link ? + "Failed to establish RSL link (%d)\n" : + "Failed to deactivate RF (%d)\n", rc); return 0; } diff --git a/src/common/l1sap.c b/src/common/l1sap.c index e6e53db..968237f 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -1024,6 +1025,10 @@ default: LOGP(DL1P, LOGL_NOTICE, "unknown prim %d op %d\n", l1sap->oph.primitive, l1sap->oph.operation); + oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, + "unknown prim %d op %d\n", + l1sap->oph.primitive, + l1sap->oph.operation); break; } diff --git a/src/common/oml.c b/src/common/oml.c index 870ef3c..8ccfcc6 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -345,19 +345,28 @@ DEBUGPC(DOML, "Rx SET BTS ATTR\n"); rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); - if (rc < 0) + if (rc < 0) { + oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, + "New value for Attribute not supported\n"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); + } /* Test for globally unsupported stuff here */ if (TLVP_PRESENT(&tp, NM_ATT_BCCH_ARFCN)) { uint16_t arfcn = ntohs(tlvp_val16_unal(&tp, NM_ATT_BCCH_ARFCN)); if (arfcn > 1024) { + oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_WARN_SW_WARN, + "Given ARFCN %d is not supported.\n", + arfcn); LOGP(DOML, LOGL_NOTICE, "Given ARFCN %d is not supported.\n", arfcn); return oml_fom_ack_nack(msg, NM_NACK_FREQ_NOTAVAIL); } } /* 9.4.52 Starting Time */ if (TLVP_PRESENT(&tp, NM_ATT_START_TIME)) { + oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, + "NM_ATT_START_TIME Attribute not " + "supported\n"); return oml_fom_ack_nack(msg, NM_NACK_SPEC_IMPL_NOTSUPP); } @@ -494,8 +503,12 @@ DEBUGPC(DOML, "Rx SET RADIO CARRIER ATTR\n"); rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); - if (rc < 0) + if (rc < 0) { + oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UNSUP_ATTR, + "New value for Set Radio Attribute not" + " supported\n"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); + } /* merge existing BTS attributes with new attributes */ tp_merged = osmo_tlvp_copy(trx->mo.nm_attr, trx->bts); @@ -656,8 +669,12 @@ DEBUGPC(DOML, "Rx SET CHAN ATTR\n"); rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); - if (rc < 0) + if (rc < 0) { + oml_tx_failure_event_rep(&ts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, + "New value for Set Channel Attribute " + "not supported\n"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); + } /* 9.4.21 HSN... */ /* 9.4.27 MAIO */ @@ -791,11 +808,29 @@ if (msgb_l2len(msg) < sizeof(*foh)) { LOGP(DOML, LOGL_NOTICE, "Formatted O&M message too short\n"); + trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr); + if (trx) { + trx->mo.obj_inst.bts_nr = 0; + trx->mo.obj_inst.trx_nr = foh->obj_inst.trx_nr; + trx->mo.obj_inst.ts_nr = 0xff; + oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, + "Formatted O&M message too short\n"); + } return -EIO; } if (foh->obj_inst.bts_nr != 0 && foh->obj_inst.bts_nr != 0xff) { LOGP(DOML, LOGL_INFO, "Formatted O&M with BTS %d out of range.\n", foh->obj_inst.bts_nr); + trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr); + if (trx) { + trx->mo.obj_inst.bts_nr = 0; + trx->mo.obj_inst.trx_nr = foh->obj_inst.trx_nr; + trx->mo.obj_inst.ts_nr = 0xff; + oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, + "Formatted O&M with BTS %d out" + " of range (0:0xFF).\n", + foh->obj_inst.bts_nr); + } return oml_fom_ack_nack(msg, NM_NACK_BTSNR_UNKN); } @@ -829,6 +864,20 @@ default: LOGP(DOML, LOGL_INFO, "unknown Formatted O&M msg_type 0x%02x\n", foh->msg_type); + trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr); + if (trx) { + trx->mo.obj_inst.bts_nr = 0; + trx->mo.obj_inst.trx_nr = foh->obj_inst.trx_nr; + trx->mo.obj_inst.ts_nr = 0xff; + oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, + "unknown Formatted O&M " + "msg_type 0x%02x\n", + foh->msg_type); + } else + oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UKWN_MSG, + "unknown Formatted O&M " + "msg_type 0x%02x\n", + foh->msg_type); ret = oml_fom_ack_nack(msg, NM_NACK_MSGTYPE_INVAL); } @@ -997,8 +1046,13 @@ DEBUGPC(DOML, "Rx IPA SET ATTR\n"); rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); - if (rc < 0) + if (rc < 0) { + mo = gsm_objclass2mo(bts, foh->obj_class, &foh->obj_inst); + oml_tx_failure_event_rep(mo, OSMO_EVT_MAJ_UNSUP_ATTR, + "New value for IPAC Set Attribute not " + "supported\n"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); + } /* Resolve MO by obj_class/obj_inst */ mo = gsm_objclass2mo(bts, foh->obj_class, &foh->obj_inst); diff --git a/src/common/rsl.c b/src/common/rsl.c index 9e9cbb6..be1861c 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -401,7 +401,11 @@ rc = paging_add_identity(btsb->paging_state, paging_group, identity_lv, chan_needed); if (rc < 0) { - /* FIXME: notfiy the BSC somehow ?*/ + /* FIXME: notfiy the BSC on other errors? */ + if (rc == -ENOSPC && trx) + oml_tx_failure_event_rep(&trx->mo, + OSMO_EVT_MIN_PAG_TAB_FULL, + "BTS paging table is full\n"); } pcu_tx_pag_req(identity_lv, chan_needed); @@ -1649,6 +1653,11 @@ LOGP(DRSL, LOGL_ERROR, "%s IPAC Failed to create RTP/RTCP sockets\n", gsm_lchan_name(lchan)); + oml_tx_failure_event_rep(&lchan->ts->trx->mo, + OSMO_EVT_CRIT_RTP_TOUT, + "%s IPAC Failed to create " + "RTP/RTCP sockets\n", + gsm_lchan_name(lchan)); return tx_ipac_XXcx_nack(lchan, RSL_ERR_RES_UNAVAIL, inc_ip_port, dch->c.msg_type); } @@ -1688,6 +1697,11 @@ LOGP(DRSL, LOGL_ERROR, "%s IPAC Failed to bind RTP/RTCP sockets\n", gsm_lchan_name(lchan)); + oml_tx_failure_event_rep(&lchan->ts->trx->mo, + OSMO_EVT_CRIT_RTP_TOUT, + "%s IPAC Failed to bind " + "RTP/RTCP sockets\n", + gsm_lchan_name(lchan)); osmo_rtp_socket_free(lchan->abis_ip.rtp_socket); lchan->abis_ip.rtp_socket = NULL; msgb_queue_flush(&lchan->dl_tch_queue); -- To view, visit https://gerrit.osmocom.org/1525 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic163bcfb6361a8ebd39e0bc0f238ef51e2cb214e Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Minh-Quang Nguyen From gerrit-no-reply at lists.osmocom.org Sun Jan 8 11:31:05 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Sun, 8 Jan 2017 11:31:05 +0000 Subject: libosmocore[master]: libosmocoding: migrate transcoding routines from OsmoBTS In-Reply-To: References: Message-ID: Patch Set 14: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/933 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0c3256b87686d878e4e716d12393cad5924fdfa1 Gerrit-PatchSet: 14 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Tom Tsou Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Jan 8 11:56:38 2017 From: gerrit-no-reply at lists.osmocom.org (tnt) Date: Sun, 8 Jan 2017 11:56:38 +0000 Subject: libosmocore[master]: libosmocoding: migrate transcoding routines from OsmoBTS In-Reply-To: References: Message-ID: Patch Set 14: Code-Review-1 No ... the "fix" for the test is not fixing the root cause, merely work around it. Find out _why_ those values are undefined and fix _that_. -- To view, visit https://gerrit.osmocom.org/933 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0c3256b87686d878e4e716d12393cad5924fdfa1 Gerrit-PatchSet: 14 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Tom Tsou Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Jan 8 11:59:36 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 8 Jan 2017 11:59:36 +0000 Subject: libosmocore[master]: libosmocoding: migrate transcoding routines from OsmoBTS In-Reply-To: References: Message-ID: Patch Set 14: > No ... the "fix" for the test is not fixing the root cause, merely > work around it. Find out _why_ those values are undefined and fix > _that_. Of course, I'll finish fix the problem! Right now I am on my way at another city... -- To view, visit https://gerrit.osmocom.org/933 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0c3256b87686d878e4e716d12393cad5924fdfa1 Gerrit-PatchSet: 14 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Tom Tsou Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Jan 8 15:48:05 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 8 Jan 2017 15:48:05 +0000 Subject: [PATCH] libosmocore[master]: tests/conv: separate both test codes and vectors Message-ID: Review at https://gerrit.osmocom.org/1542 tests/conv: separate both test codes and vectors Before adding new test vectors, it would be better to separate non GSM related convolutional code definitions and existing test vectors from the test logic. This change introduces the following new files: - conv_codes.c - the codes, which aren't preset in libosmocore; - conv_test_vectors.c - contains the test vectors array; - conv_test.h - header file, which makes separated codes and vectors accessible from the 'conv_test.c'. Change-Id: Iffee60ad19d38bcfdce2e5f47a4e886f6f74e271 --- M tests/Makefile.am A tests/conv/conv_codes.c M tests/conv/conv_test.c A tests/conv/conv_test.h A tests/conv/conv_test_vectors.c 5 files changed, 262 insertions(+), 221 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/42/1542/1 diff --git a/tests/Makefile.am b/tests/Makefile.am index b9eb8f2..b9be650 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -54,7 +54,7 @@ bits_bitcomp_test_SOURCES = bits/bitcomp_test.c bits_bitcomp_test_LDADD = $(top_builddir)/src/libosmocore.la -conv_conv_test_SOURCES = conv/conv_test.c +conv_conv_test_SOURCES = conv/conv_test.c conv/conv_codes.c conv/conv_test_vectors.c conv_conv_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gsm/libgsmint.la gsm0808_gsm0808_test_SOURCES = gsm0808/gsm0808_test.c @@ -178,6 +178,8 @@ oap/oap_test.ok fsm/fsm_test.ok fsm/fsm_test.err \ write_queue/wqueue_test.ok +EXTRA_DIST += conv/conv_test.h + DISTCLEANFILES = atconfig atlocal TESTSUITE = $(srcdir)/testsuite diff --git a/tests/conv/conv_codes.c b/tests/conv/conv_codes.c new file mode 100644 index 0000000..8bcf05f --- /dev/null +++ b/tests/conv/conv_codes.c @@ -0,0 +1,141 @@ +#include +#include + +#include "conv_test.h" + +static const uint8_t xcch_state[][2] = { + { 0, 1 }, { 2, 3 }, { 4, 5 }, { 6, 7 }, + { 8, 9 }, { 10, 11 }, { 12, 13 }, { 14, 15 }, + { 0, 1 }, { 2, 3 }, { 4, 5 }, { 6, 7 }, + { 8, 9 }, { 10, 11 }, { 12, 13 }, { 14, 15 }, +}; + +static const uint8_t xcch_output[][2] = { + { 0, 3 }, { 1, 2 }, { 0, 3 }, { 1, 2 }, + { 3, 0 }, { 2, 1 }, { 3, 0 }, { 2, 1 }, + { 3, 0 }, { 2, 1 }, { 3, 0 }, { 2, 1 }, + { 0, 3 }, { 1, 2 }, { 0, 3 }, { 1, 2 }, +}; + +/** + * Random code + * Non recursive code, direct truncation, non-punctured + */ +const struct osmo_conv_code conv_trunc = { + .N = 2, + .K = 5, + .len = 224, + .term = CONV_TERM_TRUNCATION, + .next_output = xcch_output, + .next_state = xcch_state, +}; + +/** + * GMR-1 TCH3 Speech + * Non recursive code, tail-biting, punctured + */ +static const uint8_t conv_gmr1_tch3_speech_next_output[][2] = { + { 0, 3 }, { 1, 2 }, { 3, 0 }, { 2, 1 }, + { 3, 0 }, { 2, 1 }, { 0, 3 }, { 1, 2 }, + { 0, 3 }, { 1, 2 }, { 3, 0 }, { 2, 1 }, + { 3, 0 }, { 2, 1 }, { 0, 3 }, { 1, 2 }, + { 2, 1 }, { 3, 0 }, { 1, 2 }, { 0, 3 }, + { 1, 2 }, { 0, 3 }, { 2, 1 }, { 3, 0 }, + { 2, 1 }, { 3, 0 }, { 1, 2 }, { 0, 3 }, + { 1, 2 }, { 0, 3 }, { 2, 1 }, { 3, 0 }, + { 3, 0 }, { 2, 1 }, { 0, 3 }, { 1, 2 }, + { 0, 3 }, { 1, 2 }, { 3, 0 }, { 2, 1 }, + { 3, 0 }, { 2, 1 }, { 0, 3 }, { 1, 2 }, + { 0, 3 }, { 1, 2 }, { 3, 0 }, { 2, 1 }, + { 1, 2 }, { 0, 3 }, { 2, 1 }, { 3, 0 }, + { 2, 1 }, { 3, 0 }, { 1, 2 }, { 0, 3 }, + { 1, 2 }, { 0, 3 }, { 2, 1 }, { 3, 0 }, + { 2, 1 }, { 3, 0 }, { 1, 2 }, { 0, 3 }, +}; + +static const uint8_t conv_gmr1_tch3_speech_next_state[][2] = { + { 0, 1 }, { 2, 3 }, { 4, 5 }, { 6, 7 }, + { 8, 9 }, { 10, 11 }, { 12, 13 }, { 14, 15 }, + { 16, 17 }, { 18, 19 }, { 20, 21 }, { 22, 23 }, + { 24, 25 }, { 26, 27 }, { 28, 29 }, { 30, 31 }, + { 32, 33 }, { 34, 35 }, { 36, 37 }, { 38, 39 }, + { 40, 41 }, { 42, 43 }, { 44, 45 }, { 46, 47 }, + { 48, 49 }, { 50, 51 }, { 52, 53 }, { 54, 55 }, + { 56, 57 }, { 58, 59 }, { 60, 61 }, { 62, 63 }, + { 0, 1 }, { 2, 3 }, { 4, 5 }, { 6, 7 }, + { 8, 9 }, { 10, 11 }, { 12, 13 }, { 14, 15 }, + { 16, 17 }, { 18, 19 }, { 20, 21 }, { 22, 23 }, + { 24, 25 }, { 26, 27 }, { 28, 29 }, { 30, 31 }, + { 32, 33 }, { 34, 35 }, { 36, 37 }, { 38, 39 }, + { 40, 41 }, { 42, 43 }, { 44, 45 }, { 46, 47 }, + { 48, 49 }, { 50, 51 }, { 52, 53 }, { 54, 55 }, + { 56, 57 }, { 58, 59 }, { 60, 61 }, { 62, 63 }, +}; + +static const int conv_gmr1_tch3_speech_puncture[] = { + 3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 43, 47, + 51, 55, 59, 63, 67, 71, 75, 79, 83, 87, 91, 95, + -1, +}; + +const struct osmo_conv_code conv_gmr1_tch3_speech = { + .N = 2, + .K = 7, + .len = 48, + .term = CONV_TERM_TAIL_BITING, + .next_output = conv_gmr1_tch3_speech_next_output, + .next_state = conv_gmr1_tch3_speech_next_state, + .puncture = conv_gmr1_tch3_speech_puncture, +}; + + +/** + * WiMax FCH + * Non recursive code, tail-biting, non-punctured + */ +static const uint8_t conv_wimax_fch_next_output[][2] = { + { 0, 3 }, { 2, 1 }, { 3, 0 }, { 1, 2 }, + { 3, 0 }, { 1, 2 }, { 0, 3 }, { 2, 1 }, + { 0, 3 }, { 2, 1 }, { 3, 0 }, { 1, 2 }, + { 3, 0 }, { 1, 2 }, { 0, 3 }, { 2, 1 }, + { 1, 2 }, { 3, 0 }, { 2, 1 }, { 0, 3 }, + { 2, 1 }, { 0, 3 }, { 1, 2 }, { 3, 0 }, + { 1, 2 }, { 3, 0 }, { 2, 1 }, { 0, 3 }, + { 2, 1 }, { 0, 3 }, { 1, 2 }, { 3, 0 }, + { 3, 0 }, { 1, 2 }, { 0, 3 }, { 2, 1 }, + { 0, 3 }, { 2, 1 }, { 3, 0 }, { 1, 2 }, + { 3, 0 }, { 1, 2 }, { 0, 3 }, { 2, 1 }, + { 0, 3 }, { 2, 1 }, { 3, 0 }, { 1, 2 }, + { 2, 1 }, { 0, 3 }, { 1, 2 }, { 3, 0 }, + { 1, 2 }, { 3, 0 }, { 2, 1 }, { 0, 3 }, + { 2, 1 }, { 0, 3 }, { 1, 2 }, { 3, 0 }, + { 1, 2 }, { 3, 0 }, { 2, 1 }, { 0, 3 }, +}; + +static const uint8_t conv_wimax_fch_next_state[][2] = { + { 0, 1 }, { 2, 3 }, { 4, 5 }, { 6, 7 }, + { 8, 9 }, { 10, 11 }, { 12, 13 }, { 14, 15 }, + { 16, 17 }, { 18, 19 }, { 20, 21 }, { 22, 23 }, + { 24, 25 }, { 26, 27 }, { 28, 29 }, { 30, 31 }, + { 32, 33 }, { 34, 35 }, { 36, 37 }, { 38, 39 }, + { 40, 41 }, { 42, 43 }, { 44, 45 }, { 46, 47 }, + { 48, 49 }, { 50, 51 }, { 52, 53 }, { 54, 55 }, + { 56, 57 }, { 58, 59 }, { 60, 61 }, { 62, 63 }, + { 0, 1 }, { 2, 3 }, { 4, 5 }, { 6, 7 }, + { 8, 9 }, { 10, 11 }, { 12, 13 }, { 14, 15 }, + { 16, 17 }, { 18, 19 }, { 20, 21 }, { 22, 23 }, + { 24, 25 }, { 26, 27 }, { 28, 29 }, { 30, 31 }, + { 32, 33 }, { 34, 35 }, { 36, 37 }, { 38, 39 }, + { 40, 41 }, { 42, 43 }, { 44, 45 }, { 46, 47 }, + { 48, 49 }, { 50, 51 }, { 52, 53 }, { 54, 55 }, + { 56, 57 }, { 58, 59 }, { 60, 61 }, { 62, 63 }, +}; + +const struct osmo_conv_code conv_wimax_fch = { + .N = 2, + .K = 7, + .len = 48, + .term = CONV_TERM_TAIL_BITING, + .next_output = conv_wimax_fch_next_output, + .next_state = conv_wimax_fch_next_state, +}; diff --git a/tests/conv/conv_test.c b/tests/conv/conv_test.c index 608f829..55f4c0e 100644 --- a/tests/conv/conv_test.c +++ b/tests/conv/conv_test.c @@ -8,135 +8,7 @@ #include #include -#define MAX_LEN_BITS 512 -#define MAX_LEN_BYTES (512/8) - - -/* ------------------------------------------------------------------------ */ -/* Test codes */ -/* ------------------------------------------------------------------------ */ - -/* GMR-1 TCH3 Speech -> Non recursive code, tail-biting, punctured */ -static const uint8_t conv_gmr1_tch3_speech_next_output[][2] = { - { 0, 3 }, { 1, 2 }, { 3, 0 }, { 2, 1 }, - { 3, 0 }, { 2, 1 }, { 0, 3 }, { 1, 2 }, - { 0, 3 }, { 1, 2 }, { 3, 0 }, { 2, 1 }, - { 3, 0 }, { 2, 1 }, { 0, 3 }, { 1, 2 }, - { 2, 1 }, { 3, 0 }, { 1, 2 }, { 0, 3 }, - { 1, 2 }, { 0, 3 }, { 2, 1 }, { 3, 0 }, - { 2, 1 }, { 3, 0 }, { 1, 2 }, { 0, 3 }, - { 1, 2 }, { 0, 3 }, { 2, 1 }, { 3, 0 }, - { 3, 0 }, { 2, 1 }, { 0, 3 }, { 1, 2 }, - { 0, 3 }, { 1, 2 }, { 3, 0 }, { 2, 1 }, - { 3, 0 }, { 2, 1 }, { 0, 3 }, { 1, 2 }, - { 0, 3 }, { 1, 2 }, { 3, 0 }, { 2, 1 }, - { 1, 2 }, { 0, 3 }, { 2, 1 }, { 3, 0 }, - { 2, 1 }, { 3, 0 }, { 1, 2 }, { 0, 3 }, - { 1, 2 }, { 0, 3 }, { 2, 1 }, { 3, 0 }, - { 2, 1 }, { 3, 0 }, { 1, 2 }, { 0, 3 }, -}; - -static const uint8_t conv_gmr1_tch3_speech_next_state[][2] = { - { 0, 1 }, { 2, 3 }, { 4, 5 }, { 6, 7 }, - { 8, 9 }, { 10, 11 }, { 12, 13 }, { 14, 15 }, - { 16, 17 }, { 18, 19 }, { 20, 21 }, { 22, 23 }, - { 24, 25 }, { 26, 27 }, { 28, 29 }, { 30, 31 }, - { 32, 33 }, { 34, 35 }, { 36, 37 }, { 38, 39 }, - { 40, 41 }, { 42, 43 }, { 44, 45 }, { 46, 47 }, - { 48, 49 }, { 50, 51 }, { 52, 53 }, { 54, 55 }, - { 56, 57 }, { 58, 59 }, { 60, 61 }, { 62, 63 }, - { 0, 1 }, { 2, 3 }, { 4, 5 }, { 6, 7 }, - { 8, 9 }, { 10, 11 }, { 12, 13 }, { 14, 15 }, - { 16, 17 }, { 18, 19 }, { 20, 21 }, { 22, 23 }, - { 24, 25 }, { 26, 27 }, { 28, 29 }, { 30, 31 }, - { 32, 33 }, { 34, 35 }, { 36, 37 }, { 38, 39 }, - { 40, 41 }, { 42, 43 }, { 44, 45 }, { 46, 47 }, - { 48, 49 }, { 50, 51 }, { 52, 53 }, { 54, 55 }, - { 56, 57 }, { 58, 59 }, { 60, 61 }, { 62, 63 }, -}; - -static const int conv_gmr1_tch3_speech_puncture[] = { - 3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 43, 47, - 51, 55, 59, 63, 67, 71, 75, 79, 83, 87, 91, 95, - -1, /* end */ -}; - -static const struct osmo_conv_code conv_gmr1_tch3_speech = { - .N = 2, - .K = 7, - .len = 48, - .term = CONV_TERM_TAIL_BITING, - .next_output = conv_gmr1_tch3_speech_next_output, - .next_state = conv_gmr1_tch3_speech_next_state, - .puncture = conv_gmr1_tch3_speech_puncture, -}; - - -/* WiMax FCH -> Non recursive code, tail-biting, non-punctured */ -static const uint8_t conv_wimax_fch_next_output[][2] = { - { 0, 3 }, { 2, 1 }, { 3, 0 }, { 1, 2 }, - { 3, 0 }, { 1, 2 }, { 0, 3 }, { 2, 1 }, - { 0, 3 }, { 2, 1 }, { 3, 0 }, { 1, 2 }, - { 3, 0 }, { 1, 2 }, { 0, 3 }, { 2, 1 }, - { 1, 2 }, { 3, 0 }, { 2, 1 }, { 0, 3 }, - { 2, 1 }, { 0, 3 }, { 1, 2 }, { 3, 0 }, - { 1, 2 }, { 3, 0 }, { 2, 1 }, { 0, 3 }, - { 2, 1 }, { 0, 3 }, { 1, 2 }, { 3, 0 }, - { 3, 0 }, { 1, 2 }, { 0, 3 }, { 2, 1 }, - { 0, 3 }, { 2, 1 }, { 3, 0 }, { 1, 2 }, - { 3, 0 }, { 1, 2 }, { 0, 3 }, { 2, 1 }, - { 0, 3 }, { 2, 1 }, { 3, 0 }, { 1, 2 }, - { 2, 1 }, { 0, 3 }, { 1, 2 }, { 3, 0 }, - { 1, 2 }, { 3, 0 }, { 2, 1 }, { 0, 3 }, - { 2, 1 }, { 0, 3 }, { 1, 2 }, { 3, 0 }, - { 1, 2 }, { 3, 0 }, { 2, 1 }, { 0, 3 }, -}; - -static const uint8_t conv_wimax_fch_next_state[][2] = { - { 0, 1 }, { 2, 3 }, { 4, 5 }, { 6, 7 }, - { 8, 9 }, { 10, 11 }, { 12, 13 }, { 14, 15 }, - { 16, 17 }, { 18, 19 }, { 20, 21 }, { 22, 23 }, - { 24, 25 }, { 26, 27 }, { 28, 29 }, { 30, 31 }, - { 32, 33 }, { 34, 35 }, { 36, 37 }, { 38, 39 }, - { 40, 41 }, { 42, 43 }, { 44, 45 }, { 46, 47 }, - { 48, 49 }, { 50, 51 }, { 52, 53 }, { 54, 55 }, - { 56, 57 }, { 58, 59 }, { 60, 61 }, { 62, 63 }, - { 0, 1 }, { 2, 3 }, { 4, 5 }, { 6, 7 }, - { 8, 9 }, { 10, 11 }, { 12, 13 }, { 14, 15 }, - { 16, 17 }, { 18, 19 }, { 20, 21 }, { 22, 23 }, - { 24, 25 }, { 26, 27 }, { 28, 29 }, { 30, 31 }, - { 32, 33 }, { 34, 35 }, { 36, 37 }, { 38, 39 }, - { 40, 41 }, { 42, 43 }, { 44, 45 }, { 46, 47 }, - { 48, 49 }, { 50, 51 }, { 52, 53 }, { 54, 55 }, - { 56, 57 }, { 58, 59 }, { 60, 61 }, { 62, 63 }, -}; - -static const struct osmo_conv_code conv_wimax_fch = { - .N = 2, - .K = 7, - .len = 48, - .term = CONV_TERM_TAIL_BITING, - .next_output = conv_wimax_fch_next_output, - .next_state = conv_wimax_fch_next_state, -}; - -/* ------------------------------------------------------------------------ */ -/* Test vectors */ -/* ------------------------------------------------------------------------ */ - -struct conv_test_vector { - const char *name; - const struct osmo_conv_code *code; - int in_len; - int out_len; - int has_vec; - pbit_t vec_in[MAX_LEN_BYTES]; - pbit_t vec_out[MAX_LEN_BYTES]; -}; - -/* ------------------------------------------------------------------------ */ -/* Main */ -/* ------------------------------------------------------------------------ */ +#include "conv_test.h" static void fill_random(ubit_t *b, int n) @@ -151,94 +23,7 @@ const struct conv_test_vector *tst; ubit_t *bu0, *bu1; sbit_t *bs; - -/* Random code -> Non recursive code, direct truncation, non-punctured */ - const struct osmo_conv_code conv_trunc = { - .N = 2, - .K = 5, - .len = 224, - .term = CONV_TERM_TRUNCATION, - .next_output = gsm0503_xcch.next_output, - .next_state = gsm0503_xcch.next_state, - }; - - const struct conv_test_vector tests[] = { - { - .name = "GSM xCCH (non-recursive, flushed, not punctured)", - .code = &gsm0503_xcch, - .in_len = 224, - .out_len = 456, - .has_vec = 1, - .vec_in = { 0xf3, 0x1d, 0xb4, 0x0c, 0x4d, 0x1d, 0x9d, 0xae, - 0xc0, 0x0a, 0x42, 0x57, 0x13, 0x60, 0x80, 0x96, - 0xef, 0x23, 0x7e, 0x4c, 0x1d, 0x96, 0x24, 0x19, - 0x17, 0xf2, 0x44, 0x99 }, - .vec_out = { 0xe9, 0x4d, 0x70, 0xab, 0xa2, 0x87, 0xf0, 0xe7, - 0x04, 0x14, 0x7c, 0xab, 0xaf, 0x6b, 0xa1, 0x16, - 0xeb, 0x30, 0x00, 0xde, 0xc8, 0xfd, 0x0b, 0x85, - 0x80, 0x41, 0x4a, 0xcc, 0xd3, 0xc0, 0xd0, 0xb6, - 0x26, 0xe5, 0x4e, 0x32, 0x49, 0x69, 0x38, 0x17, - 0x33, 0xab, 0xaf, 0xb6, 0xc1, 0x08, 0xf3, 0x9f, - 0x8c, 0x75, 0x6a, 0x4e, 0x08, 0xc4, 0x20, 0x5f, - 0x8f }, - }, - { - .name = "GSM TCH/AFS 7.95 (recursive, flushed, punctured)", - .code = &gsm0503_tch_afs_7_95, - .in_len = 165, - .out_len = 448, - .has_vec = 1, - .vec_in = { 0x87, 0x66, 0xc3, 0x58, 0x09, 0xd4, 0x06, 0x59, - 0x10, 0xbf, 0x6b, 0x7f, 0xc8, 0xed, 0x72, 0xaa, - 0xc1, 0x3d, 0xf3, 0x1e, 0xb0 }, - .vec_out = { 0x92, 0xbc, 0xde, 0xa0, 0xde, 0xbe, 0x01, 0x2f, - 0xbe, 0xe4, 0x61, 0x32, 0x4d, 0x4f, 0xdc, 0x41, - 0x43, 0x0d, 0x15, 0xe0, 0x23, 0xdd, 0x18, 0x91, - 0xe5, 0x36, 0x2d, 0xb7, 0xd9, 0x78, 0xb8, 0xb1, - 0xb7, 0xcb, 0x2f, 0xc0, 0x52, 0x8f, 0xe2, 0x8c, - 0x6f, 0xa6, 0x79, 0x88, 0xed, 0x0c, 0x2e, 0x9e, - 0xa1, 0x5f, 0x45, 0x4a, 0xfb, 0xe6, 0x5a, 0x9c }, - }, - { - .name = "GMR-1 TCH3 Speech (non-recursive, tail-biting, punctured)", - .code = &conv_gmr1_tch3_speech, - .in_len = 48, - .out_len = 72, - .has_vec = 1, - .vec_in = { 0x4d, 0xcb, 0xfc, 0x72, 0xf4, 0x8c }, - .vec_out = { 0xc0, 0x86, 0x63, 0x4b, 0x8b, 0xd4, 0x6a, 0x76, 0xb2 }, - }, - { - .name = "WiMax FCH (non-recursive, tail-biting, not punctured)", - .code = &conv_wimax_fch, - .in_len = 48, - .out_len = 96, - .has_vec = 1, - .vec_in = { 0xfc, 0xa0, 0xa0, 0xfc, 0xa0, 0xa0 }, - .vec_out = { 0x19, 0x42, 0x8a, 0xed, 0x21, 0xed, 0x19, 0x42, - 0x8a, 0xed, 0x21, 0xed }, - }, - { - .name = "??? (non-recursive, direct truncation, not punctured)", - .code = &conv_trunc, - .in_len = 224, - .out_len = 448, - .has_vec = 1, - .vec_in = { 0xe5, 0xe0, 0x85, 0x7e, 0xf7, 0x08, 0x19, 0x5a, - 0xb9, 0xad, 0x82, 0x37, 0x98, 0x8b, 0x26, 0xb9, - 0x81, 0x26, 0x9c, 0x75, 0xaf, 0xf3, 0xcb, 0x07, - 0xac, 0x63, 0xe2, 0x9c, - }, - .vec_out = { 0xea, 0x3b, 0x55, 0x0c, 0xd3, 0xf7, 0x85, 0x69, - 0xe5, 0x79, 0x83, 0xd3, 0xc3, 0x9f, 0xb8, 0x61, - 0x21, 0x63, 0x51, 0x18, 0xac, 0xcd, 0x32, 0x49, - 0x53, 0x5c, 0x13, 0x1d, 0xbe, 0x05, 0x11, 0x63, - 0x5c, 0xc3, 0x42, 0x05, 0x1c, 0x68, 0x0a, 0xb4, - 0x61, 0x15, 0xaa, 0x4d, 0x94, 0xed, 0xb3, 0x3a, - 0x5d, 0x1b, 0x09, 0xc2, 0x99, 0x01, 0xec, 0x68 }, - }, - { /* end */ }, - }; + int i; srandom(time(NULL)); @@ -246,9 +31,10 @@ bu1 = malloc(sizeof(ubit_t) * MAX_LEN_BITS); bs = malloc(sizeof(sbit_t) * MAX_LEN_BITS); - for (tst=tests; tst->name; tst++) + for (i = 0; i < TEST_VEC_COUNT; i++) { - int i,l; + int j, l; + tst = &tests[i]; /* Test name */ printf("[+] Testing: %s\n", tst->name); @@ -323,7 +109,7 @@ /* Check random vector */ printf("[.] Random vector checks:\n"); - for (i=0; i<3; i++) { + for (j = 0; j < 3; j++) { printf("[..] Encoding / Decoding cycle : "); fill_random(bu0, tst->in_len); diff --git a/tests/conv/conv_test.h b/tests/conv/conv_test.h new file mode 100644 index 0000000..41e8686 --- /dev/null +++ b/tests/conv/conv_test.h @@ -0,0 +1,24 @@ +#pragma once + +#include + +#define TEST_VEC_COUNT 5 +#define MAX_LEN_BITS 512 +#define MAX_LEN_BYTES (512 / 8) + +struct conv_test_vector { + const char *name; + const struct osmo_conv_code *code; + int in_len; + int out_len; + int has_vec; + pbit_t vec_in[MAX_LEN_BYTES]; + pbit_t vec_out[MAX_LEN_BYTES]; +}; + +const struct conv_test_vector tests[TEST_VEC_COUNT]; + +/* Non GSM specific codes */ +const struct osmo_conv_code conv_gmr1_tch3_speech; +const struct osmo_conv_code conv_wimax_fch; +const struct osmo_conv_code conv_trunc; diff --git a/tests/conv/conv_test_vectors.c b/tests/conv/conv_test_vectors.c new file mode 100644 index 0000000..8b245d3 --- /dev/null +++ b/tests/conv/conv_test_vectors.c @@ -0,0 +1,88 @@ +#include +#include + +#include "conv_test.h" + +/** + * NOTE: Don't forget to increase the TEST_VEC_COUNT + * after adding new vectors! + */ +const struct conv_test_vector tests[TEST_VEC_COUNT] = { + /* GSM specific test vectors */ + { + .name = "GSM xCCH (non-recursive, flushed, not punctured)", + .code = &gsm0503_xcch, + .in_len = 224, + .out_len = 456, + .has_vec = 1, + .vec_in = { 0xf3, 0x1d, 0xb4, 0x0c, 0x4d, 0x1d, 0x9d, 0xae, + 0xc0, 0x0a, 0x42, 0x57, 0x13, 0x60, 0x80, 0x96, + 0xef, 0x23, 0x7e, 0x4c, 0x1d, 0x96, 0x24, 0x19, + 0x17, 0xf2, 0x44, 0x99 }, + .vec_out = { 0xe9, 0x4d, 0x70, 0xab, 0xa2, 0x87, 0xf0, 0xe7, + 0x04, 0x14, 0x7c, 0xab, 0xaf, 0x6b, 0xa1, 0x16, + 0xeb, 0x30, 0x00, 0xde, 0xc8, 0xfd, 0x0b, 0x85, + 0x80, 0x41, 0x4a, 0xcc, 0xd3, 0xc0, 0xd0, 0xb6, + 0x26, 0xe5, 0x4e, 0x32, 0x49, 0x69, 0x38, 0x17, + 0x33, 0xab, 0xaf, 0xb6, 0xc1, 0x08, 0xf3, 0x9f, + 0x8c, 0x75, 0x6a, 0x4e, 0x08, 0xc4, 0x20, 0x5f, + 0x8f }, + }, + { + .name = "GSM TCH/AFS 7.95 (recursive, flushed, punctured)", + .code = &gsm0503_tch_afs_7_95, + .in_len = 165, + .out_len = 448, + .has_vec = 1, + .vec_in = { 0x87, 0x66, 0xc3, 0x58, 0x09, 0xd4, 0x06, 0x59, + 0x10, 0xbf, 0x6b, 0x7f, 0xc8, 0xed, 0x72, 0xaa, + 0xc1, 0x3d, 0xf3, 0x1e, 0xb0 }, + .vec_out = { 0x92, 0xbc, 0xde, 0xa0, 0xde, 0xbe, 0x01, 0x2f, + 0xbe, 0xe4, 0x61, 0x32, 0x4d, 0x4f, 0xdc, 0x41, + 0x43, 0x0d, 0x15, 0xe0, 0x23, 0xdd, 0x18, 0x91, + 0xe5, 0x36, 0x2d, 0xb7, 0xd9, 0x78, 0xb8, 0xb1, + 0xb7, 0xcb, 0x2f, 0xc0, 0x52, 0x8f, 0xe2, 0x8c, + 0x6f, 0xa6, 0x79, 0x88, 0xed, 0x0c, 0x2e, 0x9e, + 0xa1, 0x5f, 0x45, 0x4a, 0xfb, 0xe6, 0x5a, 0x9c }, + }, + + /* Other test vectors */ + { + .name = "GMR-1 TCH3 Speech (non-recursive, tail-biting, punctured)", + .code = &conv_gmr1_tch3_speech, + .in_len = 48, + .out_len = 72, + .has_vec = 1, + .vec_in = { 0x4d, 0xcb, 0xfc, 0x72, 0xf4, 0x8c }, + .vec_out = { 0xc0, 0x86, 0x63, 0x4b, 0x8b, 0xd4, 0x6a, 0x76, 0xb2 }, + }, + { + .name = "WiMax FCH (non-recursive, tail-biting, not punctured)", + .code = &conv_wimax_fch, + .in_len = 48, + .out_len = 96, + .has_vec = 1, + .vec_in = { 0xfc, 0xa0, 0xa0, 0xfc, 0xa0, 0xa0 }, + .vec_out = { 0x19, 0x42, 0x8a, 0xed, 0x21, 0xed, 0x19, 0x42, + 0x8a, 0xed, 0x21, 0xed }, + }, + { + .name = "??? (non-recursive, direct truncation, not punctured)", + .code = &conv_trunc, + .in_len = 224, + .out_len = 448, + .has_vec = 1, + .vec_in = { 0xe5, 0xe0, 0x85, 0x7e, 0xf7, 0x08, 0x19, 0x5a, + 0xb9, 0xad, 0x82, 0x37, 0x98, 0x8b, 0x26, 0xb9, + 0x81, 0x26, 0x9c, 0x75, 0xaf, 0xf3, 0xcb, 0x07, + 0xac, 0x63, 0xe2, 0x9c, + }, + .vec_out = { 0xea, 0x3b, 0x55, 0x0c, 0xd3, 0xf7, 0x85, 0x69, + 0xe5, 0x79, 0x83, 0xd3, 0xc3, 0x9f, 0xb8, 0x61, + 0x21, 0x63, 0x51, 0x18, 0xac, 0xcd, 0x32, 0x49, + 0x53, 0x5c, 0x13, 0x1d, 0xbe, 0x05, 0x11, 0x63, + 0x5c, 0xc3, 0x42, 0x05, 0x1c, 0x68, 0x0a, 0xb4, + 0x61, 0x15, 0xaa, 0x4d, 0x94, 0xed, 0xb3, 0x3a, + 0x5d, 0x1b, 0x09, 0xc2, 0x99, 0x01, 0xec, 0x68 }, + }, +}; -- To view, visit https://gerrit.osmocom.org/1542 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iffee60ad19d38bcfdce2e5f47a4e886f6f74e271 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Sun Jan 8 15:48:07 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 8 Jan 2017 15:48:07 +0000 Subject: [PATCH] libosmocore[master]: tests/conv: add LTE PBCH test vector Message-ID: Review at https://gerrit.osmocom.org/1543 tests/conv: add LTE PBCH test vector Change-Id: Ifea601d49c82c36d7c8d4a527b7422d701833806 --- M tests/conv/conv_codes.c M tests/conv/conv_test.h M tests/conv/conv_test.ok M tests/conv/conv_test_vectors.c 4 files changed, 70 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/43/1543/1 diff --git a/tests/conv/conv_codes.c b/tests/conv/conv_codes.c index 8bcf05f..c3be8ef 100644 --- a/tests/conv/conv_codes.c +++ b/tests/conv/conv_codes.c @@ -139,3 +139,54 @@ .next_output = conv_wimax_fch_next_output, .next_state = conv_wimax_fch_next_state, }; + +/** + * LTE PBCH + * Non recursive code, tail-biting, non-punctured + */ +static const uint8_t conv_lte_pbch_next_output[][2] = { + { 0, 7 }, { 3, 4 }, { 7, 0 }, { 4 , 3 }, + { 6, 1 }, { 5, 2 }, { 1, 6 }, { 2 , 5 }, + { 1, 6 }, { 2, 5 }, { 6, 1 }, { 5 , 2 }, + { 7, 0 }, { 4, 3 }, { 0, 7 }, { 3 , 4 }, + { 4, 3 }, { 7, 0 }, { 3, 4 }, { 0 , 7 }, + { 2, 5 }, { 1, 6 }, { 5, 2 }, { 6 , 1 }, + { 5, 2 }, { 6, 1 }, { 2, 5 }, { 1 , 6 }, + { 3, 4 }, { 0, 7 }, { 4, 3 }, { 7 , 0 }, + { 7, 0 }, { 4, 3 }, { 0, 7 }, { 3 , 4 }, + { 1, 6 }, { 2, 5 }, { 6, 1 }, { 5 , 2 }, + { 6, 1 }, { 5, 2 }, { 1, 6 }, { 2 , 5 }, + { 0, 7 }, { 3, 4 }, { 7, 0 }, { 4 , 3 }, + { 3, 4 }, { 0, 7 }, { 4, 3 }, { 7 , 0 }, + { 5, 2 }, { 6, 1 }, { 2, 5 }, { 1 , 6 }, + { 2, 5 }, { 1, 6 }, { 5, 2 }, { 6 , 1 }, + { 4, 3 }, { 7, 0 }, { 3, 4 }, { 0 , 7 }, +}; + +static const uint8_t conv_lte_pbch_next_state[][2] = { + { 0, 1 }, { 2, 3 }, { 4, 5 }, { 6, 7 }, + { 8, 9 }, { 10, 11 }, { 12, 13 }, { 14, 15 }, + { 16, 17 }, { 18, 19 }, { 20, 21 }, { 22, 23 }, + { 24, 25 }, { 26, 27 }, { 28, 29 }, { 30, 31 }, + { 32, 33 }, { 34, 35 }, { 36, 37 }, { 38, 39 }, + { 40, 41 }, { 42, 43 }, { 44, 45 }, { 46, 47 }, + { 48, 49 }, { 50, 51 }, { 52, 53 }, { 54, 55 }, + { 56, 57 }, { 58, 59 }, { 60, 61 }, { 62, 63 }, + { 0, 1 }, { 2, 3 }, { 4, 5 }, { 6, 7 }, + { 8, 9 }, { 10, 11 }, { 12, 13 }, { 14, 15 }, + { 16, 17 }, { 18, 19 }, { 20, 21 }, { 22, 23 }, + { 24, 25 }, { 26, 27 }, { 28, 29 }, { 30, 31 }, + { 32, 33 }, { 34, 35 }, { 36, 37 }, { 38, 39 }, + { 40, 41 }, { 42, 43 }, { 44, 45 }, { 46, 47 }, + { 48, 49 }, { 50, 51 }, { 52, 53 }, { 54, 55 }, + { 56, 57 }, { 58, 59 }, { 60, 61 }, { 62, 63 }, +}; + +const struct osmo_conv_code conv_lte_pbch = { + .N = 3, + .K = 7, + .len = 40, + .term = CONV_TERM_TAIL_BITING, + .next_output = conv_lte_pbch_next_output, + .next_state = conv_lte_pbch_next_state, +}; diff --git a/tests/conv/conv_test.h b/tests/conv/conv_test.h index 41e8686..c6c8926 100644 --- a/tests/conv/conv_test.h +++ b/tests/conv/conv_test.h @@ -2,7 +2,7 @@ #include -#define TEST_VEC_COUNT 5 +#define TEST_VEC_COUNT 6 #define MAX_LEN_BITS 512 #define MAX_LEN_BYTES (512 / 8) @@ -21,4 +21,5 @@ /* Non GSM specific codes */ const struct osmo_conv_code conv_gmr1_tch3_speech; const struct osmo_conv_code conv_wimax_fch; +const struct osmo_conv_code conv_lte_pbch; const struct osmo_conv_code conv_trunc; diff --git a/tests/conv/conv_test.ok b/tests/conv/conv_test.ok index 2122961..eceadb0 100644 --- a/tests/conv/conv_test.ok +++ b/tests/conv/conv_test.ok @@ -42,6 +42,14 @@ [..] Encoding / Decoding cycle : OK [..] Encoding / Decoding cycle : OK +[+] Testing: LTE PBCH (non-recursive, tail-biting, non-punctured) +[.] Input length : ret = 40 exp = 40 -> OK +[.] Output length : ret = 120 exp = 120 -> OK +[.] Random vector checks: +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK + [+] Testing: ??? (non-recursive, direct truncation, not punctured) [.] Input length : ret = 224 exp = 224 -> OK [.] Output length : ret = 448 exp = 448 -> OK diff --git a/tests/conv/conv_test_vectors.c b/tests/conv/conv_test_vectors.c index 8b245d3..c1da68a 100644 --- a/tests/conv/conv_test_vectors.c +++ b/tests/conv/conv_test_vectors.c @@ -67,6 +67,15 @@ 0x8a, 0xed, 0x21, 0xed }, }, { + .name = "LTE PBCH (non-recursive, tail-biting, non-punctured)", + .code = &conv_lte_pbch, + .in_len = 40, + .out_len = 120, + .has_vec = 0, + .vec_in = { }, + .vec_out = { }, + }, + { .name = "??? (non-recursive, direct truncation, not punctured)", .code = &conv_trunc, .in_len = 224, -- To view, visit https://gerrit.osmocom.org/1543 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifea601d49c82c36d7c8d4a527b7422d701833806 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Sun Jan 8 16:39:24 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 8 Jan 2017 16:39:24 +0000 Subject: osmo-pcu[master]: Sanitizer build fix for invalid value of variable of type eg... In-Reply-To: References: Message-ID: Patch Set 3: Any news here? I would like to see a fix like this committed, and I hope my negative feedback hasn't thrown you off the track. I highly appreciate your effort, while at the same time we won't do us any favor by covering a deeper failure with a well meant workaround. So, I mean to be productive, and all of my comments are on a basis of cooperation to achieve quality code. Do you have time to fix this properly? Thanks! -- To view, visit https://gerrit.osmocom.org/1411 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ice54edc7e4a936eb2f2dd8a243673a30dceef542 Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 9 09:13:20 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 9 Jan 2017 09:13:20 +0000 Subject: [MERGED] libosmocore[master]: gitignore: ignore *.pyc files In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: gitignore: ignore *.pyc files ...................................................................... gitignore: ignore *.pyc files Change-Id: I148584e1664b20741c0ade02cbda635c24268d2e --- M .gitignore 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/.gitignore b/.gitignore index d333b27..fb159c3 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ *.lo *.la *.pc +*.pyc aclocal.m4 acinclude.m4 aminclude.am -- To view, visit https://gerrit.osmocom.org/1529 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I148584e1664b20741c0ade02cbda635c24268d2e Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Mon Jan 9 10:08:16 2017 From: gerrit-no-reply at lists.osmocom.org (ikostov) Date: Mon, 9 Jan 2017 10:08:16 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: SGSN: add Auth. policy, NS Statistics and BSSGP state examples In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1535 to look at the new patch set (#2). SGSN: add Auth. policy, NS Statistics and BSSGP state examples Change-Id: I0164f418e453672321eed00bbc454c1e223ea158 --- M OsmoSGSN/chapters/configuration.adoc M OsmoSGSN/chapters/overview.adoc M common/chapters/gb.adoc 3 files changed, 82 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/35/1535/2 diff --git a/OsmoSGSN/chapters/configuration.adoc b/OsmoSGSN/chapters/configuration.adoc index 8b259ed..cd419b4 100644 --- a/OsmoSGSN/chapters/configuration.adoc +++ b/OsmoSGSN/chapters/configuration.adoc @@ -67,6 +67,50 @@ <2> Enable the dynamic GGSN resolving mode <3> Specify the IP address of a DNS server for APN resolution +[[auth-pol]] +=== Authorization Policy + +Authorization determines whether particular subscriber can access +your network or not. + +The following 4 authorization policy options are available: + +`accept-all`: When this option is selected then all IMSIs will +be accepted. Using this policy option can be dangerous. + +`acl-only`: In this case you will allow SGSN to accept only IMSIs, +which are explicitly white-listed by the Access Control List (ACL) and +the rest will be rejected. + +`closed`: This option allows you to accept only home network subscribers +either the ones, which are in the ACL or MCC/MNC match. +(i.e. MCC 901, MNC 700, IMSI 901700000003080). + +`remote`: When this authorization option is selected then the GSUP protocol +to remotely access a HLR will be used. Remote subscription data +only will be used. + + +.Example: How to assign or change current authorization policy follows: +---- +OsmoSGSN> enable +OsmoSGSN# configure terminal +OsmoSGSN(config)# sgsn +OsmoSGSN(config-sgsn)# auth-policy acl-only <1> +OsmoSGSN(config-sgsn)# write <2> +Configuration saved to sgsn.cfg +OsmoSGSN(config-sgsn)# exit +OsmoSGSN(config)# exit +OsmoSGSN# disable +OsmoSGSN> +---- +<1> 'acl-only' is selected as authorization policy +<2> Saves current changes to cofiguration file to make this policy +persistent + +Other authorization policy option can be selected by using +the above given example. Just state which policy option you would like +to use. === Subscriber Configuration diff --git a/OsmoSGSN/chapters/overview.adoc b/OsmoSGSN/chapters/overview.adoc index 566124a..396839f 100644 --- a/OsmoSGSN/chapters/overview.adoc +++ b/OsmoSGSN/chapters/overview.adoc @@ -23,16 +23,16 @@ [graphviz] ---- digraph G { - rankdir=LR; - MS0 [label="MS"] - MS1 [label="MS"] - MS0->BTS [label="Um"] - MS1->BTS [label="Um"] - BTS->BSC [label="Abis"] - BSC->MSC [label="A"] - BTS->PCU [label="pcu_sock"] - PCU->SGSN [label="Gb"] - SGSN->GGSN [label="GTP"] + rankdir=LR; + MS0 [label="MS"]; + MS1 [label="MS"]; + MS0->BTS [label="Um"]; + MS1->BTS [label="Um"]; + BTS->BSC [label="Abis"]; + BSC->MSC [label="A"]; + BTS->PCU [label="pcu_sock"]; + PCU->SGSN [label="Gb"]; + SGSN->GGSN [label="GTP"]; } ---- @@ -58,7 +58,7 @@ ==== GTP Implementation -OsmoSGSN uses the libgtp implementation originating from OpenGGSN. It +OsmoSGSN uses the libgtp implementation originating from OpenGGSN.It supports both GTPv0 and GTPv1. @@ -68,13 +68,8 @@ point. It supports the GPRS ATTACH and GPRS ROUTING AREA UPDATE procedures, as well as GPRS ATTACH and GPRS DETACH. -However, as the SGSN currently does not implement any type of HLR -access, it is not able to authenticate a subscriber or even check if the -subscriber exists at all. As such, all non-roaming subscribes are -allowed to attach to OsmoSGSN. Non-roaming means that the first 5 -digits of the IMSI must match the MCC and MNC of the cell that the -subscriber is registering to. - +Please refer to <> for more details how the Authorization +policy is handled. ==== LLC Implementation diff --git a/common/chapters/gb.adoc b/common/chapters/gb.adoc index d01fa9b..199ef2c 100644 --- a/common/chapters/gb.adoc +++ b/common/chapters/gb.adoc @@ -67,14 +67,36 @@ Encapsulation NS-UDP-IP Local IP: 127.0.0.1, UDP Port: 23000 Encapsulation NS-FR-GRE-IP Local IP: 0.0.0.0 ---- -FIXME -FIXME: show ns stats +.Example: Inspecting NS statistics +---- +OsmoSGSN> show ns stats +Encapsulation NS-UDP-IP Local IP: 10.9.1.198, UDP Port: 23000 +Encapsulation NS-FR-GRE-IP Local IP: 0.0.0.0 +NSEI 101, NS-VC 101, Remote: BSS, ALIVE UNBLOCKED, UDP 10.9.1.119:23000 + NSVC Peer Statistics: + Packets at NS Level ( In): 1024 (2/s 123/m 911/h 0/d) + Packets at NS Level (Out): 1034 (0/s 151/m 894/h 0/d) + Bytes at NS Level ( In): 296638 (1066/s 22222/m 274244/h 0/d) + Bytes at NS Level (Out): 139788 (0/s 48225/m 91710/h 0/d) + NS-VC Block count : 0 (0/s 0/m 0/h 0/d) + NS-VC gone dead count : 0 (0/s 0/m 0/h 0/d) + NS-VC replaced other count: 0 (0/s 0/m 0/h 0/d) + NS-VC changed NSEI count : 0 (0/s 0/m 0/h 0/d) + NS-VCI was invalid count : 0 (0/s 0/m 0/h 0/d) + NSEI was invalid count : 0 (0/s 0/m 0/h 0/d) + ALIVE ACK missing count : 0 (0/s 0/m 0/h 0/d) + RESET ACK missing count : 0 (0/s 0/m 0/h 0/d) + NSVC Peer Statistics: + ALIVE reponse time : 0 ms +---- .Example: Inspecting BSSGP state ---- +OsmoSGSN> show bssgp +NSEI 101, BVCI 2, RA-ID: 1-2-1-0, CID: 0, STATE: UNBLOCKED +NSEI 101, BVCI 0, RA-ID: 0-0-0-0, CID: 0, STATE: UNBLOCKED ---- -FIXME FIXME: show nse -- To view, visit https://gerrit.osmocom.org/1535 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0164f418e453672321eed00bbc454c1e223ea158 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: ikostov Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Jan 9 10:19:18 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 9 Jan 2017 10:19:18 +0000 Subject: libosmocore[master]: Add osmo_rand() function In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 Block merging until OS#1894 is fixed. -- To view, visit https://gerrit.osmocom.org/1526 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0241b814ea4c4ce1458f7ad76e31d390383c2048 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 9 10:19:41 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 9 Jan 2017 10:19:41 +0000 Subject: libosmocore[master]: Add osmo_rand() function In-Reply-To: References: Message-ID: Patch Set 2: Verified-1 -- To view, visit https://gerrit.osmocom.org/1526 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0241b814ea4c4ce1458f7ad76e31d390383c2048 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 9 10:49:49 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 9 Jan 2017 10:49:49 +0000 Subject: osmo-gsm-manuals[master]: SGSN: add Auth. policy, NS Statistics and BSSGP state examples In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 (13 comments) Here's me nitpicking on doc again. Also found minor mistakes. https://gerrit.osmocom.org/#/c/1535/2/OsmoSGSN/chapters/configuration.adoc File OsmoSGSN/chapters/configuration.adoc: Line 73: Authorization determines whether particular subscriber can access "whether a particular" Line 78: `accept-all`: When this option is selected then all IMSIs will style nitpick: maybe drop this part: "When this option is selected then" (otherwise replace "then" with a comma) Line 79: be accepted. Using this policy option can be dangerous. dangerous how? My BTS may explode violently? Line 81: `acl-only`: In this case you will allow SGSN to accept only IMSIs, maybe drop "In this case you will allow SGSN to" Line 82: which are explicitly white-listed by the Access Control List (ACL) and comma before "and" Line 85: `closed`: This option allows you to accept only home network subscribers maybe drop "This option allows you to" End the sentence after "subscribers." Line 86: either the ones, which are in the ACL or MCC/MNC match. rather first only explain what home subscribers are (the MCC + MNC part). In the end add a hint that the ACL is also heeded. Line 89: `remote`: When this authorization option is selected then the GSUP protocol maybe drop "When this authorization option is selected then" Line 91: only will be used. "will be used, only" or "Only remote..." Line 94: .Example: How to assign or change current authorization policy follows: Drop "How to", drop "current" and drop "follows" Line 108: <2> Saves current changes to cofiguration file to make this policy "configuration" Line 111: Other authorization policy option can be selected by using I would drop this paragraph, it merely states the obvious. https://gerrit.osmocom.org/#/c/1535/2/OsmoSGSN/chapters/overview.adoc File OsmoSGSN/chapters/overview.adoc: Line 71: Please refer to <> for more details how the Authorization "for more details on subscriber authorization." However, it seems to me that this is a place for implementation details, listing bugs or oddities left in our code, so this doesn't really belong here? -- To view, visit https://gerrit.osmocom.org/1535 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0164f418e453672321eed00bbc454c1e223ea158 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: ikostov Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Jan 9 11:40:11 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 9 Jan 2017 11:40:11 +0000 Subject: [PATCH] osmo-bts[master]: RSL: Fixup for CID 159534 Message-ID: Review at https://gerrit.osmocom.org/1544 RSL: Fixup for CID 159534 rsl_rx_paging_cmd() checks if the pointer *trx is NULL, this check does not make much sense since *trx has already been dereferenced without checking earlier in the code. Furthermore *trx is also a mandatory parameter which must not be NULL. Change-Id: I17dfb42ff404b2a1e18354fb7a7278089b407a79 --- M src/common/rsl.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/44/1544/1 diff --git a/src/common/rsl.c b/src/common/rsl.c index be1861c..41dd2ce 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -402,7 +402,7 @@ identity_lv, chan_needed); if (rc < 0) { /* FIXME: notfiy the BSC on other errors? */ - if (rc == -ENOSPC && trx) + if (rc == -ENOSPC) oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MIN_PAG_TAB_FULL, "BTS paging table is full\n"); -- To view, visit https://gerrit.osmocom.org/1544 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I17dfb42ff404b2a1e18354fb7a7278089b407a79 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Mon Jan 9 11:40:13 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 9 Jan 2017 11:40:13 +0000 Subject: [PATCH] osmo-bts[master]: RSL: adding assertions Message-ID: Review at https://gerrit.osmocom.org/1545 RSL: adding assertions The public functions in rsl.c do not check for null pointers, added assertions to catch null pointers early Change-Id: I63f127ce70a4127180f90238f564b63e355216ec --- M src/common/rsl.c 1 file changed, 22 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/45/1545/1 diff --git a/src/common/rsl.c b/src/common/rsl.c index 41dd2ce..a34c455 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -2008,6 +2008,8 @@ void cb_ts_disconnected(struct gsm_bts_trx_ts *ts) { + OSMO_ASSERT(ts); + switch (ts->pchan) { case GSM_PCHAN_TCH_F_PDCH: return ipacc_dyn_pdch_ts_disconnected(ts); @@ -2093,6 +2095,8 @@ void cb_ts_connected(struct gsm_bts_trx_ts *ts) { + OSMO_ASSERT(ts); + switch (ts->pchan) { case GSM_PCHAN_TCH_F_PDCH: return ipacc_dyn_pdch_ts_connected(ts); @@ -2105,7 +2109,10 @@ void ipacc_dyn_pdch_complete(struct gsm_bts_trx_ts *ts, int rc) { - bool pdch_act = ts->flags & TS_F_PDCH_ACT_PENDING; + bool pdch_act; + OSMO_ASSERT(ts); + + pdch_act = ts->flags & TS_F_PDCH_ACT_PENDING; if ((ts->flags & TS_F_PDCH_PENDING_MASK) == TS_F_PDCH_PENDING_MASK) LOGP(DRSL, LOGL_ERROR, @@ -2256,7 +2263,12 @@ int lapdm_rll_tx_cb(struct msgb *msg, struct lapdm_entity *le, void *ctx) { struct gsm_lchan *lchan = ctx; - struct abis_rsl_common_hdr *rh = msgb_l2(msg); + struct abis_rsl_common_hdr *rh; + + /* NOTE: Parameter lapdm_entity *le is ignored */ + + OSMO_ASSERT(msg); + rh = msgb_l2(msg); if (lchan->state != LCHAN_S_ACTIVE) { LOGP(DRSL, LOGL_INFO, "%s(%s) is not active . Dropping message.\n", @@ -2482,15 +2494,22 @@ int lchan_deactivate(struct gsm_lchan *lchan) { + OSMO_ASSERT(lchan); + lchan->ciph_state = 0; return bts_model_lchan_deactivate(lchan); } int down_rsl(struct gsm_bts_trx *trx, struct msgb *msg) { - struct abis_rsl_common_hdr *rslh = msgb_l2(msg); + struct abis_rsl_common_hdr *rslh; int ret = 0; + OSMO_ASSERT(trx); + OSMO_ASSERT(msg); + + rslh = msgb_l2(msg); + if (msgb_l2len(msg) < sizeof(*rslh)) { LOGP(DRSL, LOGL_NOTICE, "RSL message too short\n"); msgb_free(msg); -- To view, visit https://gerrit.osmocom.org/1545 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I63f127ce70a4127180f90238f564b63e355216ec Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Mon Jan 9 11:40:13 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 9 Jan 2017 11:40:13 +0000 Subject: [PATCH] osmo-bts[master]: OML: Fixup for CID 159533 Message-ID: Review at https://gerrit.osmocom.org/1546 OML: Fixup for CID 159533 oml_ipa_set_attr() is using gsm_objclass2mo() to determine the *mo object. However it is possible that gsm_objclass2mo() a null-pointer. The code following up is using *mo without checking. This commit adds an additional check to ensure that *mo is not used without checking. Change-Id: Ia2cc9bc504c46ca3843c43d712cd8649bfae9526 --- M src/common/oml.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/46/1546/1 diff --git a/src/common/oml.c b/src/common/oml.c index 8ccfcc6..88c9abd 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -1048,6 +1048,8 @@ rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); if (rc < 0) { mo = gsm_objclass2mo(bts, foh->obj_class, &foh->obj_inst); + if (!mo) + return oml_fom_ack_nack(msg, NM_NACK_OBJINST_UNKN); oml_tx_failure_event_rep(mo, OSMO_EVT_MAJ_UNSUP_ATTR, "New value for IPAC Set Attribute not " "supported\n"); -- To view, visit https://gerrit.osmocom.org/1546 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia2cc9bc504c46ca3843c43d712cd8649bfae9526 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Mon Jan 9 11:50:09 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 9 Jan 2017 11:50:09 +0000 Subject: [PATCH] libosmocore[master]: Remove obsolete .deb patch Message-ID: Review at https://gerrit.osmocom.org/1547 Remove obsolete .deb patch Change-Id: Icbf911540fcc840833c5012363c2ba48fd71db52 Related: OS#1694 --- D debian/patches/debian-changes-0.1.17-1 M debian/patches/series 2 files changed, 0 insertions(+), 47 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/47/1547/1 diff --git a/debian/patches/debian-changes-0.1.17-1 b/debian/patches/debian-changes-0.1.17-1 deleted file mode 100644 index c0a54bd..0000000 --- a/debian/patches/debian-changes-0.1.17-1 +++ /dev/null @@ -1,46 +0,0 @@ -Description: Upstream changes introduced in version 0.1.17-1 - This patch has been created by dpkg-source during the package build. - Here's the last changelog entry, hopefully it gives details on why - those changes were made: - . - libosmocore (0.1.17-1) unstable; urgency=low - . - * Initial release (Closes: #nnnn) - . - The person named in the Author field signed this changelog entry. -Author: Harald Welte - ---- -The information above should follow the Patch Tagging Guidelines, please -checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here -are templates for supplementary fields that you might want to add: - -Origin: , -Bug: -Bug-Debian: http://bugs.debian.org/ -Bug-Ubuntu: https://launchpad.net/bugs/ -Forwarded: -Reviewed-By: -Last-Update: - ---- /dev/null -+++ libosmocore-0.1.17/.version -@@ -0,0 +1 @@ -+0.1.17 ---- /dev/null -+++ libosmocore-0.1.17/copyright -@@ -0,0 +1,14 @@ -+Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135 -+Name: libosmocore -+Maintainer: Harald Welte -+Source: git://git.osmocom.org/libosmocore.git -+ -+Copyright: 2008-2010 Harald Welte -+License: GPL-2+ -+ -+Files: src/talloc.c include/osmocore/talloc.h -+Copyright: 2004 Andrew Tridgell -+License: LGPL-3+ -+ -+Files: include/osmocore/linuxlist.h -+License: GPL-2 diff --git a/debian/patches/series b/debian/patches/series index 0ca407b..e69de29 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +0,0 @@ -debian-changes-0.1.17-1 -- To view, visit https://gerrit.osmocom.org/1547 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icbf911540fcc840833c5012363c2ba48fd71db52 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Jan 9 12:19:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 9 Jan 2017 12:19:29 +0000 Subject: [PATCH] libosmocore[master]: gsmtap: Add GSMTAP_TYPE_QC_DIAG Message-ID: Review at https://gerrit.osmocom.org/1548 gsmtap: Add GSMTAP_TYPE_QC_DIAG This adds a definition for wrapping Qualcomm DIAG frames into GSMTAP for transporting them over an IP network. Change-Id: I1b357b7d11a370685671c7b01e55f4f36dec2f25 --- M include/osmocom/core/gsmtap.h 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/48/1548/1 diff --git a/include/osmocom/core/gsmtap.h b/include/osmocom/core/gsmtap.h index bcfc7bd..f9d6f0a 100644 --- a/include/osmocom/core/gsmtap.h +++ b/include/osmocom/core/gsmtap.h @@ -46,6 +46,7 @@ #define GSMTAP_TYPE_LTE_MAC 0x0e /* LTE MAC interface */ #define GSMTAP_TYPE_LTE_MAC_FRAMED 0x0f /* LTE MAC with context hdr */ #define GSMTAP_TYPE_OSMOCORE_LOG 0x10 /* libosmocore logging */ +#define GSMTAP_TYPE_QC_DIAG 0x11 /* Qualcomm DIAG frame */ /* ====== DO NOT MAKE UNAPPROVED MODIFICATIONS HERE ===== */ -- To view, visit https://gerrit.osmocom.org/1548 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1b357b7d11a370685671c7b01e55f4f36dec2f25 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Mon Jan 9 12:20:28 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 9 Jan 2017 12:20:28 +0000 Subject: libosmocore[master]: gsmtap: Add GSMTAP_TYPE_QC_DIAG In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1548 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1b357b7d11a370685671c7b01e55f4f36dec2f25 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 9 12:25:10 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 9 Jan 2017 12:25:10 +0000 Subject: [PATCH] libosmo-abis[master]: handle_ts1_read(): log sign_link() error Message-ID: Review at https://gerrit.osmocom.org/1549 handle_ts1_read(): log sign_link() error Change-Id: I95779ee8590ab16b7af4ad2c79ede68da3a12e5a --- M src/input/ipaccess.c 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/49/1549/1 diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c index 675f07a..9e64471 100644 --- a/src/input/ipaccess.c +++ b/src/input/ipaccess.c @@ -228,7 +228,7 @@ struct e1inp_sign_link *link; struct ipaccess_head *hh; struct msgb *msg = NULL; - int ret; + int ret, rc; ret = ipa_msg_recv_buffered(bfd->fd, &msg, &e1i_ts->pending_msg); if (ret < 0) { @@ -273,13 +273,14 @@ ret = -EINVAL; goto err_msg; } - if (e1i_ts->line->ops->sign_link(msg) < 0) { + rc = e1i_ts->line->ops->sign_link(msg); + if (rc < 0) { /* Don't close the signalling link if the upper layers report * an error, that's too strict. BTW, the signalling layer is * resposible for releasing the message. */ LOGP(DLINP, LOGL_ERROR, "Bad signalling message," - "sign_link returned error\n"); + " sign_link returned error: %s.\n", strerror(-rc)); } return 0; -- To view, visit https://gerrit.osmocom.org/1549 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I95779ee8590ab16b7af4ad2c79ede68da3a12e5a Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Jan 9 12:37:01 2017 From: gerrit-no-reply at lists.osmocom.org (ikostov) Date: Mon, 9 Jan 2017 12:37:01 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: SGSN: add Auth. policy, NS Statistics and BSSGP state examples In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1535 to look at the new patch set (#3). SGSN: add Auth. policy, NS Statistics and BSSGP state examples Change-Id: I0164f418e453672321eed00bbc454c1e223ea158 --- M OsmoSGSN/chapters/configuration.adoc M OsmoSGSN/chapters/overview.adoc M common/chapters/gb.adoc 3 files changed, 73 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/35/1535/3 diff --git a/OsmoSGSN/chapters/configuration.adoc b/OsmoSGSN/chapters/configuration.adoc index 8b259ed..71459ec 100644 --- a/OsmoSGSN/chapters/configuration.adoc +++ b/OsmoSGSN/chapters/configuration.adoc @@ -67,6 +67,43 @@ <2> Enable the dynamic GGSN resolving mode <3> Specify the IP address of a DNS server for APN resolution +[[auth-pol]] +=== Authorization Policy + +Authorization determines whether a particular subscriber can access +your network or not. + +The following 4 authorization policy options are available: + +`accept-all`: All IMSIs will be accepted. + +`acl-only`: Accept only IMSIs, which are explicitly white-listed +by the Access Control List (ACL), and the rest will be rejected. + +`closed`: Accept only home network subscribers. +The combination of MCC and MNC fully identifies subscriber's. +Home network. The ACL is also heeded. + +`remote`: GSUP protocol is uesed to remotely access a HLR. +Only remote subscription data will be used. + + +.Example: Assign or change authorization policy: +---- +OsmoSGSN> enable +OsmoSGSN# configure terminal +OsmoSGSN(config)# sgsn +OsmoSGSN(config-sgsn)# auth-policy acl-only <1> +OsmoSGSN(config-sgsn)# write <2> +Configuration saved to sgsn.cfg +OsmoSGSN(config-sgsn)# exit +OsmoSGSN(config)# exit +OsmoSGSN# disable +OsmoSGSN> +---- +<1> 'acl-only' is selected as authorization policy +<2> Saves current changes to cofiguration to make this policy +persistent === Subscriber Configuration diff --git a/OsmoSGSN/chapters/overview.adoc b/OsmoSGSN/chapters/overview.adoc index 566124a..b3a4d69 100644 --- a/OsmoSGSN/chapters/overview.adoc +++ b/OsmoSGSN/chapters/overview.adoc @@ -23,16 +23,16 @@ [graphviz] ---- digraph G { - rankdir=LR; - MS0 [label="MS"] - MS1 [label="MS"] - MS0->BTS [label="Um"] - MS1->BTS [label="Um"] - BTS->BSC [label="Abis"] - BSC->MSC [label="A"] - BTS->PCU [label="pcu_sock"] - PCU->SGSN [label="Gb"] - SGSN->GGSN [label="GTP"] + rankdir=LR; + MS0 [label="MS"]; + MS1 [label="MS"]; + MS0->BTS [label="Um"]; + MS1->BTS [label="Um"]; + BTS->BSC [label="Abis"]; + BSC->MSC [label="A"]; + BTS->PCU [label="pcu_sock"]; + PCU->SGSN [label="Gb"]; + SGSN->GGSN [label="GTP"]; } ---- @@ -58,7 +58,7 @@ ==== GTP Implementation -OsmoSGSN uses the libgtp implementation originating from OpenGGSN. It +OsmoSGSN uses the libgtp implementation originating from OpenGGSN.It supports both GTPv0 and GTPv1. @@ -67,14 +67,6 @@ The GPRS Mobility Management implementation is quite simplistic at this point. It supports the GPRS ATTACH and GPRS ROUTING AREA UPDATE procedures, as well as GPRS ATTACH and GPRS DETACH. - -However, as the SGSN currently does not implement any type of HLR -access, it is not able to authenticate a subscriber or even check if the -subscriber exists at all. As such, all non-roaming subscribes are -allowed to attach to OsmoSGSN. Non-roaming means that the first 5 -digits of the IMSI must match the MCC and MNC of the cell that the -subscriber is registering to. - ==== LLC Implementation diff --git a/common/chapters/gb.adoc b/common/chapters/gb.adoc index d01fa9b..199ef2c 100644 --- a/common/chapters/gb.adoc +++ b/common/chapters/gb.adoc @@ -67,14 +67,36 @@ Encapsulation NS-UDP-IP Local IP: 127.0.0.1, UDP Port: 23000 Encapsulation NS-FR-GRE-IP Local IP: 0.0.0.0 ---- -FIXME -FIXME: show ns stats +.Example: Inspecting NS statistics +---- +OsmoSGSN> show ns stats +Encapsulation NS-UDP-IP Local IP: 10.9.1.198, UDP Port: 23000 +Encapsulation NS-FR-GRE-IP Local IP: 0.0.0.0 +NSEI 101, NS-VC 101, Remote: BSS, ALIVE UNBLOCKED, UDP 10.9.1.119:23000 + NSVC Peer Statistics: + Packets at NS Level ( In): 1024 (2/s 123/m 911/h 0/d) + Packets at NS Level (Out): 1034 (0/s 151/m 894/h 0/d) + Bytes at NS Level ( In): 296638 (1066/s 22222/m 274244/h 0/d) + Bytes at NS Level (Out): 139788 (0/s 48225/m 91710/h 0/d) + NS-VC Block count : 0 (0/s 0/m 0/h 0/d) + NS-VC gone dead count : 0 (0/s 0/m 0/h 0/d) + NS-VC replaced other count: 0 (0/s 0/m 0/h 0/d) + NS-VC changed NSEI count : 0 (0/s 0/m 0/h 0/d) + NS-VCI was invalid count : 0 (0/s 0/m 0/h 0/d) + NSEI was invalid count : 0 (0/s 0/m 0/h 0/d) + ALIVE ACK missing count : 0 (0/s 0/m 0/h 0/d) + RESET ACK missing count : 0 (0/s 0/m 0/h 0/d) + NSVC Peer Statistics: + ALIVE reponse time : 0 ms +---- .Example: Inspecting BSSGP state ---- +OsmoSGSN> show bssgp +NSEI 101, BVCI 2, RA-ID: 1-2-1-0, CID: 0, STATE: UNBLOCKED +NSEI 101, BVCI 0, RA-ID: 0-0-0-0, CID: 0, STATE: UNBLOCKED ---- -FIXME FIXME: show nse -- To view, visit https://gerrit.osmocom.org/1535 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0164f418e453672321eed00bbc454c1e223ea158 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: ikostov Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Jan 9 12:39:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 9 Jan 2017 12:39:16 +0000 Subject: libosmocore[master]: gsmtap: Add GSMTAP_TYPE_QC_DIAG In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1548 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1b357b7d11a370685671c7b01e55f4f36dec2f25 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 9 12:39:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 9 Jan 2017 12:39:17 +0000 Subject: [MERGED] libosmocore[master]: gsmtap: Add GSMTAP_TYPE_QC_DIAG In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gsmtap: Add GSMTAP_TYPE_QC_DIAG ...................................................................... gsmtap: Add GSMTAP_TYPE_QC_DIAG This adds a definition for wrapping Qualcomm DIAG frames into GSMTAP for transporting them over an IP network. Change-Id: I1b357b7d11a370685671c7b01e55f4f36dec2f25 --- M include/osmocom/core/gsmtap.h 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/core/gsmtap.h b/include/osmocom/core/gsmtap.h index bcfc7bd..f9d6f0a 100644 --- a/include/osmocom/core/gsmtap.h +++ b/include/osmocom/core/gsmtap.h @@ -46,6 +46,7 @@ #define GSMTAP_TYPE_LTE_MAC 0x0e /* LTE MAC interface */ #define GSMTAP_TYPE_LTE_MAC_FRAMED 0x0f /* LTE MAC with context hdr */ #define GSMTAP_TYPE_OSMOCORE_LOG 0x10 /* libosmocore logging */ +#define GSMTAP_TYPE_QC_DIAG 0x11 /* Qualcomm DIAG frame */ /* ====== DO NOT MAKE UNAPPROVED MODIFICATIONS HERE ===== */ -- To view, visit https://gerrit.osmocom.org/1548 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1b357b7d11a370685671c7b01e55f4f36dec2f25 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Mon Jan 9 12:46:28 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 9 Jan 2017 12:46:28 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: Describe how to run multiple instances of osmo-nitb and osmo... In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1497 to look at the new patch set (#2). Describe how to run multiple instances of osmo-nitb and osmo-bts Change-Id: I69adeef85adda6f08b31b7d176f51e16968c1435 --- M OsmoBTS/chapters/configuration.adoc M OsmoNITB/chapters/running.adoc 2 files changed, 71 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/97/1497/2 diff --git a/OsmoBTS/chapters/configuration.adoc b/OsmoBTS/chapters/configuration.adoc index b91d8ac..cca990b 100644 --- a/OsmoBTS/chapters/configuration.adoc +++ b/OsmoBTS/chapters/configuration.adoc @@ -179,3 +179,29 @@ De-activating power-ramping can be performed by setting the max-initial value to the nominal power. The default max-initial value is 23 dBm. + + +==== Running multiple instances + +It is possible to run multiple instances of `osmo-bts` on one and the same +machine, if the phy-interface is flexible enough to distinguish between +different phy hardware interfaces. + +Since usually a BTS instance runs in conjunction with a dedicated PCU instance, +the socket path between PCU and BTS has to be distinguished between the running +instances. It is possible to change the default socket path via VTY config: + +.Example: Personalize PCU socket path +---- +bts 0 + pcu-socket /tmp/pcu_bts_2 +---- + +It is also necessary to separate the VTY interfaces of the different instances. +The VTY can be bound to a free IP address from the loopback range: + +.Example: Binding VTY to a specific IP address +---- +line vty + bind 127.0.0.2 +---- diff --git a/OsmoNITB/chapters/running.adoc b/OsmoNITB/chapters/running.adoc index ae2c3fc..406c41c 100644 --- a/OsmoNITB/chapters/running.adoc +++ b/OsmoNITB/chapters/running.adoc @@ -49,12 +49,56 @@ Enable the RTP proxy code inside OsmoNITB. This will force all voice RTP data to pass through OsmoNITB, rather than going directly from BTS to MGW, or BTS to BTS. -*-m, --mncc-sock*:: +*-M, --mncc-sock-path*:: Enable the MNCC socket for an external MNCC handler. See <> for further information. +*-m, --mncc-sock*:: + Same as option -M (deprecated). *-C, --no-dbcounter*:: Disable the regular periodic synchronization of statistics counters to the database. *-r, --rf-ctl 'RFCTL'*:: Offer a Unix domain socket for RF control at the path/filename 'RFCTL' in the file system. + + +=== Multiple instances + +Running multiple instances of `osmo-nitb` is possible if all interfaces (VTY, +OML) are separated using the appropriate configuration options. The IP based +interfaces are binding to local host by default. In order to separate the +processes, the user has to bind those services to specific but different +IP addresses. + +The VTY and the control interface can be bound to IP addresses from the loopback +address range. + +.Example: Binding VTY and control interface to a specific ip-address +---- +line vty + bind 127.0.0.2 +ctrl + bind 127.0.0.2 +---- + +The OML interface also needs to be separated by binding it to different IP +addresses. Usually it is not possible to use addresses from the loopback +address range here since the OML interface needs to be reachable by an external +BTS. If only one ethernet interface is available, sub-devices with different IP +addresses can be created. + +.Example: Binding OML to a specific IP address +---- +e1_input + ipa bind 10.9.1.101 +---- + +NOTE: Depending on the application, it is necessary to have different ARFCN, +MCC, MNC and network name settings. It might also be necessary to point to +different database and config files using command line options (see option +-l and -c). + +NOTE: If an external MNCC handler is used, the user has to assign a different +socket path to reach osmo-nitb instance using commandline option -M. If option +-M is left out, the internal MNCC handler is used and no further configuration +is required -- To view, visit https://gerrit.osmocom.org/1497 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I69adeef85adda6f08b31b7d176f51e16968c1435 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Jan 9 12:59:40 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 9 Jan 2017 12:59:40 +0000 Subject: osmo-gsm-manuals[master]: Describe how to run multiple instances of osmo-nitb and osmo... In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1497 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I69adeef85adda6f08b31b7d176f51e16968c1435 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 9 12:59:48 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 9 Jan 2017 12:59:48 +0000 Subject: [PATCH] osmo-bts[master]: scheduler: log lchan on which prim error occured Message-ID: Review at https://gerrit.osmocom.org/1550 scheduler: log lchan on which prim error occured Log both lchan and trx_chan_type (using introduced value_string). Change-Id: I80c581b54eeee371ee524a75a400d1e9ece16c68 --- M include/osmo-bts/scheduler.h M src/common/scheduler.c 2 files changed, 53 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/50/1550/1 diff --git a/include/osmo-bts/scheduler.h b/include/osmo-bts/scheduler.h index b0387db..33a99bb 100644 --- a/include/osmo-bts/scheduler.h +++ b/include/osmo-bts/scheduler.h @@ -1,6 +1,8 @@ #ifndef TRX_SCHEDULER_H #define TRX_SCHEDULER_H +#include + #include /* These types define the different channels on a multiframe. @@ -48,6 +50,8 @@ _TRX_CHAN_MAX }; +extern const struct value_string trx_chan_type_names[]; + #define GSM_BURST_LEN 148 #define GPRS_BURST_LEN GSM_BURST_LEN #define EGPRS_BURST_LEN 444 diff --git a/src/common/scheduler.c b/src/common/scheduler.c index fd5c584..724fb5a 100644 --- a/src/common/scheduler.c +++ b/src/common/scheduler.c @@ -156,6 +156,48 @@ { 1, TRXC_PTCCH, 0x08, LID_DEDIC, "PTCCH", rts_data_fn, tx_data_fn, rx_data_fn, 0 }, }; +const struct value_string trx_chan_type_names[] = { + OSMO_VALUE_STRING(TRXC_IDLE), + OSMO_VALUE_STRING(TRXC_FCCH), + OSMO_VALUE_STRING(TRXC_SCH), + OSMO_VALUE_STRING(TRXC_BCCH), + OSMO_VALUE_STRING(TRXC_RACH), + OSMO_VALUE_STRING(TRXC_CCCH), + OSMO_VALUE_STRING(TRXC_TCHF), + OSMO_VALUE_STRING(TRXC_TCHH_0), + OSMO_VALUE_STRING(TRXC_TCHH_1), + OSMO_VALUE_STRING(TRXC_SDCCH4_0), + OSMO_VALUE_STRING(TRXC_SDCCH4_1), + OSMO_VALUE_STRING(TRXC_SDCCH4_2), + OSMO_VALUE_STRING(TRXC_SDCCH4_3), + OSMO_VALUE_STRING(TRXC_SDCCH8_0), + OSMO_VALUE_STRING(TRXC_SDCCH8_1), + OSMO_VALUE_STRING(TRXC_SDCCH8_2), + OSMO_VALUE_STRING(TRXC_SDCCH8_3), + OSMO_VALUE_STRING(TRXC_SDCCH8_4), + OSMO_VALUE_STRING(TRXC_SDCCH8_5), + OSMO_VALUE_STRING(TRXC_SDCCH8_6), + OSMO_VALUE_STRING(TRXC_SDCCH8_7), + OSMO_VALUE_STRING(TRXC_SACCHTF), + OSMO_VALUE_STRING(TRXC_SACCHTH_0), + OSMO_VALUE_STRING(TRXC_SACCHTH_1), + OSMO_VALUE_STRING(TRXC_SACCH4_0), + OSMO_VALUE_STRING(TRXC_SACCH4_1), + OSMO_VALUE_STRING(TRXC_SACCH4_2), + OSMO_VALUE_STRING(TRXC_SACCH4_3), + OSMO_VALUE_STRING(TRXC_SACCH8_0), + OSMO_VALUE_STRING(TRXC_SACCH8_1), + OSMO_VALUE_STRING(TRXC_SACCH8_2), + OSMO_VALUE_STRING(TRXC_SACCH8_3), + OSMO_VALUE_STRING(TRXC_SACCH8_4), + OSMO_VALUE_STRING(TRXC_SACCH8_5), + OSMO_VALUE_STRING(TRXC_SACCH8_6), + OSMO_VALUE_STRING(TRXC_SACCH8_7), + OSMO_VALUE_STRING(TRXC_PDTCH), + OSMO_VALUE_STRING(TRXC_PTCCH), + OSMO_VALUE_STRING(_TRX_CHAN_MAX), + { 0, NULL } +}; /* * init / exit @@ -264,10 +306,13 @@ } if (prim_fn > 100) { LOGP(DL1C, LOGL_NOTICE, "Prim for trx=%u ts=%u at fn=%u " - "is out of range, or channel already disabled. " - "If this happens in conjunction with PCU, " - "increase 'rts-advance' by 5. (current fn=%u)\n", - l1t->trx->nr, tn, l1sap->u.data.fn, fn); + "is out of range, or channel %s with type %s is " + "already disabled. If this happens in conjunction " + "with PCU, increase 'rts-advance' by 5. " + "(current fn=%u)\n", l1t->trx->nr, tn, + l1sap->u.data.fn, + get_lchan_by_chan_nr(l1t->trx, chan_nr)->name, + get_value_string(trx_chan_type_names, chan), fn); /* unlink and free message */ llist_del(&msg->list); msgb_free(msg); -- To view, visit https://gerrit.osmocom.org/1550 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I80c581b54eeee371ee524a75a400d1e9ece16c68 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Jan 9 13:32:39 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 9 Jan 2017 13:32:39 +0000 Subject: [PATCH] libosmocore[master]: LAPD: improve logging Message-ID: Review at https://gerrit.osmocom.org/1551 LAPD: improve logging Log error cause and state names in case of SABM errors. Change-Id: I2c7fa276e03f8b14ba41cc1fb6e19d0aae77d127 --- M src/gsm/lapd_core.c 1 file changed, 6 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/51/1551/1 diff --git a/src/gsm/lapd_core.c b/src/gsm/lapd_core.c index fd163c8..cdd9b56 100644 --- a/src/gsm/lapd_core.c +++ b/src/gsm/lapd_core.c @@ -377,8 +377,8 @@ struct lapd_datalink *dl = lctx->dl; struct osmo_dlsap_prim dp; - LOGP(DLLAPD, LOGL_NOTICE, "sending MDL-ERROR-IND cause %d\n", - cause); + LOGP(DLLAPD, LOGL_NOTICE, "sending MDL-ERROR-IND cause %s\n", + rsl_rlm_cause_name(cause)); osmo_prim_init(&dp.oph, 0, PRIM_MDL_ERROR, PRIM_OP_INDICATION, NULL); dp.u.error_ind.cause = cause; return dl->send_dlsap(&dp, lctx); @@ -833,7 +833,8 @@ } if (!dl->cont_res) { LOGP(DLLAPD, LOGL_INFO, "SABM command not " - "allowed in this state\n"); + "allowed in state %s\n", + lapd_state_names[dl->state]); mdl_error(MDL_CAUSE_SABM_MF, lctx); msgb_free(msg); return 0; @@ -870,7 +871,8 @@ /* check for contention resoultion */ if (dl->tx_hist[0].msg && dl->tx_hist[0].msg->len) { LOGP(DLLAPD, LOGL_NOTICE, "SABM not allowed " - "during contention resolution\n"); + "during contention resolution (state %s)\n", + lapd_state_names[dl->state]); mdl_error(MDL_CAUSE_SABM_INFO_NOTALL, lctx); } lapd_send_ua(lctx, length, msg->l3h); -- To view, visit https://gerrit.osmocom.org/1551 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2c7fa276e03f8b14ba41cc1fb6e19d0aae77d127 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Jan 9 14:08:33 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 9 Jan 2017 14:08:33 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: Describe how to run multiple instances of osmo-nitb and osmo... In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1497 to look at the new patch set (#3). Describe how to run multiple instances of osmo-nitb and osmo-bts Change-Id: I69adeef85adda6f08b31b7d176f51e16968c1435 --- M OsmoBTS/chapters/configuration.adoc M OsmoNITB/chapters/running.adoc 2 files changed, 71 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/97/1497/3 diff --git a/OsmoBTS/chapters/configuration.adoc b/OsmoBTS/chapters/configuration.adoc index b91d8ac..cca990b 100644 --- a/OsmoBTS/chapters/configuration.adoc +++ b/OsmoBTS/chapters/configuration.adoc @@ -179,3 +179,29 @@ De-activating power-ramping can be performed by setting the max-initial value to the nominal power. The default max-initial value is 23 dBm. + + +==== Running multiple instances + +It is possible to run multiple instances of `osmo-bts` on one and the same +machine, if the phy-interface is flexible enough to distinguish between +different phy hardware interfaces. + +Since usually a BTS instance runs in conjunction with a dedicated PCU instance, +the socket path between PCU and BTS has to be distinguished between the running +instances. It is possible to change the default socket path via VTY config: + +.Example: Personalize PCU socket path +---- +bts 0 + pcu-socket /tmp/pcu_bts_2 +---- + +It is also necessary to separate the VTY interfaces of the different instances. +The VTY can be bound to a free IP address from the loopback range: + +.Example: Binding VTY to a specific IP address +---- +line vty + bind 127.0.0.2 +---- diff --git a/OsmoNITB/chapters/running.adoc b/OsmoNITB/chapters/running.adoc index ae2c3fc..067a365 100644 --- a/OsmoNITB/chapters/running.adoc +++ b/OsmoNITB/chapters/running.adoc @@ -49,12 +49,56 @@ Enable the RTP proxy code inside OsmoNITB. This will force all voice RTP data to pass through OsmoNITB, rather than going directly from BTS to MGW, or BTS to BTS. -*-m, --mncc-sock*:: +*-M, --mncc-sock-path*:: Enable the MNCC socket for an external MNCC handler. See <> for further information. +*-m, --mncc-sock*:: + Same as option -M (deprecated). *-C, --no-dbcounter*:: Disable the regular periodic synchronization of statistics counters to the database. *-r, --rf-ctl 'RFCTL'*:: Offer a Unix domain socket for RF control at the path/filename 'RFCTL' in the file system. + + +=== Multiple instances + +Running multiple instances of `osmo-nitb` is possible if all interfaces (VTY, +OML) are separated using the appropriate configuration options. The IP based +interfaces are binding to local host by default. In order to separate the +processes, the user has to bind those services to specific but different +IP addresses. + +The VTY and the control interface can be bound to IP addresses from the loopback +address range. + +.Example: Binding VTY and control interface to a specific ip-address +---- +line vty + bind 127.0.0.2 +ctrl + bind 127.0.0.2 +---- + +The OML interface also needs to be separated by binding it to different IP +addresses. Usually it is not possible to use addresses from the loopback +address range here since the OML interface needs to be reachable by an external +BTS. If only one ethernet interface is available, sub-devices with different IP +addresses can be created. + +.Example: Binding OML to a specific IP address +---- +e1_input + ipa bind 10.9.1.101 +---- + +NOTE: Depending on the application, it may be necessary to have different ARFCN, +MCC, MNC and network name settings. It might also be necessary to point to +different database and config files using command line options (see option +-l and -c). + +NOTE: If an external MNCC handler is used, the user has to assign a different +socket path to reach the osmo-nitb instance using commandline option -M. If +option -M is left out, the internal MNCC handler is used and no further +configuration is required. -- To view, visit https://gerrit.osmocom.org/1497 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I69adeef85adda6f08b31b7d176f51e16968c1435 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Jan 9 14:09:01 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 9 Jan 2017 14:09:01 +0000 Subject: osmo-gsm-manuals[master]: Describe how to run multiple instances of osmo-nitb and osmo... In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1497 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I69adeef85adda6f08b31b7d176f51e16968c1435 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 9 14:41:18 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 9 Jan 2017 14:41:18 +0000 Subject: osmo-bts[master]: RSL: Fixup for CID 159534 In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/1544/1//COMMIT_MSG Commit Message: Line 7: RSL: Fixup for CID 159534 I guess the subject line should rather say something meaningful like "RSL: drop obsolete NULL check" with the CID mentioned as 'Related: ...' below -- To view, visit https://gerrit.osmocom.org/1544 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I17dfb42ff404b2a1e18354fb7a7278089b407a79 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Jan 9 14:41:53 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 9 Jan 2017 14:41:53 +0000 Subject: [PATCH] osmo-bts[master]: RSL: drop obsolete NULL check In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1544 to look at the new patch set (#2). RSL: drop obsolete NULL check rsl_rx_paging_cmd() checks if the pointer *trx is NULL, this check does not make much sense since *trx has already been dereferenced without checking earlier in the code. Furthermore *trx is also a mandatory parameter which must not be NULL. Fixes: coverity scan CID#159534 Change-Id: I17dfb42ff404b2a1e18354fb7a7278089b407a79 --- M src/common/rsl.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/44/1544/2 diff --git a/src/common/rsl.c b/src/common/rsl.c index be1861c..41dd2ce 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -402,7 +402,7 @@ identity_lv, chan_needed); if (rc < 0) { /* FIXME: notfiy the BSC on other errors? */ - if (rc == -ENOSPC && trx) + if (rc == -ENOSPC) oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MIN_PAG_TAB_FULL, "BTS paging table is full\n"); -- To view, visit https://gerrit.osmocom.org/1544 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I17dfb42ff404b2a1e18354fb7a7278089b407a79 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Jan 9 14:41:58 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 9 Jan 2017 14:41:58 +0000 Subject: osmo-bts[master]: RSL: drop obsolete NULL check In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1544 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I17dfb42ff404b2a1e18354fb7a7278089b407a79 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 9 14:44:17 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 9 Jan 2017 14:44:17 +0000 Subject: [PATCH] osmo-bts[master]: RSL: add assertions to check args of public API In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1545 to look at the new patch set (#2). RSL: add assertions to check args of public API The public functions in rsl.c do not check for null pointers, add assertions to catch null pointers early. Change-Id: I63f127ce70a4127180f90238f564b63e355216ec --- M src/common/rsl.c 1 file changed, 22 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/45/1545/2 diff --git a/src/common/rsl.c b/src/common/rsl.c index 41dd2ce..a34c455 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -2008,6 +2008,8 @@ void cb_ts_disconnected(struct gsm_bts_trx_ts *ts) { + OSMO_ASSERT(ts); + switch (ts->pchan) { case GSM_PCHAN_TCH_F_PDCH: return ipacc_dyn_pdch_ts_disconnected(ts); @@ -2093,6 +2095,8 @@ void cb_ts_connected(struct gsm_bts_trx_ts *ts) { + OSMO_ASSERT(ts); + switch (ts->pchan) { case GSM_PCHAN_TCH_F_PDCH: return ipacc_dyn_pdch_ts_connected(ts); @@ -2105,7 +2109,10 @@ void ipacc_dyn_pdch_complete(struct gsm_bts_trx_ts *ts, int rc) { - bool pdch_act = ts->flags & TS_F_PDCH_ACT_PENDING; + bool pdch_act; + OSMO_ASSERT(ts); + + pdch_act = ts->flags & TS_F_PDCH_ACT_PENDING; if ((ts->flags & TS_F_PDCH_PENDING_MASK) == TS_F_PDCH_PENDING_MASK) LOGP(DRSL, LOGL_ERROR, @@ -2256,7 +2263,12 @@ int lapdm_rll_tx_cb(struct msgb *msg, struct lapdm_entity *le, void *ctx) { struct gsm_lchan *lchan = ctx; - struct abis_rsl_common_hdr *rh = msgb_l2(msg); + struct abis_rsl_common_hdr *rh; + + /* NOTE: Parameter lapdm_entity *le is ignored */ + + OSMO_ASSERT(msg); + rh = msgb_l2(msg); if (lchan->state != LCHAN_S_ACTIVE) { LOGP(DRSL, LOGL_INFO, "%s(%s) is not active . Dropping message.\n", @@ -2482,15 +2494,22 @@ int lchan_deactivate(struct gsm_lchan *lchan) { + OSMO_ASSERT(lchan); + lchan->ciph_state = 0; return bts_model_lchan_deactivate(lchan); } int down_rsl(struct gsm_bts_trx *trx, struct msgb *msg) { - struct abis_rsl_common_hdr *rslh = msgb_l2(msg); + struct abis_rsl_common_hdr *rslh; int ret = 0; + OSMO_ASSERT(trx); + OSMO_ASSERT(msg); + + rslh = msgb_l2(msg); + if (msgb_l2len(msg) < sizeof(*rslh)) { LOGP(DRSL, LOGL_NOTICE, "RSL message too short\n"); msgb_free(msg); -- To view, visit https://gerrit.osmocom.org/1545 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I63f127ce70a4127180f90238f564b63e355216ec Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Jan 9 14:44:23 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 9 Jan 2017 14:44:23 +0000 Subject: osmo-bts[master]: RSL: add assertions to check args of public API In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1545 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I63f127ce70a4127180f90238f564b63e355216ec Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 9 14:47:30 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 9 Jan 2017 14:47:30 +0000 Subject: [PATCH] osmo-bts[master]: OML: fix possible segfault: add NULL check in oml_ipa_set_at... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1546 to look at the new patch set (#2). OML: fix possible segfault: add NULL check in oml_ipa_set_attr() oml_ipa_set_attr() is using gsm_objclass2mo() to determine the *mo object. However, it is possible that gsm_objclass2mo() returns a null-pointer. The code following up is using *mo without checking. Reject instead of dereferencing a NULL *mo. Fixes: coverity scan CID#159533 Change-Id: Ia2cc9bc504c46ca3843c43d712cd8649bfae9526 --- M src/common/oml.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/46/1546/2 diff --git a/src/common/oml.c b/src/common/oml.c index 8ccfcc6..88c9abd 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -1048,6 +1048,8 @@ rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); if (rc < 0) { mo = gsm_objclass2mo(bts, foh->obj_class, &foh->obj_inst); + if (!mo) + return oml_fom_ack_nack(msg, NM_NACK_OBJINST_UNKN); oml_tx_failure_event_rep(mo, OSMO_EVT_MAJ_UNSUP_ATTR, "New value for IPAC Set Attribute not " "supported\n"); -- To view, visit https://gerrit.osmocom.org/1546 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia2cc9bc504c46ca3843c43d712cd8649bfae9526 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Jan 9 14:47:32 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 9 Jan 2017 14:47:32 +0000 Subject: osmo-bts[master]: OML: fix possible segfault: add NULL check in oml_ipa_set_at... In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1546 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia2cc9bc504c46ca3843c43d712cd8649bfae9526 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 9 14:48:21 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 9 Jan 2017 14:48:21 +0000 Subject: osmo-bts[master]: RSL: add assertions to check args of public API In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1545 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I63f127ce70a4127180f90238f564b63e355216ec Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 9 17:39:23 2017 From: gerrit-no-reply at lists.osmocom.org (ikostov) Date: Mon, 9 Jan 2017 17:39:23 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: SGSN: add Auth. policy, NS Statistics and BSSGP state examples In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1535 to look at the new patch set (#4). SGSN: add Auth. policy, NS Statistics and BSSGP state examples Change-Id: I0164f418e453672321eed00bbc454c1e223ea158 --- M OsmoSGSN/chapters/configuration.adoc M OsmoSGSN/chapters/overview.adoc M common/chapters/gb.adoc 3 files changed, 73 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/35/1535/4 diff --git a/OsmoSGSN/chapters/configuration.adoc b/OsmoSGSN/chapters/configuration.adoc index 8b259ed..694fd18 100644 --- a/OsmoSGSN/chapters/configuration.adoc +++ b/OsmoSGSN/chapters/configuration.adoc @@ -67,6 +67,43 @@ <2> Enable the dynamic GGSN resolving mode <3> Specify the IP address of a DNS server for APN resolution +[[auth-pol]] +=== Authorization Policy + +Authorization determines whether a particular subscriber can access +your network or not. + +The following 4 authorization policy options are available: + +`accept-all`: All IMSIs will be accepted. + +`acl-only`: Accept only IMSIs, which are explicitly white-listed +by the Access Control List (ACL), and the rest will be rejected. + +`closed`: Accept only home network subscribers. +The combination of MCC and MNC fully identifies subscriber's +Home network. The ACL is also heeded. + +`remote`: GSUP protocol is used to remotely access a HLR. +Only remote subscription data will be used. + + +.Example: Assign or change authorization policy: +---- +OsmoSGSN> enable +OsmoSGSN# configure terminal +OsmoSGSN(config)# sgsn +OsmoSGSN(config-sgsn)# auth-policy acl-only <1> +OsmoSGSN(config-sgsn)# write <2> +Configuration saved to sgsn.cfg +OsmoSGSN(config-sgsn)# exit +OsmoSGSN(config)# exit +OsmoSGSN# disable +OsmoSGSN> +---- +<1> 'acl-only' is selected as authorization policy +<2> Saves current changes to cofiguration to make this policy +persistent === Subscriber Configuration diff --git a/OsmoSGSN/chapters/overview.adoc b/OsmoSGSN/chapters/overview.adoc index 566124a..b3a4d69 100644 --- a/OsmoSGSN/chapters/overview.adoc +++ b/OsmoSGSN/chapters/overview.adoc @@ -23,16 +23,16 @@ [graphviz] ---- digraph G { - rankdir=LR; - MS0 [label="MS"] - MS1 [label="MS"] - MS0->BTS [label="Um"] - MS1->BTS [label="Um"] - BTS->BSC [label="Abis"] - BSC->MSC [label="A"] - BTS->PCU [label="pcu_sock"] - PCU->SGSN [label="Gb"] - SGSN->GGSN [label="GTP"] + rankdir=LR; + MS0 [label="MS"]; + MS1 [label="MS"]; + MS0->BTS [label="Um"]; + MS1->BTS [label="Um"]; + BTS->BSC [label="Abis"]; + BSC->MSC [label="A"]; + BTS->PCU [label="pcu_sock"]; + PCU->SGSN [label="Gb"]; + SGSN->GGSN [label="GTP"]; } ---- @@ -58,7 +58,7 @@ ==== GTP Implementation -OsmoSGSN uses the libgtp implementation originating from OpenGGSN. It +OsmoSGSN uses the libgtp implementation originating from OpenGGSN.It supports both GTPv0 and GTPv1. @@ -67,14 +67,6 @@ The GPRS Mobility Management implementation is quite simplistic at this point. It supports the GPRS ATTACH and GPRS ROUTING AREA UPDATE procedures, as well as GPRS ATTACH and GPRS DETACH. - -However, as the SGSN currently does not implement any type of HLR -access, it is not able to authenticate a subscriber or even check if the -subscriber exists at all. As such, all non-roaming subscribes are -allowed to attach to OsmoSGSN. Non-roaming means that the first 5 -digits of the IMSI must match the MCC and MNC of the cell that the -subscriber is registering to. - ==== LLC Implementation diff --git a/common/chapters/gb.adoc b/common/chapters/gb.adoc index d01fa9b..199ef2c 100644 --- a/common/chapters/gb.adoc +++ b/common/chapters/gb.adoc @@ -67,14 +67,36 @@ Encapsulation NS-UDP-IP Local IP: 127.0.0.1, UDP Port: 23000 Encapsulation NS-FR-GRE-IP Local IP: 0.0.0.0 ---- -FIXME -FIXME: show ns stats +.Example: Inspecting NS statistics +---- +OsmoSGSN> show ns stats +Encapsulation NS-UDP-IP Local IP: 10.9.1.198, UDP Port: 23000 +Encapsulation NS-FR-GRE-IP Local IP: 0.0.0.0 +NSEI 101, NS-VC 101, Remote: BSS, ALIVE UNBLOCKED, UDP 10.9.1.119:23000 + NSVC Peer Statistics: + Packets at NS Level ( In): 1024 (2/s 123/m 911/h 0/d) + Packets at NS Level (Out): 1034 (0/s 151/m 894/h 0/d) + Bytes at NS Level ( In): 296638 (1066/s 22222/m 274244/h 0/d) + Bytes at NS Level (Out): 139788 (0/s 48225/m 91710/h 0/d) + NS-VC Block count : 0 (0/s 0/m 0/h 0/d) + NS-VC gone dead count : 0 (0/s 0/m 0/h 0/d) + NS-VC replaced other count: 0 (0/s 0/m 0/h 0/d) + NS-VC changed NSEI count : 0 (0/s 0/m 0/h 0/d) + NS-VCI was invalid count : 0 (0/s 0/m 0/h 0/d) + NSEI was invalid count : 0 (0/s 0/m 0/h 0/d) + ALIVE ACK missing count : 0 (0/s 0/m 0/h 0/d) + RESET ACK missing count : 0 (0/s 0/m 0/h 0/d) + NSVC Peer Statistics: + ALIVE reponse time : 0 ms +---- .Example: Inspecting BSSGP state ---- +OsmoSGSN> show bssgp +NSEI 101, BVCI 2, RA-ID: 1-2-1-0, CID: 0, STATE: UNBLOCKED +NSEI 101, BVCI 0, RA-ID: 0-0-0-0, CID: 0, STATE: UNBLOCKED ---- -FIXME FIXME: show nse -- To view, visit https://gerrit.osmocom.org/1535 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0164f418e453672321eed00bbc454c1e223ea158 Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: ikostov Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Jan 9 19:47:30 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 9 Jan 2017 19:47:30 +0000 Subject: osmo-gsm-manuals[master]: SGSN: add Auth. policy, NS Statistics and BSSGP state examples In-Reply-To: References: Message-ID: Patch Set 4: Code-Review-1 (3 comments) https://gerrit.osmocom.org/#/c/1535/4/OsmoSGSN/chapters/configuration.adoc File OsmoSGSN/chapters/configuration.adoc: Line 84: The combination of MCC and MNC fully identifies subscriber's "a subscriber's home network" Maybe also include the nice explanation about IMSI starting with MCC and MNC that I saw in the other patch? Line 99: OsmoSGSN(config-sgsn)# exit I think we don't need to show the exits here. BTW, 'end' once instead of multiple 'exit' is quicker. https://gerrit.osmocom.org/#/c/1535/4/OsmoSGSN/chapters/overview.adoc File OsmoSGSN/chapters/overview.adoc: Line 61: OsmoSGSN uses the libgtp implementation originating from OpenGGSN.It this looks like a change by mistake -- To view, visit https://gerrit.osmocom.org/1535 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0164f418e453672321eed00bbc454c1e223ea158 Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: ikostov Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Jan 10 08:56:32 2017 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Tue, 10 Jan 2017 08:56:32 +0000 Subject: osmo-pcu[master]: Enable padding support for retransmission in EGPRS DL TBF In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/1513/1//COMMIT_MSG Commit Message: Line 8: updating the Commit Message -- To view, visit https://gerrit.osmocom.org/1513 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idaf956244aa029c4bef70ecf94163044a3c85f59 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Jan 10 08:59:05 2017 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Tue, 10 Jan 2017 08:59:05 +0000 Subject: [PATCH] osmo-pcu[master]: Enable padding support for retransmission in EGPRS DL TBF In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1513 to look at the new patch set (#2). Enable padding support for retransmission in EGPRS DL TBF According to section 10.3a.0 of 44.060 version 7.27.0 Release 7, MCS8 retransmission shall be made as either MCS8->MCS8, MCS8->MCS6 padding or MCS8->MCS3 padding. When PCU was enabled for this transition, L1 was discarding this RLC blocks when received from PCU(MS was not receiving it), causing retransmission failure. Hence frequent DL-TBF establishment or degrade of throughput in DL. During discussion with NuRAN, we found, this is the limitation with LiteCell, they have fixed the same Limitation now, so the support has been enabled from the PCU code. This patch is integration tested successfully with LiteCell 1.5 and B210, B200 setup. Change-Id: Idaf956244aa029c4bef70ecf94163044a3c85f59 --- M src/tbf_dl.cpp M tests/tbf/TbfTest.err 2 files changed, 10 insertions(+), 28 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/13/1513/2 diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 78f06e9..f408418 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -391,14 +391,6 @@ ms()->current_cs_dl().to_num(), m_rlc.block(bsn)->cs_current_trans.to_num(), bts->bts_data()->dl_arq_type, bsn); - - /* TODO: Need to remove this check when MCS-8 -> MCS-6 - * transistion is handled. - * Refer commit be881c028fc4da00c4046ecd9296727975c206a3 - */ - if (m_rlc.block(bsn)->cs_init == GprsCodingScheme::MCS8) - m_rlc.block(bsn)->cs_current_trans = - GprsCodingScheme::MCS8; } else m_rlc.block(bsn)->cs_current_trans = m_rlc.block(bsn)->cs_last; @@ -661,15 +653,7 @@ spb_status == EGPRS_RESEG_SECOND_SEG_SENT) need_padding = true; } else if (num_bsns == 1) { - /* TODO: remove the conditional when MCS-6 padding isn't - * failing to be decoded by MEs anymore */ - /* TODO: support of MCS-8 -> MCS-6 transition should be - * handled - * Refer commit be881c028fc4da00c4046ecd9296727975c206a3 - * dated 2016-02-07 23:45:40 (UTC) - */ - if (cs != GprsCodingScheme(GprsCodingScheme::MCS8)) - cs.decToSingleBlock(&need_padding); + cs.decToSingleBlock(&need_padding); } spb = get_egprs_dl_spb(index); diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index 2647551..3e35670 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -5298,18 +5298,17 @@ Complete DL frame for TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS)len=56 data block (BSN 0, MCS-8): 14 71 01 01 01 01 01 01 01 01 01 01 43 c0 01 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b - Restarting at BSN 0, because all blocks have been transmitted (FLOW). -- need_padding 0 spb_status 0 spb 0(BSN1 0 BSN2 -1) +- need_padding 1 spb_status 0 spb 0(BSN1 0 BSN2 -1) - Copying data unit 0 (BSN 0) -- Copying data unit 1 (BSN 0) - Scheduling Ack/Nack polling, because is was requested explicitly (e.g. first final block sent). Polling is already scheduled for TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) -msg block (BSN 0, MCS-8): 07 00 00 00 60 50 c4 05 04 04 04 04 04 04 04 04 04 0c 01 07 ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac 40 11 17 10 10 10 10 10 10 10 10 10 30 04 1c b0 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 02 -Sending data request: trx=0 ts=4 sapi=5 arfcn=0 fn=4 block=1 data=07 00 00 00 60 50 c4 05 04 04 04 04 04 04 04 04 04 0c 01 07 ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac 40 11 17 10 10 10 10 10 10 10 10 10 30 04 1c b0 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 02 +msg block (BSN 0, MCS-6, padded): 07 00 00 04 00 00 00 00 00 00 45 5c 40 40 40 40 40 40 40 40 40 c0 10 70 c0 ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca 0a +Sending data request: trx=0 ts=4 sapi=5 arfcn=0 fn=4 block=1 data=07 00 00 04 00 00 00 00 00 00 45 5c 40 40 40 40 40 40 40 40 40 c0 10 70 c0 ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca 0a TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) append Received RTS for PDCH: TRX=0 TS=4 FN=8 block_nr=2 scheduling free USF for polling at FN=13 of TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Scheduling data message at RTS for DL TFI=0 (TRX=0, TS=4) prio=3 TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink (V(A)==0 .. V(S)==1) -- initial_cs_dl(8) last_mcs(8) demanded_mcs(8) cs_trans(8) arq_type(1) bsn(0) +- initial_cs_dl(8) last_mcs(6) demanded_mcs(8) cs_trans(8) arq_type(1) bsn(0) - Resending BSN 0 - Sending new block at BSN 1, CS=MCS-8 - Dequeue next LLC for TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) (len=512) @@ -5320,8 +5319,8 @@ - Copying data unit 1 (BSN 1) - Scheduling Ack/Nack polling, because is was requested explicitly (e.g. first final block sent). Polling is already scheduled for TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) -msg block (BSN 0, MCS-8): 07 00 00 02 88 50 c4 05 04 04 04 04 04 04 04 04 04 0c 01 07 ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac 14 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 00 -Sending data request: trx=0 ts=4 sapi=5 arfcn=0 fn=8 block=2 data=07 00 00 02 88 50 c4 05 04 04 04 04 04 04 04 04 04 0c 01 07 ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac 14 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 00 +msg block (BSN 0, MCS-8): 07 00 00 02 58 50 c4 05 04 04 04 04 04 04 04 04 04 0c 01 07 ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac 14 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 00 +Sending data request: trx=0 ts=4 sapi=5 arfcn=0 fn=8 block=2 data=07 00 00 02 58 50 c4 05 04 04 04 04 04 04 04 04 04 0c 01 07 ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac 14 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 00 Scheduling data message at RTS for DL TFI=0 (TRX=0, TS=4) prio=3 TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink (V(A)==0 .. V(S)==2) - Sending new block at BSN 2, CS=MCS-8 @@ -5378,13 +5377,12 @@ Complete DL frame for TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS)len=30 data block (BSN 8, MCS-8): 48 3d 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 43 c0 01 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b - Restarting at BSN 0, because all blocks have been transmitted (FLOW). -- need_padding 0 spb_status 0 spb 0(BSN1 8 BSN2 -1) +- need_padding 1 spb_status 0 spb 0(BSN1 8 BSN2 -1) - Copying data unit 0 (BSN 8) -- Copying data unit 1 (BSN 8) - Scheduling Ack/Nack polling, because is was requested explicitly (e.g. first final block sent). Polling is already scheduled for TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) -msg block (BSN 8, MCS-8): 07 00 02 00 60 20 f5 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 0c 01 07 ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac 80 d4 13 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 30 04 1c b0 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 02 -Sending data request: trx=0 ts=4 sapi=5 arfcn=0 fn=26 block=6 data=07 00 02 00 60 20 f5 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 0c 01 07 ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac 80 d4 13 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 30 04 1c b0 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 02 +msg block (BSN 8, MCS-6, padded): 07 00 02 04 00 00 00 00 00 00 52 4f 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 c0 10 70 c0 ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca 0a +Sending data request: trx=0 ts=4 sapi=5 arfcn=0 fn=26 block=6 data=07 00 02 04 00 00 00 00 00 00 52 4f 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 c0 10 70 c0 ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca 0a TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -- To view, visit https://gerrit.osmocom.org/1513 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Idaf956244aa029c4bef70ecf94163044a3c85f59 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: arvind.sirsikar From gerrit-no-reply at lists.osmocom.org Tue Jan 10 09:29:33 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 10 Jan 2017 09:29:33 +0000 Subject: [PATCH] libosmocore[master]: DTX: fix AMR SID-FIRST detection Message-ID: Review at https://gerrit.osmocom.org/1552 DTX: fix AMR SID-FIRST detection Max's note: adjusted test output. Change-Id: I46477c631bf86345cb757f31d7f2e2935b12adcc Related: OS#1801 --- M src/codec/gsm690.c M tests/codec/codec_test.ok 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/52/1552/1 diff --git a/src/codec/gsm690.c b/src/codec/gsm690.c index c3cb932..b273f0f 100644 --- a/src/codec/gsm690.c +++ b/src/codec/gsm690.c @@ -215,7 +215,7 @@ }; static const uint8_t amr_len_by_ft[16] = { - 12, 13, 15, 17, 19, 20, 26, 31, 0, 0, 0, 0, 0, 0, 0, 0 + 12, 13, 15, 17, 19, 20, 26, 31, 7, 0, 0, 0, 0, 0, 0, 0 }; const struct value_string osmo_amr_type_names[] = { @@ -262,7 +262,7 @@ if (rtppayload[1] >> 7) return -ENOTSUP; - if (payload_len - 2 < amr_len_by_ft[type]) + if (payload_len < amr_len_by_ft[type]) return -ENOTSUP; if (ft) diff --git a/tests/codec/codec_test.ok b/tests/codec/codec_test.ok index 2af7cc7..80c4a09 100644 --- a/tests/codec/codec_test.ok +++ b/tests/codec/codec_test.ok @@ -1,6 +1,6 @@ AMR RTP payload decoder test: -[2] decode RTP 20 44 00 00 00 00 04 OK: FT AMR SID, CMR AMR 5,90 kbit/s, CMI is 2, SID type FIRST [2] encode [0] -[2] decode RTP 20 44 29 c2 92 91 f4 OK: FT AMR SID, CMR AMR 5,90 kbit/s, CMI is 2, SID type UPDATE [2] encode [0] +[9] decode RTP 20 44 00 00 00 00 04 OK: FT AMR SID, CMR AMR 5,90 kbit/s, CMI is 2, SID type FIRST [9] encode [0] +[9] decode RTP 20 44 29 c2 92 91 f4 OK: FT AMR SID, CMR AMR 5,90 kbit/s, CMI is 2, SID type UPDATE [9] encode [0] [2/2] No Data/NA, CMR: OK, FT: OK, BFI: OK, CMI: -1, STI: -1 [2/2] No Data/NA, CMR: OK, FT: OK, BFI: OK, CMI: -1, STI: -1 [33/33] AMR 12,2 kbit/s (GSM-EFR), CMR: OK, FT: OK, BFI: OK, CMI: -1, STI: -1 -- To view, visit https://gerrit.osmocom.org/1552 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I46477c631bf86345cb757f31d7f2e2935b12adcc Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Jan 10 09:29:38 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 10 Jan 2017 09:29:38 +0000 Subject: [PATCH] osmo-bts[master]: DTX: fix SID-FIRST detection Message-ID: Review at https://gerrit.osmocom.org/1553 DTX: fix SID-FIRST detection Max's note: made similar modification to osmo-bts-sysmo/tch.c Change-Id: I76e62783b73803dfc0d32693a68020a9d89878b8 Related: OS#1801 --- M src/osmo-bts-litecell15/tch.c M src/osmo-bts-sysmo/tch.c 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/53/1553/1 diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index a47a88f..4b22b64 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -363,7 +363,7 @@ GsmL1_PhDataInd_t *data_ind = &l1p->u.phDataInd; uint8_t payload_type = data_ind->msgUnitParam.u8Buffer[0]; uint8_t *payload = data_ind->msgUnitParam.u8Buffer + 1; - uint8_t payload_len, sid_first[7] = {0}; + uint8_t payload_len, sid_first[9] = { 0 }; struct msgb *rmsg = NULL; struct gsm_lchan *lchan = &trx->ts[L1SAP_CHAN2TS(chan_nr)].lchan[l1sap_chan2ss(chan_nr)]; diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index bc495d9..8eb419b 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -461,7 +461,7 @@ GsmL1_PhDataInd_t *data_ind = &l1p->u.phDataInd; uint8_t payload_type = data_ind->msgUnitParam.u8Buffer[0]; uint8_t *payload = data_ind->msgUnitParam.u8Buffer + 1; - uint8_t payload_len, sid_first[7] = {0}; + uint8_t payload_len, sid_first[9] = { 0 }; struct msgb *rmsg = NULL; struct gsm_lchan *lchan = &trx->ts[L1SAP_CHAN2TS(chan_nr)].lchan[l1sap_chan2ss(chan_nr)]; -- To view, visit https://gerrit.osmocom.org/1553 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I76e62783b73803dfc0d32693a68020a9d89878b8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Jan 10 09:46:33 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 10 Jan 2017 09:46:33 +0000 Subject: [PATCH] osmo-bts[master]: RSL: Fixup for CID 159534 Null pointer dereferences (REVERSE... In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1544 to look at the new patch set (#3). RSL: Fixup for CID 159534 Null pointer dereferences (REVERSE_INULL) rsl_rx_paging_cmd() checks if the pointer *trx is NULL, this check does not make much sense since *trx has already been dereferenced without checking earlier in the code. Furthermore *trx is also a mandatory parameter which must not be NULL. Change-Id: I17dfb42ff404b2a1e18354fb7a7278089b407a79 --- M src/common/rsl.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/44/1544/3 diff --git a/src/common/rsl.c b/src/common/rsl.c index be1861c..41dd2ce 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -402,7 +402,7 @@ identity_lv, chan_needed); if (rc < 0) { /* FIXME: notfiy the BSC on other errors? */ - if (rc == -ENOSPC && trx) + if (rc == -ENOSPC) oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MIN_PAG_TAB_FULL, "BTS paging table is full\n"); -- To view, visit https://gerrit.osmocom.org/1544 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I17dfb42ff404b2a1e18354fb7a7278089b407a79 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Jan 10 09:46:33 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 10 Jan 2017 09:46:33 +0000 Subject: [PATCH] osmo-bts[master]: RSL: adding assertions In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1545 to look at the new patch set (#3). RSL: adding assertions The public functions in rsl.c do not check for null pointers, added assertions to catch null pointers early Change-Id: I63f127ce70a4127180f90238f564b63e355216ec --- M src/common/rsl.c 1 file changed, 22 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/45/1545/3 diff --git a/src/common/rsl.c b/src/common/rsl.c index 41dd2ce..a34c455 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -2008,6 +2008,8 @@ void cb_ts_disconnected(struct gsm_bts_trx_ts *ts) { + OSMO_ASSERT(ts); + switch (ts->pchan) { case GSM_PCHAN_TCH_F_PDCH: return ipacc_dyn_pdch_ts_disconnected(ts); @@ -2093,6 +2095,8 @@ void cb_ts_connected(struct gsm_bts_trx_ts *ts) { + OSMO_ASSERT(ts); + switch (ts->pchan) { case GSM_PCHAN_TCH_F_PDCH: return ipacc_dyn_pdch_ts_connected(ts); @@ -2105,7 +2109,10 @@ void ipacc_dyn_pdch_complete(struct gsm_bts_trx_ts *ts, int rc) { - bool pdch_act = ts->flags & TS_F_PDCH_ACT_PENDING; + bool pdch_act; + OSMO_ASSERT(ts); + + pdch_act = ts->flags & TS_F_PDCH_ACT_PENDING; if ((ts->flags & TS_F_PDCH_PENDING_MASK) == TS_F_PDCH_PENDING_MASK) LOGP(DRSL, LOGL_ERROR, @@ -2256,7 +2263,12 @@ int lapdm_rll_tx_cb(struct msgb *msg, struct lapdm_entity *le, void *ctx) { struct gsm_lchan *lchan = ctx; - struct abis_rsl_common_hdr *rh = msgb_l2(msg); + struct abis_rsl_common_hdr *rh; + + /* NOTE: Parameter lapdm_entity *le is ignored */ + + OSMO_ASSERT(msg); + rh = msgb_l2(msg); if (lchan->state != LCHAN_S_ACTIVE) { LOGP(DRSL, LOGL_INFO, "%s(%s) is not active . Dropping message.\n", @@ -2482,15 +2494,22 @@ int lchan_deactivate(struct gsm_lchan *lchan) { + OSMO_ASSERT(lchan); + lchan->ciph_state = 0; return bts_model_lchan_deactivate(lchan); } int down_rsl(struct gsm_bts_trx *trx, struct msgb *msg) { - struct abis_rsl_common_hdr *rslh = msgb_l2(msg); + struct abis_rsl_common_hdr *rslh; int ret = 0; + OSMO_ASSERT(trx); + OSMO_ASSERT(msg); + + rslh = msgb_l2(msg); + if (msgb_l2len(msg) < sizeof(*rslh)) { LOGP(DRSL, LOGL_NOTICE, "RSL message too short\n"); msgb_free(msg); -- To view, visit https://gerrit.osmocom.org/1545 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I63f127ce70a4127180f90238f564b63e355216ec Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Jan 10 09:46:33 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 10 Jan 2017 09:46:33 +0000 Subject: [PATCH] osmo-bts[master]: OML: Fixup for CID 159533 Null pointer dereferences (NULL_RE... In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1546 to look at the new patch set (#3). OML: Fixup for CID 159533 Null pointer dereferences (NULL_RETURNS) oml_ipa_set_attr() is using gsm_objclass2mo() to determine the *mo object. However it is possible that gsm_objclass2mo() a null-pointer. The code following up is using *mo without checking. This commit adds an additional check to ensure that *mo is not used without checking. Change-Id: Ia2cc9bc504c46ca3843c43d712cd8649bfae9526 --- M src/common/oml.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/46/1546/3 diff --git a/src/common/oml.c b/src/common/oml.c index 8ccfcc6..88c9abd 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -1048,6 +1048,8 @@ rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); if (rc < 0) { mo = gsm_objclass2mo(bts, foh->obj_class, &foh->obj_inst); + if (!mo) + return oml_fom_ack_nack(msg, NM_NACK_OBJINST_UNKN); oml_tx_failure_event_rep(mo, OSMO_EVT_MAJ_UNSUP_ATTR, "New value for IPAC Set Attribute not " "supported\n"); -- To view, visit https://gerrit.osmocom.org/1546 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia2cc9bc504c46ca3843c43d712cd8649bfae9526 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Jan 10 11:32:06 2017 From: gerrit-no-reply at lists.osmocom.org (ikostov) Date: Tue, 10 Jan 2017 11:32:06 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: SGSN: add Auth. policy, NS Statistics and BSSGP state examples In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1535 to look at the new patch set (#5). SGSN: add Auth. policy, NS Statistics and BSSGP state examples Change-Id: I0164f418e453672321eed00bbc454c1e223ea158 --- M OsmoSGSN/chapters/configuration.adoc M OsmoSGSN/chapters/overview.adoc M common/chapters/gb.adoc 3 files changed, 73 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/35/1535/5 diff --git a/OsmoSGSN/chapters/configuration.adoc b/OsmoSGSN/chapters/configuration.adoc index 8b259ed..108e9af 100644 --- a/OsmoSGSN/chapters/configuration.adoc +++ b/OsmoSGSN/chapters/configuration.adoc @@ -67,6 +67,44 @@ <2> Enable the dynamic GGSN resolving mode <3> Specify the IP address of a DNS server for APN resolution +[[auth-pol]] +=== Authorization Policy + +Authorization determines whether a particular subscriber can access +your network or not. + +The following 4 authorization policy options are available: + +`accept-all`: All IMSIs will be accepted. + +`acl-only`: Accept only IMSIs, which are explicitly white-listed +by the Access Control List (ACL), and the rest will be rejected. + +`closed`: Accept only home network subscribers. +The combination of MCC and MNC fully identifies a subscriber's +Home network. Which is also known as a Home Network Identity (HNI). +(i.e. MCC 901, MNC 700, IMSI 901700000003080). The ACL is also +heeded. + +`remote`: GSUP protocol is used to remotely access a HLR. +Only remote subscription data will be used. + + +.Example: Assign or change authorization policy: +---- +OsmoSGSN> enable +OsmoSGSN# configure terminal +OsmoSGSN(config)# sgsn +OsmoSGSN(config-sgsn)# auth-policy acl-only <1> +OsmoSGSN(config-sgsn)# write <2> +Configuration saved to sgsn.cfg +OsmoSGSN(config-sgsn)# end +OsmoSGSN# disable +OsmoSGSN> +---- +<1> 'acl-only' is selected as authorization policy +<2> Saves current changes to cofiguration to make this policy +persistent === Subscriber Configuration diff --git a/OsmoSGSN/chapters/overview.adoc b/OsmoSGSN/chapters/overview.adoc index 566124a..2ff92fa 100644 --- a/OsmoSGSN/chapters/overview.adoc +++ b/OsmoSGSN/chapters/overview.adoc @@ -23,16 +23,16 @@ [graphviz] ---- digraph G { - rankdir=LR; - MS0 [label="MS"] - MS1 [label="MS"] - MS0->BTS [label="Um"] - MS1->BTS [label="Um"] - BTS->BSC [label="Abis"] - BSC->MSC [label="A"] - BTS->PCU [label="pcu_sock"] - PCU->SGSN [label="Gb"] - SGSN->GGSN [label="GTP"] + rankdir=LR; + MS0 [label="MS"]; + MS1 [label="MS"]; + MS0->BTS [label="Um"]; + MS1->BTS [label="Um"]; + BTS->BSC [label="Abis"]; + BSC->MSC [label="A"]; + BTS->PCU [label="pcu_sock"]; + PCU->SGSN [label="Gb"]; + SGSN->GGSN [label="GTP"]; } ---- @@ -67,14 +67,6 @@ The GPRS Mobility Management implementation is quite simplistic at this point. It supports the GPRS ATTACH and GPRS ROUTING AREA UPDATE procedures, as well as GPRS ATTACH and GPRS DETACH. - -However, as the SGSN currently does not implement any type of HLR -access, it is not able to authenticate a subscriber or even check if the -subscriber exists at all. As such, all non-roaming subscribes are -allowed to attach to OsmoSGSN. Non-roaming means that the first 5 -digits of the IMSI must match the MCC and MNC of the cell that the -subscriber is registering to. - ==== LLC Implementation diff --git a/common/chapters/gb.adoc b/common/chapters/gb.adoc index d01fa9b..199ef2c 100644 --- a/common/chapters/gb.adoc +++ b/common/chapters/gb.adoc @@ -67,14 +67,36 @@ Encapsulation NS-UDP-IP Local IP: 127.0.0.1, UDP Port: 23000 Encapsulation NS-FR-GRE-IP Local IP: 0.0.0.0 ---- -FIXME -FIXME: show ns stats +.Example: Inspecting NS statistics +---- +OsmoSGSN> show ns stats +Encapsulation NS-UDP-IP Local IP: 10.9.1.198, UDP Port: 23000 +Encapsulation NS-FR-GRE-IP Local IP: 0.0.0.0 +NSEI 101, NS-VC 101, Remote: BSS, ALIVE UNBLOCKED, UDP 10.9.1.119:23000 + NSVC Peer Statistics: + Packets at NS Level ( In): 1024 (2/s 123/m 911/h 0/d) + Packets at NS Level (Out): 1034 (0/s 151/m 894/h 0/d) + Bytes at NS Level ( In): 296638 (1066/s 22222/m 274244/h 0/d) + Bytes at NS Level (Out): 139788 (0/s 48225/m 91710/h 0/d) + NS-VC Block count : 0 (0/s 0/m 0/h 0/d) + NS-VC gone dead count : 0 (0/s 0/m 0/h 0/d) + NS-VC replaced other count: 0 (0/s 0/m 0/h 0/d) + NS-VC changed NSEI count : 0 (0/s 0/m 0/h 0/d) + NS-VCI was invalid count : 0 (0/s 0/m 0/h 0/d) + NSEI was invalid count : 0 (0/s 0/m 0/h 0/d) + ALIVE ACK missing count : 0 (0/s 0/m 0/h 0/d) + RESET ACK missing count : 0 (0/s 0/m 0/h 0/d) + NSVC Peer Statistics: + ALIVE reponse time : 0 ms +---- .Example: Inspecting BSSGP state ---- +OsmoSGSN> show bssgp +NSEI 101, BVCI 2, RA-ID: 1-2-1-0, CID: 0, STATE: UNBLOCKED +NSEI 101, BVCI 0, RA-ID: 0-0-0-0, CID: 0, STATE: UNBLOCKED ---- -FIXME FIXME: show nse -- To view, visit https://gerrit.osmocom.org/1535 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0164f418e453672321eed00bbc454c1e223ea158 Gerrit-PatchSet: 5 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: ikostov Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Jan 10 11:52:26 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 10 Jan 2017 11:52:26 +0000 Subject: [PATCH] osmo-bts[master]: RSL: add assertions to check args of public API In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1545 to look at the new patch set (#4). RSL: add assertions to check args of public API The public functions in rsl.c do not check for null pointers, add assertions to catch null pointers early. Change-Id: I63f127ce70a4127180f90238f564b63e355216ec --- M src/common/rsl.c 1 file changed, 22 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/45/1545/4 diff --git a/src/common/rsl.c b/src/common/rsl.c index 41dd2ce..a34c455 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -2008,6 +2008,8 @@ void cb_ts_disconnected(struct gsm_bts_trx_ts *ts) { + OSMO_ASSERT(ts); + switch (ts->pchan) { case GSM_PCHAN_TCH_F_PDCH: return ipacc_dyn_pdch_ts_disconnected(ts); @@ -2093,6 +2095,8 @@ void cb_ts_connected(struct gsm_bts_trx_ts *ts) { + OSMO_ASSERT(ts); + switch (ts->pchan) { case GSM_PCHAN_TCH_F_PDCH: return ipacc_dyn_pdch_ts_connected(ts); @@ -2105,7 +2109,10 @@ void ipacc_dyn_pdch_complete(struct gsm_bts_trx_ts *ts, int rc) { - bool pdch_act = ts->flags & TS_F_PDCH_ACT_PENDING; + bool pdch_act; + OSMO_ASSERT(ts); + + pdch_act = ts->flags & TS_F_PDCH_ACT_PENDING; if ((ts->flags & TS_F_PDCH_PENDING_MASK) == TS_F_PDCH_PENDING_MASK) LOGP(DRSL, LOGL_ERROR, @@ -2256,7 +2263,12 @@ int lapdm_rll_tx_cb(struct msgb *msg, struct lapdm_entity *le, void *ctx) { struct gsm_lchan *lchan = ctx; - struct abis_rsl_common_hdr *rh = msgb_l2(msg); + struct abis_rsl_common_hdr *rh; + + /* NOTE: Parameter lapdm_entity *le is ignored */ + + OSMO_ASSERT(msg); + rh = msgb_l2(msg); if (lchan->state != LCHAN_S_ACTIVE) { LOGP(DRSL, LOGL_INFO, "%s(%s) is not active . Dropping message.\n", @@ -2482,15 +2494,22 @@ int lchan_deactivate(struct gsm_lchan *lchan) { + OSMO_ASSERT(lchan); + lchan->ciph_state = 0; return bts_model_lchan_deactivate(lchan); } int down_rsl(struct gsm_bts_trx *trx, struct msgb *msg) { - struct abis_rsl_common_hdr *rslh = msgb_l2(msg); + struct abis_rsl_common_hdr *rslh; int ret = 0; + OSMO_ASSERT(trx); + OSMO_ASSERT(msg); + + rslh = msgb_l2(msg); + if (msgb_l2len(msg) < sizeof(*rslh)) { LOGP(DRSL, LOGL_NOTICE, "RSL message too short\n"); msgb_free(msg); -- To view, visit https://gerrit.osmocom.org/1545 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I63f127ce70a4127180f90238f564b63e355216ec Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Jan 10 11:54:05 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 10 Jan 2017 11:54:05 +0000 Subject: [PATCH] osmo-bts[master]: RSL: drop obsolete NULL check In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1544 to look at the new patch set (#4). RSL: drop obsolete NULL check rsl_rx_paging_cmd() checks if the pointer *trx is NULL, this check does not make much sense since *trx has already been dereferenced without checking earlier in the code. Furthermore *trx is also a mandatory parameter which must not be NULL. Fixes: coverity scan CID#159534 Change-Id: I17dfb42ff404b2a1e18354fb7a7278089b407a79 --- M src/common/rsl.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/44/1544/4 diff --git a/src/common/rsl.c b/src/common/rsl.c index be1861c..41dd2ce 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -402,7 +402,7 @@ identity_lv, chan_needed); if (rc < 0) { /* FIXME: notfiy the BSC on other errors? */ - if (rc == -ENOSPC && trx) + if (rc == -ENOSPC) oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MIN_PAG_TAB_FULL, "BTS paging table is full\n"); -- To view, visit https://gerrit.osmocom.org/1544 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I17dfb42ff404b2a1e18354fb7a7278089b407a79 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Jan 10 11:55:04 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 10 Jan 2017 11:55:04 +0000 Subject: [PATCH] osmo-bts[master]: OML: fix possible segfault: add NULL check in oml_ipa_set_at... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1546 to look at the new patch set (#4). OML: fix possible segfault: add NULL check in oml_ipa_set_attr() oml_ipa_set_attr() is using gsm_objclass2mo() to determine the *mo object. However, it is possible that gsm_objclass2mo() returns a null-pointer. The code following up is using *mo without checking. Reject instead of dereferencing a NULL *mo. Fixes: coverity scan CID#159533 Change-Id: Ia2cc9bc504c46ca3843c43d712cd8649bfae9526 --- M src/common/oml.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/46/1546/4 diff --git a/src/common/oml.c b/src/common/oml.c index 8ccfcc6..88c9abd 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -1048,6 +1048,8 @@ rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); if (rc < 0) { mo = gsm_objclass2mo(bts, foh->obj_class, &foh->obj_inst); + if (!mo) + return oml_fom_ack_nack(msg, NM_NACK_OBJINST_UNKN); oml_tx_failure_event_rep(mo, OSMO_EVT_MAJ_UNSUP_ATTR, "New value for IPAC Set Attribute not " "supported\n"); -- To view, visit https://gerrit.osmocom.org/1546 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia2cc9bc504c46ca3843c43d712cd8649bfae9526 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Jan 10 12:11:19 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 10 Jan 2017 12:11:19 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: SGSN: add Auth. policy, NS Statistics and BSSGP state exampl... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1535 to look at the new patch set (#6). SGSN: add Auth. policy, NS Statistics and BSSGP state examples, tweaks Add semicoli in fig-gprs-pcubts digraph. Remove section from GMM Implementation about non-existence of HLR. The SGSN can access osmo-hlr via GSUP (and will have to do so in the libvlr future). Change-Id: I0164f418e453672321eed00bbc454c1e223ea158 --- M OsmoSGSN/chapters/configuration.adoc M OsmoSGSN/chapters/overview.adoc M common/chapters/gb.adoc 3 files changed, 72 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/35/1535/6 diff --git a/OsmoSGSN/chapters/configuration.adoc b/OsmoSGSN/chapters/configuration.adoc index 8b259ed..a933d1b 100644 --- a/OsmoSGSN/chapters/configuration.adoc +++ b/OsmoSGSN/chapters/configuration.adoc @@ -67,6 +67,43 @@ <2> Enable the dynamic GGSN resolving mode <3> Specify the IP address of a DNS server for APN resolution +[[auth-pol]] +=== Authorization Policy + +Authorization determines whether a particular subscriber can access +your network or not. + +The following 4 authorization policy options are available: + +`accept-all`: All IMSIs will be accepted. + +`acl-only`: Accept only IMSIs, which are explicitly white-listed +by the Access Control List (ACL), and the rest will be rejected. + +`closed`: Accept only home network subscribers. +The combination of MCC and MNC fully identifies a subscriber's +home network, also known as a Home Network Identity (HNI, i.e. +MCC and MNC found at the start of the IMSI, e.g. MCC 901 and +MNC 700 with IMSI 901700000003080). The ACL is also heeded. + +`remote`: GSUP protocol is used to remotely access a HLR. +Only remote subscription data will be used. + +.Example: Assign or change authorization policy: +---- +OsmoSGSN> enable +OsmoSGSN# configure terminal +OsmoSGSN(config)# sgsn +OsmoSGSN(config-sgsn)# auth-policy acl-only <1> +OsmoSGSN(config-sgsn)# write <2> +Configuration saved to sgsn.cfg +OsmoSGSN(config-sgsn)# end +OsmoSGSN# disable +OsmoSGSN> +---- +<1> 'acl-only' is selected as authorization policy +<2> Saves current changes to cofiguration to make this policy +persistent === Subscriber Configuration diff --git a/OsmoSGSN/chapters/overview.adoc b/OsmoSGSN/chapters/overview.adoc index 566124a..2ff92fa 100644 --- a/OsmoSGSN/chapters/overview.adoc +++ b/OsmoSGSN/chapters/overview.adoc @@ -23,16 +23,16 @@ [graphviz] ---- digraph G { - rankdir=LR; - MS0 [label="MS"] - MS1 [label="MS"] - MS0->BTS [label="Um"] - MS1->BTS [label="Um"] - BTS->BSC [label="Abis"] - BSC->MSC [label="A"] - BTS->PCU [label="pcu_sock"] - PCU->SGSN [label="Gb"] - SGSN->GGSN [label="GTP"] + rankdir=LR; + MS0 [label="MS"]; + MS1 [label="MS"]; + MS0->BTS [label="Um"]; + MS1->BTS [label="Um"]; + BTS->BSC [label="Abis"]; + BSC->MSC [label="A"]; + BTS->PCU [label="pcu_sock"]; + PCU->SGSN [label="Gb"]; + SGSN->GGSN [label="GTP"]; } ---- @@ -67,14 +67,6 @@ The GPRS Mobility Management implementation is quite simplistic at this point. It supports the GPRS ATTACH and GPRS ROUTING AREA UPDATE procedures, as well as GPRS ATTACH and GPRS DETACH. - -However, as the SGSN currently does not implement any type of HLR -access, it is not able to authenticate a subscriber or even check if the -subscriber exists at all. As such, all non-roaming subscribes are -allowed to attach to OsmoSGSN. Non-roaming means that the first 5 -digits of the IMSI must match the MCC and MNC of the cell that the -subscriber is registering to. - ==== LLC Implementation diff --git a/common/chapters/gb.adoc b/common/chapters/gb.adoc index d01fa9b..199ef2c 100644 --- a/common/chapters/gb.adoc +++ b/common/chapters/gb.adoc @@ -67,14 +67,36 @@ Encapsulation NS-UDP-IP Local IP: 127.0.0.1, UDP Port: 23000 Encapsulation NS-FR-GRE-IP Local IP: 0.0.0.0 ---- -FIXME -FIXME: show ns stats +.Example: Inspecting NS statistics +---- +OsmoSGSN> show ns stats +Encapsulation NS-UDP-IP Local IP: 10.9.1.198, UDP Port: 23000 +Encapsulation NS-FR-GRE-IP Local IP: 0.0.0.0 +NSEI 101, NS-VC 101, Remote: BSS, ALIVE UNBLOCKED, UDP 10.9.1.119:23000 + NSVC Peer Statistics: + Packets at NS Level ( In): 1024 (2/s 123/m 911/h 0/d) + Packets at NS Level (Out): 1034 (0/s 151/m 894/h 0/d) + Bytes at NS Level ( In): 296638 (1066/s 22222/m 274244/h 0/d) + Bytes at NS Level (Out): 139788 (0/s 48225/m 91710/h 0/d) + NS-VC Block count : 0 (0/s 0/m 0/h 0/d) + NS-VC gone dead count : 0 (0/s 0/m 0/h 0/d) + NS-VC replaced other count: 0 (0/s 0/m 0/h 0/d) + NS-VC changed NSEI count : 0 (0/s 0/m 0/h 0/d) + NS-VCI was invalid count : 0 (0/s 0/m 0/h 0/d) + NSEI was invalid count : 0 (0/s 0/m 0/h 0/d) + ALIVE ACK missing count : 0 (0/s 0/m 0/h 0/d) + RESET ACK missing count : 0 (0/s 0/m 0/h 0/d) + NSVC Peer Statistics: + ALIVE reponse time : 0 ms +---- .Example: Inspecting BSSGP state ---- +OsmoSGSN> show bssgp +NSEI 101, BVCI 2, RA-ID: 1-2-1-0, CID: 0, STATE: UNBLOCKED +NSEI 101, BVCI 0, RA-ID: 0-0-0-0, CID: 0, STATE: UNBLOCKED ---- -FIXME FIXME: show nse -- To view, visit https://gerrit.osmocom.org/1535 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0164f418e453672321eed00bbc454c1e223ea158 Gerrit-PatchSet: 6 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: ikostov Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Jan 10 14:07:18 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 10 Jan 2017 14:07:18 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: Describe how to run multiple instances of osmo-nitb and osmo... In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1497 to look at the new patch set (#4). Describe how to run multiple instances of osmo-nitb and osmo-bts Change-Id: I69adeef85adda6f08b31b7d176f51e16968c1435 --- M OsmoBTS/chapters/configuration.adoc M OsmoNITB/chapters/running.adoc 2 files changed, 74 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/97/1497/4 diff --git a/OsmoBTS/chapters/configuration.adoc b/OsmoBTS/chapters/configuration.adoc index b91d8ac..980f835 100644 --- a/OsmoBTS/chapters/configuration.adoc +++ b/OsmoBTS/chapters/configuration.adoc @@ -179,3 +179,32 @@ De-activating power-ramping can be performed by setting the max-initial value to the nominal power. The default max-initial value is 23 dBm. + + +==== Running multiple instances + +It is possible to run multiple instances of `osmo-bts` on one and the same +machine, if the phy-interface is flexible enough to distinguish between +different phy hardware interfaces. + +Since usually a BTS instance runs in conjunction with a dedicated PCU instance, +the socket path between PCU and BTS has to be distinguished between the running +instances. It is possible to change the default socket path via VTY config: + +.Example: Personalize PCU socket path +---- +bts 0 + pcu-socket /tmp/pcu_bts_2 +---- + +It is also necessary to separate the VTY anc CTRL interfaces of the different +instances. The VTY, as well as the CTRL interface can be bound to a free IP +address from the loopback range: + +.Example: Binding VTY and CTRL interface to a specific IP address +---- +line vty + bind 127.0.0.2 +ctrl + bind 127.0.0.2 +---- diff --git a/OsmoNITB/chapters/running.adoc b/OsmoNITB/chapters/running.adoc index ae2c3fc..406c41c 100644 --- a/OsmoNITB/chapters/running.adoc +++ b/OsmoNITB/chapters/running.adoc @@ -49,12 +49,56 @@ Enable the RTP proxy code inside OsmoNITB. This will force all voice RTP data to pass through OsmoNITB, rather than going directly from BTS to MGW, or BTS to BTS. -*-m, --mncc-sock*:: +*-M, --mncc-sock-path*:: Enable the MNCC socket for an external MNCC handler. See <> for further information. +*-m, --mncc-sock*:: + Same as option -M (deprecated). *-C, --no-dbcounter*:: Disable the regular periodic synchronization of statistics counters to the database. *-r, --rf-ctl 'RFCTL'*:: Offer a Unix domain socket for RF control at the path/filename 'RFCTL' in the file system. + + +=== Multiple instances + +Running multiple instances of `osmo-nitb` is possible if all interfaces (VTY, +OML) are separated using the appropriate configuration options. The IP based +interfaces are binding to local host by default. In order to separate the +processes, the user has to bind those services to specific but different +IP addresses. + +The VTY and the control interface can be bound to IP addresses from the loopback +address range. + +.Example: Binding VTY and control interface to a specific ip-address +---- +line vty + bind 127.0.0.2 +ctrl + bind 127.0.0.2 +---- + +The OML interface also needs to be separated by binding it to different IP +addresses. Usually it is not possible to use addresses from the loopback +address range here since the OML interface needs to be reachable by an external +BTS. If only one ethernet interface is available, sub-devices with different IP +addresses can be created. + +.Example: Binding OML to a specific IP address +---- +e1_input + ipa bind 10.9.1.101 +---- + +NOTE: Depending on the application, it is necessary to have different ARFCN, +MCC, MNC and network name settings. It might also be necessary to point to +different database and config files using command line options (see option +-l and -c). + +NOTE: If an external MNCC handler is used, the user has to assign a different +socket path to reach osmo-nitb instance using commandline option -M. If option +-M is left out, the internal MNCC handler is used and no further configuration +is required -- To view, visit https://gerrit.osmocom.org/1497 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I69adeef85adda6f08b31b7d176f51e16968c1435 Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Jan 10 14:12:28 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 10 Jan 2017 14:12:28 +0000 Subject: [MERGED] osmo-bts[master]: RSL: drop obsolete NULL check In-Reply-To: References: Message-ID: dexter has submitted this change and it was merged. Change subject: RSL: drop obsolete NULL check ...................................................................... RSL: drop obsolete NULL check rsl_rx_paging_cmd() checks if the pointer *trx is NULL, this check does not make much sense since *trx has already been dereferenced without checking earlier in the code. Furthermore *trx is also a mandatory parameter which must not be NULL. Fixes: coverity scan CID#159534 Change-Id: I17dfb42ff404b2a1e18354fb7a7278089b407a79 --- M src/common/rsl.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/rsl.c b/src/common/rsl.c index be1861c..41dd2ce 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -402,7 +402,7 @@ identity_lv, chan_needed); if (rc < 0) { /* FIXME: notfiy the BSC on other errors? */ - if (rc == -ENOSPC && trx) + if (rc == -ENOSPC) oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MIN_PAG_TAB_FULL, "BTS paging table is full\n"); -- To view, visit https://gerrit.osmocom.org/1544 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I17dfb42ff404b2a1e18354fb7a7278089b407a79 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Tue Jan 10 14:14:33 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 10 Jan 2017 14:14:33 +0000 Subject: [MERGED] osmo-bts[master]: RSL: add assertions to check args of public API In-Reply-To: References: Message-ID: dexter has submitted this change and it was merged. Change subject: RSL: add assertions to check args of public API ...................................................................... RSL: add assertions to check args of public API The public functions in rsl.c do not check for null pointers, add assertions to catch null pointers early. Change-Id: I63f127ce70a4127180f90238f564b63e355216ec --- M src/common/rsl.c 1 file changed, 22 insertions(+), 3 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/rsl.c b/src/common/rsl.c index 41dd2ce..a34c455 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -2008,6 +2008,8 @@ void cb_ts_disconnected(struct gsm_bts_trx_ts *ts) { + OSMO_ASSERT(ts); + switch (ts->pchan) { case GSM_PCHAN_TCH_F_PDCH: return ipacc_dyn_pdch_ts_disconnected(ts); @@ -2093,6 +2095,8 @@ void cb_ts_connected(struct gsm_bts_trx_ts *ts) { + OSMO_ASSERT(ts); + switch (ts->pchan) { case GSM_PCHAN_TCH_F_PDCH: return ipacc_dyn_pdch_ts_connected(ts); @@ -2105,7 +2109,10 @@ void ipacc_dyn_pdch_complete(struct gsm_bts_trx_ts *ts, int rc) { - bool pdch_act = ts->flags & TS_F_PDCH_ACT_PENDING; + bool pdch_act; + OSMO_ASSERT(ts); + + pdch_act = ts->flags & TS_F_PDCH_ACT_PENDING; if ((ts->flags & TS_F_PDCH_PENDING_MASK) == TS_F_PDCH_PENDING_MASK) LOGP(DRSL, LOGL_ERROR, @@ -2256,7 +2263,12 @@ int lapdm_rll_tx_cb(struct msgb *msg, struct lapdm_entity *le, void *ctx) { struct gsm_lchan *lchan = ctx; - struct abis_rsl_common_hdr *rh = msgb_l2(msg); + struct abis_rsl_common_hdr *rh; + + /* NOTE: Parameter lapdm_entity *le is ignored */ + + OSMO_ASSERT(msg); + rh = msgb_l2(msg); if (lchan->state != LCHAN_S_ACTIVE) { LOGP(DRSL, LOGL_INFO, "%s(%s) is not active . Dropping message.\n", @@ -2482,15 +2494,22 @@ int lchan_deactivate(struct gsm_lchan *lchan) { + OSMO_ASSERT(lchan); + lchan->ciph_state = 0; return bts_model_lchan_deactivate(lchan); } int down_rsl(struct gsm_bts_trx *trx, struct msgb *msg) { - struct abis_rsl_common_hdr *rslh = msgb_l2(msg); + struct abis_rsl_common_hdr *rslh; int ret = 0; + OSMO_ASSERT(trx); + OSMO_ASSERT(msg); + + rslh = msgb_l2(msg); + if (msgb_l2len(msg) < sizeof(*rslh)) { LOGP(DRSL, LOGL_NOTICE, "RSL message too short\n"); msgb_free(msg); -- To view, visit https://gerrit.osmocom.org/1545 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I63f127ce70a4127180f90238f564b63e355216ec Gerrit-PatchSet: 5 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Tue Jan 10 14:14:55 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 10 Jan 2017 14:14:55 +0000 Subject: [MERGED] osmo-bts[master]: OML: fix possible segfault: add NULL check in oml_ipa_set_at... In-Reply-To: References: Message-ID: dexter has submitted this change and it was merged. Change subject: OML: fix possible segfault: add NULL check in oml_ipa_set_attr() ...................................................................... OML: fix possible segfault: add NULL check in oml_ipa_set_attr() oml_ipa_set_attr() is using gsm_objclass2mo() to determine the *mo object. However, it is possible that gsm_objclass2mo() returns a null-pointer. The code following up is using *mo without checking. Reject instead of dereferencing a NULL *mo. Fixes: coverity scan CID#159533 Change-Id: Ia2cc9bc504c46ca3843c43d712cd8649bfae9526 --- M src/common/oml.c 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/oml.c b/src/common/oml.c index 8ccfcc6..88c9abd 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -1048,6 +1048,8 @@ rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); if (rc < 0) { mo = gsm_objclass2mo(bts, foh->obj_class, &foh->obj_inst); + if (!mo) + return oml_fom_ack_nack(msg, NM_NACK_OBJINST_UNKN); oml_tx_failure_event_rep(mo, OSMO_EVT_MAJ_UNSUP_ATTR, "New value for IPAC Set Attribute not " "supported\n"); -- To view, visit https://gerrit.osmocom.org/1546 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia2cc9bc504c46ca3843c43d712cd8649bfae9526 Gerrit-PatchSet: 5 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Tue Jan 10 14:16:20 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 10 Jan 2017 14:16:20 +0000 Subject: [PATCH] osmo-bts[master]: CTRL: Allow chainging of the CTRL-Interface IP address Message-ID: Review at https://gerrit.osmocom.org/1558 CTRL: Allow chainging of the CTRL-Interface IP address Currently the IP address where the control interface is bound to is hardcoded to 127.0.0.1. This leads to problems with multiple instances on one and the same machine. This commit integrates the ctrl interface bind option into the VTY, so that we can bind the ctrl interface to any IP address, just like we do it with the VTY already. Change-Id: If51e0c645c0789a4f4a8c51737fb81fb12f80829 --- M include/osmo-bts/control_if.h M src/common/bts_ctrl_lookup.c M src/common/main.c 3 files changed, 12 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/58/1558/1 diff --git a/include/osmo-bts/control_if.h b/include/osmo-bts/control_if.h index 750f6bd..490c87a 100644 --- a/include/osmo-bts/control_if.h +++ b/include/osmo-bts/control_if.h @@ -1,4 +1,5 @@ #pragma once int bts_ctrl_cmds_install(struct gsm_bts *bts); -struct ctrl_handle *bts_controlif_setup(struct gsm_bts *bts); +struct ctrl_handle *bts_controlif_setup(struct gsm_bts *bts, + const char *bind_addr, uint16_t port); diff --git a/src/common/bts_ctrl_lookup.c b/src/common/bts_ctrl_lookup.c index 3ee9b4a..f0157e9 100644 --- a/src/common/bts_ctrl_lookup.c +++ b/src/common/bts_ctrl_lookup.c @@ -87,12 +87,14 @@ return -ERANGE; } -struct ctrl_handle *bts_controlif_setup(struct gsm_bts *bts) +struct ctrl_handle *bts_controlif_setup(struct gsm_bts *bts, + const char *bind_addr, uint16_t port) { struct ctrl_handle *hdl; int rc = 0; - hdl = ctrl_interface_setup(bts, OSMO_CTRL_PORT_BTS, bts_ctrl_node_lookup); + hdl = ctrl_interface_setup_dynip(bts, bind_addr, port, + bts_ctrl_node_lookup); if (!hdl) return NULL; diff --git a/src/common/main.c b/src/common/main.c index f99f196..00c8b23 100644 --- a/src/common/main.c +++ b/src/common/main.c @@ -50,6 +50,10 @@ #include #include #include +#include +#include +#include +#include #include int quit = 0; @@ -237,6 +241,7 @@ bts_log_init(NULL); vty_init(&bts_vty_info); + ctrl_vty_init(tall_bts_ctx); handle_options(argc, argv); @@ -308,7 +313,7 @@ write_pid_file("osmo-bts"); - bts_controlif_setup(bts); + bts_controlif_setup(bts, ctrl_vty_get_bind_addr(), OSMO_CTRL_PORT_BTS); rc = telnet_init_dynif(tall_bts_ctx, NULL, vty_get_bind_addr(), g_vty_port_num); -- To view, visit https://gerrit.osmocom.org/1558 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If51e0c645c0789a4f4a8c51737fb81fb12f80829 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Tue Jan 10 15:46:26 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 10 Jan 2017 15:46:26 +0000 Subject: [PATCH] osmo-bts[master]: CTRL: make the CTRL-Interface IP address configurable In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1558 to look at the new patch set (#2). CTRL: make the CTRL-Interface IP address configurable Currently the IP address where the control interface is bound to is hardcoded to 127.0.0.1. This leads to problems with multiple instances on one and the same machine. This commit integrates the ctrl interface bind option into the VTY, so that we can bind the ctrl interface to any IP address, just like we do it with the VTY already. Change-Id: If51e0c645c0789a4f4a8c51737fb81fb12f80829 --- M include/osmo-bts/control_if.h M src/common/bts_ctrl_lookup.c M src/common/main.c 3 files changed, 12 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/58/1558/2 diff --git a/include/osmo-bts/control_if.h b/include/osmo-bts/control_if.h index 750f6bd..490c87a 100644 --- a/include/osmo-bts/control_if.h +++ b/include/osmo-bts/control_if.h @@ -1,4 +1,5 @@ #pragma once int bts_ctrl_cmds_install(struct gsm_bts *bts); -struct ctrl_handle *bts_controlif_setup(struct gsm_bts *bts); +struct ctrl_handle *bts_controlif_setup(struct gsm_bts *bts, + const char *bind_addr, uint16_t port); diff --git a/src/common/bts_ctrl_lookup.c b/src/common/bts_ctrl_lookup.c index 3ee9b4a..f0157e9 100644 --- a/src/common/bts_ctrl_lookup.c +++ b/src/common/bts_ctrl_lookup.c @@ -87,12 +87,14 @@ return -ERANGE; } -struct ctrl_handle *bts_controlif_setup(struct gsm_bts *bts) +struct ctrl_handle *bts_controlif_setup(struct gsm_bts *bts, + const char *bind_addr, uint16_t port) { struct ctrl_handle *hdl; int rc = 0; - hdl = ctrl_interface_setup(bts, OSMO_CTRL_PORT_BTS, bts_ctrl_node_lookup); + hdl = ctrl_interface_setup_dynip(bts, bind_addr, port, + bts_ctrl_node_lookup); if (!hdl) return NULL; diff --git a/src/common/main.c b/src/common/main.c index f99f196..00c8b23 100644 --- a/src/common/main.c +++ b/src/common/main.c @@ -50,6 +50,10 @@ #include #include #include +#include +#include +#include +#include #include int quit = 0; @@ -237,6 +241,7 @@ bts_log_init(NULL); vty_init(&bts_vty_info); + ctrl_vty_init(tall_bts_ctx); handle_options(argc, argv); @@ -308,7 +313,7 @@ write_pid_file("osmo-bts"); - bts_controlif_setup(bts); + bts_controlif_setup(bts, ctrl_vty_get_bind_addr(), OSMO_CTRL_PORT_BTS); rc = telnet_init_dynif(tall_bts_ctx, NULL, vty_get_bind_addr(), g_vty_port_num); -- To view, visit https://gerrit.osmocom.org/1558 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If51e0c645c0789a4f4a8c51737fb81fb12f80829 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Jan 10 15:46:28 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 10 Jan 2017 15:46:28 +0000 Subject: osmo-bts[master]: CTRL: make the CTRL-Interface IP address configurable In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/1558/1//COMMIT_MSG Commit Message: Line 7: CTRL: make the CTRL-Interface IP address configurable chaining? changing? ... rather "make configurable" -- To view, visit https://gerrit.osmocom.org/1558 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If51e0c645c0789a4f4a8c51737fb81fb12f80829 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Jan 10 15:46:29 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 10 Jan 2017 15:46:29 +0000 Subject: [MERGED] osmo-bts[master]: CTRL: make the CTRL-Interface IP address configurable In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: CTRL: make the CTRL-Interface IP address configurable ...................................................................... CTRL: make the CTRL-Interface IP address configurable Currently the IP address where the control interface is bound to is hardcoded to 127.0.0.1. This leads to problems with multiple instances on one and the same machine. This commit integrates the ctrl interface bind option into the VTY, so that we can bind the ctrl interface to any IP address, just like we do it with the VTY already. Change-Id: If51e0c645c0789a4f4a8c51737fb81fb12f80829 --- M include/osmo-bts/control_if.h M src/common/bts_ctrl_lookup.c M src/common/main.c 3 files changed, 12 insertions(+), 4 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmo-bts/control_if.h b/include/osmo-bts/control_if.h index 750f6bd..490c87a 100644 --- a/include/osmo-bts/control_if.h +++ b/include/osmo-bts/control_if.h @@ -1,4 +1,5 @@ #pragma once int bts_ctrl_cmds_install(struct gsm_bts *bts); -struct ctrl_handle *bts_controlif_setup(struct gsm_bts *bts); +struct ctrl_handle *bts_controlif_setup(struct gsm_bts *bts, + const char *bind_addr, uint16_t port); diff --git a/src/common/bts_ctrl_lookup.c b/src/common/bts_ctrl_lookup.c index 3ee9b4a..f0157e9 100644 --- a/src/common/bts_ctrl_lookup.c +++ b/src/common/bts_ctrl_lookup.c @@ -87,12 +87,14 @@ return -ERANGE; } -struct ctrl_handle *bts_controlif_setup(struct gsm_bts *bts) +struct ctrl_handle *bts_controlif_setup(struct gsm_bts *bts, + const char *bind_addr, uint16_t port) { struct ctrl_handle *hdl; int rc = 0; - hdl = ctrl_interface_setup(bts, OSMO_CTRL_PORT_BTS, bts_ctrl_node_lookup); + hdl = ctrl_interface_setup_dynip(bts, bind_addr, port, + bts_ctrl_node_lookup); if (!hdl) return NULL; diff --git a/src/common/main.c b/src/common/main.c index f99f196..00c8b23 100644 --- a/src/common/main.c +++ b/src/common/main.c @@ -50,6 +50,10 @@ #include #include #include +#include +#include +#include +#include #include int quit = 0; @@ -237,6 +241,7 @@ bts_log_init(NULL); vty_init(&bts_vty_info); + ctrl_vty_init(tall_bts_ctx); handle_options(argc, argv); @@ -308,7 +313,7 @@ write_pid_file("osmo-bts"); - bts_controlif_setup(bts); + bts_controlif_setup(bts, ctrl_vty_get_bind_addr(), OSMO_CTRL_PORT_BTS); rc = telnet_init_dynif(tall_bts_ctx, NULL, vty_get_bind_addr(), g_vty_port_num); -- To view, visit https://gerrit.osmocom.org/1558 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If51e0c645c0789a4f4a8c51737fb81fb12f80829 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Jan 10 16:19:35 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 10 Jan 2017 16:19:35 +0000 Subject: [PATCH] osmo-bts[master]: Remove obsolete define TLVP_PRES_LEN Message-ID: Review at https://gerrit.osmocom.org/1559 Remove obsolete define TLVP_PRES_LEN The libosmocore version required by configure.ac already has TLVP_PRES_LEN anyway. Change-Id: I3e33d9d1a6160ea17ab0a875c65a98129e3d19c1 --- M src/common/oml.c 1 file changed, 0 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/59/1559/1 diff --git a/src/common/oml.c b/src/common/oml.c index 88c9abd..1482410 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -888,11 +888,6 @@ * manufacturer related messages */ -#ifndef TLVP_PRES_LEN /* old libosmocore */ -#define TLVP_PRES_LEN(tp, tag, min_len) \ - (TLVP_PRESENT(tp, tag) && TLVP_LEN(tp, tag) >= min_len) -#endif - static int oml_ipa_mo_set_attr_nse(void *obj, struct tlv_parsed *tp) { struct gsm_bts *bts = container_of(obj, struct gsm_bts, gprs.nse); -- To view, visit https://gerrit.osmocom.org/1559 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3e33d9d1a6160ea17ab0a875c65a98129e3d19c1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Jan 10 16:51:17 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 10 Jan 2017 16:51:17 +0000 Subject: [PATCH] libosmocore[master]: Add value strings for Probable Cause Type Message-ID: Review at https://gerrit.osmocom.org/1560 Add value strings for Probable Cause Type Add string representation of Probable Cause Type from 3GPP TS 12.21 ? 9.4.43. Change-Id: I9fe14ed3b5398f59dd06a509e4d419e074cc20a7 Related: OS#1615 --- M include/osmocom/gsm/protocol/gsm_12_21.h M src/gsm/abis_nm.c M src/gsm/libosmogsm.map 3 files changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/60/1560/1 diff --git a/include/osmocom/gsm/protocol/gsm_12_21.h b/include/osmocom/gsm/protocol/gsm_12_21.h index deca2df..1a95311 100644 --- a/include/osmocom/gsm/protocol/gsm_12_21.h +++ b/include/osmocom/gsm/protocol/gsm_12_21.h @@ -592,6 +592,8 @@ NM_PCAUSE_T_MANUF = 0x03, }; +extern const struct value_string abis_nm_pcause_type_names[]; + /*! \brief NACK causes (Section 9.4.36) */ enum abis_nm_nack_cause { /* General Nack Causes */ diff --git a/src/gsm/abis_nm.c b/src/gsm/abis_nm.c index 2de4941..f50a54f 100644 --- a/src/gsm/abis_nm.c +++ b/src/gsm/abis_nm.c @@ -164,6 +164,13 @@ { 0, NULL } }; +const struct value_string abis_nm_pcause_type_names[] = { + { NM_PCAUSE_T_X721, "ISO/CCITT values (X.721)"}, + { NM_PCAUSE_T_GSM, "GSM specific values"}, + { NM_PCAUSE_T_MANUF, "Manufacturer specific values"}, + { 0, NULL } +}; + /* Chapter 9.4.36 */ static const struct value_string nack_cause_names[] = { /* General Nack Causes */ diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 0c37d1c..3d1413d 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -27,6 +27,7 @@ abis_nm_osmo_magic; abis_nm_ipa_magic; abis_nm_event_cause_names; +abis_nm_pcause_type_names; osmo_sitype_strs; osmo_c4; -- To view, visit https://gerrit.osmocom.org/1560 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9fe14ed3b5398f59dd06a509e4d419e074cc20a7 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Jan 10 23:26:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 10 Jan 2017 23:26:18 +0000 Subject: libosmocore[master]: Add value strings for Probable Cause Type In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1560 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9fe14ed3b5398f59dd06a509e4d419e074cc20a7 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 10 23:26:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 10 Jan 2017 23:26:20 +0000 Subject: [MERGED] libosmocore[master]: Add value strings for Probable Cause Type In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add value strings for Probable Cause Type ...................................................................... Add value strings for Probable Cause Type Add string representation of Probable Cause Type from 3GPP TS 12.21 ? 9.4.43. Change-Id: I9fe14ed3b5398f59dd06a509e4d419e074cc20a7 Related: OS#1615 --- M include/osmocom/gsm/protocol/gsm_12_21.h M src/gsm/abis_nm.c M src/gsm/libosmogsm.map 3 files changed, 10 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/gsm/protocol/gsm_12_21.h b/include/osmocom/gsm/protocol/gsm_12_21.h index deca2df..1a95311 100644 --- a/include/osmocom/gsm/protocol/gsm_12_21.h +++ b/include/osmocom/gsm/protocol/gsm_12_21.h @@ -592,6 +592,8 @@ NM_PCAUSE_T_MANUF = 0x03, }; +extern const struct value_string abis_nm_pcause_type_names[]; + /*! \brief NACK causes (Section 9.4.36) */ enum abis_nm_nack_cause { /* General Nack Causes */ diff --git a/src/gsm/abis_nm.c b/src/gsm/abis_nm.c index 2de4941..f50a54f 100644 --- a/src/gsm/abis_nm.c +++ b/src/gsm/abis_nm.c @@ -164,6 +164,13 @@ { 0, NULL } }; +const struct value_string abis_nm_pcause_type_names[] = { + { NM_PCAUSE_T_X721, "ISO/CCITT values (X.721)"}, + { NM_PCAUSE_T_GSM, "GSM specific values"}, + { NM_PCAUSE_T_MANUF, "Manufacturer specific values"}, + { 0, NULL } +}; + /* Chapter 9.4.36 */ static const struct value_string nack_cause_names[] = { /* General Nack Causes */ diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 0c37d1c..3d1413d 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -27,6 +27,7 @@ abis_nm_osmo_magic; abis_nm_ipa_magic; abis_nm_event_cause_names; +abis_nm_pcause_type_names; osmo_sitype_strs; osmo_c4; -- To view, visit https://gerrit.osmocom.org/1560 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9fe14ed3b5398f59dd06a509e4d419e074cc20a7 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Jan 10 23:26:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 10 Jan 2017 23:26:36 +0000 Subject: osmo-bts[master]: Remove obsolete define TLVP_PRES_LEN In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1559 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3e33d9d1a6160ea17ab0a875c65a98129e3d19c1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 10 23:26:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 10 Jan 2017 23:26:37 +0000 Subject: [MERGED] osmo-bts[master]: Remove obsolete define TLVP_PRES_LEN In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Remove obsolete define TLVP_PRES_LEN ...................................................................... Remove obsolete define TLVP_PRES_LEN The libosmocore version required by configure.ac already has TLVP_PRES_LEN anyway. Change-Id: I3e33d9d1a6160ea17ab0a875c65a98129e3d19c1 --- M src/common/oml.c 1 file changed, 0 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/oml.c b/src/common/oml.c index 88c9abd..1482410 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -888,11 +888,6 @@ * manufacturer related messages */ -#ifndef TLVP_PRES_LEN /* old libosmocore */ -#define TLVP_PRES_LEN(tp, tag, min_len) \ - (TLVP_PRESENT(tp, tag) && TLVP_LEN(tp, tag) >= min_len) -#endif - static int oml_ipa_mo_set_attr_nse(void *obj, struct tlv_parsed *tp) { struct gsm_bts *bts = container_of(obj, struct gsm_bts, gprs.nse); -- To view, visit https://gerrit.osmocom.org/1559 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3e33d9d1a6160ea17ab0a875c65a98129e3d19c1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Jan 10 23:26:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 10 Jan 2017 23:26:51 +0000 Subject: osmo-gsm-manuals[master]: Describe how to run multiple instances of osmo-nitb and osmo... In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1497 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I69adeef85adda6f08b31b7d176f51e16968c1435 Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 10 23:26:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 10 Jan 2017 23:26:52 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: Describe how to run multiple instances of osmo-nitb and osmo... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Describe how to run multiple instances of osmo-nitb and osmo-bts ...................................................................... Describe how to run multiple instances of osmo-nitb and osmo-bts Change-Id: I69adeef85adda6f08b31b7d176f51e16968c1435 --- M OsmoBTS/chapters/configuration.adoc M OsmoNITB/chapters/running.adoc 2 files changed, 74 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoBTS/chapters/configuration.adoc b/OsmoBTS/chapters/configuration.adoc index b91d8ac..980f835 100644 --- a/OsmoBTS/chapters/configuration.adoc +++ b/OsmoBTS/chapters/configuration.adoc @@ -179,3 +179,32 @@ De-activating power-ramping can be performed by setting the max-initial value to the nominal power. The default max-initial value is 23 dBm. + + +==== Running multiple instances + +It is possible to run multiple instances of `osmo-bts` on one and the same +machine, if the phy-interface is flexible enough to distinguish between +different phy hardware interfaces. + +Since usually a BTS instance runs in conjunction with a dedicated PCU instance, +the socket path between PCU and BTS has to be distinguished between the running +instances. It is possible to change the default socket path via VTY config: + +.Example: Personalize PCU socket path +---- +bts 0 + pcu-socket /tmp/pcu_bts_2 +---- + +It is also necessary to separate the VTY anc CTRL interfaces of the different +instances. The VTY, as well as the CTRL interface can be bound to a free IP +address from the loopback range: + +.Example: Binding VTY and CTRL interface to a specific IP address +---- +line vty + bind 127.0.0.2 +ctrl + bind 127.0.0.2 +---- diff --git a/OsmoNITB/chapters/running.adoc b/OsmoNITB/chapters/running.adoc index ae2c3fc..406c41c 100644 --- a/OsmoNITB/chapters/running.adoc +++ b/OsmoNITB/chapters/running.adoc @@ -49,12 +49,56 @@ Enable the RTP proxy code inside OsmoNITB. This will force all voice RTP data to pass through OsmoNITB, rather than going directly from BTS to MGW, or BTS to BTS. -*-m, --mncc-sock*:: +*-M, --mncc-sock-path*:: Enable the MNCC socket for an external MNCC handler. See <> for further information. +*-m, --mncc-sock*:: + Same as option -M (deprecated). *-C, --no-dbcounter*:: Disable the regular periodic synchronization of statistics counters to the database. *-r, --rf-ctl 'RFCTL'*:: Offer a Unix domain socket for RF control at the path/filename 'RFCTL' in the file system. + + +=== Multiple instances + +Running multiple instances of `osmo-nitb` is possible if all interfaces (VTY, +OML) are separated using the appropriate configuration options. The IP based +interfaces are binding to local host by default. In order to separate the +processes, the user has to bind those services to specific but different +IP addresses. + +The VTY and the control interface can be bound to IP addresses from the loopback +address range. + +.Example: Binding VTY and control interface to a specific ip-address +---- +line vty + bind 127.0.0.2 +ctrl + bind 127.0.0.2 +---- + +The OML interface also needs to be separated by binding it to different IP +addresses. Usually it is not possible to use addresses from the loopback +address range here since the OML interface needs to be reachable by an external +BTS. If only one ethernet interface is available, sub-devices with different IP +addresses can be created. + +.Example: Binding OML to a specific IP address +---- +e1_input + ipa bind 10.9.1.101 +---- + +NOTE: Depending on the application, it is necessary to have different ARFCN, +MCC, MNC and network name settings. It might also be necessary to point to +different database and config files using command line options (see option +-l and -c). + +NOTE: If an external MNCC handler is used, the user has to assign a different +socket path to reach osmo-nitb instance using commandline option -M. If option +-M is left out, the internal MNCC handler is used and no further configuration +is required -- To view, visit https://gerrit.osmocom.org/1497 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I69adeef85adda6f08b31b7d176f51e16968c1435 Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Jan 10 23:27:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 10 Jan 2017 23:27:27 +0000 Subject: osmo-gsm-manuals[master]: SGSN: add Auth. policy, NS Statistics and BSSGP state exampl... In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1535 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0164f418e453672321eed00bbc454c1e223ea158 Gerrit-PatchSet: 6 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: ikostov Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 10 23:27:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 10 Jan 2017 23:27:28 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: SGSN: add Auth. policy, NS Statistics and BSSGP state exampl... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: SGSN: add Auth. policy, NS Statistics and BSSGP state examples, tweaks ...................................................................... SGSN: add Auth. policy, NS Statistics and BSSGP state examples, tweaks Add semicoli in fig-gprs-pcubts digraph. Remove section from GMM Implementation about non-existence of HLR. The SGSN can access osmo-hlr via GSUP (and will have to do so in the libvlr future). Change-Id: I0164f418e453672321eed00bbc454c1e223ea158 --- M OsmoSGSN/chapters/configuration.adoc M OsmoSGSN/chapters/overview.adoc M common/chapters/gb.adoc 3 files changed, 72 insertions(+), 21 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoSGSN/chapters/configuration.adoc b/OsmoSGSN/chapters/configuration.adoc index 8b259ed..a933d1b 100644 --- a/OsmoSGSN/chapters/configuration.adoc +++ b/OsmoSGSN/chapters/configuration.adoc @@ -67,6 +67,43 @@ <2> Enable the dynamic GGSN resolving mode <3> Specify the IP address of a DNS server for APN resolution +[[auth-pol]] +=== Authorization Policy + +Authorization determines whether a particular subscriber can access +your network or not. + +The following 4 authorization policy options are available: + +`accept-all`: All IMSIs will be accepted. + +`acl-only`: Accept only IMSIs, which are explicitly white-listed +by the Access Control List (ACL), and the rest will be rejected. + +`closed`: Accept only home network subscribers. +The combination of MCC and MNC fully identifies a subscriber's +home network, also known as a Home Network Identity (HNI, i.e. +MCC and MNC found at the start of the IMSI, e.g. MCC 901 and +MNC 700 with IMSI 901700000003080). The ACL is also heeded. + +`remote`: GSUP protocol is used to remotely access a HLR. +Only remote subscription data will be used. + +.Example: Assign or change authorization policy: +---- +OsmoSGSN> enable +OsmoSGSN# configure terminal +OsmoSGSN(config)# sgsn +OsmoSGSN(config-sgsn)# auth-policy acl-only <1> +OsmoSGSN(config-sgsn)# write <2> +Configuration saved to sgsn.cfg +OsmoSGSN(config-sgsn)# end +OsmoSGSN# disable +OsmoSGSN> +---- +<1> 'acl-only' is selected as authorization policy +<2> Saves current changes to cofiguration to make this policy +persistent === Subscriber Configuration diff --git a/OsmoSGSN/chapters/overview.adoc b/OsmoSGSN/chapters/overview.adoc index 566124a..2ff92fa 100644 --- a/OsmoSGSN/chapters/overview.adoc +++ b/OsmoSGSN/chapters/overview.adoc @@ -23,16 +23,16 @@ [graphviz] ---- digraph G { - rankdir=LR; - MS0 [label="MS"] - MS1 [label="MS"] - MS0->BTS [label="Um"] - MS1->BTS [label="Um"] - BTS->BSC [label="Abis"] - BSC->MSC [label="A"] - BTS->PCU [label="pcu_sock"] - PCU->SGSN [label="Gb"] - SGSN->GGSN [label="GTP"] + rankdir=LR; + MS0 [label="MS"]; + MS1 [label="MS"]; + MS0->BTS [label="Um"]; + MS1->BTS [label="Um"]; + BTS->BSC [label="Abis"]; + BSC->MSC [label="A"]; + BTS->PCU [label="pcu_sock"]; + PCU->SGSN [label="Gb"]; + SGSN->GGSN [label="GTP"]; } ---- @@ -67,14 +67,6 @@ The GPRS Mobility Management implementation is quite simplistic at this point. It supports the GPRS ATTACH and GPRS ROUTING AREA UPDATE procedures, as well as GPRS ATTACH and GPRS DETACH. - -However, as the SGSN currently does not implement any type of HLR -access, it is not able to authenticate a subscriber or even check if the -subscriber exists at all. As such, all non-roaming subscribes are -allowed to attach to OsmoSGSN. Non-roaming means that the first 5 -digits of the IMSI must match the MCC and MNC of the cell that the -subscriber is registering to. - ==== LLC Implementation diff --git a/common/chapters/gb.adoc b/common/chapters/gb.adoc index d01fa9b..199ef2c 100644 --- a/common/chapters/gb.adoc +++ b/common/chapters/gb.adoc @@ -67,14 +67,36 @@ Encapsulation NS-UDP-IP Local IP: 127.0.0.1, UDP Port: 23000 Encapsulation NS-FR-GRE-IP Local IP: 0.0.0.0 ---- -FIXME -FIXME: show ns stats +.Example: Inspecting NS statistics +---- +OsmoSGSN> show ns stats +Encapsulation NS-UDP-IP Local IP: 10.9.1.198, UDP Port: 23000 +Encapsulation NS-FR-GRE-IP Local IP: 0.0.0.0 +NSEI 101, NS-VC 101, Remote: BSS, ALIVE UNBLOCKED, UDP 10.9.1.119:23000 + NSVC Peer Statistics: + Packets at NS Level ( In): 1024 (2/s 123/m 911/h 0/d) + Packets at NS Level (Out): 1034 (0/s 151/m 894/h 0/d) + Bytes at NS Level ( In): 296638 (1066/s 22222/m 274244/h 0/d) + Bytes at NS Level (Out): 139788 (0/s 48225/m 91710/h 0/d) + NS-VC Block count : 0 (0/s 0/m 0/h 0/d) + NS-VC gone dead count : 0 (0/s 0/m 0/h 0/d) + NS-VC replaced other count: 0 (0/s 0/m 0/h 0/d) + NS-VC changed NSEI count : 0 (0/s 0/m 0/h 0/d) + NS-VCI was invalid count : 0 (0/s 0/m 0/h 0/d) + NSEI was invalid count : 0 (0/s 0/m 0/h 0/d) + ALIVE ACK missing count : 0 (0/s 0/m 0/h 0/d) + RESET ACK missing count : 0 (0/s 0/m 0/h 0/d) + NSVC Peer Statistics: + ALIVE reponse time : 0 ms +---- .Example: Inspecting BSSGP state ---- +OsmoSGSN> show bssgp +NSEI 101, BVCI 2, RA-ID: 1-2-1-0, CID: 0, STATE: UNBLOCKED +NSEI 101, BVCI 0, RA-ID: 0-0-0-0, CID: 0, STATE: UNBLOCKED ---- -FIXME FIXME: show nse -- To view, visit https://gerrit.osmocom.org/1535 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0164f418e453672321eed00bbc454c1e223ea158 Gerrit-PatchSet: 7 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: ikostov Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Jan 10 23:28:11 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 10 Jan 2017 23:28:11 +0000 Subject: libosmocore[master]: DTX: fix AMR SID-FIRST detection In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1552 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I46477c631bf86345cb757f31d7f2e2935b12adcc Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jean-Francois Dionne Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 10 23:28:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 10 Jan 2017 23:28:12 +0000 Subject: [MERGED] libosmocore[master]: DTX: fix AMR SID-FIRST detection In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: DTX: fix AMR SID-FIRST detection ...................................................................... DTX: fix AMR SID-FIRST detection Max's note: adjusted test output. Change-Id: I46477c631bf86345cb757f31d7f2e2935b12adcc Related: OS#1801 --- M src/codec/gsm690.c M tests/codec/codec_test.ok 2 files changed, 4 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/codec/gsm690.c b/src/codec/gsm690.c index c3cb932..b273f0f 100644 --- a/src/codec/gsm690.c +++ b/src/codec/gsm690.c @@ -215,7 +215,7 @@ }; static const uint8_t amr_len_by_ft[16] = { - 12, 13, 15, 17, 19, 20, 26, 31, 0, 0, 0, 0, 0, 0, 0, 0 + 12, 13, 15, 17, 19, 20, 26, 31, 7, 0, 0, 0, 0, 0, 0, 0 }; const struct value_string osmo_amr_type_names[] = { @@ -262,7 +262,7 @@ if (rtppayload[1] >> 7) return -ENOTSUP; - if (payload_len - 2 < amr_len_by_ft[type]) + if (payload_len < amr_len_by_ft[type]) return -ENOTSUP; if (ft) diff --git a/tests/codec/codec_test.ok b/tests/codec/codec_test.ok index 2af7cc7..80c4a09 100644 --- a/tests/codec/codec_test.ok +++ b/tests/codec/codec_test.ok @@ -1,6 +1,6 @@ AMR RTP payload decoder test: -[2] decode RTP 20 44 00 00 00 00 04 OK: FT AMR SID, CMR AMR 5,90 kbit/s, CMI is 2, SID type FIRST [2] encode [0] -[2] decode RTP 20 44 29 c2 92 91 f4 OK: FT AMR SID, CMR AMR 5,90 kbit/s, CMI is 2, SID type UPDATE [2] encode [0] +[9] decode RTP 20 44 00 00 00 00 04 OK: FT AMR SID, CMR AMR 5,90 kbit/s, CMI is 2, SID type FIRST [9] encode [0] +[9] decode RTP 20 44 29 c2 92 91 f4 OK: FT AMR SID, CMR AMR 5,90 kbit/s, CMI is 2, SID type UPDATE [9] encode [0] [2/2] No Data/NA, CMR: OK, FT: OK, BFI: OK, CMI: -1, STI: -1 [2/2] No Data/NA, CMR: OK, FT: OK, BFI: OK, CMI: -1, STI: -1 [33/33] AMR 12,2 kbit/s (GSM-EFR), CMR: OK, FT: OK, BFI: OK, CMI: -1, STI: -1 -- To view, visit https://gerrit.osmocom.org/1552 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I46477c631bf86345cb757f31d7f2e2935b12adcc Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jean-Francois Dionne Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Jan 10 23:28:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 10 Jan 2017 23:28:17 +0000 Subject: osmo-bts[master]: DTX: fix SID-FIRST detection In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1553 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I76e62783b73803dfc0d32693a68020a9d89878b8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jean-Francois Dionne Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 10 23:28:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 10 Jan 2017 23:28:19 +0000 Subject: [MERGED] osmo-bts[master]: DTX: fix SID-FIRST detection In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: DTX: fix SID-FIRST detection ...................................................................... DTX: fix SID-FIRST detection Max's note: made similar modification to osmo-bts-sysmo/tch.c Change-Id: I76e62783b73803dfc0d32693a68020a9d89878b8 Related: OS#1801 --- M src/osmo-bts-litecell15/tch.c M src/osmo-bts-sysmo/tch.c 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index a47a88f..4b22b64 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -363,7 +363,7 @@ GsmL1_PhDataInd_t *data_ind = &l1p->u.phDataInd; uint8_t payload_type = data_ind->msgUnitParam.u8Buffer[0]; uint8_t *payload = data_ind->msgUnitParam.u8Buffer + 1; - uint8_t payload_len, sid_first[7] = {0}; + uint8_t payload_len, sid_first[9] = { 0 }; struct msgb *rmsg = NULL; struct gsm_lchan *lchan = &trx->ts[L1SAP_CHAN2TS(chan_nr)].lchan[l1sap_chan2ss(chan_nr)]; diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index bc495d9..8eb419b 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -461,7 +461,7 @@ GsmL1_PhDataInd_t *data_ind = &l1p->u.phDataInd; uint8_t payload_type = data_ind->msgUnitParam.u8Buffer[0]; uint8_t *payload = data_ind->msgUnitParam.u8Buffer + 1; - uint8_t payload_len, sid_first[7] = {0}; + uint8_t payload_len, sid_first[9] = { 0 }; struct msgb *rmsg = NULL; struct gsm_lchan *lchan = &trx->ts[L1SAP_CHAN2TS(chan_nr)].lchan[l1sap_chan2ss(chan_nr)]; -- To view, visit https://gerrit.osmocom.org/1553 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I76e62783b73803dfc0d32693a68020a9d89878b8 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jean-Francois Dionne Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Jan 10 23:28:39 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 10 Jan 2017 23:28:39 +0000 Subject: libosmocore[master]: LAPD: improve logging In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1551 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2c7fa276e03f8b14ba41cc1fb6e19d0aae77d127 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 10 23:28:40 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 10 Jan 2017 23:28:40 +0000 Subject: [MERGED] libosmocore[master]: LAPD: improve logging In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: LAPD: improve logging ...................................................................... LAPD: improve logging Log error cause and state names in case of SABM errors. Change-Id: I2c7fa276e03f8b14ba41cc1fb6e19d0aae77d127 --- M src/gsm/lapd_core.c 1 file changed, 6 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gsm/lapd_core.c b/src/gsm/lapd_core.c index fd163c8..cdd9b56 100644 --- a/src/gsm/lapd_core.c +++ b/src/gsm/lapd_core.c @@ -377,8 +377,8 @@ struct lapd_datalink *dl = lctx->dl; struct osmo_dlsap_prim dp; - LOGP(DLLAPD, LOGL_NOTICE, "sending MDL-ERROR-IND cause %d\n", - cause); + LOGP(DLLAPD, LOGL_NOTICE, "sending MDL-ERROR-IND cause %s\n", + rsl_rlm_cause_name(cause)); osmo_prim_init(&dp.oph, 0, PRIM_MDL_ERROR, PRIM_OP_INDICATION, NULL); dp.u.error_ind.cause = cause; return dl->send_dlsap(&dp, lctx); @@ -833,7 +833,8 @@ } if (!dl->cont_res) { LOGP(DLLAPD, LOGL_INFO, "SABM command not " - "allowed in this state\n"); + "allowed in state %s\n", + lapd_state_names[dl->state]); mdl_error(MDL_CAUSE_SABM_MF, lctx); msgb_free(msg); return 0; @@ -870,7 +871,8 @@ /* check for contention resoultion */ if (dl->tx_hist[0].msg && dl->tx_hist[0].msg->len) { LOGP(DLLAPD, LOGL_NOTICE, "SABM not allowed " - "during contention resolution\n"); + "during contention resolution (state %s)\n", + lapd_state_names[dl->state]); mdl_error(MDL_CAUSE_SABM_INFO_NOTALL, lctx); } lapd_send_ua(lctx, length, msg->l3h); -- To view, visit https://gerrit.osmocom.org/1551 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2c7fa276e03f8b14ba41cc1fb6e19d0aae77d127 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Jan 10 23:29:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 10 Jan 2017 23:29:05 +0000 Subject: osmo-bts[master]: scheduler: log lchan on which prim error occured In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1550 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I80c581b54eeee371ee524a75a400d1e9ece16c68 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 10 23:29:06 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 10 Jan 2017 23:29:06 +0000 Subject: [MERGED] osmo-bts[master]: scheduler: log lchan on which prim error occured In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: scheduler: log lchan on which prim error occured ...................................................................... scheduler: log lchan on which prim error occured Log both lchan and trx_chan_type (using introduced value_string). Change-Id: I80c581b54eeee371ee524a75a400d1e9ece16c68 --- M include/osmo-bts/scheduler.h M src/common/scheduler.c 2 files changed, 53 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmo-bts/scheduler.h b/include/osmo-bts/scheduler.h index b0387db..33a99bb 100644 --- a/include/osmo-bts/scheduler.h +++ b/include/osmo-bts/scheduler.h @@ -1,6 +1,8 @@ #ifndef TRX_SCHEDULER_H #define TRX_SCHEDULER_H +#include + #include /* These types define the different channels on a multiframe. @@ -48,6 +50,8 @@ _TRX_CHAN_MAX }; +extern const struct value_string trx_chan_type_names[]; + #define GSM_BURST_LEN 148 #define GPRS_BURST_LEN GSM_BURST_LEN #define EGPRS_BURST_LEN 444 diff --git a/src/common/scheduler.c b/src/common/scheduler.c index fd5c584..724fb5a 100644 --- a/src/common/scheduler.c +++ b/src/common/scheduler.c @@ -156,6 +156,48 @@ { 1, TRXC_PTCCH, 0x08, LID_DEDIC, "PTCCH", rts_data_fn, tx_data_fn, rx_data_fn, 0 }, }; +const struct value_string trx_chan_type_names[] = { + OSMO_VALUE_STRING(TRXC_IDLE), + OSMO_VALUE_STRING(TRXC_FCCH), + OSMO_VALUE_STRING(TRXC_SCH), + OSMO_VALUE_STRING(TRXC_BCCH), + OSMO_VALUE_STRING(TRXC_RACH), + OSMO_VALUE_STRING(TRXC_CCCH), + OSMO_VALUE_STRING(TRXC_TCHF), + OSMO_VALUE_STRING(TRXC_TCHH_0), + OSMO_VALUE_STRING(TRXC_TCHH_1), + OSMO_VALUE_STRING(TRXC_SDCCH4_0), + OSMO_VALUE_STRING(TRXC_SDCCH4_1), + OSMO_VALUE_STRING(TRXC_SDCCH4_2), + OSMO_VALUE_STRING(TRXC_SDCCH4_3), + OSMO_VALUE_STRING(TRXC_SDCCH8_0), + OSMO_VALUE_STRING(TRXC_SDCCH8_1), + OSMO_VALUE_STRING(TRXC_SDCCH8_2), + OSMO_VALUE_STRING(TRXC_SDCCH8_3), + OSMO_VALUE_STRING(TRXC_SDCCH8_4), + OSMO_VALUE_STRING(TRXC_SDCCH8_5), + OSMO_VALUE_STRING(TRXC_SDCCH8_6), + OSMO_VALUE_STRING(TRXC_SDCCH8_7), + OSMO_VALUE_STRING(TRXC_SACCHTF), + OSMO_VALUE_STRING(TRXC_SACCHTH_0), + OSMO_VALUE_STRING(TRXC_SACCHTH_1), + OSMO_VALUE_STRING(TRXC_SACCH4_0), + OSMO_VALUE_STRING(TRXC_SACCH4_1), + OSMO_VALUE_STRING(TRXC_SACCH4_2), + OSMO_VALUE_STRING(TRXC_SACCH4_3), + OSMO_VALUE_STRING(TRXC_SACCH8_0), + OSMO_VALUE_STRING(TRXC_SACCH8_1), + OSMO_VALUE_STRING(TRXC_SACCH8_2), + OSMO_VALUE_STRING(TRXC_SACCH8_3), + OSMO_VALUE_STRING(TRXC_SACCH8_4), + OSMO_VALUE_STRING(TRXC_SACCH8_5), + OSMO_VALUE_STRING(TRXC_SACCH8_6), + OSMO_VALUE_STRING(TRXC_SACCH8_7), + OSMO_VALUE_STRING(TRXC_PDTCH), + OSMO_VALUE_STRING(TRXC_PTCCH), + OSMO_VALUE_STRING(_TRX_CHAN_MAX), + { 0, NULL } +}; /* * init / exit @@ -264,10 +306,13 @@ } if (prim_fn > 100) { LOGP(DL1C, LOGL_NOTICE, "Prim for trx=%u ts=%u at fn=%u " - "is out of range, or channel already disabled. " - "If this happens in conjunction with PCU, " - "increase 'rts-advance' by 5. (current fn=%u)\n", - l1t->trx->nr, tn, l1sap->u.data.fn, fn); + "is out of range, or channel %s with type %s is " + "already disabled. If this happens in conjunction " + "with PCU, increase 'rts-advance' by 5. " + "(current fn=%u)\n", l1t->trx->nr, tn, + l1sap->u.data.fn, + get_lchan_by_chan_nr(l1t->trx, chan_nr)->name, + get_value_string(trx_chan_type_names, chan), fn); /* unlink and free message */ llist_del(&msg->list); msgb_free(msg); -- To view, visit https://gerrit.osmocom.org/1550 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I80c581b54eeee371ee524a75a400d1e9ece16c68 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Jan 10 23:29:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 10 Jan 2017 23:29:25 +0000 Subject: libosmo-abis[master]: handle_ts1_read(): log sign_link() error In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1549 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I95779ee8590ab16b7af4ad2c79ede68da3a12e5a Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 10 23:29:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 10 Jan 2017 23:29:28 +0000 Subject: [MERGED] libosmo-abis[master]: handle_ts1_read(): log sign_link() error In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: handle_ts1_read(): log sign_link() error ...................................................................... handle_ts1_read(): log sign_link() error Change-Id: I95779ee8590ab16b7af4ad2c79ede68da3a12e5a --- M src/input/ipaccess.c 1 file changed, 4 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c index 675f07a..9e64471 100644 --- a/src/input/ipaccess.c +++ b/src/input/ipaccess.c @@ -228,7 +228,7 @@ struct e1inp_sign_link *link; struct ipaccess_head *hh; struct msgb *msg = NULL; - int ret; + int ret, rc; ret = ipa_msg_recv_buffered(bfd->fd, &msg, &e1i_ts->pending_msg); if (ret < 0) { @@ -273,13 +273,14 @@ ret = -EINVAL; goto err_msg; } - if (e1i_ts->line->ops->sign_link(msg) < 0) { + rc = e1i_ts->line->ops->sign_link(msg); + if (rc < 0) { /* Don't close the signalling link if the upper layers report * an error, that's too strict. BTW, the signalling layer is * resposible for releasing the message. */ LOGP(DLINP, LOGL_ERROR, "Bad signalling message," - "sign_link returned error\n"); + " sign_link returned error: %s.\n", strerror(-rc)); } return 0; -- To view, visit https://gerrit.osmocom.org/1549 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I95779ee8590ab16b7af4ad2c79ede68da3a12e5a Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Jan 10 23:29:46 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 10 Jan 2017 23:29:46 +0000 Subject: libosmocore[master]: Remove obsolete .deb patch In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1547 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icbf911540fcc840833c5012363c2ba48fd71db52 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 10 23:29:47 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 10 Jan 2017 23:29:47 +0000 Subject: [MERGED] libosmocore[master]: Remove obsolete .deb patch In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Remove obsolete .deb patch ...................................................................... Remove obsolete .deb patch Change-Id: Icbf911540fcc840833c5012363c2ba48fd71db52 Related: OS#1694 --- D debian/patches/debian-changes-0.1.17-1 M debian/patches/series 2 files changed, 0 insertions(+), 47 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/patches/debian-changes-0.1.17-1 b/debian/patches/debian-changes-0.1.17-1 deleted file mode 100644 index c0a54bd..0000000 --- a/debian/patches/debian-changes-0.1.17-1 +++ /dev/null @@ -1,46 +0,0 @@ -Description: Upstream changes introduced in version 0.1.17-1 - This patch has been created by dpkg-source during the package build. - Here's the last changelog entry, hopefully it gives details on why - those changes were made: - . - libosmocore (0.1.17-1) unstable; urgency=low - . - * Initial release (Closes: #nnnn) - . - The person named in the Author field signed this changelog entry. -Author: Harald Welte - ---- -The information above should follow the Patch Tagging Guidelines, please -checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here -are templates for supplementary fields that you might want to add: - -Origin: , -Bug: -Bug-Debian: http://bugs.debian.org/ -Bug-Ubuntu: https://launchpad.net/bugs/ -Forwarded: -Reviewed-By: -Last-Update: - ---- /dev/null -+++ libosmocore-0.1.17/.version -@@ -0,0 +1 @@ -+0.1.17 ---- /dev/null -+++ libosmocore-0.1.17/copyright -@@ -0,0 +1,14 @@ -+Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135 -+Name: libosmocore -+Maintainer: Harald Welte -+Source: git://git.osmocom.org/libosmocore.git -+ -+Copyright: 2008-2010 Harald Welte -+License: GPL-2+ -+ -+Files: src/talloc.c include/osmocore/talloc.h -+Copyright: 2004 Andrew Tridgell -+License: LGPL-3+ -+ -+Files: include/osmocore/linuxlist.h -+License: GPL-2 diff --git a/debian/patches/series b/debian/patches/series index 0ca407b..e69de29 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +0,0 @@ -debian-changes-0.1.17-1 -- To view, visit https://gerrit.osmocom.org/1547 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icbf911540fcc840833c5012363c2ba48fd71db52 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Jan 10 23:30:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 10 Jan 2017 23:30:12 +0000 Subject: libosmocore[master]: tests/conv: add LTE PBCH test vector In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1543 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifea601d49c82c36d7c8d4a527b7422d701833806 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 10 23:39:40 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 10 Jan 2017 23:39:40 +0000 Subject: [PATCH] libosmo-abis[master]: subchan_demux.c: rename llist_len() to _llist_len(), prep fo... Message-ID: Review at https://gerrit.osmocom.org/1561 subchan_demux.c: rename llist_len() to _llist_len(), prep for libosmocore llist_len() Related: libosmocore Change-Id Ic49adc7a346f5722bf624d7d3b4a735e4220ae15 Change-Id: I99c627cf2a2f0dca1ec5d2ad36e3c3f7f0d8d191 --- M src/subchan_demux.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/61/1561/1 diff --git a/src/subchan_demux.c b/src/subchan_demux.c index f965490..d4aa4ee 100644 --- a/src/subchan_demux.c +++ b/src/subchan_demux.c @@ -289,7 +289,7 @@ return i; } -static int llist_len(struct llist_head *head) +static int _llist_len(struct llist_head *head) { struct llist_head *entry; int i = 0; @@ -327,7 +327,7 @@ int len) { struct mux_subch *sch = &mx->subch[s_nr]; - int list_len = llist_len(&sch->tx_queue); + int list_len = _llist_len(&sch->tx_queue); struct subch_txq_entry *tqe = talloc_zero_size(tall_tqe_ctx, sizeof(*tqe) + len); if (!tqe) -- To view, visit https://gerrit.osmocom.org/1561 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I99c627cf2a2f0dca1ec5d2ad36e3c3f7f0d8d191 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Jan 10 23:39:49 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 10 Jan 2017 23:39:49 +0000 Subject: [PATCH] openbsc[master]: gtphub_test: rename llist_len() to _llist_len(), prep for li... Message-ID: Review at https://gerrit.osmocom.org/1562 gtphub_test: rename llist_len() to _llist_len(), prep for libosmocore llist_len() Related: libosmocore Change-Id Ic49adc7a346f5722bf624d7d3b4a735e4220ae15 Change-Id: I9a7e438de4539c382de54b7337fd18e4bf19d007 --- M openbsc/tests/gtphub/gtphub_test.c 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/62/1562/1 diff --git a/openbsc/tests/gtphub/gtphub_test.c b/openbsc/tests/gtphub/gtphub_test.c index 7d7673b..cbd238c 100644 --- a/openbsc/tests/gtphub/gtphub_test.c +++ b/openbsc/tests/gtphub/gtphub_test.c @@ -57,7 +57,7 @@ void *osmo_gtphub_ctx; /* TODO copied from libosmo-abis/src/subchan_demux.c, remove dup */ -static int llist_len(struct llist_head *head) +static int _llist_len(struct llist_head *head) { struct llist_head *entry; int i = 0; @@ -174,11 +174,11 @@ mapping = nr_map_have(map, origin1, orig, 0); m[i] = mapping->repl; OSMO_ASSERT(m[i] != 0); - OSMO_ASSERT(llist_len(&map->mappings) == (i+1)); + OSMO_ASSERT(_llist_len(&map->mappings) == (i+1)); for (check_i = 0; check_i < i; check_i++) OSMO_ASSERT(m[check_i] != m[i]); } - OSMO_ASSERT(llist_len(&map->mappings) == TEST_N_HALF); + OSMO_ASSERT(_llist_len(&map->mappings) == TEST_N_HALF); /* create another TEST_N mappings with the same original numbers, but * from a different origin */ @@ -189,11 +189,11 @@ mapping = nr_map_have(map, origin2, orig, 0); m[i2] = mapping->repl; OSMO_ASSERT(m[i2] != 0); - OSMO_ASSERT(llist_len(&map->mappings) == (i2+1)); + OSMO_ASSERT(_llist_len(&map->mappings) == (i2+1)); for (check_i = 0; check_i < i2; check_i++) OSMO_ASSERT(m[check_i] != m[i2]); } - OSMO_ASSERT(llist_len(&map->mappings) == TEST_N); + OSMO_ASSERT(_llist_len(&map->mappings) == TEST_N); /* verify mappings */ for (i = 0; i < TEST_N_HALF; i++) { @@ -213,7 +213,7 @@ /* remove all mappings */ for (i = 0; i < TEST_N_HALF; i++) { - OSMO_ASSERT(llist_len(&map->mappings) == (TEST_N - 2*i)); + OSMO_ASSERT(_llist_len(&map->mappings) == (TEST_N - 2*i)); nr_t orig = TEST_I + i; nr_mapping_del(nr_map_get(map, origin1, orig)); -- To view, visit https://gerrit.osmocom.org/1562 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9a7e438de4539c382de54b7337fd18e4bf19d007 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Jan 10 23:40:00 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 10 Jan 2017 23:40:00 +0000 Subject: [PATCH] libosmocore[master]: linuxlist.h: add llist_len() Message-ID: Review at https://gerrit.osmocom.org/1563 linuxlist.h: add llist_len() After subchan_demux.c in libosmo-abis, osmo-bts/common/vty.c and openbsc's gtphub_test.c, more places would like to count the llist items (mostly unit tests). Instead of proliferating numerous local implementations, add here. Before merging this, make sure the name llist_head() is not redefined, see: libosmo-abis Change-Id I99c627cf2a2f0dca1ec5d2ad36e3c3f7f0d8d191 openbsc Change-Id I9a7e438de4539c382de54b7337fd18e4bf19d007 Change-Id: Ic49adc7a346f5722bf624d7d3b4a735e4220ae15 --- M include/osmocom/core/linuxlist.h 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/63/1563/1 diff --git a/include/osmocom/core/linuxlist.h b/include/osmocom/core/linuxlist.h index 1c83395..69d9752 100644 --- a/include/osmocom/core/linuxlist.h +++ b/include/osmocom/core/linuxlist.h @@ -351,6 +351,15 @@ for ((pos) = (pos)->next, prefetch((pos)->next); (pos) != (head); \ (pos) = (pos)->next, ({ smp_read_barrier_depends(); 0;}), prefetch((pos)->next)) +static inline int llist_len(struct llist_head *head) +{ + struct llist_head *entry; + int i = 0; + llist_for_each(entry, head) + i++; + return i; +} + /*! * }@ */ -- To view, visit https://gerrit.osmocom.org/1563 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic49adc7a346f5722bf624d7d3b4a735e4220ae15 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Jan 10 23:45:33 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 10 Jan 2017 23:45:33 +0000 Subject: [PATCH] libosmo-abis[master]: undup: subchan_demux.c: use libosmocore's llist_len() Message-ID: Review at https://gerrit.osmocom.org/1564 undup: subchan_demux.c: use libosmocore's llist_len() Depends on libosmocore Change-Id Ic49adc7a346f5722bf624d7d3b4a735e4220ae15 Change-Id: I47f1831f1835dc07925dabbc115677087e48fa1b --- M src/subchan_demux.c 1 file changed, 1 insertion(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/64/1564/1 diff --git a/src/subchan_demux.c b/src/subchan_demux.c index d4aa4ee..2f9ba76 100644 --- a/src/subchan_demux.c +++ b/src/subchan_demux.c @@ -289,17 +289,6 @@ return i; } -static int _llist_len(struct llist_head *head) -{ - struct llist_head *entry; - int i = 0; - - llist_for_each(entry, head) - i++; - - return i; -} - /* evict the 'num_evict' number of oldest entries in the queue */ static void tx_queue_evict(struct mux_subch *sch, int num_evict) { @@ -327,7 +316,7 @@ int len) { struct mux_subch *sch = &mx->subch[s_nr]; - int list_len = _llist_len(&sch->tx_queue); + int list_len = llist_len(&sch->tx_queue); struct subch_txq_entry *tqe = talloc_zero_size(tall_tqe_ctx, sizeof(*tqe) + len); if (!tqe) -- To view, visit https://gerrit.osmocom.org/1564 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I47f1831f1835dc07925dabbc115677087e48fa1b Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Jan 10 23:45:44 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 10 Jan 2017 23:45:44 +0000 Subject: [PATCH] openbsc[master]: undup: gtphub_test: use libosmocore's llist_len() Message-ID: Review at https://gerrit.osmocom.org/1565 undup: gtphub_test: use libosmocore's llist_len() Depends on libosmocore Change-Id Ic49adc7a346f5722bf624d7d3b4a735e4220ae15 Change-Id: I67bc1889c064596a2f3e93cc0354b11c720b0225 --- M openbsc/tests/gtphub/gtphub_test.c 1 file changed, 5 insertions(+), 17 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/65/1565/1 diff --git a/openbsc/tests/gtphub/gtphub_test.c b/openbsc/tests/gtphub/gtphub_test.c index cbd238c..8eb1ba9 100644 --- a/openbsc/tests/gtphub/gtphub_test.c +++ b/openbsc/tests/gtphub/gtphub_test.c @@ -56,18 +56,6 @@ void *osmo_gtphub_ctx; -/* TODO copied from libosmo-abis/src/subchan_demux.c, remove dup */ -static int _llist_len(struct llist_head *head) -{ - struct llist_head *entry; - int i = 0; - - llist_for_each(entry, head) - i++; - - return i; -} - static void nr_mapping_free(struct expiring_item *e) { struct nr_mapping *m = container_of(e, struct nr_mapping, @@ -174,11 +162,11 @@ mapping = nr_map_have(map, origin1, orig, 0); m[i] = mapping->repl; OSMO_ASSERT(m[i] != 0); - OSMO_ASSERT(_llist_len(&map->mappings) == (i+1)); + OSMO_ASSERT(llist_len(&map->mappings) == (i+1)); for (check_i = 0; check_i < i; check_i++) OSMO_ASSERT(m[check_i] != m[i]); } - OSMO_ASSERT(_llist_len(&map->mappings) == TEST_N_HALF); + OSMO_ASSERT(llist_len(&map->mappings) == TEST_N_HALF); /* create another TEST_N mappings with the same original numbers, but * from a different origin */ @@ -189,11 +177,11 @@ mapping = nr_map_have(map, origin2, orig, 0); m[i2] = mapping->repl; OSMO_ASSERT(m[i2] != 0); - OSMO_ASSERT(_llist_len(&map->mappings) == (i2+1)); + OSMO_ASSERT(llist_len(&map->mappings) == (i2+1)); for (check_i = 0; check_i < i2; check_i++) OSMO_ASSERT(m[check_i] != m[i2]); } - OSMO_ASSERT(_llist_len(&map->mappings) == TEST_N); + OSMO_ASSERT(llist_len(&map->mappings) == TEST_N); /* verify mappings */ for (i = 0; i < TEST_N_HALF; i++) { @@ -213,7 +201,7 @@ /* remove all mappings */ for (i = 0; i < TEST_N_HALF; i++) { - OSMO_ASSERT(_llist_len(&map->mappings) == (TEST_N - 2*i)); + OSMO_ASSERT(llist_len(&map->mappings) == (TEST_N - 2*i)); nr_t orig = TEST_I + i; nr_mapping_del(nr_map_get(map, origin1, orig)); -- To view, visit https://gerrit.osmocom.org/1565 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I67bc1889c064596a2f3e93cc0354b11c720b0225 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Jan 11 09:30:58 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 11 Jan 2017 09:30:58 +0000 Subject: openbsc[master]: gtphub_test: rename llist_len() to _llist_len(), prep for li... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1562 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9a7e438de4539c382de54b7337fd18e4bf19d007 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 11 09:31:11 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 11 Jan 2017 09:31:11 +0000 Subject: libosmo-abis[master]: subchan_demux.c: rename llist_len() to _llist_len(), prep fo... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1561 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I99c627cf2a2f0dca1ec5d2ad36e3c3f7f0d8d191 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 11 09:32:44 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 11 Jan 2017 09:32:44 +0000 Subject: libosmocore[master]: linuxlist.h: add llist_len() In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 Why returning int if it's always positive value? Better use size_t or other unsigned type. -- To view, visit https://gerrit.osmocom.org/1563 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic49adc7a346f5722bf624d7d3b4a735e4220ae15 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 11 09:33:26 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 11 Jan 2017 09:33:26 +0000 Subject: openbsc[master]: undup: gtphub_test: use libosmocore's llist_len() In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1565 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I67bc1889c064596a2f3e93cc0354b11c720b0225 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 11 09:33:50 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 11 Jan 2017 09:33:50 +0000 Subject: libosmo-abis[master]: undup: subchan_demux.c: use libosmocore's llist_len() In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1564 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I47f1831f1835dc07925dabbc115677087e48fa1b Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 11 09:39:15 2017 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Wed, 11 Jan 2017 09:39:15 +0000 Subject: osmo-pcu[master]: Handle packet access reject during packet resource request In-Reply-To: References: Message-ID: Patch Set 9: Neels, My apologies for delay in response. I was in vacation. I keep track of things which needs to be done. No further follow ups are required. It may create noise for others as pointed out by many earlier. Do we have agreement yet about what needs to be done?. My understanding is, we are still going ahead with memset of ?egprs_puncturing_values punct? with minor modification in commit message. Confirm if my understanding is correct. If my understanding is correct, I can re submit the patch with modification I am intending to do. Otherwise I prefer it is reassigned to someone else. For me, priority is pushing https://gerrit.osmocom.org/#/c/1216/ and https://gerrit.osmocom.org/#/c/1512/ . out of which https://gerrit.osmocom.org/#/c/1216/ is pending for ~2 months for the reason I am not aware of. Furthermore, as you said ?enum egprs_puncturing_values? is added by me in commit 7a05b039c835868eff34308d861edfeb28d1763b. however unsigned ?int gprs_rlc_mcs_cps? is added by ?https://git.osmocom.org/osmo-pcu/commit/?id=9e8593917f3e301c3487f73430ce416a08360ce8?. Which lacked any assert for invalid input to the function Thanks, Aravind Sirsikar -- To view, visit https://gerrit.osmocom.org/1216 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I05ff25124b58905586caa0c0c37023d69724f121 Gerrit-PatchSet: 9 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: pravin Gerrit-Reviewer: sivasankari Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 11 09:39:54 2017 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Wed, 11 Jan 2017 09:39:54 +0000 Subject: osmo-pcu[master]: Sanitizer build fix for invalid value of variable of type eg... In-Reply-To: References: Message-ID: Patch Set 3: Neels, My apologies for delay in response. I was in vacation. I keep track of things which needs to be done. No further follow ups are required. It may create noise for others as pointed out by many earlier. Do we have agreement yet about what needs to be done?. My understanding is, we are still going ahead with memset of ?egprs_puncturing_values punct? with minor modification in commit message. Confirm if my understanding is correct. If my understanding is correct, I can re submit the patch with modification I am intending to do. Otherwise I prefer it is reassigned to someone else. For me, priority is pushing https://gerrit.osmocom.org/#/c/1216/ and https://gerrit.osmocom.org/#/c/1512/ . out of which https://gerrit.osmocom.org/#/c/1216/ is pending for ~2 months for the reason I am not aware of. Furthermore, as you said ?enum egprs_puncturing_values? is added by me in commit 7a05b039c835868eff34308d861edfeb28d1763b. however unsigned ?int gprs_rlc_mcs_cps? is added by ?https://git.osmocom.org/osmo-pcu/commit/?id=9e8593917f3e301c3487f73430ce416a08360ce8?. Which lacked any assert for invalid input to the function Thanks, Aravind Sirsikar -- To view, visit https://gerrit.osmocom.org/1411 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ice54edc7e4a936eb2f2dd8a243673a30dceef542 Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 11 09:41:12 2017 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Wed, 11 Jan 2017 09:41:12 +0000 Subject: osmo-pcu[master]: Handle packet access reject during packet resource request In-Reply-To: References: Message-ID: Patch Set 9: Ignore my last reply. It was intending for some other patch. -- To view, visit https://gerrit.osmocom.org/1216 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I05ff25124b58905586caa0c0c37023d69724f121 Gerrit-PatchSet: 9 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: pravin Gerrit-Reviewer: sivasankari Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 11 10:02:57 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 11 Jan 2017 10:02:57 +0000 Subject: [PATCH] osmo-bts[master]: Fix memleak Message-ID: Review at https://gerrit.osmocom.org/1566 Fix memleak Max's note: added same fix to sysmobts. Change-Id: I3061060235a488b114b636b3af9a2253a94de1e8 --- M src/osmo-bts-litecell15/l1_if.c M src/osmo-bts-sysmo/l1_if.c 2 files changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/66/1566/1 diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index 99533d7..c70bd9e 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -647,6 +647,7 @@ /* ignore every time indication, except for c0 */ if (trx != bts->c0) { + msgb_free(msg); return 0; } diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index ad9aa64..82db8d7 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -642,6 +642,7 @@ /* ignore every time indication, except for c0 */ if (trx != bts->c0) { + msgb_free(msg); return 0; } -- To view, visit https://gerrit.osmocom.org/1566 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3061060235a488b114b636b3af9a2253a94de1e8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Jan 11 10:32:22 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 11 Jan 2017 10:32:22 +0000 Subject: [PATCH] libosmocore[master]: libosmogsm.map: fix typo Message-ID: Review at https://gerrit.osmocom.org/1567 libosmogsm.map: fix typo Change-Id: I71413fbe703e459782a235e5b1d8487265de3780 Related: OS#1615 --- M src/gsm/libosmogsm.map 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/67/1567/1 diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 3d1413d..7398c16 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -26,7 +26,7 @@ abis_nm_test_name; abis_nm_osmo_magic; abis_nm_ipa_magic; -abis_nm_event_cause_names; +abis_mm_event_cause_names; abis_nm_pcause_type_names; osmo_sitype_strs; -- To view, visit https://gerrit.osmocom.org/1567 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I71413fbe703e459782a235e5b1d8487265de3780 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Jan 11 10:56:16 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 11 Jan 2017 10:56:16 +0000 Subject: [PATCH] openbsc[master]: Improve OML failure report Message-ID: Review at https://gerrit.osmocom.org/1568 Improve OML failure report * clearly separate report parts * use textual representation for failure cause if possible Change-Id: I7a98a77011463021d0edd6ecfab1680e211f7e16 Related: OS#1615 --- M openbsc/src/libbsc/abis_nm.c 1 file changed, 13 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/68/1568/1 diff --git a/openbsc/src/libbsc/abis_nm.c b/openbsc/src/libbsc/abis_nm.c index 0c723e8..28a1850 100644 --- a/openbsc/src/libbsc/abis_nm.c +++ b/openbsc/src/libbsc/abis_nm.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -280,25 +281,32 @@ const uint8_t *p_val; char *p_text; - LOGPC(DNM, LOGL_ERROR, "Failure Event Report "); + LOGPC(DNM, LOGL_ERROR, "Failure Event Report: "); abis_nm_tlv_parse(&tp, sign_link->trx->bts, foh->data, oh->length-sizeof(*foh)); if (TLVP_PRESENT(&tp, NM_ATT_EVENT_TYPE)) - LOGPC(DNM, LOGL_ERROR, "Type=%s ", + LOGPC(DNM, LOGL_ERROR, "Type=%s, ", abis_nm_event_type_name(*TLVP_VAL(&tp, NM_ATT_EVENT_TYPE))); if (TLVP_PRESENT(&tp, NM_ATT_SEVERITY)) - LOGPC(DNM, LOGL_ERROR, "Severity=%s ", + LOGPC(DNM, LOGL_ERROR, "Severity=%s, ", abis_nm_severity_name(*TLVP_VAL(&tp, NM_ATT_SEVERITY))); if (TLVP_PRESENT(&tp, NM_ATT_PROB_CAUSE)) { p_val = TLVP_VAL(&tp, NM_ATT_PROB_CAUSE); - LOGPC(DNM, LOGL_ERROR, "Probable cause= %02X %02X %02X ", p_val[0], p_val[1], p_val[2]); + LOGPC(DNM, LOGL_ERROR, "Probable cause=%s: ", + get_value_string(abis_nm_pcause_type_names, p_val[0])); + if (p_val[0] == NM_PCAUSE_T_MANUF) + LOGPC(DNM, LOGL_ERROR, "%s, ", + get_value_string(abis_mm_event_cause_names, + osmo_load16be(p_val + 1))); + else + LOGPC(DNM, LOGL_ERROR, "%02X %02X ", p_val[1], p_val[2]); } if (TLVP_PRESENT(&tp, NM_ATT_ADD_TEXT)) { p_val = TLVP_VAL(&tp, NM_ATT_ADD_TEXT); p_text = talloc_strndup(tall_bsc_ctx, (const char *) p_val, TLVP_LEN(&tp, NM_ATT_ADD_TEXT)); if (p_text) { - LOGPC(DNM, LOGL_ERROR, "Additional Text=%s ", p_text); + LOGPC(DNM, LOGL_ERROR, "Additional Text=%s. ", p_text); talloc_free(p_text); } } -- To view, visit https://gerrit.osmocom.org/1568 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7a98a77011463021d0edd6ecfab1680e211f7e16 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Jan 11 12:09:36 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 11 Jan 2017 12:09:36 +0000 Subject: [PATCH] libosmocore[master]: abis_nm_fail_evt_rep(): use va_list explicitly Message-ID: Review at https://gerrit.osmocom.org/1569 abis_nm_fail_evt_rep(): use va_list explicitly Accept fixed number of arguments including va_list instead of variable number of arguments. This allows this function to be used from another vararg functions similar to vprintff() vs printf(). Related: OS#1615 Change-Id: Ib293dec1c2de9b664584a8456c782ea7b6dd8555 --- M include/osmocom/gsm/protocol/gsm_12_21.h M src/gsm/abis_nm.c 2 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/69/1569/1 diff --git a/include/osmocom/gsm/protocol/gsm_12_21.h b/include/osmocom/gsm/protocol/gsm_12_21.h index 1a95311..3281265 100644 --- a/include/osmocom/gsm/protocol/gsm_12_21.h +++ b/include/osmocom/gsm/protocol/gsm_12_21.h @@ -789,5 +789,6 @@ struct msgb *abis_nm_fail_evt_rep(enum abis_nm_event_type t, enum abis_nm_severity s, enum abis_nm_pcause_type ct, - uint16_t cause_value, const char *fmt, ...); + uint16_t cause_value, const char *fmt, + va_list ap); /*! @} */ diff --git a/src/gsm/abis_nm.c b/src/gsm/abis_nm.c index f50a54f..6695caf 100644 --- a/src/gsm/abis_nm.c +++ b/src/gsm/abis_nm.c @@ -28,6 +28,7 @@ #include #include +#include #include #include @@ -528,11 +529,11 @@ struct msgb *abis_nm_fail_evt_rep(enum abis_nm_event_type t, enum abis_nm_severity s, enum abis_nm_pcause_type ct, - uint16_t cause_value, const char *fmt, ...) + uint16_t cause_value, const char *fmt, + va_list ap) { uint8_t cause[3]; int len; - va_list ap; char add_text[ABIS_NM_MSG_HEADROOM]; struct msgb *nmsg = msgb_alloc_headroom(ABIS_NM_MSG_SIZE, ABIS_NM_MSG_HEADROOM, @@ -548,9 +549,7 @@ msgb_tv_fixed_put(nmsg, NM_ATT_PROB_CAUSE, 3, cause); - va_start(ap, fmt); len = vsnprintf(add_text, ABIS_NM_MSG_HEADROOM, fmt, ap); - va_end(ap); if (len < 0) { msgb_free(nmsg); -- To view, visit https://gerrit.osmocom.org/1569 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib293dec1c2de9b664584a8456c782ea7b6dd8555 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Jan 11 12:32:55 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 11 Jan 2017 12:32:55 +0000 Subject: [PATCH] osmo-bts[master]: OML: internalize failure reporting Message-ID: Review at https://gerrit.osmocom.org/1570 OML: internalize failure reporting * make oml_tx_failure_event_rep() static and use osmo_signal_dispatch() to trigger event reports outside of oml.c instead of directly calling into OML layer * remove unnecessary formatting from text messages Change-Id: I738555c547926e97b325ab53763c0076c42309bc Related: OS#1615 --- M include/osmo-bts/oml.h M include/osmo-bts/signal.h M src/common/abis.c M src/common/bts.c M src/common/l1sap.c M src/common/main.c M src/common/oml.c M src/common/rsl.c 8 files changed, 84 insertions(+), 63 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/70/1570/1 diff --git a/include/osmo-bts/oml.h b/include/osmo-bts/oml.h index 217ec64..29e0791 100644 --- a/include/osmo-bts/oml.h +++ b/include/osmo-bts/oml.h @@ -9,7 +9,7 @@ struct gsm_lchan; -int oml_init(void); +int oml_init(struct gsm_abis_mo *mo); int down_oml(struct gsm_bts *bts, struct msgb *msg); struct msgb *oml_msgb_alloc(void); @@ -43,9 +43,5 @@ /* Configure LAPDm T200 timers for this lchan according to OML */ int oml_set_lchan_t200(struct gsm_lchan *lchan); extern const unsigned int oml_default_t200_ms[7]; - -/* Transmit failure event report */ -int oml_tx_failure_event_rep(struct gsm_abis_mo *mo, uint16_t cause_value, - const char *fmt, ...); #endif // _OML_H */ diff --git a/include/osmo-bts/signal.h b/include/osmo-bts/signal.h index c8168a2..01d4099 100644 --- a/include/osmo-bts/signal.h +++ b/include/osmo-bts/signal.h @@ -5,6 +5,7 @@ enum sig_subsys { SS_GLOBAL, + SS_FAIL, }; enum signals_global { diff --git a/src/common/abis.c b/src/common/abis.c index 6753149..768d261 100644 --- a/src/common/abis.c +++ b/src/common/abis.c @@ -235,7 +235,7 @@ { g_bts = bts; - oml_init(); + oml_init(&bts->mo); libosmo_abis_init(NULL); osmo_signal_register_handler(SS_L_INPUT, &inp_s_cbfn, bts); diff --git a/src/common/bts.c b/src/common/bts.c index efefb86..147cc11 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -257,20 +257,24 @@ struct e1inp_sign_link *link = trx->rsl_link; uint8_t radio_state = link ? NM_OPSTATE_ENABLED : NM_OPSTATE_DISABLED; int rc; + char *rep; LOGP(DSUM, LOGL_INFO, "RSL link (TRX %02x) state changed to %s, sending Status'.\n", trx->nr, link ? "up" : "down"); oml_mo_state_chg(&trx->mo, radio_state, NM_AVSTATE_OK); - if (link) + if (link) { rc = rsl_tx_rf_res(trx); - else + rep = talloc_asprintf(tall_bts_ctx, + "Failed to establish RSL link (%d)", rc); + } else { rc = bts_model_trx_deact_rf(trx); + rep = talloc_asprintf(tall_bts_ctx, + "Failed to deactivate RF (%d)", rc); + } if (rc < 0) - oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_RSL_FAIL, link ? - "Failed to establish RSL link (%d)\n" : - "Failed to deactivate RF (%d)\n", rc); + osmo_signal_dispatch(SS_FAIL, OSMO_EVT_MAJ_RSL_FAIL, rep); return 0; } diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 968237f..3dcdf74 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -49,6 +49,7 @@ #include #include #include +#include struct gsm_lchan *get_lchan_by_chan_nr(struct gsm_bts_trx *trx, unsigned int chan_nr) @@ -1025,10 +1026,11 @@ default: LOGP(DL1P, LOGL_NOTICE, "unknown prim %d op %d\n", l1sap->oph.primitive, l1sap->oph.operation); - oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, - "unknown prim %d op %d\n", - l1sap->oph.primitive, - l1sap->oph.operation); + osmo_signal_dispatch(SS_FAIL, OSMO_EVT_MAJ_UKWN_MSG, + talloc_asprintf(tall_bts_ctx, + "unknown prim %d op %d", + l1sap->oph.primitive, + l1sap->oph.operation)); break; } diff --git a/src/common/main.c b/src/common/main.c index 00c8b23..c62d152 100644 --- a/src/common/main.c +++ b/src/common/main.c @@ -54,6 +54,7 @@ #include #include #include +#include #include int quit = 0; @@ -181,16 +182,15 @@ static void signal_handler(int signal) { - fprintf(stderr, "signal %u received\n", signal); + char *rep = talloc_asprintf(tall_bts_ctx, "BTS: signal %d (%s) received", + signal, strsignal(signal)); + fprintf(stderr, "%s\n", rep); switch (signal) { case SIGINT: - //osmo_signal_dispatch(SS_GLOBAL, S_GLOBAL_SHUTDOWN, NULL); if (!quit) { - oml_tx_failure_event_rep(&bts->mo, - OSMO_EVT_CRIT_PROC_STOP, - "BTS: SIGINT received -> " - "shutdown\n"); + osmo_signal_dispatch(SS_FAIL, OSMO_EVT_CRIT_PROC_STOP, + rep); bts_shutdown(bts, "SIGINT"); } quit++; @@ -198,9 +198,7 @@ case SIGABRT: case SIGUSR1: case SIGUSR2: - oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_CRIT_PROC_STOP, - "BTS: signal %s received\n", - strsignal(signal)); + osmo_signal_dispatch(SS_FAIL, OSMO_EVT_CRIT_PROC_STOP, rep); talloc_report_full(tall_bts_ctx, stderr); break; default: diff --git a/src/common/oml.c b/src/common/oml.c index 1482410..c42a7da 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -25,6 +25,8 @@ */ #include +#include +#include #include #include @@ -56,6 +58,27 @@ struct msgb *oml_msgb_alloc(void) { return msgb_alloc_headroom(1024, 128, "OML"); +} + +/* 3GPP TS 12.21 ? 8.8.2 */ +static int oml_tx_failure_event_rep(struct gsm_abis_mo *mo, uint16_t cause_value, + const char *fmt, ...) +{ + struct msgb *nmsg; + va_list ap; + + LOGP(DOML, LOGL_NOTICE, "Reporting FAILURE to BSC: "); + va_start(ap, fmt); + osmo_vlogp(DOML, LOGL_NOTICE, __FILE__, __LINE__, 1, fmt, ap); + nmsg = abis_nm_fail_evt_rep(NM_EVT_PROC_FAIL, NM_SEVER_CRITICAL, + NM_PCAUSE_T_MANUF, cause_value, fmt, ap); + va_end(ap); + LOGPC(DOML, LOGL_NOTICE, "\n"); + + if (!nmsg) + return -ENOMEM; + + return oml_mo_send_msg(mo, nmsg, NM_MT_FAILURE_EVENT_REP); } int oml_send_msg(struct msgb *msg, int is_manuf) @@ -347,7 +370,7 @@ rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); if (rc < 0) { oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, - "New value for Attribute not supported\n"); + "New value for Attribute not supported"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); } @@ -356,7 +379,7 @@ uint16_t arfcn = ntohs(tlvp_val16_unal(&tp, NM_ATT_BCCH_ARFCN)); if (arfcn > 1024) { oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_WARN_SW_WARN, - "Given ARFCN %d is not supported.\n", + "Given ARFCN %u is not supported", arfcn); LOGP(DOML, LOGL_NOTICE, "Given ARFCN %d is not supported.\n", arfcn); return oml_fom_ack_nack(msg, NM_NACK_FREQ_NOTAVAIL); @@ -366,7 +389,7 @@ if (TLVP_PRESENT(&tp, NM_ATT_START_TIME)) { oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, "NM_ATT_START_TIME Attribute not " - "supported\n"); + "supported"); return oml_fom_ack_nack(msg, NM_NACK_SPEC_IMPL_NOTSUPP); } @@ -506,7 +529,7 @@ if (rc < 0) { oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UNSUP_ATTR, "New value for Set Radio Attribute not" - " supported\n"); + " supported"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); } @@ -568,8 +591,15 @@ memcpy(&_value, value, 2); arfcn = ntohs(_value); value += 2; - if (arfcn > 1024) + if (arfcn > 1024) { + oml_tx_failure_event_rep(&trx->bts->mo, + OSMO_EVT_WARN_SW_WARN, + "Given ARFCN %u is unsupported", + arfcn); + LOGP(DOML, LOGL_NOTICE, + "Given ARFCN %u is unsupported.\n", arfcn); return oml_fom_ack_nack(msg, NM_NACK_FREQ_NOTAVAIL); + } trx->arfcn = arfcn; } #endif @@ -672,7 +702,7 @@ if (rc < 0) { oml_tx_failure_event_rep(&ts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, "New value for Set Channel Attribute " - "not supported\n"); + "not supported"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); } @@ -814,7 +844,7 @@ trx->mo.obj_inst.trx_nr = foh->obj_inst.trx_nr; trx->mo.obj_inst.ts_nr = 0xff; oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, - "Formatted O&M message too short\n"); + "Formatted O&M message too short"); } return -EIO; } @@ -828,7 +858,7 @@ trx->mo.obj_inst.ts_nr = 0xff; oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, "Formatted O&M with BTS %d out" - " of range (0:0xFF).\n", + " of range (0:0xFF)", foh->obj_inst.bts_nr); } return oml_fom_ack_nack(msg, NM_NACK_BTSNR_UNKN); @@ -871,12 +901,12 @@ trx->mo.obj_inst.ts_nr = 0xff; oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, "unknown Formatted O&M " - "msg_type 0x%02x\n", + "msg_type 0x%02x", foh->msg_type); } else oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UKWN_MSG, "unknown Formatted O&M " - "msg_type 0x%02x\n", + "msg_type 0x%02x", foh->msg_type); ret = oml_fom_ack_nack(msg, NM_NACK_MSGTYPE_INVAL); } @@ -1191,29 +1221,21 @@ return ret; } -/* 3GPP TS 12.21 ? 8.8.2 */ -int oml_tx_failure_event_rep(struct gsm_abis_mo *mo, uint16_t cause_value, - const char *fmt, ...) +static int handle_fail_sig(unsigned int subsys, unsigned int signal, + void *handler_data, void *signal_data) { - struct msgb *nmsg; - va_list ap; + oml_tx_failure_event_rep(handler_data, signal, "%s", signal_data); + if (signal_data) + talloc_free(signal_data); - va_start(ap, fmt); - nmsg = abis_nm_fail_evt_rep(NM_EVT_PROC_FAIL, NM_SEVER_CRITICAL, - NM_PCAUSE_T_MANUF, cause_value, fmt, ap); - LOGP(DOML, LOGL_INFO, fmt, ap); - va_end(ap); - - if (!nmsg) - return -ENOMEM; - - return oml_mo_send_msg(mo, nmsg, NM_MT_FAILURE_EVENT_REP); + return 0; } -int oml_init(void) +int oml_init(struct gsm_abis_mo *mo) { DEBUGP(DOML, "Initializing OML attribute definitions\n"); tlv_def_patch(&abis_nm_att_tlvdef_ipa, &abis_nm_att_tlvdef); + osmo_signal_register_handler(SS_FAIL, handle_fail_sig, mo); return 0; } diff --git a/src/common/rsl.c b/src/common/rsl.c index a34c455..6e516dc 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -403,9 +403,9 @@ if (rc < 0) { /* FIXME: notfiy the BSC on other errors? */ if (rc == -ENOSPC) - oml_tx_failure_event_rep(&trx->mo, - OSMO_EVT_MIN_PAG_TAB_FULL, - "BTS paging table is full\n"); + osmo_signal_dispatch(SS_FAIL, OSMO_EVT_MIN_PAG_TAB_FULL, + talloc_asprintf(tall_bts_ctx, + "BTS paging table is full")); } pcu_tx_pag_req(identity_lv, chan_needed); @@ -1653,11 +1653,10 @@ LOGP(DRSL, LOGL_ERROR, "%s IPAC Failed to create RTP/RTCP sockets\n", gsm_lchan_name(lchan)); - oml_tx_failure_event_rep(&lchan->ts->trx->mo, - OSMO_EVT_CRIT_RTP_TOUT, - "%s IPAC Failed to create " - "RTP/RTCP sockets\n", - gsm_lchan_name(lchan)); + osmo_signal_dispatch(SS_FAIL, OSMO_EVT_CRIT_RTP_TOUT, + talloc_asprintf(tall_bts_ctx, + "%s IPAC Failed to create RTP/RTCP sockets", + gsm_lchan_name(lchan))); return tx_ipac_XXcx_nack(lchan, RSL_ERR_RES_UNAVAIL, inc_ip_port, dch->c.msg_type); } @@ -1697,11 +1696,10 @@ LOGP(DRSL, LOGL_ERROR, "%s IPAC Failed to bind RTP/RTCP sockets\n", gsm_lchan_name(lchan)); - oml_tx_failure_event_rep(&lchan->ts->trx->mo, - OSMO_EVT_CRIT_RTP_TOUT, - "%s IPAC Failed to bind " - "RTP/RTCP sockets\n", - gsm_lchan_name(lchan)); + osmo_signal_dispatch(SS_FAIL, OSMO_EVT_CRIT_RTP_TOUT, + talloc_asprintf(tall_bts_ctx, + "%s IPAC Failed to bind RTP/RTCP sockets", + gsm_lchan_name(lchan))); osmo_rtp_socket_free(lchan->abis_ip.rtp_socket); lchan->abis_ip.rtp_socket = NULL; msgb_queue_flush(&lchan->dl_tch_queue); -- To view, visit https://gerrit.osmocom.org/1570 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I738555c547926e97b325ab53763c0076c42309bc Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Jan 11 12:37:40 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 11 Jan 2017 12:37:40 +0000 Subject: [PATCH] openbsc[master]: Improve OML failure report In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1568 to look at the new patch set (#2). Improve OML failure report * clearly separate report parts * use textual representation for failure cause if possible Change-Id: I7a98a77011463021d0edd6ecfab1680e211f7e16 Related: OS#1615 --- M openbsc/src/libbsc/abis_nm.c 1 file changed, 14 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/68/1568/2 diff --git a/openbsc/src/libbsc/abis_nm.c b/openbsc/src/libbsc/abis_nm.c index 0c723e8..306e779 100644 --- a/openbsc/src/libbsc/abis_nm.c +++ b/openbsc/src/libbsc/abis_nm.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -280,25 +281,32 @@ const uint8_t *p_val; char *p_text; - LOGPC(DNM, LOGL_ERROR, "Failure Event Report "); - + LOGPC(DNM, LOGL_ERROR, "Failure Event Report: "); + abis_nm_tlv_parse(&tp, sign_link->trx->bts, foh->data, oh->length-sizeof(*foh)); if (TLVP_PRESENT(&tp, NM_ATT_EVENT_TYPE)) - LOGPC(DNM, LOGL_ERROR, "Type=%s ", + LOGPC(DNM, LOGL_ERROR, "Type=%s, ", abis_nm_event_type_name(*TLVP_VAL(&tp, NM_ATT_EVENT_TYPE))); if (TLVP_PRESENT(&tp, NM_ATT_SEVERITY)) - LOGPC(DNM, LOGL_ERROR, "Severity=%s ", + LOGPC(DNM, LOGL_ERROR, "Severity=%s, ", abis_nm_severity_name(*TLVP_VAL(&tp, NM_ATT_SEVERITY))); if (TLVP_PRESENT(&tp, NM_ATT_PROB_CAUSE)) { p_val = TLVP_VAL(&tp, NM_ATT_PROB_CAUSE); - LOGPC(DNM, LOGL_ERROR, "Probable cause= %02X %02X %02X ", p_val[0], p_val[1], p_val[2]); + LOGPC(DNM, LOGL_ERROR, "Probable cause=%s: ", + get_value_string(abis_nm_pcause_type_names, p_val[0])); + if (p_val[0] == NM_PCAUSE_T_MANUF) + LOGPC(DNM, LOGL_ERROR, "%s, ", + get_value_string(abis_mm_event_cause_names, + osmo_load16be(p_val + 1))); + else + LOGPC(DNM, LOGL_ERROR, "%02X %02X ", p_val[1], p_val[2]); } if (TLVP_PRESENT(&tp, NM_ATT_ADD_TEXT)) { p_val = TLVP_VAL(&tp, NM_ATT_ADD_TEXT); p_text = talloc_strndup(tall_bsc_ctx, (const char *) p_val, TLVP_LEN(&tp, NM_ATT_ADD_TEXT)); if (p_text) { - LOGPC(DNM, LOGL_ERROR, "Additional Text=%s ", p_text); + LOGPC(DNM, LOGL_ERROR, "Additional Text=%s. ", p_text); talloc_free(p_text); } } -- To view, visit https://gerrit.osmocom.org/1568 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I7a98a77011463021d0edd6ecfab1680e211f7e16 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Jan 11 13:12:26 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 11 Jan 2017 13:12:26 +0000 Subject: [PATCH] libosmocore[master]: OML: add external alerts Message-ID: Review at https://gerrit.osmocom.org/1571 OML: add external alerts Add special cause for alerts produced by external processes. Change-Id: Idd7ee085321f8172c72ecfdba320186049f4d988 Related: OS#1615 --- M include/osmocom/gsm/protocol/gsm_12_21.h M src/gsm/abis_nm.c 2 files changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/71/1571/1 diff --git a/include/osmocom/gsm/protocol/gsm_12_21.h b/include/osmocom/gsm/protocol/gsm_12_21.h index 1a95311..a9aee10 100644 --- a/include/osmocom/gsm/protocol/gsm_12_21.h +++ b/include/osmocom/gsm/protocol/gsm_12_21.h @@ -275,6 +275,8 @@ OSMO_EVT_MIN_PAG_TAB_FULL = 0x0401, /* Warning causes */ OSMO_EVT_WARN_SW_WARN = 0x0001, + /* External causes */ + OSMO_EVT_EXT_ALARM = 0xfeed, }; extern const struct value_string abis_mm_event_cause_names[]; diff --git a/src/gsm/abis_nm.c b/src/gsm/abis_nm.c index f50a54f..34b7835 100644 --- a/src/gsm/abis_nm.c +++ b/src/gsm/abis_nm.c @@ -161,6 +161,7 @@ { OSMO_EVT_MAJ_NET_CONGEST, "Network congestion" }, { OSMO_EVT_MIN_PAG_TAB_FULL, "Paging table full" }, { OSMO_EVT_WARN_SW_WARN, "Software warning" }, + { OSMO_EVT_EXT_ALARM, "External alarm" }, { 0, NULL } }; -- To view, visit https://gerrit.osmocom.org/1571 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idd7ee085321f8172c72ecfdba320186049f4d988 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Jan 11 14:12:59 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 11 Jan 2017 14:12:59 +0000 Subject: [PATCH] openbsc[master]: bsc_control.py: fix blocking Message-ID: Review at https://gerrit.osmocom.org/1572 bsc_control.py: fix blocking Previously reading from socket would block if no data were sent by the server. Use non-blocking read for set and get operations. Change-Id: I706d54a4a7ceef62683bf9a2fe63fc9ab331c24e --- M openbsc/contrib/bsc_control.py 1 file changed, 11 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/72/1572/1 diff --git a/openbsc/contrib/bsc_control.py b/openbsc/contrib/bsc_control.py index 66a41eb..3a7964d 100755 --- a/openbsc/contrib/bsc_control.py +++ b/openbsc/contrib/bsc_control.py @@ -30,8 +30,14 @@ (_, _, v) = do_set_get(sck, var) return v -def _leftovers(sck): - data = sck.recv(1024) +def _leftovers(sck, fl): + """ + Read outstanding data if any according to flags + """ + try: + data = sck.recv(1024, fl) + except socket.error as (s_errno, strerror): + return False if len(data) != 0: tail = data while True: @@ -75,19 +81,19 @@ if options.cmd_set: if len(args) < 2: parser.error("Set requires var and value arguments") - _leftovers(sock) + _leftovers(sock, socket.MSG_DONTWAIT) print "Got message:", set_var(sock, args[0], ' '.join(args[1:])) if options.cmd_get: if len(args) != 1: parser.error("Get requires the var argument") - _leftovers(sock) + _leftovers(sock, socket.MSG_DONTWAIT) (a, _, _) = do_set_get(sock, args[0]) print "Got message:", a if options.monitor: while True: - if not _leftovers(sock): + if not _leftovers(sock, 0): print "Connection is gone." break sock.close() -- To view, visit https://gerrit.osmocom.org/1572 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I706d54a4a7ceef62683bf9a2fe63fc9ab331c24e Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Jan 11 14:34:43 2017 From: gerrit-no-reply at lists.osmocom.org (jfdionne) Date: Wed, 11 Jan 2017 14:34:43 +0000 Subject: osmo-bts[master]: Fix memleak In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 Verified+1 -- To view, visit https://gerrit.osmocom.org/1566 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3061060235a488b114b636b3af9a2253a94de1e8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jean-Francois Dionne Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: jfdionne Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 11 14:36:46 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 11 Jan 2017 14:36:46 +0000 Subject: libosmocore[master]: linuxlist.h: add llist_len() In-Reply-To: References: Message-ID: Patch Set 1: > Why returning int if it's always positive value? Better use size_t > or other unsigned type. I considered it, but then decided to keep int, as in the original implementation from some C file in libosmo-abis: firstly, practical fact: if we want to count the len by iterating an llist that has more than INT_MAX elements, something is seriously wrong. Coding convenience: it is painful / dangerous to compare signed and unsigned ints. We usually use int for iterators, indexes, list lengths, so it's convenient to return an int here. Also enables the caller to compare with negative values -- no idea why we'd want that, but is conceivable that it might be useful. So I agree that it is wrong in the sense of type logic to return a signed value, but if we return unsigned, we need to add type casts and checks or use unsigned int for iterators everywhere... (which is a bit like saying "then we need to use the correct type for iterators everywhere") unsigned is more "correct", but I wasn't certain enough to change it from the int return type I found. What do other reviewers think? -- To view, visit https://gerrit.osmocom.org/1563 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic49adc7a346f5722bf624d7d3b4a735e4220ae15 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 11 14:51:41 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 11 Jan 2017 14:51:41 +0000 Subject: libosmocore[master]: abis_nm_fail_evt_rep(): use va_list explicitly In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (1 comment) marking to have the question resolved first https://gerrit.osmocom.org/#/c/1569/1//COMMIT_MSG Commit Message: Line 11: vararg functions similar to vprintff() vs printf(). but it disallows calling "directly". Usually one has both variants, one with '...' that simply passes on to the va_list version, and another one suffixed _va with a va_list arg for lower level access. Will there be no callers that would like to provide variable number of arguments instead of a va_list? What code does this affect? Will e.g. the openbsc build break with this patch? -- To view, visit https://gerrit.osmocom.org/1569 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib293dec1c2de9b664584a8456c782ea7b6dd8555 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Jan 11 15:06:06 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 11 Jan 2017 15:06:06 +0000 Subject: osmo-pcu[master]: Sanitizer build fix for invalid value of variable of type eg... In-Reply-To: References: Message-ID: Patch Set 3: I can only reiterate my previous comment: In short: set to INVALID only where it is supposed to be INVALID, and/or, input-check on that called function that potentially receives the INVALID items. It is currently unclear whether the code will happily use INVALID items as if they were valid. That should be easy to see. In long: " My point remains that in gprs_rlc_mcs_cps() the punct/punct2 are used in calculations directly without checking against INVALID items. By initializing both punct values to "INVALID" in create_dl_acked_block(), it is suggested that INVALID values may be passed on to gprs_rlc_mcs_cps() -- if that weren't the case, it would not be necessary to initialize to INVALID. So, gprs_rlc_mcs_cps() must check that it isn't using INVALID enum values in its bitfield calculations. Would it make more sense to set punct2 to INVALID explicitly in specific cases? Even though incidentally, the cases where one (or both??) args are INVALID might match the internal expectations of the switch() statement, this is bad coding style. Each function's API should make sense on its own. " Let's stop discussing and see another patch set... In case your intention is to abandon this, please clearly say so; but I assume it's not much effort and would appreciate if you could follow up. -- To view, visit https://gerrit.osmocom.org/1411 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ice54edc7e4a936eb2f2dd8a243673a30dceef542 Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 11 15:09:08 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 11 Jan 2017 15:09:08 +0000 Subject: [PATCH] osmo-bts[master]: l1sap: Fix expired rach slot counting Message-ID: Review at https://gerrit.osmocom.org/1573 l1sap: Fix expired rach slot counting The counting of the expired rach slots in l1sap.c is not correctly implemented. This commit fixes the implementation. The expired rach slots are now conted correctly according to the configured channel combination. If a CCCH and SDCCH are combined, only the frames related to rach slots are counted. Change-Id: I87f40f5f160a4f6750c4f3d06997fc4f24049303 --- M src/common/l1sap.c 1 file changed, 49 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/73/1573/1 diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 968237f..cf7b085 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -354,15 +354,26 @@ /* time information received from bts model */ static int l1sap_info_time_ind(struct gsm_bts *bts, - struct osmo_phsap_prim *l1sap, - struct info_time_ind_param *info_time_ind) + struct osmo_phsap_prim *l1sap, + struct info_time_ind_param *info_time_ind) { struct gsm_bts_trx *trx; struct gsm_bts_role_bts *btsb = bts->role; - - int frames_expired = info_time_ind->fn - btsb->gsm_time.fn; + unsigned int blockno; + struct gsm48_system_information_type_3 *si3; + uint8_t ccch_conf; + uint8_t ccch_mult; + int frames_expired; + int rach_frames_expired = 0; DEBUGP(DL1P, "MPH_INFO time ind %u\n", info_time_ind->fn); + + /* Calculate and check frame difference */ + frames_expired = info_time_ind->fn - btsb->gsm_time.fn; + if (frames_expired > 1) { + LOGP(DL1P, LOGL_ERROR, + "Invalid condition detected: Frame difference is > 1!\n"); + } /* Update our data structures with the current GSM time */ gsm_fn2gsmtime(&btsb->gsm_time, info_time_ind->fn); @@ -373,21 +384,45 @@ /* check if the measurement period of some lchan has ended * and pre-compute the respective measurement */ llist_for_each_entry(trx, &bts->trx_list, list) - trx_meas_check_compute(trx, info_time_ind->fn - 1); + trx_meas_check_compute(trx, info_time_ind->fn - 1); /* increment number of RACH slots that have passed by since the - * last time indication */ - if (trx == bts->c0) { - unsigned int num_rach_per_frame; - /* 27 / 51 taken from TS 05.01 Figure 3 */ - if (bts->c0->ts[0].pchan == GSM_PCHAN_CCCH_SDCCH4) - num_rach_per_frame = 27; - else - num_rach_per_frame = 51; + * last time indication, See also 3GPP TS 05.02 Clause 7 Table 5 of 9 */ + blockno = info_time_ind->fn % 51; + si3 = GSM_BTS_SI(bts, SYSINFO_TYPE_3); + ccch_conf = si3->control_channel_desc.ccch_conf; - btsb->load.rach.total += frames_expired * num_rach_per_frame; + if (ccch_conf == RSL_BCCH_CCCH_CONF_1_C) { + /* It is possible to combine a CCCH with an SDCCH4, in this + * case the CCCH will have to share the available frames with + * the other channel, this results in a limited number of + * available rach slots */ + if (blockno == 4 || blockno == 5 + || (blockno >= 15 && blockno <= 36) || blockno == 45 + || blockno == 46) + rach_frames_expired = frames_expired; + } else { + /* It is possible to have multiple CCCH channels on + * different physical channels (large cells), this + * also multiplies the available/expired RACH channels. + * See also TS 04.08, Chapter 10.5.2.11, table 10.29 */ + if (ccch_conf == RSL_BCCH_CCCH_CONF_2_NC) + ccch_mult = 2; + if (ccch_conf == RSL_BCCH_CCCH_CONF_3_NC) + ccch_mult = 3; + if (ccch_conf == RSL_BCCH_CCCH_CONF_4_NC) + ccch_mult = 4; + else + ccch_mult = 1; + + rach_frames_expired = frames_expired * ccch_mult; } + /* Each Frame has room for 4 RACH requests, since RACH + * requests are short enough to fit into a single radio + * burst, so we need to multiply the final result by 4 */ + btsb->load.rach.total += rach_frames_expired * 4; + return 0; } -- To view, visit https://gerrit.osmocom.org/1573 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I87f40f5f160a4f6750c4f3d06997fc4f24049303 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Jan 11 15:21:04 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 11 Jan 2017 15:21:04 +0000 Subject: [PATCH] osmo-bts[master]: l1sap: Fix expired rach slot counting In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1573 to look at the new patch set (#2). l1sap: Fix expired rach slot counting The counting of the expired rach slots in l1sap.c is not correctly implemented. This commit fixes the implementation. The expired rach slots are now conted correctly according to the configured channel combination. If a CCCH and SDCCH are combined, only the frames related to rach slots are counted. Change-Id: I87f40f5f160a4f6750c4f3d06997fc4f24049303 --- M src/common/l1sap.c 1 file changed, 47 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/73/1573/2 diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 968237f..f560d3b 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -354,15 +354,26 @@ /* time information received from bts model */ static int l1sap_info_time_ind(struct gsm_bts *bts, - struct osmo_phsap_prim *l1sap, - struct info_time_ind_param *info_time_ind) + struct osmo_phsap_prim *l1sap, + struct info_time_ind_param *info_time_ind) { struct gsm_bts_trx *trx; struct gsm_bts_role_bts *btsb = bts->role; - - int frames_expired = info_time_ind->fn - btsb->gsm_time.fn; + unsigned int blockno; + struct gsm48_system_information_type_3 *si3; + uint8_t ccch_conf; + uint8_t ccch_mult; + int frames_expired; + int rach_frames_expired = 0; DEBUGP(DL1P, "MPH_INFO time ind %u\n", info_time_ind->fn); + + /* Calculate and check frame difference */ + frames_expired = info_time_ind->fn - btsb->gsm_time.fn; + if (frames_expired > 1) { + LOGP(DL1P, LOGL_ERROR, + "Invalid condition detected: Frame difference is > 1!\n"); + } /* Update our data structures with the current GSM time */ gsm_fn2gsmtime(&btsb->gsm_time, info_time_ind->fn); @@ -373,21 +384,44 @@ /* check if the measurement period of some lchan has ended * and pre-compute the respective measurement */ llist_for_each_entry(trx, &bts->trx_list, list) - trx_meas_check_compute(trx, info_time_ind->fn - 1); + trx_meas_check_compute(trx, info_time_ind->fn - 1); /* increment number of RACH slots that have passed by since the - * last time indication */ - if (trx == bts->c0) { - unsigned int num_rach_per_frame; - /* 27 / 51 taken from TS 05.01 Figure 3 */ - if (bts->c0->ts[0].pchan == GSM_PCHAN_CCCH_SDCCH4) - num_rach_per_frame = 27; + * last time indication, See also 3GPP TS 05.02 Clause 7 Table 5 of 9 */ + si3 = GSM_BTS_SI(bts, SYSINFO_TYPE_3); + ccch_conf = si3->control_channel_desc.ccch_conf; + if (ccch_conf == RSL_BCCH_CCCH_CONF_1_C) { + /* It is possible to combine a CCCH with an SDCCH4, in this + * case the CCCH will have to share the available frames with + * the other channel, this results in a limited number of + * available rach slots */ + blockno = info_time_ind->fn % 51; + if (blockno == 4 || blockno == 5 + || (blockno >= 15 && blockno <= 36) || blockno == 45 + || blockno == 46) + rach_frames_expired = frames_expired; + } else { + /* It is possible to have multiple CCCH channels on + * different physical channels (large cells), this + * also multiplies the available/expired RACH channels. + * See also TS 04.08, Chapter 10.5.2.11, table 10.29 */ + if (ccch_conf == RSL_BCCH_CCCH_CONF_2_NC) + ccch_mult = 2; + if (ccch_conf == RSL_BCCH_CCCH_CONF_3_NC) + ccch_mult = 3; + if (ccch_conf == RSL_BCCH_CCCH_CONF_4_NC) + ccch_mult = 4; else - num_rach_per_frame = 51; + ccch_mult = 1; - btsb->load.rach.total += frames_expired * num_rach_per_frame; + rach_frames_expired = frames_expired * ccch_mult; } + /* Each Frame has room for 4 RACH requests, since RACH + * requests are short enough to fit into a single radio + * burst, so we need to multiply the final result by 4 */ + btsb->load.rach.total += rach_frames_expired * 4; + return 0; } -- To view, visit https://gerrit.osmocom.org/1573 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I87f40f5f160a4f6750c4f3d06997fc4f24049303 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Jan 11 16:15:31 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 11 Jan 2017 16:15:31 +0000 Subject: libosmocore[master]: abis_nm_fail_evt_rep(): use va_list explicitly In-Reply-To: References: Message-ID: Patch Set 1: The only caller is osmobts and it's unlikely that we'll have use for ... variant. Nothing should break as well (from caller's point of view the interface is the same). I can add both for the sake of completeness - let's see what others think. -- To view, visit https://gerrit.osmocom.org/1569 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib293dec1c2de9b664584a8456c782ea7b6dd8555 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 11 16:20:54 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 11 Jan 2017 16:20:54 +0000 Subject: osmo-bts[master]: l1sap: Fix expired rach slot counting In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/1573/2/src/common/l1sap.c File src/common/l1sap.c: Line 402: rach_frames_expired = frames_expired; might make sense to create a new function that simply retunrs the number of rach frames expired for a given 'struct gsm_bts' and frame_number as arguments/parameters. -- To view, visit https://gerrit.osmocom.org/1573 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I87f40f5f160a4f6750c4f3d06997fc4f24049303 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Jan 11 16:21:43 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 11 Jan 2017 16:21:43 +0000 Subject: openbsc[master]: bsc_control.py: fix blocking In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1572 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I706d54a4a7ceef62683bf9a2fe63fc9ab331c24e Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 11 16:49:47 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 11 Jan 2017 16:49:47 +0000 Subject: [PATCH] libosmocore[master]: CTRL: add write-only helper Message-ID: Review at https://gerrit.osmocom.org/1574 CTRL: add write-only helper Similar to CTRL_CMD_DEFINE_RO() add helper for control commands which are not meant to be read, only to set. Change-Id: I66b7990db590c1f8e56326e392e6c1d2eafebd9a --- M include/osmocom/ctrl/control_cmd.h 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/74/1574/1 diff --git a/include/osmocom/ctrl/control_cmd.h b/include/osmocom/ctrl/control_cmd.h index 8f2eaa2..6d28d23 100644 --- a/include/osmocom/ctrl/control_cmd.h +++ b/include/osmocom/ctrl/control_cmd.h @@ -187,4 +187,14 @@ } \ CTRL_CMD_DEFINE_STRUCT(cmdname, cmdstr, verify_##cmdname) +#define CTRL_CMD_DEFINE_WO(cmdname, cmdstr) \ +static int set_##cmdname(struct ctrl_cmd *cmd, void *data); \ +static int get_##cmdname(struct ctrl_cmd *cmd, void *data) \ +{ \ + cmd->reply = "Write Only attribute"; \ + return CTRL_CMD_ERROR; \ +} \ +static int verify_##cmdname(struct ctrl_cmd *cmd, const char *value, void *data); \ +CTRL_CMD_DEFINE_STRUCT(cmdname, cmdstr, verify_##cmdname) + struct gsm_network; -- To view, visit https://gerrit.osmocom.org/1574 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I66b7990db590c1f8e56326e392e6c1d2eafebd9a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Jan 11 16:52:08 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 11 Jan 2017 16:52:08 +0000 Subject: [PATCH] osmo-bts[master]: Add ctrl command to send OML alert Message-ID: Review at https://gerrit.osmocom.org/1575 Add ctrl command to send OML alert Change-Id: I228cb71ab945e19e3747843469a52f577ee32f97 Related: OS#1615 --- M src/common/bts_ctrl_commands.c 1 file changed, 23 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/75/1575/1 diff --git a/src/common/bts_ctrl_commands.c b/src/common/bts_ctrl_commands.c index 6d223ff..2d017bd 100644 --- a/src/common/bts_ctrl_commands.c +++ b/src/common/bts_ctrl_commands.c @@ -24,11 +24,15 @@ #include #include +#include #include #include #include #include +#include +#include +#include CTRL_CMD_DEFINE(therm_att, "thermal-attenuation"); static int get_therm_att(struct ctrl_cmd *cmd, void *data) @@ -67,12 +71,31 @@ return 0; } +CTRL_CMD_DEFINE_WO(oml_alert, "oml-alert"); +static int set_oml_alert(struct ctrl_cmd *cmd, void *data) +{ + char *rep = talloc_strdup(tall_bts_ctx, cmd->value); + if (!rep) { + cmd->reply = "Not enough memory"; + return CTRL_CMD_ERROR; + } + osmo_signal_dispatch(SS_FAIL, OSMO_EVT_EXT_ALARM, rep); + cmd->reply = "OK"; + + return CTRL_CMD_REPLY; +} + +static int verify_oml_alert(struct ctrl_cmd *cmd, const char *value, void *data) +{ + return 0; +} int bts_ctrl_cmds_install(struct gsm_bts *bts) { int rc = 0; rc |= ctrl_cmd_install(CTRL_NODE_TRX, &cmd_therm_att); + rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_oml_alert); return rc; } -- To view, visit https://gerrit.osmocom.org/1575 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I228cb71ab945e19e3747843469a52f577ee32f97 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Jan 11 17:14:24 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 11 Jan 2017 17:14:24 +0000 Subject: [PATCH] libosmocore[master]: Add abis_nm_fail_evt_vrep() function In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1569 to look at the new patch set (#2). Add abis_nm_fail_evt_vrep() function It accept fixed number of arguments including va_list instead of variable number of arguments in abis_nm_fail_evt_rep() - similar to vprintff() vs printf(). Related: OS#1615 Change-Id: Ib293dec1c2de9b664584a8456c782ea7b6dd8555 --- M include/osmocom/gsm/protocol/gsm_12_21.h M src/gsm/abis_nm.c 2 files changed, 22 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/69/1569/2 diff --git a/include/osmocom/gsm/protocol/gsm_12_21.h b/include/osmocom/gsm/protocol/gsm_12_21.h index 1a95311..5daab42 100644 --- a/include/osmocom/gsm/protocol/gsm_12_21.h +++ b/include/osmocom/gsm/protocol/gsm_12_21.h @@ -790,4 +790,9 @@ enum abis_nm_severity s, enum abis_nm_pcause_type ct, uint16_t cause_value, const char *fmt, ...); +struct msgb *abis_nm_fail_evt_vrep(enum abis_nm_event_type t, + enum abis_nm_severity s, + enum abis_nm_pcause_type ct, + uint16_t cause_value, const char *fmt, + va_list ap); /*! @} */ diff --git a/src/gsm/abis_nm.c b/src/gsm/abis_nm.c index f50a54f..73e3c7e 100644 --- a/src/gsm/abis_nm.c +++ b/src/gsm/abis_nm.c @@ -530,9 +530,25 @@ enum abis_nm_pcause_type ct, uint16_t cause_value, const char *fmt, ...) { + va_list ap; + struct msgb *nmsg; + + va_start(ap, fmt); + nmsg = abis_nm_fail_evt_vrep(t, s, ct, cause_value, fmt, ap); + va_end(ap); + + return nmsg; +} + +/*! \brief Pack 3GPP TS 12.21 ? 8.8.2 Failure Event Report into msgb */ +struct msgb *abis_nm_fail_evt_vrep(enum abis_nm_event_type t, + enum abis_nm_severity s, + enum abis_nm_pcause_type ct, + uint16_t cause_value, const char *fmt, + va_list ap) +{ uint8_t cause[3]; int len; - va_list ap; char add_text[ABIS_NM_MSG_HEADROOM]; struct msgb *nmsg = msgb_alloc_headroom(ABIS_NM_MSG_SIZE, ABIS_NM_MSG_HEADROOM, @@ -548,10 +564,7 @@ msgb_tv_fixed_put(nmsg, NM_ATT_PROB_CAUSE, 3, cause); - va_start(ap, fmt); len = vsnprintf(add_text, ABIS_NM_MSG_HEADROOM, fmt, ap); - va_end(ap); - if (len < 0) { msgb_free(nmsg); return NULL; -- To view, visit https://gerrit.osmocom.org/1569 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib293dec1c2de9b664584a8456c782ea7b6dd8555 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Jan 11 17:23:08 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 11 Jan 2017 17:23:08 +0000 Subject: [PATCH] osmo-bts[master]: OML: internalize failure reporting In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1570 to look at the new patch set (#2). OML: internalize failure reporting * make oml_tx_failure_event_rep() static and use osmo_signal_dispatch() to trigger event reports outside of oml.c instead of directly calling into OML layer * remove unnecessary formatting from text messages Change-Id: I738555c547926e97b325ab53763c0076c42309bc Related: OS#1615 --- M include/osmo-bts/oml.h M include/osmo-bts/signal.h M src/common/abis.c M src/common/bts.c M src/common/l1sap.c M src/common/main.c M src/common/oml.c M src/common/rsl.c 8 files changed, 84 insertions(+), 63 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/70/1570/2 diff --git a/include/osmo-bts/oml.h b/include/osmo-bts/oml.h index 217ec64..29e0791 100644 --- a/include/osmo-bts/oml.h +++ b/include/osmo-bts/oml.h @@ -9,7 +9,7 @@ struct gsm_lchan; -int oml_init(void); +int oml_init(struct gsm_abis_mo *mo); int down_oml(struct gsm_bts *bts, struct msgb *msg); struct msgb *oml_msgb_alloc(void); @@ -43,9 +43,5 @@ /* Configure LAPDm T200 timers for this lchan according to OML */ int oml_set_lchan_t200(struct gsm_lchan *lchan); extern const unsigned int oml_default_t200_ms[7]; - -/* Transmit failure event report */ -int oml_tx_failure_event_rep(struct gsm_abis_mo *mo, uint16_t cause_value, - const char *fmt, ...); #endif // _OML_H */ diff --git a/include/osmo-bts/signal.h b/include/osmo-bts/signal.h index c8168a2..01d4099 100644 --- a/include/osmo-bts/signal.h +++ b/include/osmo-bts/signal.h @@ -5,6 +5,7 @@ enum sig_subsys { SS_GLOBAL, + SS_FAIL, }; enum signals_global { diff --git a/src/common/abis.c b/src/common/abis.c index 6753149..768d261 100644 --- a/src/common/abis.c +++ b/src/common/abis.c @@ -235,7 +235,7 @@ { g_bts = bts; - oml_init(); + oml_init(&bts->mo); libosmo_abis_init(NULL); osmo_signal_register_handler(SS_L_INPUT, &inp_s_cbfn, bts); diff --git a/src/common/bts.c b/src/common/bts.c index efefb86..147cc11 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -257,20 +257,24 @@ struct e1inp_sign_link *link = trx->rsl_link; uint8_t radio_state = link ? NM_OPSTATE_ENABLED : NM_OPSTATE_DISABLED; int rc; + char *rep; LOGP(DSUM, LOGL_INFO, "RSL link (TRX %02x) state changed to %s, sending Status'.\n", trx->nr, link ? "up" : "down"); oml_mo_state_chg(&trx->mo, radio_state, NM_AVSTATE_OK); - if (link) + if (link) { rc = rsl_tx_rf_res(trx); - else + rep = talloc_asprintf(tall_bts_ctx, + "Failed to establish RSL link (%d)", rc); + } else { rc = bts_model_trx_deact_rf(trx); + rep = talloc_asprintf(tall_bts_ctx, + "Failed to deactivate RF (%d)", rc); + } if (rc < 0) - oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_RSL_FAIL, link ? - "Failed to establish RSL link (%d)\n" : - "Failed to deactivate RF (%d)\n", rc); + osmo_signal_dispatch(SS_FAIL, OSMO_EVT_MAJ_RSL_FAIL, rep); return 0; } diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 968237f..3dcdf74 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -49,6 +49,7 @@ #include #include #include +#include struct gsm_lchan *get_lchan_by_chan_nr(struct gsm_bts_trx *trx, unsigned int chan_nr) @@ -1025,10 +1026,11 @@ default: LOGP(DL1P, LOGL_NOTICE, "unknown prim %d op %d\n", l1sap->oph.primitive, l1sap->oph.operation); - oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, - "unknown prim %d op %d\n", - l1sap->oph.primitive, - l1sap->oph.operation); + osmo_signal_dispatch(SS_FAIL, OSMO_EVT_MAJ_UKWN_MSG, + talloc_asprintf(tall_bts_ctx, + "unknown prim %d op %d", + l1sap->oph.primitive, + l1sap->oph.operation)); break; } diff --git a/src/common/main.c b/src/common/main.c index 00c8b23..c62d152 100644 --- a/src/common/main.c +++ b/src/common/main.c @@ -54,6 +54,7 @@ #include #include #include +#include #include int quit = 0; @@ -181,16 +182,15 @@ static void signal_handler(int signal) { - fprintf(stderr, "signal %u received\n", signal); + char *rep = talloc_asprintf(tall_bts_ctx, "BTS: signal %d (%s) received", + signal, strsignal(signal)); + fprintf(stderr, "%s\n", rep); switch (signal) { case SIGINT: - //osmo_signal_dispatch(SS_GLOBAL, S_GLOBAL_SHUTDOWN, NULL); if (!quit) { - oml_tx_failure_event_rep(&bts->mo, - OSMO_EVT_CRIT_PROC_STOP, - "BTS: SIGINT received -> " - "shutdown\n"); + osmo_signal_dispatch(SS_FAIL, OSMO_EVT_CRIT_PROC_STOP, + rep); bts_shutdown(bts, "SIGINT"); } quit++; @@ -198,9 +198,7 @@ case SIGABRT: case SIGUSR1: case SIGUSR2: - oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_CRIT_PROC_STOP, - "BTS: signal %s received\n", - strsignal(signal)); + osmo_signal_dispatch(SS_FAIL, OSMO_EVT_CRIT_PROC_STOP, rep); talloc_report_full(tall_bts_ctx, stderr); break; default: diff --git a/src/common/oml.c b/src/common/oml.c index 1482410..d3a47a6 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -25,6 +25,8 @@ */ #include +#include +#include #include #include @@ -56,6 +58,27 @@ struct msgb *oml_msgb_alloc(void) { return msgb_alloc_headroom(1024, 128, "OML"); +} + +/* 3GPP TS 12.21 ? 8.8.2 */ +static int oml_tx_failure_event_rep(struct gsm_abis_mo *mo, uint16_t cause_value, + const char *fmt, ...) +{ + struct msgb *nmsg; + va_list ap; + + LOGP(DOML, LOGL_NOTICE, "Reporting FAILURE to BSC: "); + va_start(ap, fmt); + osmo_vlogp(DOML, LOGL_NOTICE, __FILE__, __LINE__, 1, fmt, ap); + nmsg = abis_nm_fail_evt_vrep(NM_EVT_PROC_FAIL, NM_SEVER_CRITICAL, + NM_PCAUSE_T_MANUF, cause_value, fmt, ap); + va_end(ap); + LOGPC(DOML, LOGL_NOTICE, "\n"); + + if (!nmsg) + return -ENOMEM; + + return oml_mo_send_msg(mo, nmsg, NM_MT_FAILURE_EVENT_REP); } int oml_send_msg(struct msgb *msg, int is_manuf) @@ -347,7 +370,7 @@ rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); if (rc < 0) { oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, - "New value for Attribute not supported\n"); + "New value for Attribute not supported"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); } @@ -356,7 +379,7 @@ uint16_t arfcn = ntohs(tlvp_val16_unal(&tp, NM_ATT_BCCH_ARFCN)); if (arfcn > 1024) { oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_WARN_SW_WARN, - "Given ARFCN %d is not supported.\n", + "Given ARFCN %u is not supported", arfcn); LOGP(DOML, LOGL_NOTICE, "Given ARFCN %d is not supported.\n", arfcn); return oml_fom_ack_nack(msg, NM_NACK_FREQ_NOTAVAIL); @@ -366,7 +389,7 @@ if (TLVP_PRESENT(&tp, NM_ATT_START_TIME)) { oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, "NM_ATT_START_TIME Attribute not " - "supported\n"); + "supported"); return oml_fom_ack_nack(msg, NM_NACK_SPEC_IMPL_NOTSUPP); } @@ -506,7 +529,7 @@ if (rc < 0) { oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UNSUP_ATTR, "New value for Set Radio Attribute not" - " supported\n"); + " supported"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); } @@ -568,8 +591,15 @@ memcpy(&_value, value, 2); arfcn = ntohs(_value); value += 2; - if (arfcn > 1024) + if (arfcn > 1024) { + oml_tx_failure_event_rep(&trx->bts->mo, + OSMO_EVT_WARN_SW_WARN, + "Given ARFCN %u is unsupported", + arfcn); + LOGP(DOML, LOGL_NOTICE, + "Given ARFCN %u is unsupported.\n", arfcn); return oml_fom_ack_nack(msg, NM_NACK_FREQ_NOTAVAIL); + } trx->arfcn = arfcn; } #endif @@ -672,7 +702,7 @@ if (rc < 0) { oml_tx_failure_event_rep(&ts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, "New value for Set Channel Attribute " - "not supported\n"); + "not supported"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); } @@ -814,7 +844,7 @@ trx->mo.obj_inst.trx_nr = foh->obj_inst.trx_nr; trx->mo.obj_inst.ts_nr = 0xff; oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, - "Formatted O&M message too short\n"); + "Formatted O&M message too short"); } return -EIO; } @@ -828,7 +858,7 @@ trx->mo.obj_inst.ts_nr = 0xff; oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, "Formatted O&M with BTS %d out" - " of range (0:0xFF).\n", + " of range (0:0xFF)", foh->obj_inst.bts_nr); } return oml_fom_ack_nack(msg, NM_NACK_BTSNR_UNKN); @@ -871,12 +901,12 @@ trx->mo.obj_inst.ts_nr = 0xff; oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, "unknown Formatted O&M " - "msg_type 0x%02x\n", + "msg_type 0x%02x", foh->msg_type); } else oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UKWN_MSG, "unknown Formatted O&M " - "msg_type 0x%02x\n", + "msg_type 0x%02x", foh->msg_type); ret = oml_fom_ack_nack(msg, NM_NACK_MSGTYPE_INVAL); } @@ -1191,29 +1221,21 @@ return ret; } -/* 3GPP TS 12.21 ? 8.8.2 */ -int oml_tx_failure_event_rep(struct gsm_abis_mo *mo, uint16_t cause_value, - const char *fmt, ...) +static int handle_fail_sig(unsigned int subsys, unsigned int signal, void *handle, + void *signal_data) { - struct msgb *nmsg; - va_list ap; + oml_tx_failure_event_rep(handle, signal, "%s", signal_data); + if (signal_data) + talloc_free(signal_data); - va_start(ap, fmt); - nmsg = abis_nm_fail_evt_rep(NM_EVT_PROC_FAIL, NM_SEVER_CRITICAL, - NM_PCAUSE_T_MANUF, cause_value, fmt, ap); - LOGP(DOML, LOGL_INFO, fmt, ap); - va_end(ap); - - if (!nmsg) - return -ENOMEM; - - return oml_mo_send_msg(mo, nmsg, NM_MT_FAILURE_EVENT_REP); + return 0; } -int oml_init(void) +int oml_init(struct gsm_abis_mo *mo) { DEBUGP(DOML, "Initializing OML attribute definitions\n"); tlv_def_patch(&abis_nm_att_tlvdef_ipa, &abis_nm_att_tlvdef); + osmo_signal_register_handler(SS_FAIL, handle_fail_sig, mo); return 0; } diff --git a/src/common/rsl.c b/src/common/rsl.c index a34c455..6e516dc 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -403,9 +403,9 @@ if (rc < 0) { /* FIXME: notfiy the BSC on other errors? */ if (rc == -ENOSPC) - oml_tx_failure_event_rep(&trx->mo, - OSMO_EVT_MIN_PAG_TAB_FULL, - "BTS paging table is full\n"); + osmo_signal_dispatch(SS_FAIL, OSMO_EVT_MIN_PAG_TAB_FULL, + talloc_asprintf(tall_bts_ctx, + "BTS paging table is full")); } pcu_tx_pag_req(identity_lv, chan_needed); @@ -1653,11 +1653,10 @@ LOGP(DRSL, LOGL_ERROR, "%s IPAC Failed to create RTP/RTCP sockets\n", gsm_lchan_name(lchan)); - oml_tx_failure_event_rep(&lchan->ts->trx->mo, - OSMO_EVT_CRIT_RTP_TOUT, - "%s IPAC Failed to create " - "RTP/RTCP sockets\n", - gsm_lchan_name(lchan)); + osmo_signal_dispatch(SS_FAIL, OSMO_EVT_CRIT_RTP_TOUT, + talloc_asprintf(tall_bts_ctx, + "%s IPAC Failed to create RTP/RTCP sockets", + gsm_lchan_name(lchan))); return tx_ipac_XXcx_nack(lchan, RSL_ERR_RES_UNAVAIL, inc_ip_port, dch->c.msg_type); } @@ -1697,11 +1696,10 @@ LOGP(DRSL, LOGL_ERROR, "%s IPAC Failed to bind RTP/RTCP sockets\n", gsm_lchan_name(lchan)); - oml_tx_failure_event_rep(&lchan->ts->trx->mo, - OSMO_EVT_CRIT_RTP_TOUT, - "%s IPAC Failed to bind " - "RTP/RTCP sockets\n", - gsm_lchan_name(lchan)); + osmo_signal_dispatch(SS_FAIL, OSMO_EVT_CRIT_RTP_TOUT, + talloc_asprintf(tall_bts_ctx, + "%s IPAC Failed to bind RTP/RTCP sockets", + gsm_lchan_name(lchan))); osmo_rtp_socket_free(lchan->abis_ip.rtp_socket); lchan->abis_ip.rtp_socket = NULL; msgb_queue_flush(&lchan->dl_tch_queue); -- To view, visit https://gerrit.osmocom.org/1570 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I738555c547926e97b325ab53763c0076c42309bc Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Jan 11 17:39:17 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 11 Jan 2017 17:39:17 +0000 Subject: [PATCH] openbsc[master]: CTRL: remove boilerplate Message-ID: Review at https://gerrit.osmocom.org/1576 CTRL: remove boilerplate Use CTRL_CMD_DEFINE_WO() where appropriate to get rid of boilerplate code. Change-Id: I5bcea0b4f4b8f535bef2b423f2013b8b4a218b5b --- M openbsc/src/libbsc/bsc_ctrl_commands.c M openbsc/src/libmsc/ctrl_commands.c M openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c 3 files changed, 7 insertions(+), 49 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/76/1576/1 diff --git a/openbsc/src/libbsc/bsc_ctrl_commands.c b/openbsc/src/libbsc/bsc_ctrl_commands.c index 7e84797..0c7e84b 100644 --- a/openbsc/src/libbsc/bsc_ctrl_commands.c +++ b/openbsc/src/libbsc/bsc_ctrl_commands.c @@ -75,12 +75,6 @@ return 0; } -static int get_net_apply_config(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Write only attribute"; - return CTRL_CMD_ERROR; -} - static int set_net_apply_config(struct ctrl_cmd *cmd, void *data) { struct gsm_network *net = cmd->node; @@ -107,7 +101,7 @@ return CTRL_CMD_REPLY; } -CTRL_CMD_DEFINE(net_apply_config, "apply-configuration"); +CTRL_CMD_DEFINE_WO(net_apply_config, "apply-configuration"); static int verify_net_mcc_mnc_apply(struct ctrl_cmd *cmd, const char *value, void *d) { @@ -124,12 +118,6 @@ if (!mcc || !mnc) return 1; return 0; -} - -static int get_net_mcc_mnc_apply(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Write only attribute"; - return CTRL_CMD_ERROR; } static int set_net_mcc_mnc_apply(struct ctrl_cmd *cmd, void *data) @@ -165,7 +153,7 @@ cmd->reply = "OOM"; return CTRL_CMD_ERROR; } -CTRL_CMD_DEFINE(net_mcc_mnc_apply, "mcc-mnc-apply"); +CTRL_CMD_DEFINE_WO(net_mcc_mnc_apply, "mcc-mnc-apply"); /* BTS related commands below */ CTRL_CMD_DEFINE_RANGE(bts_lac, "location-area-code", struct gsm_bts, location_area_code, 0, 65535); @@ -174,12 +162,6 @@ static int verify_bts_apply_config(struct ctrl_cmd *cmd, const char *v, void *d) { return 0; -} - -static int get_bts_apply_config(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Write only attribute"; - return CTRL_CMD_ERROR; } static int set_bts_apply_config(struct ctrl_cmd *cmd, void *data) @@ -196,17 +178,11 @@ return CTRL_CMD_REPLY; } -CTRL_CMD_DEFINE(bts_apply_config, "apply-configuration"); +CTRL_CMD_DEFINE_WO(bts_apply_config, "apply-configuration"); static int verify_bts_si(struct ctrl_cmd *cmd, const char *v, void *d) { return 0; -} - -static int get_bts_si(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Write only attribute"; - return CTRL_CMD_ERROR; } static int set_bts_si(struct ctrl_cmd *cmd, void *data) @@ -223,7 +199,7 @@ cmd->reply = "Generated new System Information"; return CTRL_CMD_REPLY; } -CTRL_CMD_DEFINE(bts_si, "send-new-system-informations"); +CTRL_CMD_DEFINE_WO(bts_si, "send-new-system-informations"); static int verify_bts_chan_load(struct ctrl_cmd *cmd, const char *v, void *d) { diff --git a/openbsc/src/libmsc/ctrl_commands.c b/openbsc/src/libmsc/ctrl_commands.c index 79e136d..0747410 100644 --- a/openbsc/src/libmsc/ctrl_commands.c +++ b/openbsc/src/libmsc/ctrl_commands.c @@ -74,12 +74,6 @@ return rc; } -static int get_subscriber_modify(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Set only attribute"; - return CTRL_CMD_ERROR; -} - static int set_subscriber_modify(struct ctrl_cmd *cmd, void *data) { struct gsm_network *net = cmd->node; @@ -157,17 +151,11 @@ return CTRL_CMD_ERROR; } -CTRL_CMD_DEFINE(subscriber_modify, "subscriber-modify-v1"); +CTRL_CMD_DEFINE_WO(subscriber_modify, "subscriber-modify-v1"); static int verify_subscriber_delete(struct ctrl_cmd *cmd, const char *v, void *d) { return 0; -} - -static int get_subscriber_delete(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Set only attribute"; - return CTRL_CMD_ERROR; } static int set_subscriber_delete(struct ctrl_cmd *cmd, void *data) @@ -199,7 +187,7 @@ cmd->reply = was_used ? "Removed active subscriber" : "Removed"; return CTRL_CMD_REPLY; } -CTRL_CMD_DEFINE(subscriber_delete, "subscriber-delete-v1"); +CTRL_CMD_DEFINE_WO(subscriber_delete, "subscriber-delete-v1"); static int verify_subscriber_list(struct ctrl_cmd *cmd, const char *value, void *d) { diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c b/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c index ec4243e..ce498c7 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c @@ -446,7 +446,7 @@ return 0; } -CTRL_CMD_DEFINE(net_save_cmd, "net 0 save-configuration"); +CTRL_CMD_DEFINE_WO(net_save_cmd, "net 0 save-configuration"); static int verify_net_save_cmd(struct ctrl_cmd *cmd, const char *v, void *d) { return 0; @@ -462,12 +462,6 @@ } return CTRL_CMD_REPLY; -} - -static int get_net_save_cmd(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Write only attribute"; - return CTRL_CMD_ERROR; } struct ctrl_handle *bsc_nat_controlif_setup(struct bsc_nat *nat, -- To view, visit https://gerrit.osmocom.org/1576 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5bcea0b4f4b8f535bef2b423f2013b8b4a218b5b Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Jan 11 17:46:45 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 11 Jan 2017 17:46:45 +0000 Subject: [PATCH] libosmocore[master]: CTRL: add write-only helpers In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1574 to look at the new patch set (#2). CTRL: add write-only helpers Similar to CTRL_CMD_DEFINE_RO() add helper for control commands which are not meant to be read, only to set. Similarly, add CTRL_CMD_DEFINE_WO_NOVRF() for commands which do not perform inbound data verification. Change-Id: I66b7990db590c1f8e56326e392e6c1d2eafebd9a --- M include/osmocom/ctrl/control_cmd.h 1 file changed, 24 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/74/1574/2 diff --git a/include/osmocom/ctrl/control_cmd.h b/include/osmocom/ctrl/control_cmd.h index 8f2eaa2..93825f8 100644 --- a/include/osmocom/ctrl/control_cmd.h +++ b/include/osmocom/ctrl/control_cmd.h @@ -187,4 +187,28 @@ } \ CTRL_CMD_DEFINE_STRUCT(cmdname, cmdstr, verify_##cmdname) +#define CTRL_CMD_DEFINE_WO(cmdname, cmdstr) \ +static int set_##cmdname(struct ctrl_cmd *cmd, void *data); \ +static int get_##cmdname(struct ctrl_cmd *cmd, void *data) \ +{ \ + cmd->reply = "Write Only attribute"; \ + return CTRL_CMD_ERROR; \ +} \ +static int verify_##cmdname(struct ctrl_cmd *cmd, const char *value, void *data); \ +CTRL_CMD_DEFINE_STRUCT(cmdname, cmdstr, verify_##cmdname) + + +#define CTRL_CMD_DEFINE_WO_NOVRF(cmdname, cmdstr) \ +static int set_##cmdname(struct ctrl_cmd *cmd, void *data); \ +static int get_##cmdname(struct ctrl_cmd *cmd, void *data) \ +{ \ + cmd->reply = "Write Only attribute"; \ + return CTRL_CMD_ERROR; \ +} \ +static int verify_##cmdname(struct ctrl_cmd *cmd, const char *value, void *data) \ +{ \ + return 0; \ +} \ +CTRL_CMD_DEFINE_STRUCT(cmdname, cmdstr, verify_##cmdname) + struct gsm_network; -- To view, visit https://gerrit.osmocom.org/1574 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I66b7990db590c1f8e56326e392e6c1d2eafebd9a Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Jan 11 17:55:16 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 11 Jan 2017 17:55:16 +0000 Subject: [PATCH] openbsc[master]: CTRL: remove boilerplate In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1576 to look at the new patch set (#2). CTRL: remove boilerplate Use CTRL_CMD_DEFINE_WO() and CTRL_CMD_DEFINE_WO_NOVRF() where appropriate to get rid of boilerplate code. Change-Id: I5bcea0b4f4b8f535bef2b423f2013b8b4a218b5b --- M openbsc/src/libbsc/bsc_ctrl_commands.c M openbsc/src/libmsc/ctrl_commands.c M openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c 3 files changed, 7 insertions(+), 73 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/76/1576/2 diff --git a/openbsc/src/libbsc/bsc_ctrl_commands.c b/openbsc/src/libbsc/bsc_ctrl_commands.c index 7e84797..d1348e0 100644 --- a/openbsc/src/libbsc/bsc_ctrl_commands.c +++ b/openbsc/src/libbsc/bsc_ctrl_commands.c @@ -70,17 +70,6 @@ CTRL_CMD_VTY_STRING(net_short_name, "short-name", struct gsm_network, name_short); CTRL_CMD_VTY_STRING(net_long_name, "long-name", struct gsm_network, name_long); -static int verify_net_apply_config(struct ctrl_cmd *cmd, const char *v, void *d) -{ - return 0; -} - -static int get_net_apply_config(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Write only attribute"; - return CTRL_CMD_ERROR; -} - static int set_net_apply_config(struct ctrl_cmd *cmd, void *data) { struct gsm_network *net = cmd->node; @@ -107,7 +96,7 @@ return CTRL_CMD_REPLY; } -CTRL_CMD_DEFINE(net_apply_config, "apply-configuration"); +CTRL_CMD_DEFINE_WO_NOVRF(net_apply_config, "apply-configuration"); static int verify_net_mcc_mnc_apply(struct ctrl_cmd *cmd, const char *value, void *d) { @@ -124,12 +113,6 @@ if (!mcc || !mnc) return 1; return 0; -} - -static int get_net_mcc_mnc_apply(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Write only attribute"; - return CTRL_CMD_ERROR; } static int set_net_mcc_mnc_apply(struct ctrl_cmd *cmd, void *data) @@ -165,22 +148,11 @@ cmd->reply = "OOM"; return CTRL_CMD_ERROR; } -CTRL_CMD_DEFINE(net_mcc_mnc_apply, "mcc-mnc-apply"); +CTRL_CMD_DEFINE_WO(net_mcc_mnc_apply, "mcc-mnc-apply"); /* BTS related commands below */ CTRL_CMD_DEFINE_RANGE(bts_lac, "location-area-code", struct gsm_bts, location_area_code, 0, 65535); CTRL_CMD_DEFINE_RANGE(bts_ci, "cell-identity", struct gsm_bts, cell_identity, 0, 65535); - -static int verify_bts_apply_config(struct ctrl_cmd *cmd, const char *v, void *d) -{ - return 0; -} - -static int get_bts_apply_config(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Write only attribute"; - return CTRL_CMD_ERROR; -} static int set_bts_apply_config(struct ctrl_cmd *cmd, void *data) { @@ -196,18 +168,7 @@ return CTRL_CMD_REPLY; } -CTRL_CMD_DEFINE(bts_apply_config, "apply-configuration"); - -static int verify_bts_si(struct ctrl_cmd *cmd, const char *v, void *d) -{ - return 0; -} - -static int get_bts_si(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Write only attribute"; - return CTRL_CMD_ERROR; -} +CTRL_CMD_DEFINE_WO_NOVRF(bts_apply_config, "apply-configuration"); static int set_bts_si(struct ctrl_cmd *cmd, void *data) { @@ -223,7 +184,7 @@ cmd->reply = "Generated new System Information"; return CTRL_CMD_REPLY; } -CTRL_CMD_DEFINE(bts_si, "send-new-system-informations"); +CTRL_CMD_DEFINE_WO_NOVRF(bts_si, "send-new-system-informations"); static int verify_bts_chan_load(struct ctrl_cmd *cmd, const char *v, void *d) { diff --git a/openbsc/src/libmsc/ctrl_commands.c b/openbsc/src/libmsc/ctrl_commands.c index 79e136d..24b68fa 100644 --- a/openbsc/src/libmsc/ctrl_commands.c +++ b/openbsc/src/libmsc/ctrl_commands.c @@ -74,12 +74,6 @@ return rc; } -static int get_subscriber_modify(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Set only attribute"; - return CTRL_CMD_ERROR; -} - static int set_subscriber_modify(struct ctrl_cmd *cmd, void *data) { struct gsm_network *net = cmd->node; @@ -157,18 +151,7 @@ return CTRL_CMD_ERROR; } -CTRL_CMD_DEFINE(subscriber_modify, "subscriber-modify-v1"); - -static int verify_subscriber_delete(struct ctrl_cmd *cmd, const char *v, void *d) -{ - return 0; -} - -static int get_subscriber_delete(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Set only attribute"; - return CTRL_CMD_ERROR; -} +CTRL_CMD_DEFINE_WO(subscriber_modify, "subscriber-modify-v1"); static int set_subscriber_delete(struct ctrl_cmd *cmd, void *data) { @@ -199,7 +182,7 @@ cmd->reply = was_used ? "Removed active subscriber" : "Removed"; return CTRL_CMD_REPLY; } -CTRL_CMD_DEFINE(subscriber_delete, "subscriber-delete-v1"); +CTRL_CMD_DEFINE_WO_NOVRF(subscriber_delete, "subscriber-delete-v1"); static int verify_subscriber_list(struct ctrl_cmd *cmd, const char *value, void *d) { diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c b/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c index ec4243e..057a583 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c @@ -446,11 +446,7 @@ return 0; } -CTRL_CMD_DEFINE(net_save_cmd, "net 0 save-configuration"); -static int verify_net_save_cmd(struct ctrl_cmd *cmd, const char *v, void *d) -{ - return 0; -} +CTRL_CMD_DEFINE_WO_NOVRF(net_save_cmd, "net 0 save-configuration"); static int set_net_save_cmd(struct ctrl_cmd *cmd, void *data) { @@ -462,12 +458,6 @@ } return CTRL_CMD_REPLY; -} - -static int get_net_save_cmd(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Write only attribute"; - return CTRL_CMD_ERROR; } struct ctrl_handle *bsc_nat_controlif_setup(struct bsc_nat *nat, -- To view, visit https://gerrit.osmocom.org/1576 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I5bcea0b4f4b8f535bef2b423f2013b8b4a218b5b Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Jan 11 17:59:54 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 11 Jan 2017 17:59:54 +0000 Subject: [PATCH] osmo-bts[master]: OML: internalize failure reporting In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1570 to look at the new patch set (#3). OML: internalize failure reporting * make oml_tx_failure_event_rep() static and use osmo_signal_dispatch() to trigger event reports outside of oml.c instead of directly calling into OML layer * remove unnecessary formatting from text messages Related: OS#1615 Change-Id: I738555c547926e97b325ab53763c0076c42309bc --- M include/osmo-bts/oml.h M include/osmo-bts/signal.h M src/common/abis.c M src/common/bts.c M src/common/l1sap.c M src/common/main.c M src/common/oml.c M src/common/rsl.c 8 files changed, 84 insertions(+), 63 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/70/1570/3 diff --git a/include/osmo-bts/oml.h b/include/osmo-bts/oml.h index 217ec64..29e0791 100644 --- a/include/osmo-bts/oml.h +++ b/include/osmo-bts/oml.h @@ -9,7 +9,7 @@ struct gsm_lchan; -int oml_init(void); +int oml_init(struct gsm_abis_mo *mo); int down_oml(struct gsm_bts *bts, struct msgb *msg); struct msgb *oml_msgb_alloc(void); @@ -43,9 +43,5 @@ /* Configure LAPDm T200 timers for this lchan according to OML */ int oml_set_lchan_t200(struct gsm_lchan *lchan); extern const unsigned int oml_default_t200_ms[7]; - -/* Transmit failure event report */ -int oml_tx_failure_event_rep(struct gsm_abis_mo *mo, uint16_t cause_value, - const char *fmt, ...); #endif // _OML_H */ diff --git a/include/osmo-bts/signal.h b/include/osmo-bts/signal.h index c8168a2..01d4099 100644 --- a/include/osmo-bts/signal.h +++ b/include/osmo-bts/signal.h @@ -5,6 +5,7 @@ enum sig_subsys { SS_GLOBAL, + SS_FAIL, }; enum signals_global { diff --git a/src/common/abis.c b/src/common/abis.c index 6753149..768d261 100644 --- a/src/common/abis.c +++ b/src/common/abis.c @@ -235,7 +235,7 @@ { g_bts = bts; - oml_init(); + oml_init(&bts->mo); libosmo_abis_init(NULL); osmo_signal_register_handler(SS_L_INPUT, &inp_s_cbfn, bts); diff --git a/src/common/bts.c b/src/common/bts.c index efefb86..147cc11 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -257,20 +257,24 @@ struct e1inp_sign_link *link = trx->rsl_link; uint8_t radio_state = link ? NM_OPSTATE_ENABLED : NM_OPSTATE_DISABLED; int rc; + char *rep; LOGP(DSUM, LOGL_INFO, "RSL link (TRX %02x) state changed to %s, sending Status'.\n", trx->nr, link ? "up" : "down"); oml_mo_state_chg(&trx->mo, radio_state, NM_AVSTATE_OK); - if (link) + if (link) { rc = rsl_tx_rf_res(trx); - else + rep = talloc_asprintf(tall_bts_ctx, + "Failed to establish RSL link (%d)", rc); + } else { rc = bts_model_trx_deact_rf(trx); + rep = talloc_asprintf(tall_bts_ctx, + "Failed to deactivate RF (%d)", rc); + } if (rc < 0) - oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_RSL_FAIL, link ? - "Failed to establish RSL link (%d)\n" : - "Failed to deactivate RF (%d)\n", rc); + osmo_signal_dispatch(SS_FAIL, OSMO_EVT_MAJ_RSL_FAIL, rep); return 0; } diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 968237f..3dcdf74 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -49,6 +49,7 @@ #include #include #include +#include struct gsm_lchan *get_lchan_by_chan_nr(struct gsm_bts_trx *trx, unsigned int chan_nr) @@ -1025,10 +1026,11 @@ default: LOGP(DL1P, LOGL_NOTICE, "unknown prim %d op %d\n", l1sap->oph.primitive, l1sap->oph.operation); - oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, - "unknown prim %d op %d\n", - l1sap->oph.primitive, - l1sap->oph.operation); + osmo_signal_dispatch(SS_FAIL, OSMO_EVT_MAJ_UKWN_MSG, + talloc_asprintf(tall_bts_ctx, + "unknown prim %d op %d", + l1sap->oph.primitive, + l1sap->oph.operation)); break; } diff --git a/src/common/main.c b/src/common/main.c index 00c8b23..c62d152 100644 --- a/src/common/main.c +++ b/src/common/main.c @@ -54,6 +54,7 @@ #include #include #include +#include #include int quit = 0; @@ -181,16 +182,15 @@ static void signal_handler(int signal) { - fprintf(stderr, "signal %u received\n", signal); + char *rep = talloc_asprintf(tall_bts_ctx, "BTS: signal %d (%s) received", + signal, strsignal(signal)); + fprintf(stderr, "%s\n", rep); switch (signal) { case SIGINT: - //osmo_signal_dispatch(SS_GLOBAL, S_GLOBAL_SHUTDOWN, NULL); if (!quit) { - oml_tx_failure_event_rep(&bts->mo, - OSMO_EVT_CRIT_PROC_STOP, - "BTS: SIGINT received -> " - "shutdown\n"); + osmo_signal_dispatch(SS_FAIL, OSMO_EVT_CRIT_PROC_STOP, + rep); bts_shutdown(bts, "SIGINT"); } quit++; @@ -198,9 +198,7 @@ case SIGABRT: case SIGUSR1: case SIGUSR2: - oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_CRIT_PROC_STOP, - "BTS: signal %s received\n", - strsignal(signal)); + osmo_signal_dispatch(SS_FAIL, OSMO_EVT_CRIT_PROC_STOP, rep); talloc_report_full(tall_bts_ctx, stderr); break; default: diff --git a/src/common/oml.c b/src/common/oml.c index 1482410..d3a47a6 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -25,6 +25,8 @@ */ #include +#include +#include #include #include @@ -56,6 +58,27 @@ struct msgb *oml_msgb_alloc(void) { return msgb_alloc_headroom(1024, 128, "OML"); +} + +/* 3GPP TS 12.21 ? 8.8.2 */ +static int oml_tx_failure_event_rep(struct gsm_abis_mo *mo, uint16_t cause_value, + const char *fmt, ...) +{ + struct msgb *nmsg; + va_list ap; + + LOGP(DOML, LOGL_NOTICE, "Reporting FAILURE to BSC: "); + va_start(ap, fmt); + osmo_vlogp(DOML, LOGL_NOTICE, __FILE__, __LINE__, 1, fmt, ap); + nmsg = abis_nm_fail_evt_vrep(NM_EVT_PROC_FAIL, NM_SEVER_CRITICAL, + NM_PCAUSE_T_MANUF, cause_value, fmt, ap); + va_end(ap); + LOGPC(DOML, LOGL_NOTICE, "\n"); + + if (!nmsg) + return -ENOMEM; + + return oml_mo_send_msg(mo, nmsg, NM_MT_FAILURE_EVENT_REP); } int oml_send_msg(struct msgb *msg, int is_manuf) @@ -347,7 +370,7 @@ rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); if (rc < 0) { oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, - "New value for Attribute not supported\n"); + "New value for Attribute not supported"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); } @@ -356,7 +379,7 @@ uint16_t arfcn = ntohs(tlvp_val16_unal(&tp, NM_ATT_BCCH_ARFCN)); if (arfcn > 1024) { oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_WARN_SW_WARN, - "Given ARFCN %d is not supported.\n", + "Given ARFCN %u is not supported", arfcn); LOGP(DOML, LOGL_NOTICE, "Given ARFCN %d is not supported.\n", arfcn); return oml_fom_ack_nack(msg, NM_NACK_FREQ_NOTAVAIL); @@ -366,7 +389,7 @@ if (TLVP_PRESENT(&tp, NM_ATT_START_TIME)) { oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, "NM_ATT_START_TIME Attribute not " - "supported\n"); + "supported"); return oml_fom_ack_nack(msg, NM_NACK_SPEC_IMPL_NOTSUPP); } @@ -506,7 +529,7 @@ if (rc < 0) { oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UNSUP_ATTR, "New value for Set Radio Attribute not" - " supported\n"); + " supported"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); } @@ -568,8 +591,15 @@ memcpy(&_value, value, 2); arfcn = ntohs(_value); value += 2; - if (arfcn > 1024) + if (arfcn > 1024) { + oml_tx_failure_event_rep(&trx->bts->mo, + OSMO_EVT_WARN_SW_WARN, + "Given ARFCN %u is unsupported", + arfcn); + LOGP(DOML, LOGL_NOTICE, + "Given ARFCN %u is unsupported.\n", arfcn); return oml_fom_ack_nack(msg, NM_NACK_FREQ_NOTAVAIL); + } trx->arfcn = arfcn; } #endif @@ -672,7 +702,7 @@ if (rc < 0) { oml_tx_failure_event_rep(&ts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, "New value for Set Channel Attribute " - "not supported\n"); + "not supported"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); } @@ -814,7 +844,7 @@ trx->mo.obj_inst.trx_nr = foh->obj_inst.trx_nr; trx->mo.obj_inst.ts_nr = 0xff; oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, - "Formatted O&M message too short\n"); + "Formatted O&M message too short"); } return -EIO; } @@ -828,7 +858,7 @@ trx->mo.obj_inst.ts_nr = 0xff; oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, "Formatted O&M with BTS %d out" - " of range (0:0xFF).\n", + " of range (0:0xFF)", foh->obj_inst.bts_nr); } return oml_fom_ack_nack(msg, NM_NACK_BTSNR_UNKN); @@ -871,12 +901,12 @@ trx->mo.obj_inst.ts_nr = 0xff; oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, "unknown Formatted O&M " - "msg_type 0x%02x\n", + "msg_type 0x%02x", foh->msg_type); } else oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UKWN_MSG, "unknown Formatted O&M " - "msg_type 0x%02x\n", + "msg_type 0x%02x", foh->msg_type); ret = oml_fom_ack_nack(msg, NM_NACK_MSGTYPE_INVAL); } @@ -1191,29 +1221,21 @@ return ret; } -/* 3GPP TS 12.21 ? 8.8.2 */ -int oml_tx_failure_event_rep(struct gsm_abis_mo *mo, uint16_t cause_value, - const char *fmt, ...) +static int handle_fail_sig(unsigned int subsys, unsigned int signal, void *handle, + void *signal_data) { - struct msgb *nmsg; - va_list ap; + oml_tx_failure_event_rep(handle, signal, "%s", signal_data); + if (signal_data) + talloc_free(signal_data); - va_start(ap, fmt); - nmsg = abis_nm_fail_evt_rep(NM_EVT_PROC_FAIL, NM_SEVER_CRITICAL, - NM_PCAUSE_T_MANUF, cause_value, fmt, ap); - LOGP(DOML, LOGL_INFO, fmt, ap); - va_end(ap); - - if (!nmsg) - return -ENOMEM; - - return oml_mo_send_msg(mo, nmsg, NM_MT_FAILURE_EVENT_REP); + return 0; } -int oml_init(void) +int oml_init(struct gsm_abis_mo *mo) { DEBUGP(DOML, "Initializing OML attribute definitions\n"); tlv_def_patch(&abis_nm_att_tlvdef_ipa, &abis_nm_att_tlvdef); + osmo_signal_register_handler(SS_FAIL, handle_fail_sig, mo); return 0; } diff --git a/src/common/rsl.c b/src/common/rsl.c index a34c455..6e516dc 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -403,9 +403,9 @@ if (rc < 0) { /* FIXME: notfiy the BSC on other errors? */ if (rc == -ENOSPC) - oml_tx_failure_event_rep(&trx->mo, - OSMO_EVT_MIN_PAG_TAB_FULL, - "BTS paging table is full\n"); + osmo_signal_dispatch(SS_FAIL, OSMO_EVT_MIN_PAG_TAB_FULL, + talloc_asprintf(tall_bts_ctx, + "BTS paging table is full")); } pcu_tx_pag_req(identity_lv, chan_needed); @@ -1653,11 +1653,10 @@ LOGP(DRSL, LOGL_ERROR, "%s IPAC Failed to create RTP/RTCP sockets\n", gsm_lchan_name(lchan)); - oml_tx_failure_event_rep(&lchan->ts->trx->mo, - OSMO_EVT_CRIT_RTP_TOUT, - "%s IPAC Failed to create " - "RTP/RTCP sockets\n", - gsm_lchan_name(lchan)); + osmo_signal_dispatch(SS_FAIL, OSMO_EVT_CRIT_RTP_TOUT, + talloc_asprintf(tall_bts_ctx, + "%s IPAC Failed to create RTP/RTCP sockets", + gsm_lchan_name(lchan))); return tx_ipac_XXcx_nack(lchan, RSL_ERR_RES_UNAVAIL, inc_ip_port, dch->c.msg_type); } @@ -1697,11 +1696,10 @@ LOGP(DRSL, LOGL_ERROR, "%s IPAC Failed to bind RTP/RTCP sockets\n", gsm_lchan_name(lchan)); - oml_tx_failure_event_rep(&lchan->ts->trx->mo, - OSMO_EVT_CRIT_RTP_TOUT, - "%s IPAC Failed to bind " - "RTP/RTCP sockets\n", - gsm_lchan_name(lchan)); + osmo_signal_dispatch(SS_FAIL, OSMO_EVT_CRIT_RTP_TOUT, + talloc_asprintf(tall_bts_ctx, + "%s IPAC Failed to bind RTP/RTCP sockets", + gsm_lchan_name(lchan))); osmo_rtp_socket_free(lchan->abis_ip.rtp_socket); lchan->abis_ip.rtp_socket = NULL; msgb_queue_flush(&lchan->dl_tch_queue); -- To view, visit https://gerrit.osmocom.org/1570 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I738555c547926e97b325ab53763c0076c42309bc Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Jan 11 17:59:54 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 11 Jan 2017 17:59:54 +0000 Subject: [PATCH] osmo-bts[master]: Add ctrl command to send OML alert In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1575 to look at the new patch set (#3). Add ctrl command to send OML alert Change-Id: I228cb71ab945e19e3747843469a52f577ee32f97 Related: OS#1615 --- M src/common/bts_ctrl_commands.c 1 file changed, 18 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/75/1575/3 diff --git a/src/common/bts_ctrl_commands.c b/src/common/bts_ctrl_commands.c index 6d223ff..d79d14b 100644 --- a/src/common/bts_ctrl_commands.c +++ b/src/common/bts_ctrl_commands.c @@ -24,11 +24,15 @@ #include #include +#include #include #include #include #include +#include +#include +#include CTRL_CMD_DEFINE(therm_att, "thermal-attenuation"); static int get_therm_att(struct ctrl_cmd *cmd, void *data) @@ -67,12 +71,26 @@ return 0; } +CTRL_CMD_DEFINE_WO_NOVRF(oml_alert, "oml-alert"); +static int set_oml_alert(struct ctrl_cmd *cmd, void *data) +{ + char *rep = talloc_strdup(tall_bts_ctx, cmd->value); + if (!rep) { + cmd->reply = "Not enough memory"; + return CTRL_CMD_ERROR; + } + osmo_signal_dispatch(SS_FAIL, OSMO_EVT_EXT_ALARM, rep); + cmd->reply = "OK"; + + return CTRL_CMD_REPLY; +} int bts_ctrl_cmds_install(struct gsm_bts *bts) { int rc = 0; rc |= ctrl_cmd_install(CTRL_NODE_TRX, &cmd_therm_att); + rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_oml_alert); return rc; } -- To view, visit https://gerrit.osmocom.org/1575 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I228cb71ab945e19e3747843469a52f577ee32f97 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Jan 11 18:53:28 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 11 Jan 2017 18:53:28 +0000 Subject: [PATCH] openbsc[master]: Turn some warnings into errors In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1368 to look at the new patch set (#3). Turn some warnings into errors Make warnings (when available) related to common memory-related issues into errors to harden the source and decrease chance of errors. Change-Id: Ied9c950dafa65f324cf31298b13b590f56139700 --- M debian/control M openbsc/configure.ac 2 files changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/68/1368/3 diff --git a/debian/control b/debian/control index 79f18df..d9432e2 100644 --- a/debian/control +++ b/debian/control @@ -4,6 +4,7 @@ Priority: optional Build-Depends: debhelper (>= 9), autotools-dev, + autoconf-archive, pkg-config, libgtp0-dev, libosmocore-dev, diff --git a/openbsc/configure.ac b/openbsc/configure.ac index 0753834..9fd7325 100644 --- a/openbsc/configure.ac +++ b/openbsc/configure.ac @@ -140,6 +140,14 @@ CFLAGS="$saved_CFLAGS" AC_SUBST(SYMBOL_VISIBILITY) +# FIXME: use CC_CHECK_CFLAG_APPEND([-Werror=implicit]) +AX_CHECK_COMPILE_FLAG([-Werror=implicit], [CFLAGS="$CFLAGS -Werror=implicit"]) +AX_CHECK_COMPILE_FLAG([-Werror=maybe-uninitialized], [CFLAGS="$CFLAGS -Werror=maybe-uninitialized"]) +AX_CHECK_COMPILE_FLAG([-Werror=memset-transposed-args], [CFLAGS="$CFLAGS -Werror=memset-transposed-args"]) +AX_CHECK_COMPILE_FLAG([-Werror=null-dereference], [CFLAGS="$CFLAGS -Werror=null-dereference"]) +AX_CHECK_COMPILE_FLAG([-Werror=sizeof-array-argument], [CFLAGS="$CFLAGS -Werror=sizeof-array-argument"]) +AX_CHECK_COMPILE_FLAG([-Werror=sizeof-pointer-memaccess], [CFLAGS="$CFLAGS -Werror=sizeof-pointer-memaccess"]) + # Coverage build taken from WebKit's configure.in AC_MSG_CHECKING([whether to enable code coverage support]) AC_ARG_ENABLE(coverage, -- To view, visit https://gerrit.osmocom.org/1368 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ied9c950dafa65f324cf31298b13b590f56139700 Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Jan 11 21:31:11 2017 From: gerrit-no-reply at lists.osmocom.org (Tom Tsou) Date: Wed, 11 Jan 2017 21:31:11 +0000 Subject: [PATCH] osmo-trx[master]: uhd: Add X300 sample timing for 4 SPS Message-ID: Review at https://gerrit.osmocom.org/1577 uhd: Add X300 sample timing for 4 SPS Previously only 4/1 and 1/1 configurations Tx/Tx samples-per-symbol were supported. Change-Id: I9153171fe3af95e1cb0d9d35a9287dfde155d184 --- M Transceiver52M/UHDDevice.cpp 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/77/1577/1 diff --git a/Transceiver52M/UHDDevice.cpp b/Transceiver52M/UHDDevice.cpp index a84fe4b..0a640f9 100644 --- a/Transceiver52M/UHDDevice.cpp +++ b/Transceiver52M/UHDDevice.cpp @@ -121,6 +121,7 @@ { USRP2, 4, 4, 4.6080e-5, "N2XX 4 SPS" }, { B200, 4, 4, B2XX_TIMING_4_4SPS, "B200 4 SPS" }, { B210, 4, 4, B2XX_TIMING_4_4SPS, "B210 4 SPS" }, + { X3XX, 4, 4, 5.6567e-5, "X3XX 4 SPS"}, { UMTRX, 4, 4, 5.1503e-5, "UmTRX 4 SPS" }, { LIMESDR, 4, 4, 16.5/GSMRATE, "STREAM/LimeSDR (4 SPS TX/RX)" }, }; -- To view, visit https://gerrit.osmocom.org/1577 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9153171fe3af95e1cb0d9d35a9287dfde155d184 Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Tom Tsou From gerrit-no-reply at lists.osmocom.org Thu Jan 12 09:00:41 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 12 Jan 2017 09:00:41 +0000 Subject: osmo-trx[master]: uhd: Add X300 sample timing for 4 SPS In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1577 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9153171fe3af95e1cb0d9d35a9287dfde155d184 Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Tom Tsou Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 12 09:23:45 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 12 Jan 2017 09:23:45 +0000 Subject: osmo-bts[master]: LC15: Introduce measurement management messages, TS 12.21 se... In-Reply-To: References: Message-ID: Patch Set 2: Is there patch for OsmoPCU side available somewhere? -- To view, visit https://gerrit.osmocom.org/260 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic930baa69fc09ad5059627ed3d85cce5474085b0 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 12 09:37:17 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 12 Jan 2017 09:37:17 +0000 Subject: [PATCH] osmo-bts[master]: l1sap: Fix expired rach slot counting In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1573 to look at the new patch set (#3). l1sap: Fix expired rach slot counting The counting of the expired rach slots in l1sap.c is not correctly implemented. This commit fixes the implementation. The expired rach slots are now conted correctly according to the configured channel combination. If a CCCH and SDCCH are combined, only the frames related to rach slots are counted. Change-Id: I87f40f5f160a4f6750c4f3d06997fc4f24049303 --- M src/common/l1sap.c 1 file changed, 56 insertions(+), 16 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/73/1573/3 diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 968237f..0ce1e4a 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -352,17 +352,66 @@ return 0; } +/* Calculate the number of RACH slots that expire in a certain GSM frame + * See also 3GPP TS 05.02 Clause 7 Table 5 of 9 */ +static unsigned int calc_exprd_rach_frames(struct gsm_bts *bts, uint32_t fn) +{ + int rach_frames_expired = 0; + uint8_t ccch_conf; + struct gsm48_system_information_type_3 *si3; + unsigned int blockno; + + si3 = GSM_BTS_SI(bts, SYSINFO_TYPE_3); + ccch_conf = si3->control_channel_desc.ccch_conf; + + if (ccch_conf == RSL_BCCH_CCCH_CONF_1_C) { + /* It is possible to combine a CCCH with an SDCCH4, in this + * case the CCCH will have to share the available frames with + * the other channel, this results in a limited number of + * available rach slots */ + blockno = fn % 51; + if (blockno == 4 || blockno == 5 + || (blockno >= 15 && blockno <= 36) || blockno == 45 + || blockno == 46) + rach_frames_expired = 1; + } else { + /* It is possible to have multiple CCCH channels on + * different physical channels (large cells), this + * also multiplies the available/expired RACH channels. + * See also TS 04.08, Chapter 10.5.2.11, table 10.29 */ + if (ccch_conf == RSL_BCCH_CCCH_CONF_2_NC) + rach_frames_expired = 2; + if (ccch_conf == RSL_BCCH_CCCH_CONF_3_NC) + rach_frames_expired = 3; + if (ccch_conf == RSL_BCCH_CCCH_CONF_4_NC) + rach_frames_expired = 4; + else + rach_frames_expired = 1; + } + + /* Each Frame has room for 4 RACH slots, since RACH + * slots are short enough to fit into a single radio + * burst, so we need to multiply the final result by 4 */ + return rach_frames_expired * 4; +} + /* time information received from bts model */ static int l1sap_info_time_ind(struct gsm_bts *bts, - struct osmo_phsap_prim *l1sap, - struct info_time_ind_param *info_time_ind) + struct osmo_phsap_prim *l1sap, + struct info_time_ind_param *info_time_ind) { struct gsm_bts_trx *trx; struct gsm_bts_role_bts *btsb = bts->role; - - int frames_expired = info_time_ind->fn - btsb->gsm_time.fn; + int frames_expired; DEBUGP(DL1P, "MPH_INFO time ind %u\n", info_time_ind->fn); + + /* Calculate and check frame difference */ + frames_expired = info_time_ind->fn - btsb->gsm_time.fn; + if (frames_expired > 1) { + LOGP(DL1P, LOGL_ERROR, + "Invalid condition detected: Frame difference is > 1!\n"); + } /* Update our data structures with the current GSM time */ gsm_fn2gsmtime(&btsb->gsm_time, info_time_ind->fn); @@ -373,24 +422,15 @@ /* check if the measurement period of some lchan has ended * and pre-compute the respective measurement */ llist_for_each_entry(trx, &bts->trx_list, list) - trx_meas_check_compute(trx, info_time_ind->fn - 1); + trx_meas_check_compute(trx, info_time_ind->fn - 1); /* increment number of RACH slots that have passed by since the * last time indication */ - if (trx == bts->c0) { - unsigned int num_rach_per_frame; - /* 27 / 51 taken from TS 05.01 Figure 3 */ - if (bts->c0->ts[0].pchan == GSM_PCHAN_CCCH_SDCCH4) - num_rach_per_frame = 27; - else - num_rach_per_frame = 51; - - btsb->load.rach.total += frames_expired * num_rach_per_frame; - } + btsb->load.rach.total += + calc_exprd_rach_frames(bts, info_time_ind->fn) * frames_expired; return 0; } - /* measurement information received from bts model */ static int l1sap_info_meas_ind(struct gsm_bts_trx *trx, struct osmo_phsap_prim *l1sap, -- To view, visit https://gerrit.osmocom.org/1573 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I87f40f5f160a4f6750c4f3d06997fc4f24049303 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Jan 12 10:39:15 2017 From: gerrit-no-reply at lists.osmocom.org (sivasankari) Date: Thu, 12 Jan 2017 10:39:15 +0000 Subject: [PATCH] osmo-pcu[master]: Add compression support in EGPRS PUAN In-Reply-To: References: Message-ID: Hello Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/413 to look at the new patch set (#4). Add compression support in EGPRS PUAN This adds compression of bitmap in PUAN. The compressed bitmap is used only if the number of bits in the bitmap does not fit in the message and there is a gain after compression. The algorithm is part of libosmocore and so there is dependency on the libosmocore for compilation. The algorithm is tested on integration setup by forcing compression. Change-Id: I30d88769f6a699a5e0c2e11e4f3c3c48f63c979a --- M src/egprs_rlc_compression.cpp M src/egprs_rlc_compression.h M src/encoding.cpp M src/rlc.cpp M src/rlc.h M src/tbf.cpp M src/tbf.h M src/tbf_ul.cpp M tests/tbf/TbfTest.err 9 files changed, 537 insertions(+), 27 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/13/413/4 diff --git a/src/egprs_rlc_compression.cpp b/src/egprs_rlc_compression.cpp index f4e6bde..82605ff 100644 --- a/src/egprs_rlc_compression.cpp +++ b/src/egprs_rlc_compression.cpp @@ -84,8 +84,203 @@ } } -/* The code words for one run length and zero run length are described in - * table 9.1.10.1 of 3gpp 44.060 +/* + * Terminating codes for uninterrupted sequences of 0 and 1 up to 64 bit length + * according to TS 44.060 9.1.10 + */ +static const unsigned t4_term[2][64] = { + { + 0b0000110111, + 0b10, + 0b11, + 0b010, + 0b011, + 0b0011, + 0b0010, + 0b00011, + 0b000101, + 0b000100, + 0b0000100, + 0b0000101, + 0b0000111, + 0b00000100, + 0b00000111, + 0b000011000, + 0b0000010111, + 0b0000011000, + 0b0000001000, + 0b00001100111, + 0b00001101000, + 0b00001101100, + 0b00000110111, + 0b00000101000, + 0b00000010111, + 0b00000011000, + 0b000011001010, + 0b000011001011, + 0b000011001100, + 0b000011001101, + 0b000001101000, + 0b000001101001, + 0b000001101010, + 0b000001101011, + 0b000011010010, + 0b000011010011, + 0b000011010100, + 0b000011010101, + 0b000011010110, + 0b000011010111, + 0b000001101100, + 0b000001101101, + 0b000011011010, + 0b000011011011, + 0b000001010100, + 0b000001010101, + 0b000001010110, + 0b000001010111, + 0b000001100100, + 0b000001100101, + 0b000001010010, + 0b000001010011, + 0b000000100100, + 0b000000110111, + 0b000000111000, + 0b000000100111, + 0b000000101000, + 0b000001011000, + 0b000001011001, + 0b000000101011, + 0b000000101100, + 0b000001011010, + 0b000001100110, + 0b000001100111 + + }, + { + 0b00110101, + 0b000111, + 0b0111, + 0b1000, + 0b1011, + 0b1100, + 0b1110, + 0b1111, + 0b10011, + 0b10100, + 0b00111, + 0b01000, + 0b001000, + 0b000011, + 0b110100, + 0b110101, + 0b101010, + 0b101011, + 0b0100111, + 0b0001100, + 0b0001000, + 0b0010111, + 0b0000011, + 0b0000100, + 0b0101000, + 0b0101011, + 0b0010011, + 0b0100100, + 0b0011000, + 0b00000010, + 0b00000011, + 0b00011010, + 0b00011011, + 0b00010010, + 0b00010011, + 0b00010100, + 0b00010101, + 0b00010110, + 0b00010111, + 0b00101000, + 0b00101001, + 0b00101010, + 0b00101011, + 0b00101100, + 0b00101101, + 0b00000100, + 0b00000101, + 0b00001010, + 0b00001011, + 0b01010010, + 0b01010011, + 0b01010100, + 0b01010101, + 0b00100100, + 0b00100101, + 0b01011000, + 0b01011001, + 0b01011010, + 0b01011011, + 0b01001010, + 0b01001011, + 0b00110010, + 0b00110011, + 0b00110100 + } +}; +static const unsigned t4_term_length[2][64] = { + {10, 2, 2, 3, 3, 4, 4, 5, 6, 6, 7, 7, 7, 8, 8, 9, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12}, + {8, 6, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8} +}; + +static const unsigned t4_min_term_length[] = {2, 4}; +static const unsigned t4_min_make_up_length[] = {10, 5}; + +static const unsigned t4_max_term_length[] = {12, 8}; +static const unsigned t4_max_make_up_length[] = {13, 9}; + +static const unsigned t4_make_up_length[2][15] = { + {10, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13}, + {5, 5, 6, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9} +}; + +static const unsigned t4_make_up_ind[15] = {64, 128, 192, 256, 320, 384, 448, 512, 576, 640, 704, 768, 832, 896, 960}; + +static const unsigned t4_make_up[2][15] = { + { + 0b0000001111, + 0b000011001000, + 0b000011001001, + 0b000001011011, + 0b000000110011, + 0b000000110100, + 0b000000110101, + 0b0000001101100, + 0b0000001101101, + 0b0000001001010, + 0b0000001001011, + 0b0000001001100, + 0b0000001001101, + 0b0000001110010, + 0b0000001110011 + }, + { + 0b11011, + 0b10010, + 0b010111, + 0b0110111, + 0b00110110, + 0b00110111, + 0b01100100, + 0b01100101, + 0b01101000, + 0b01100111, + 0b011001100, + 0b011001101, + 0b011010010, + 0b011010011, + 0b011010100 + } +}; + +/* The code words for one run length and zero + * run length are described in table 9.1.10.1 + * of 3gpp 44.060 */ const char *one_run_len_code_list[EGPRS_CODEWORDS] = { "00110101", @@ -359,3 +554,138 @@ decode_tree_init(); } +/* Compress received block bitmap + * \param run_len_cnt[in] Count of number of 1's and 0's + * \param codewrd_bitmap[in] Code word for coresponding run length. + * \param crbb_vec[out] compressed bitvector. + */ +static void compress_bitmap( + uint16_t *run_len_cnt, /* cnt: run length count */ + uint16_t *codewrd_bitmap, /* code word */ + int16_t *codewrd_len, /* number of bits in the code word */ + bitvec *crbb_vec, /* bitmap buffer to put code word in */ + bool start) +{ + int i = 0; + unsigned writeIndex = crbb_vec->cur_bit; + *codewrd_bitmap = 0; + *codewrd_len = 0; + if (*run_len_cnt >= 64) { + for (i = 0; i < 15; i++) { + if (t4_make_up_ind[i] == *run_len_cnt) { + *codewrd_bitmap = t4_make_up[start][i]; + *codewrd_len = t4_make_up_length[start][i]; + } + } + } else { + *codewrd_bitmap = t4_term[start][*run_len_cnt]; + *codewrd_len = t4_term_length[start][*run_len_cnt]; + } + bitvec_write_field(crbb_vec, writeIndex, *codewrd_bitmap, *codewrd_len); +} + +/* Compress received block bitmap */ +int egprs_compress::osmo_t4_compress(struct bitvec *bv) +{ + uint8_t crbb_len = 0; + uint8_t uclen_crbb = 0; + uint8_t crbb_bitmap[127] = {'\0'}; + bool start = (bv->data[0] & 0x80)>>7; + struct bitvec crbb_vec; + + crbb_vec.data = crbb_bitmap; + crbb_vec.cur_bit = 0; + crbb_vec.data_len = 127; + bv->data_len = bv->cur_bit; + bv->cur_bit = 0; + if (egprs_compress::compress_rbb(bv, &crbb_vec, &uclen_crbb, 23*8)) { + memcpy(bv->data, crbb_bitmap, (crbb_len+7)/8); + bv->cur_bit = crbb_len; + bv->data_len = (crbb_len+7)/8; + return start; + } + else + printf("Encode failed\n"); + return -1; +} + +/*! \brief compression algorithm using T4 encoding + * the compressed bitmap's are copied in crbb_bitmap + * \param[in] rbb_vec bit vector to be encoded + * \return 1 if compression is success or 0 for failure + */ +int egprs_compress::compress_rbb( + struct bitvec *urbb_vec, + struct bitvec *crbb_vec, + uint8_t *uclen_crbb, /* Uncompressed bitmap len in CRBB */ + uint8_t max_bits) /* max remaining bits */ +{ + bool run_len_bit; + int buflen = urbb_vec->cur_bit; + int total_bits = urbb_vec->cur_bit; + uint16_t rlen; + uint16_t temprl = 0; + uint16_t cbmap = 0; /* Compressed code word */ + int16_t nbits; /* Length of code word */ + uint16_t uclen = 0; + int16_t clen = 0; + bool start; /* Starting color code see 9.1.10, 3GPP 44.060 */ + urbb_vec->cur_bit = 0; + run_len_bit = (urbb_vec->data[0] & 0x80)>>7; + while (buflen > 0) { + temprl = 0; + /* Find Run length */ + if (run_len_bit == 1) + rlen = bitvec_rl_curbit(urbb_vec, true, total_bits); + else + rlen = bitvec_rl_curbit(urbb_vec, false, total_bits); + buflen = buflen - rlen; + /* if rlen > 64 need Makeup code word */ + /*Compress the bits */ + if (run_len_bit == 0) { + start = 0; + if (rlen >= 64) { + temprl = (rlen/64)*64; + compress_bitmap(&temprl, &cbmap, &nbits, + crbb_vec, start); + clen = clen + nbits; + } + temprl = MOD64(rlen); + compress_bitmap(&temprl, &cbmap, &nbits, + crbb_vec, start); + /* next time the run length will be Ones */ + run_len_bit = 1; + } else { + start = 1; + if (rlen >= 64) { + temprl = (rlen/64)*64; + compress_bitmap(&temprl, &cbmap, &nbits, + crbb_vec, start); + clen = clen + nbits; + } + temprl = MOD64(rlen); + compress_bitmap(&temprl, &cbmap, &nbits, + crbb_vec, start); + + /* next time the run length will be Zeros */ + run_len_bit = 0; + } + uclen = uclen + rlen; + clen = clen + nbits; + /*compressed bitmap exceeds the buffer space */ + if (clen > max_bits) { + uclen = uclen - rlen; + clen = clen - nbits; + break; + } + } + crbb_vec->cur_bit = clen; + *uclen_crbb = uclen; + if (clen >= uclen) + /* No Gain is observed, So no need to compress */ + return 0; + else + LOGP(DRLCMACUL, LOGL_DEBUG, "CRBB bitmap = %s\n", osmo_hexdump(crbb_vec->data, (crbb_vec->cur_bit+7)/8)); + /* Add compressed bitmap to final buffer */ + return 1; +} diff --git a/src/egprs_rlc_compression.h b/src/egprs_rlc_compression.h index c5f0f1a..4d2501b 100644 --- a/src/egprs_rlc_compression.h +++ b/src/egprs_rlc_compression.h @@ -5,6 +5,7 @@ #pragma once struct egprs_compress_node; +#define MOD64(X) (((X) + 64) & 0x3F) /* Singleton to manage the EGPRS compression algorithm. */ class egprs_compress @@ -14,6 +15,9 @@ bool start, const uint8_t *orig_buf, bitvec *dest); egprs_compress(); + int osmo_t4_compress(struct bitvec *bv); + static int compress_rbb(struct bitvec *urbb_vec, struct bitvec *crbb_vec, + uint8_t *uclen_crbb, uint8_t max_bits); private: egprs_compress_node *ones_list; diff --git a/src/encoding.cpp b/src/encoding.cpp index 8fa4bf6..ea38b77 100644 --- a/src/encoding.cpp +++ b/src/encoding.cpp @@ -24,6 +24,7 @@ #include #include #include +#include extern "C" { #include @@ -699,20 +700,44 @@ static void write_packet_ack_nack_desc_egprs( struct gprs_rlcmac_bts *bts, bitvec * dest, unsigned& wp, - gprs_rlc_ul_window *window, bool is_final) + gprs_rlc_ul_window *window, bool is_final, unsigned& rest_bits) { - int urbb_len = 0; - int len; + unsigned int urbb_len = 0; + uint8_t crbb_len = 0; + uint8_t len; bool bow = true; bool eow = true; int ssn = window->mod_sns(window->v_q() + 1); - int num_blocks = window->mod_sns(window->v_r() - window->v_q()); + unsigned int num_blocks = window->mod_sns(window->v_r() - window->v_q()); int esn_crbb = window->mod_sns(ssn - 1); - /* Bit 0 at the end is mandatory Table 11.2.28.1 in 44.060 */ - int rest_bits = dest->data_len * 8 - wp - 1; + static uint8_t rbb[RLC_EGPRS_MAX_WS] = {'\0'}; + uint8_t iter = 0; int is_compressed = 0; + bool try_compression = false; + uint8_t ucmp_bmplen; + uint8_t crbb_bitmap[23] = {'\0'}; + bitvec ucmp_vec; + bitvec crbb_vec; + uint8_t uclen_crbb = 0; bool len_coded = true; + uint8_t crbb_start_clr_code; uint8_t i; +#if 0 + /* static size of 16 bits*/ + ..0. .... = ACKNACK: (Union) + Desc + + ...0 .... = FINAL_ACK_INDICATION: False + + .... 1... = BEGINNING_OF_WINDOW: 1 + + .... .1.. = END_OF_WINDOW: 1 + + .... ..10 0101 0001 1... .... = STARTING_SEQUENCE_NUMBER: 1187 + + .0.. .... = CRBB Exist: 0 +#endif + rest_bits -= 16; if (num_blocks > 0) /* V(Q) is NACK and omitted -> SSN = V(Q) + 1 */ @@ -720,27 +745,67 @@ if (num_blocks > window->ws()) num_blocks = window->ws(); - /* TODO Compression support */ - if (is_compressed == 0) { - /* Union bit takes 1 bit */ - /* Other fields in descr for uncompresed bitmap takes 15 bits*/ + /* Try Compression as number of blocks does not fit */ + if (num_blocks > rest_bits) { + try_compression = true; + } + if (try_compression == true) { + ucmp_bmplen = window->update_egprs_rbb(rbb); + ucmp_vec.data = rbb; + ucmp_vec.cur_bit = ucmp_bmplen; + ucmp_vec.data_len = 127; + crbb_vec.data = crbb_bitmap; + crbb_vec.cur_bit = 0; + crbb_vec.data_len = 127; + LOGP(DRLCMACUL, LOGL_DEBUG, + "rest_bits=%d uncompressed len %d and uncompressed bitmap = %s\n", + rest_bits, ucmp_bmplen, + osmo_hexdump(ucmp_vec.data, (ucmp_bmplen+7)/8)); - if (num_blocks > rest_bits - 15 - 1) { + is_compressed = egprs_compress::compress_rbb(&ucmp_vec, /* Uncompressed bitmap*/ + &crbb_vec, /*Compressed bitmap vector */ + &uclen_crbb, + (rest_bits - 16));/* CRBBlength:7 colourcode:1 dissector length:8*/ + LOGP(DRLCMACUL, LOGL_DEBUG, + "the ucmp len=%d uclen_crbb=%d num_blocks=%d crbb length %d, " + "and the CRBB bitmap = %s\n", + ucmp_bmplen, uclen_crbb, num_blocks, crbb_vec.cur_bit, + osmo_hexdump(crbb_bitmap, (crbb_vec.cur_bit+7)/8)); + crbb_len = crbb_vec.cur_bit; + } + + if (is_compressed == 0) { + /* length field takes 8 bits*/ + if (num_blocks > rest_bits - 8) { eow = false; - urbb_len = rest_bits - 15 - 1; + urbb_len = rest_bits; len_coded = false; - } else if (num_blocks == rest_bits - 15 - 1) { - urbb_len = rest_bits - 15 - 1; + } else if (num_blocks == rest_bits) { + urbb_len = rest_bits; len_coded = false; - /* Union bit takes 1 bit length field takes 8 bits*/ - } else if (num_blocks > rest_bits - 15 - 9) { - eow = false; - urbb_len = rest_bits - 15 - 9; } else urbb_len = num_blocks; + len = urbb_len + 15; } else { - /* TODO Compressed bitmap */ + if (num_blocks > uclen_crbb) { + eow = false; + urbb_len = num_blocks - uclen_crbb; + } + /* Union bit takes 1 bit */ + /* Other fields in descr of compresed bitmap takes 23 bits + * -8 = CRBB_STARTING_COLOR_CODE + CRBB_LENGTH */ + if (urbb_len > (rest_bits - crbb_len - 8)) { + eow = false; + len_coded = false; + urbb_len = rest_bits - crbb_len - 8; + /* -16 = ACKNACK Dissector length + CRBB_STARTING_COLOR_CODE + CRBB_LENGTH */ + } else if (urbb_len > (rest_bits - crbb_len - 16)) { + eow = false; + len_coded = false; + urbb_len = rest_bits - crbb_len - 16; + } + len = urbb_len + crbb_len + 23; } /* EGPRS Ack/Nack Description IE */ @@ -756,14 +821,32 @@ bitvec_write_field(dest, wp, eow, 1); // END_OF_WINDOW bitvec_write_field(dest, wp, ssn, 11); // STARTING_SEQUENCE_NUMBER if (is_compressed) { - /* TODO Add CRBB support */ - } else + bitvec_write_field(dest, wp, 1, 1); // CRBB_Exist + bitvec_write_field(dest, wp, crbb_len, 7); // CRBB_LENGTH + crbb_start_clr_code = (0x80 & ucmp_vec.data[0])>>7; + bitvec_write_field(dest, wp, crbb_start_clr_code, 1); // CRBB_clr_code + LOGP(DRLCMACUL, LOGL_DEBUG, + "EGPRS CRBB, crbb_len = %d, crbb_start_clr_code = %d\n", + crbb_len, crbb_start_clr_code); + while (crbb_len != 0) { + if (crbb_len > 8) { + bitvec_write_field(dest, wp, crbb_bitmap[iter], 8); + crbb_len = crbb_len - 8; + iter++; + } else { + bitvec_write_field(dest, wp, crbb_bitmap[iter], crbb_len); + crbb_len = 0; + } + } + esn_crbb = window->mod_sns(esn_crbb + uclen_crbb); + } else { bitvec_write_field(dest, wp, 0, 1); // CRBB_Exist + } LOGP(DRLCMACUL, LOGL_DEBUG, "EGPRS URBB, urbb len = %d, SSN = %d, ESN_CRBB = %d, " "len present = %s,desc len = %d, " "SNS = %d, WS = %d, V(Q) = %d, V(R) = %d%s%s\n", - urbb_len, ssn, esn_crbb, len_coded ? "yes" : "No", len, + urbb_len, ssn, esn_crbb, len_coded ? "yes" : "No" , len, window->sns(), window->ws(), window->v_q(), window->v_r(), bow ? ", BOW" : "", eow ? ", EOW" : ""); @@ -795,7 +878,9 @@ bitvec_write_field(dest, wp, 0, 1); // 0: don't have Power Control Parameters bitvec_write_field(dest, wp, 0, 1); // 0: don't have Extension Bits - write_packet_ack_nack_desc_egprs(bts, dest, wp, &tbf->m_window, is_final); + /* -2 for last bit 0 mandatory and REL5 not supported */ + unsigned bits_ack_nack = dest->data_len * 8 - wp - 2; + write_packet_ack_nack_desc_egprs(bts, dest, wp, &tbf->m_window, is_final, bits_ack_nack); bitvec_write_field(dest, wp, 0, 1); // fixed 0 bitvec_write_field(dest, wp, 0, 1); // 0: don't have REL 5 diff --git a/src/rlc.cpp b/src/rlc.cpp index 2bffccb..d13045e 100644 --- a/src/rlc.cpp +++ b/src/rlc.cpp @@ -83,6 +83,32 @@ return resend; } +/* Update the receive block bitmap */ +uint16_t gprs_rlc_ul_window::update_egprs_rbb(uint8_t *rbb) +{ + int i; + uint16_t bsn; + uint16_t bitmask = 0x80; + int8_t pos = 0; + int8_t bit_pos = 0; + for (i = 0, bsn = (v_q()+1); ((bsn < (v_r())) && (i < ws())); i++, + bsn = this->mod_sns(bsn + 1)) { + if (m_v_n.is_received(bsn)) { + rbb[pos] = rbb[pos] | bitmask; + } else { + rbb[pos] = rbb[pos] & (~bitmask); + } + bitmask = bitmask >> 1; + bit_pos++; + bit_pos = bit_pos % 8; + if (bit_pos == 0) { + pos++; + bitmask = 0x80; + } + } + return i; +} + int gprs_rlc_dl_window::count_unacked() { uint16_t unacked = 0; @@ -219,6 +245,8 @@ void gprs_rlc_window::set_ws(uint16_t ws) { + LOGP(DRLCMAC, LOGL_INFO, "ws(%d)\n", + ws); OSMO_ASSERT(ws >= RLC_GPRS_SNS/2); OSMO_ASSERT(ws <= RLC_MAX_SNS/2); m_ws = ws; diff --git a/src/rlc.h b/src/rlc.h index b2fcd95..7db205d 100644 --- a/src/rlc.h +++ b/src/rlc.h @@ -347,6 +347,7 @@ bool is_received(uint16_t bsn) const; void update_rbb(char *rbb); + uint16_t update_egprs_rbb(uint8_t *rbb); void raise_v_r_to(int moves); void raise_v_r(const uint16_t bsn); uint16_t raise_v_q(); diff --git a/src/tbf.cpp b/src/tbf.cpp index 657255d..33d94a8 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -827,14 +827,16 @@ if (egprs_ms_class > 0 && bts->egprs_enabled) { tbf->enable_egprs(); tbf->m_window.set_sns(RLC_EGPRS_SNS); - /* TODO: Allow bigger UL windows when CRBB encoding is supported */ - tbf->m_window.set_ws(RLC_EGPRS_MIN_WS); setup_egprs_mode(bts, ms); LOGP(DRLCMAC, LOGL_INFO, "Enabled EGPRS for %s, mode %s\n", tbf->name(), GprsCodingScheme::modeName(ms->mode())); } rc = setup_tbf(tbf, ms, use_trx, ms_class, egprs_ms_class, single_slot); + + if (tbf->is_egprs_enabled()) + tbf->egprs_calc_ulwindow_size(); + /* if no resource */ if (rc < 0) { talloc_free(tbf); diff --git a/src/tbf.h b/src/tbf.h index adb7dcc..0389595 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -523,6 +523,8 @@ struct gprs_rlc_data *block, uint8_t *data, const uint8_t block_idx); + void egprs_calc_ulwindow_size(); + void update_coding_scheme_counter_ul(const GprsCodingScheme cs); /* Please note that all variables here will be reset when changing diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 0de0127..2598174 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -29,6 +29,8 @@ #include #include +#include "pcu_utils.h" + extern "C" { #include #include @@ -587,3 +589,22 @@ } } } + +void gprs_rlcmac_ul_tbf::egprs_calc_ulwindow_size() +{ + struct gprs_rlcmac_bts *bts_data = bts->bts_data(); + unsigned int num_pdch = pcu_bitcount(ul_slots()); + unsigned int ws = bts_data->ws_base + num_pdch * bts_data->ws_pdch; + ws = (ws / 32) * 32; + ws = OSMO_MAX(64, ws); + + if (num_pdch == 1) + ws = OSMO_MIN(192, ws); + else + ws = OSMO_MIN(128 * num_pdch, ws); + + LOGP(DRLCMAC, LOGL_INFO, "%s: Setting EGPRS window size to %d, base(%d) slots(%d) ws_pdch(%d)\n", + name(), ws, bts_data->ws_base, num_pdch, bts_data->ws_pdch); + + m_window.set_ws(ws); +} diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index 38d85d9..5f5456b 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -3342,6 +3342,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 3c TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 384 +ws(384) DL TBF slots: 0x3c, N: 4, WS: 384 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to RELEASING TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=RELEASING EGPRS) free @@ -3386,6 +3387,8 @@ - Setting Control TS 7 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 00 +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): Setting EGPRS window size to 64, base(0) slots(1) ws_pdch(0) +ws(64) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer 3169. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed @@ -3438,6 +3441,7 @@ Attaching TBF to MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 80 TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI: 0xf1223344 confirmed TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) [DOWNLINK] START Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' @@ -3479,6 +3483,8 @@ - Setting Control TS 7 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 00 +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): Setting EGPRS window size to 64, base(0) slots(1) ws_pdch(0) +ws(64) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer 3169. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed @@ -3694,6 +3700,7 @@ Attaching TBF to MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 80 TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI: 0xf1223344 confirmed TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) [DOWNLINK] START Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' @@ -3723,6 +3730,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -4057,6 +4065,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -4336,6 +4345,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -4574,6 +4584,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -4776,6 +4787,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -4956,6 +4968,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -5117,6 +5130,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -5274,6 +5288,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -5418,6 +5433,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -5563,6 +5579,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -5614,6 +5631,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -5665,6 +5683,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -5716,6 +5735,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -5786,6 +5806,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -5856,6 +5877,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -5926,6 +5948,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -5996,6 +6019,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -6053,6 +6077,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -6110,6 +6135,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -6167,6 +6193,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -6242,6 +6269,8 @@ - Setting Control TS 7 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 00 +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): Setting EGPRS window size to 64, base(0) slots(1) ws_pdch(0) +ws(64) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer 3169. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed @@ -6324,6 +6353,7 @@ Attaching TBF to MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 80 TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI: 0xf1223344 confirmed TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) [DOWNLINK] START Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' @@ -6355,6 +6385,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 192 +ws(192) DL TBF slots: 0x10, N: 1, WS: 192 ********** TBF update ********** PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. @@ -6371,6 +6402,7 @@ - Assigning DL TS 5 PDCH(TS 5, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS), 1 TBFs, USFs = 00, TFIs = 00000001. TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 384 +ws(384) DL TBF slots: 0x3c, N: 4, WS: 384 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to RELEASING TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=RELEASING EGPRS) free @@ -6415,6 +6447,8 @@ - Setting Control TS 7 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 00 +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): Setting EGPRS window size to 64, base(0) slots(1) ws_pdch(0) +ws(64) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer 3169. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed @@ -6485,6 +6519,7 @@ Attaching TBF to MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 80 TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI: 0xf1223344 confirmed TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) [DOWNLINK] START Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' @@ -6514,9 +6549,11 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed +ws(480) TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - ack: (BSN=1176)"RRRRRRRRRRIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIRRRIRRRRRRRRRRRRRRRRRRRRRRRRRRI"(BSN=1287) R=ACK I=NACK TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) DL analysis, range=1176:1288, lost=73, recv=39, skipped=0, bsn=1944, info='RRRRRRRRRRRRRRRRRRRRRRRRRRLRRRLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLRRRRRRRRRR................................................................................................................................................................................................................................................................................................................................................................................' -- To view, visit https://gerrit.osmocom.org/413 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I30d88769f6a699a5e0c2e11e4f3c3c48f63c979a Gerrit-PatchSet: 4 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: prasadkg Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: prasadkg Gerrit-Reviewer: pravin Gerrit-Reviewer: sivasankari From gerrit-no-reply at lists.osmocom.org Thu Jan 12 10:40:14 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 12 Jan 2017 10:40:14 +0000 Subject: [PATCH] osmo-pcu[master]: Log additional info for radio errors Message-ID: Review at https://gerrit.osmocom.org/1578 Log additional info for radio errors Change-Id: I936a07ce87f05d9c3dc351dc3bdc4f00d78265e0 Related: OS#1553 --- M src/bts.cpp M src/sba.cpp 2 files changed, 14 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/78/1578/1 diff --git a/src/bts.cpp b/src/bts.cpp index a47d7d8..bcd7293 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -909,9 +909,9 @@ void gprs_rlcmac_pdch::rcv_control_ack(Packet_Control_Acknowledgement_t *packet, uint32_t fn) { struct gprs_rlcmac_tbf *tbf, *new_tbf; - uint32_t tlli = 0; + uint32_t tlli = packet->TLLI; + GprsMs *ms = bts()->ms_by_tlli(tlli); - tlli = packet->TLLI; tbf = bts()->ul_tbf_by_poll_fn(fn, trx_no(), ts_no); if (!tbf) tbf = bts()->dl_tbf_by_poll_fn(fn, trx_no(), ts_no); @@ -920,6 +920,15 @@ LOGP(DRLCMAC, LOGL_NOTICE, "PACKET CONTROL ACK with " "unknown FN=%u TLLI=0x%08x (TRX %d TS %d)\n", fn, tlli, trx_no(), ts_no); + if (ms) + LOGP(DRLCMAC, LOGL_NOTICE, "PACKET CONTROL ACK with " + "unknown TBF correspond to MS with IMSI %s, TA %d, " + "uTBF (TFI=%d, state=%s), uTBF (TFI=%d, state=%s)\n", + ms->imsi(), ms->ta(), + ms->ul_tbf() ? ms->ul_tbf()->tfi() : 0, + ms->ul_tbf() ? ms->ul_tbf()->state_name() : "None", + ms->dl_tbf() ? ms->dl_tbf()->tfi() : 0, + ms->dl_tbf() ? ms->dl_tbf()->state_name() : "None"); return; } tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF); diff --git a/src/sba.cpp b/src/sba.cpp index 46c1431..5d75b17 100644 --- a/src/sba.cpp +++ b/src/sba.cpp @@ -127,7 +127,9 @@ int SBAController::timeout(struct gprs_rlcmac_sba *sba) { - LOGP(DRLCMAC, LOGL_NOTICE, "Poll timeout for SBA\n"); + LOGP(DRLCMAC, LOGL_NOTICE, + "Poll timeout for SBA (TRX=%u, TS=%u, FN=%u, TA=%u)\n", sba->trx_no, + sba->ts_no, sba->fn, sba->ta); m_bts.sba_timedout(); free_sba(sba); return 0; -- To view, visit https://gerrit.osmocom.org/1578 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I936a07ce87f05d9c3dc351dc3bdc4f00d78265e0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Jan 12 11:09:28 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 12 Jan 2017 11:09:28 +0000 Subject: libosmocore[master]: Add osmo_rand() function In-Reply-To: References: Message-ID: Patch Set 2: technically we could introduce osmo_rand() as a wrapper for the current rand method, so that the gnutls introduction will be a patch simply changing the osmo_rand() implementation? just a thought... -- To view, visit https://gerrit.osmocom.org/1526 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0241b814ea4c4ce1458f7ad76e31d390383c2048 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 12 11:13:42 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 12 Jan 2017 11:13:42 +0000 Subject: [PATCH] osmo-bts[master]: lc15, sysmobts l1_if: fix memleak in handle_mph_time_ind() In-Reply-To: References: Message-ID: Hello jfdionne, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1566 to look at the new patch set (#2). lc15,sysmobts l1_if: fix memleak in handle_mph_time_ind() Change-Id: I3061060235a488b114b636b3af9a2253a94de1e8 --- M src/osmo-bts-litecell15/l1_if.c M src/osmo-bts-sysmo/l1_if.c 2 files changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/66/1566/2 diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index 99533d7..c70bd9e 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -647,6 +647,7 @@ /* ignore every time indication, except for c0 */ if (trx != bts->c0) { + msgb_free(msg); return 0; } diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index ad9aa64..82db8d7 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -642,6 +642,7 @@ /* ignore every time indication, except for c0 */ if (trx != bts->c0) { + msgb_free(msg); return 0; } -- To view, visit https://gerrit.osmocom.org/1566 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I3061060235a488b114b636b3af9a2253a94de1e8 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jean-Francois Dionne Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: jfdionne From gerrit-no-reply at lists.osmocom.org Thu Jan 12 11:14:25 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 12 Jan 2017 11:14:25 +0000 Subject: libosmocore[master]: Add osmo_rand() function In-Reply-To: References: Message-ID: Patch Set 2: I don't see a point: this would defeat the purpose of avoiding license conflict. I think it's better to just wait until build env is ready - we're not in a rush to push this. -- To view, visit https://gerrit.osmocom.org/1526 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0241b814ea4c4ce1458f7ad76e31d390383c2048 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 12 11:17:01 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 12 Jan 2017 11:17:01 +0000 Subject: osmo-bts[master]: lc15, sysmobts l1_if: fix memleak in handle_mph_time_ind() In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1566 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3061060235a488b114b636b3af9a2253a94de1e8 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jean-Francois Dionne Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: jfdionne Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 12 11:17:07 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 12 Jan 2017 11:17:07 +0000 Subject: [MERGED] osmo-bts[master]: lc15, sysmobts l1_if: fix memleak in handle_mph_time_ind() In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: lc15,sysmobts l1_if: fix memleak in handle_mph_time_ind() ...................................................................... lc15,sysmobts l1_if: fix memleak in handle_mph_time_ind() Change-Id: I3061060235a488b114b636b3af9a2253a94de1e8 --- M src/osmo-bts-litecell15/l1_if.c M src/osmo-bts-sysmo/l1_if.c 2 files changed, 2 insertions(+), 0 deletions(-) Approvals: jfdionne: Verified Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index 99533d7..c70bd9e 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -647,6 +647,7 @@ /* ignore every time indication, except for c0 */ if (trx != bts->c0) { + msgb_free(msg); return 0; } diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index ad9aa64..82db8d7 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -642,6 +642,7 @@ /* ignore every time indication, except for c0 */ if (trx != bts->c0) { + msgb_free(msg); return 0; } -- To view, visit https://gerrit.osmocom.org/1566 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3061060235a488b114b636b3af9a2253a94de1e8 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jean-Francois Dionne Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: jfdionne From gerrit-no-reply at lists.osmocom.org Thu Jan 12 11:26:22 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 12 Jan 2017 11:26:22 +0000 Subject: libosmocore[master]: Add abis_nm_fail_evt_vrep() function In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 Ah, I see, you've just recently added this. That would have resolved the question, and in any case now you've added both variants, too... -- To view, visit https://gerrit.osmocom.org/1569 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib293dec1c2de9b664584a8456c782ea7b6dd8555 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 12 11:31:14 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 12 Jan 2017 11:31:14 +0000 Subject: openbsc[master]: Turn some warnings into errors In-Reply-To: References: Message-ID: Patch Set 3: > it makes sense to simply edit the commit message in gerrit has also backfired for me before, e.g. when the OP resubmitted a new patch set and effectively put the commit log typo/thinko back without noticing... -- To view, visit https://gerrit.osmocom.org/1368 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ied9c950dafa65f324cf31298b13b590f56139700 Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 12 11:37:58 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 12 Jan 2017 11:37:58 +0000 Subject: openbsc[master]: Turn some warnings into errors In-Reply-To: References: Message-ID: Patch Set 3: Hmm, I've pulled commit from gerrit before resubmission so I thought the edit would be there. -- To view, visit https://gerrit.osmocom.org/1368 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ied9c950dafa65f324cf31298b13b590f56139700 Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 12 11:43:02 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 12 Jan 2017 11:43:02 +0000 Subject: openbsc[master]: Turn some warnings into errors In-Reply-To: References: Message-ID: Patch Set 2: It actually is as far as I can see :) -- To view, visit https://gerrit.osmocom.org/1368 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ied9c950dafa65f324cf31298b13b590f56139700 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 12 11:43:31 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 12 Jan 2017 11:43:31 +0000 Subject: [MERGED] libosmocore[master]: Add abis_nm_fail_evt_vrep() function In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Add abis_nm_fail_evt_vrep() function ...................................................................... Add abis_nm_fail_evt_vrep() function It accept fixed number of arguments including va_list instead of variable number of arguments in abis_nm_fail_evt_rep() - similar to vprintff() vs printf(). Related: OS#1615 Change-Id: Ib293dec1c2de9b664584a8456c782ea7b6dd8555 --- M include/osmocom/gsm/protocol/gsm_12_21.h M src/gsm/abis_nm.c 2 files changed, 22 insertions(+), 4 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/gsm/protocol/gsm_12_21.h b/include/osmocom/gsm/protocol/gsm_12_21.h index 1a95311..5daab42 100644 --- a/include/osmocom/gsm/protocol/gsm_12_21.h +++ b/include/osmocom/gsm/protocol/gsm_12_21.h @@ -790,4 +790,9 @@ enum abis_nm_severity s, enum abis_nm_pcause_type ct, uint16_t cause_value, const char *fmt, ...); +struct msgb *abis_nm_fail_evt_vrep(enum abis_nm_event_type t, + enum abis_nm_severity s, + enum abis_nm_pcause_type ct, + uint16_t cause_value, const char *fmt, + va_list ap); /*! @} */ diff --git a/src/gsm/abis_nm.c b/src/gsm/abis_nm.c index f50a54f..73e3c7e 100644 --- a/src/gsm/abis_nm.c +++ b/src/gsm/abis_nm.c @@ -530,9 +530,25 @@ enum abis_nm_pcause_type ct, uint16_t cause_value, const char *fmt, ...) { + va_list ap; + struct msgb *nmsg; + + va_start(ap, fmt); + nmsg = abis_nm_fail_evt_vrep(t, s, ct, cause_value, fmt, ap); + va_end(ap); + + return nmsg; +} + +/*! \brief Pack 3GPP TS 12.21 ? 8.8.2 Failure Event Report into msgb */ +struct msgb *abis_nm_fail_evt_vrep(enum abis_nm_event_type t, + enum abis_nm_severity s, + enum abis_nm_pcause_type ct, + uint16_t cause_value, const char *fmt, + va_list ap) +{ uint8_t cause[3]; int len; - va_list ap; char add_text[ABIS_NM_MSG_HEADROOM]; struct msgb *nmsg = msgb_alloc_headroom(ABIS_NM_MSG_SIZE, ABIS_NM_MSG_HEADROOM, @@ -548,10 +564,7 @@ msgb_tv_fixed_put(nmsg, NM_ATT_PROB_CAUSE, 3, cause); - va_start(ap, fmt); len = vsnprintf(add_text, ABIS_NM_MSG_HEADROOM, fmt, ap); - va_end(ap); - if (len < 0) { msgb_free(nmsg); return NULL; -- To view, visit https://gerrit.osmocom.org/1569 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib293dec1c2de9b664584a8456c782ea7b6dd8555 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Jan 12 12:50:10 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 12 Jan 2017 12:50:10 +0000 Subject: [PATCH] osmo-pcu[master]: Fix segfault in tbf test Message-ID: Review at https://gerrit.osmocom.org/1579 Fix segfault in tbf test Make vty init optional and only init it once per test. Change-Id: I975cee6b2b21e1e83649f2ce23203568f225bd7a --- M src/gprs_bssgp_pcu.cpp M src/gprs_bssgp_pcu.h M src/pcu_l1_if.cpp M tests/emu/pcu_emu.cpp M tests/tbf/TbfTest.cpp 5 files changed, 19 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/79/1579/1 diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp index da1d26c..6c90c27 100644 --- a/src/gprs_bssgp_pcu.cpp +++ b/src/gprs_bssgp_pcu.cpp @@ -824,7 +824,8 @@ uint16_t local_port, uint32_t sgsn_ip, uint16_t sgsn_port, uint16_t nsei, uint16_t nsvci, uint16_t bvci, uint16_t mcc, uint16_t mnc, uint16_t lac, uint16_t rac, - uint16_t cell_id) + uint16_t cell_id, + bool init_vty) { struct sockaddr_in dest; int rc; @@ -844,7 +845,8 @@ LOGP(DBSSGP, LOGL_ERROR, "Failed to create NS instance\n"); return NULL; } - gprs_ns_vty_init(bssgp_nsi); + if (init_vty) + gprs_ns_vty_init(bssgp_nsi); bssgp_nsi->nsip.local_port = local_port; rc = gprs_ns_nsip_listen(bssgp_nsi); if (rc < 0) { diff --git a/src/gprs_bssgp_pcu.h b/src/gprs_bssgp_pcu.h index bb44903..a37c8a1 100644 --- a/src/gprs_bssgp_pcu.h +++ b/src/gprs_bssgp_pcu.h @@ -21,6 +21,7 @@ #ifndef GPRS_BSSGP_PCU_H #define GPRS_BSSGP_PCU_H +#include extern "C" { #include @@ -80,7 +81,9 @@ uint16_t local_port, uint32_t sgsn_ip, uint16_t sgsn_port, uint16_t nsei, uint16_t nsvci, uint16_t bvci, uint16_t mcc, uint16_t mnc, - uint16_t lac, uint16_t rac, uint16_t cell_id); + uint16_t lac, uint16_t rac, + uint16_t cell_id, + bool init_vty); void gprs_bssgp_destroy(void); int gprs_ns_reconnect(struct gprs_nsvc *nsvc); diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp index b892597..adc7cb7 100644 --- a/src/pcu_l1_if.cpp +++ b/src/pcu_l1_if.cpp @@ -18,6 +18,7 @@ */ #include +#include #include #include #include @@ -421,7 +422,7 @@ info_ind->remote_ip[0], info_ind->remote_port[0], info_ind->nsei, info_ind->nsvci[0], info_ind->bvci, info_ind->mcc, info_ind->mnc, info_ind->lac, info_ind->rac, - info_ind->cell_id); + info_ind->cell_id, true); if (!pcu) { LOGP(DL1IF, LOGL_NOTICE, "SGSN not available\n"); goto bssgp_failed; diff --git a/tests/emu/pcu_emu.cpp b/tests/emu/pcu_emu.cpp index 3725c8d..cced031 100644 --- a/tests/emu/pcu_emu.cpp +++ b/tests/emu/pcu_emu.cpp @@ -31,6 +31,7 @@ #include #include +#include #include #include #include @@ -99,7 +100,8 @@ struct gprs_bssgp_pcu *pcu; pcu = gprs_bssgp_create_and_connect(bts, 0, sgsn_ip, sgsn_port, - 20, 20, 20, 0x901, 0x99, 1, 0, 0); + 20, 20, 20, 0x901, 0x99, 1, 0, 0, + true); pcu->on_unblock_ack = bvci_unblocked; pcu->on_dl_unit_data = bssgp_data; } diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index bebb6ef..84475e1 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -41,6 +41,7 @@ } #include +#include void *tall_pcu_ctx; int16_t spoof_mnc = 0, spoof_mcc = 0; @@ -453,7 +454,7 @@ bts = the_bts.bts_data(); setup_bts(&the_bts, ts_no); gprs_bssgp_create_and_connect(bts, 33001, 0, 33001, - 1234, 1234, 1234, 1, 1, 0, 0, 0); + 1234, 1234, 1234, 1, 1, 0, 0, 0, true); for (i = 0; i < 1024; i++) { uint32_t tlli = 0xc0000000 + i; @@ -496,7 +497,7 @@ bts->ms_idle_sec = 10; /* keep the MS object */ gprs_bssgp_create_and_connect(bts, 33001, 0, 33001, - 1234, 1234, 1234, 1, 1, 0, 0, 0); + 1234, 1234, 1234, 1, 1, 0, 0, 0, false); /* Handle LLC frame 1 */ memset(buf, 1, sizeof(buf)); @@ -1792,7 +1793,7 @@ bts->egprs_enabled = 1; gprs_bssgp_create_and_connect(bts, 33001, 0, 33001, - 1234, 1234, 1234, 1, 1, 0, 0, 0); + 1234, 1234, 1234, 1, 1, 0, 0, 0, false); /* Does not support EGPRS */ rc = gprs_rlcmac_dl_tbf::handle(bts, tlli, 0, imsi, ms_class, 0, @@ -1826,7 +1827,7 @@ bts->trx[0].pdch[5].enable(); gprs_bssgp_create_and_connect(bts, 33001, 0, 33001, - 1234, 1234, 1234, 1, 1, 0, 0, 0); + 1234, 1234, 1234, 1, 1, 0, 0, 0, false); /* Does no support EGPRS */ dl_tbf = tbf_alloc_dl_tbf(bts, NULL, 0, ms_class, 0, 0); @@ -1881,7 +1882,7 @@ bts->trx[0].pdch[5].enable(); gprs_bssgp_create_and_connect(bts, 33001, 0, 33001, - 1234, 1234, 1234, 1, 1, 0, 0, 0); + 1234, 1234, 1234, 1, 1, 0, 0, 0, false); /* EGPRS-only */ bts->egprs_enabled = 1; -- To view, visit https://gerrit.osmocom.org/1579 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I975cee6b2b21e1e83649f2ce23203568f225bd7a Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Jan 12 12:51:38 2017 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Thu, 12 Jan 2017 12:51:38 +0000 Subject: [PATCH] osmo-pcu[master]: Sanitizer fix for invalid value of egprs_puncturing_values In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1411 to look at the new patch set (#4). Sanitizer fix for invalid value of egprs_puncturing_values The puncturing values are set to EGPRS_PS_INVALID initially for both the BSNs and CPS calculation is done for only EGPRS case. During CPS calculation each puncturing values are validated against EGPRS_PS_INVALID to ensure the correctness of the variable. Change-Id: Ice54edc7e4a936eb2f2dd8a243673a30dceef542 --- M src/rlc.cpp M src/tbf_dl.cpp 2 files changed, 46 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/11/1411/4 diff --git a/src/rlc.cpp b/src/rlc.cpp index 2bffccb..0dfec8f 100644 --- a/src/rlc.cpp +++ b/src/rlc.cpp @@ -351,26 +351,49 @@ enum egprs_puncturing_values punct2, int with_padding) { switch (GprsCodingScheme::Scheme(cs)) { - case GprsCodingScheme::MCS1: return 0b1011 + - punct % EGPRS_MAX_PS_NUM_2; - case GprsCodingScheme::MCS2: return 0b1001 + - punct % EGPRS_MAX_PS_NUM_2; - case GprsCodingScheme::MCS3: return (with_padding ? 0b0110 : 0b0011) + + case GprsCodingScheme::MCS1: + OSMO_ASSERT(punct != EGPRS_PS_INVALID); + + return 0b1011 + punct % EGPRS_MAX_PS_NUM_2; + case GprsCodingScheme::MCS2: + OSMO_ASSERT(punct != EGPRS_PS_INVALID); + + return 0b1001 + punct % EGPRS_MAX_PS_NUM_2; + case GprsCodingScheme::MCS3: + OSMO_ASSERT(punct != EGPRS_PS_INVALID); + + return (with_padding ? 0b0110 : 0b0011) + punct % EGPRS_MAX_PS_NUM_3; - case GprsCodingScheme::MCS4: return 0b0000 + - punct % EGPRS_MAX_PS_NUM_3; - case GprsCodingScheme::MCS5: return 0b100 + + case GprsCodingScheme::MCS4: + OSMO_ASSERT(punct != EGPRS_PS_INVALID); + + return 0b0000 + punct % EGPRS_MAX_PS_NUM_3; + case GprsCodingScheme::MCS5: + OSMO_ASSERT(punct != EGPRS_PS_INVALID); + + return 0b100 + punct % EGPRS_MAX_PS_NUM_2; + case GprsCodingScheme::MCS6: + OSMO_ASSERT(punct != EGPRS_PS_INVALID); + + return (with_padding ? 0b010 : 0b000) + punct % EGPRS_MAX_PS_NUM_2; - case GprsCodingScheme::MCS6: return (with_padding ? 0b010 : 0b000) + - punct % EGPRS_MAX_PS_NUM_2; - case GprsCodingScheme::MCS7: return 0b10100 + - 3 * (punct % EGPRS_MAX_PS_NUM_3) + + case GprsCodingScheme::MCS7: + OSMO_ASSERT(punct != EGPRS_PS_INVALID); + OSMO_ASSERT(punct2 != EGPRS_PS_INVALID); + + return 0b10100 + 3 * (punct % EGPRS_MAX_PS_NUM_3) + punct2 % EGPRS_MAX_PS_NUM_3; - case GprsCodingScheme::MCS8: return 0b01011 + - 3 * (punct % EGPRS_MAX_PS_NUM_3) + + case GprsCodingScheme::MCS8: + OSMO_ASSERT(punct != EGPRS_PS_INVALID); + OSMO_ASSERT(punct2 != EGPRS_PS_INVALID); + + return 0b01011 + 3 * (punct % EGPRS_MAX_PS_NUM_3) + punct2 % EGPRS_MAX_PS_NUM_3; - case GprsCodingScheme::MCS9: return 0b00000 + - 4 * (punct % EGPRS_MAX_PS_NUM_3) + + case GprsCodingScheme::MCS9: + OSMO_ASSERT(punct != EGPRS_PS_INVALID); + OSMO_ASSERT(punct2 != EGPRS_PS_INVALID); + + return 0b00000 + 4 * (punct % EGPRS_MAX_PS_NUM_3) + punct2 % EGPRS_MAX_PS_NUM_3; default: ; } diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 78f06e9..e2b2e68 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -631,6 +631,10 @@ bool need_padding = false; enum egprs_rlcmac_dl_spb spb = EGPRS_RLCMAC_DL_NO_RETX; unsigned int spb_status = get_egprs_dl_spb_status(index); + + /* Initialise the puncturing schemes for both BSN as to Invalid */ + memset(punct, EGPRS_PS_INVALID, sizeof(punct)); + /* * TODO: This is an experimental work-around to put 2 BSN into * MSC-7 to MCS-9 encoded messages. It just sends the same BSN @@ -762,8 +766,9 @@ msg_data, block_data); } - OSMO_ASSERT(ARRAY_SIZE(punct) >= 2); - rlc.cps = gprs_rlc_mcs_cps(cs, punct[0], punct[1], need_padding); + /* Calculate CPS only for EGPRS case */ + if (cs.isEgprs()) + rlc.cps = gprs_rlc_mcs_cps(cs, punct[0], punct[1], need_padding); /* If the TBF has just started, relate frames_since_last_poll to the * current fn */ -- To view, visit https://gerrit.osmocom.org/1411 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ice54edc7e4a936eb2f2dd8a243673a30dceef542 Gerrit-PatchSet: 4 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar From gerrit-no-reply at lists.osmocom.org Thu Jan 12 12:55:27 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 12 Jan 2017 12:55:27 +0000 Subject: [PATCH] libosmocore[master]: core/conv: implement optimized Viterbi decoder In-Reply-To: References: Message-ID: Hello tnt, Alexander Chemeris, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1337 to look at the new patch set (#5). core/conv: implement optimized Viterbi decoder Add a separate, faster convolution decoding implementation for rates up to N=4 and constraint lengths of K=5 and K=7, which covers the most GSM code uses. The decoding algorithm exploits the symmetric structure of the Viterbi add-compare-select (ACS) operation - commonly known as the ACS butterfly. This shift-register optimization can be found in the well-known text by Dave Forney. Forney, G.D., "The Viterbi Algorithm," Proc. of the IEEE, March 1973. Implementation is non-architecture specific and improves performance on x86 as well as ARM processors. Existing API is unchanged with optimized code being called internally for supported codes. The original code was relicensed under GPLv2-or-later with permission of copyright holder - Tom Tsou. Change-Id: I74d355274b4176a7d924f91ef3c96912ce338fb2 --- M src/Makefile.am M src/conv.c A src/viterbi.c A src/viterbi_gen.c 4 files changed, 807 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/37/1337/5 diff --git a/src/Makefile.am b/src/Makefile.am index 0cf2665..6948e1a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -16,7 +16,8 @@ gsmtap_util.c crc16.c panic.c backtrace.c \ conv.c application.c rbtree.c strrb.c \ loggingrb.c crc8gen.c crc16gen.c crc32gen.c crc64gen.c \ - macaddr.c stat_item.c stats.c stats_statsd.c prim.c + macaddr.c stat_item.c stats.c stats_statsd.c prim.c \ + viterbi.c viterbi_gen.c BUILT_SOURCES = crc8gen.c crc16gen.c crc32gen.c crc64gen.c diff --git a/src/conv.c b/src/conv.c index f13deef..79b3a7c 100644 --- a/src/conv.c +++ b/src/conv.c @@ -238,6 +238,11 @@ #define MAX_AE 0x00ffffff +/* Forward declaration for accerlated decoding with certain codes */ +int +osmo_conv_decode_acc(const struct osmo_conv_code *code, + const sbit_t *input, ubit_t *output); + void osmo_conv_decode_init(struct osmo_conv_decoder *decoder, const struct osmo_conv_code *code, int len, int start_state) @@ -606,6 +611,10 @@ struct osmo_conv_decoder decoder; int rv, l; + /* Use accelerated implementation for supported codes */ + if ((code->N <= 4) && ((code->K == 5) || (code->K == 7))) + return osmo_conv_decode_acc(code, input, output); + osmo_conv_decode_init(&decoder, code, 0, 0); if (code->term == CONV_TERM_TAIL_BITING) { diff --git a/src/viterbi.c b/src/viterbi.c new file mode 100644 index 0000000..9422575 --- /dev/null +++ b/src/viterbi.c @@ -0,0 +1,603 @@ +/* + * Viterbi decoder + * + * Copyright (C) 2013, 2014 Thomas Tsou + * + * 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 2 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. + */ + +#include +#include +#include + +#include +#include "config.h" + +#define BIT2NRZ(REG,N) (((REG >> N) & 0x01) * 2 - 1) * -1 +#define NUM_STATES(K) (K == 7 ? 64 : 16) +#define SSE_ALIGN 16 + +/* Forward Metric Units */ +void osmo_conv_gen_metrics_k5_n2(const int8_t *seq, const int16_t *out, + int16_t *sums, int16_t *paths, int norm); +void osmo_conv_gen_metrics_k5_n3(const int8_t *seq, const int16_t *out, + int16_t *sums, int16_t *paths, int norm); +void osmo_conv_gen_metrics_k5_n4(const int8_t *seq, const int16_t *out, + int16_t *sums, int16_t *paths, int norm); +void osmo_conv_gen_metrics_k7_n2(const int8_t *seq, const int16_t *out, + int16_t *sums, int16_t *paths, int norm); +void osmo_conv_gen_metrics_k7_n3(const int8_t *seq, const int16_t *out, + int16_t *sums, int16_t *paths, int norm); +void osmo_conv_gen_metrics_k7_n4(const int8_t *seq, const int16_t *out, + int16_t *sums, int16_t *paths, int norm); + +/* Trellis State + * state - Internal lshift register value + * prev - Register values of previous 0 and 1 states + */ +struct vstate { + unsigned state; + unsigned prev[2]; +}; + +/* Trellis Object + * num_states - Number of states in the trellis + * sums - Accumulated path metrics + * outputs - Trellis output values + * vals - Input value that led to each state + */ +struct vtrellis { + int num_states; + int16_t *sums; + int16_t *outputs; + uint8_t *vals; +}; + +/* Viterbi Decoder + * n - Code order + * k - Constraint length + * len - Horizontal length of trellis + * recursive - Set to '1' if the code is recursive + * intrvl - Normalization interval + * trellis - Trellis object + * punc - Puncturing sequence + * paths - Trellis paths + */ +struct vdecoder { + int n; + int k; + int len; + int recursive; + int intrvl; + struct vtrellis *trellis; + int *punc; + int16_t **paths; + + void (*metric_func)(const int8_t *, const int16_t *, + int16_t *, int16_t *, int); +}; + +/* Aligned Memory Allocator + * SSE requires 16-byte memory alignment. We store relevant trellis values + * (accumulated sums, outputs, and path decisions) as 16 bit signed integers + * so the allocated memory is casted as such. + */ +static int16_t *vdec_malloc(size_t n) +{ +#ifdef HAVE_SSE3 + return (int16_t *) memalign(SSE_ALIGN, sizeof(int16_t) * n); +#else + return (int16_t *) malloc(sizeof(int16_t) * n); +#endif +} + +/* Accessor calls */ +static inline int conv_code_recursive(const struct osmo_conv_code *code) +{ + return code->next_term_output ? 1 : 0; +} + +/* Left shift and mask for finding the previous state */ +static unsigned vstate_lshift(unsigned reg, int k, int val) +{ + unsigned mask; + + if (k == 5) + mask = 0x0e; + else if (k == 7) + mask = 0x3e; + else + mask = 0; + + return ((reg << 1) & mask) | val; +} + +/* Bit endian manipulators */ +static inline unsigned bitswap2(unsigned v) +{ + return ((v & 0x02) >> 1) | ((v & 0x01) << 1); +} + +static inline unsigned bitswap3(unsigned v) +{ + return ((v & 0x04) >> 2) | ((v & 0x02) >> 0) | + ((v & 0x01) << 2); +} + +static inline unsigned bitswap4(unsigned v) +{ + return ((v & 0x08) >> 3) | ((v & 0x04) >> 1) | + ((v & 0x02) << 1) | ((v & 0x01) << 3); +} + +static inline unsigned bitswap5(unsigned v) +{ + return ((v & 0x10) >> 4) | ((v & 0x08) >> 2) | ((v & 0x04) >> 0) | + ((v & 0x02) << 2) | ((v & 0x01) << 4); +} + +static inline unsigned bitswap6(unsigned v) +{ + return ((v & 0x20) >> 5) | ((v & 0x10) >> 3) | ((v & 0x08) >> 1) | + ((v & 0x04) << 1) | ((v & 0x02) << 3) | ((v & 0x01) << 5); +} + +static unsigned bitswap(unsigned v, unsigned n) +{ + switch (n) { + case 1: + return v; + case 2: + return bitswap2(v); + case 3: + return bitswap3(v); + case 4: + return bitswap4(v); + case 5: + return bitswap5(v); + case 6: + return bitswap6(v); + default: + return 0; + } +} + +/* Generate non-recursive state output from generator state table + * Note that the shift register moves right (i.e. the most recent bit is + * shifted into the register at k-1 bit of the register), which is typical + * textbook representation. The API transition table expects the most recent + * bit in the low order bit, or left shift. A bitswap operation is required + * to accommodate the difference. + */ +static unsigned gen_output(struct vstate *state, int val, + const struct osmo_conv_code *code) +{ + unsigned out, prev; + + prev = bitswap(state->prev[0], code->K - 1); + out = code->next_output[prev][val]; + out = bitswap(out, code->N); + + return out; +} + +/* Populate non-recursive trellis state + * For a given state defined by the k-1 length shift register, find the + * value of the input bit that drove the trellis to that state. Also + * generate the N outputs of the generator polynomial at that state. + */ +static int gen_state_info(uint8_t *val, unsigned reg, + int16_t *output, const struct osmo_conv_code *code) +{ + int i; + unsigned out; + struct vstate state; + + /* Previous '0' state */ + state.state = reg; + state.prev[0] = vstate_lshift(reg, code->K, 0); + state.prev[1] = vstate_lshift(reg, code->K, 1); + + *val = (reg >> (code->K - 2)) & 0x01; + + /* Transition output */ + out = gen_output(&state, *val, code); + + /* Unpack to NRZ */ + for (i = 0; i < code->N; i++) + output[i] = BIT2NRZ(out, i); + + return 0; +} + +/* Generate recursive state output from generator state table */ +static unsigned gen_recursive_output(struct vstate *state, + uint8_t *val, unsigned reg, + const struct osmo_conv_code *code, int pos) +{ + int val0, val1; + unsigned out, prev; + + /* Previous '0' state */ + prev = vstate_lshift(reg, code->K, 0); + prev = bitswap(prev, code->K - 1); + + /* Input value */ + val0 = (reg >> (code->K - 2)) & 0x01; + val1 = (code->next_term_output[prev] >> pos) & 0x01; + *val = val0 == val1 ? 0 : 1; + + /* Wrapper for osmocom state access */ + prev = bitswap(state->prev[0], code->K - 1); + + /* Compute the transition output */ + out = code->next_output[prev][*val]; + out = bitswap(out, code->N); + + return out; +} + +/* Populate recursive trellis state + * The bit position of the systematic bit is not explicitly marked by the + * API, so it must be extracted from the generator table. Otherwise, + * populate the trellis similar to the non-recursive version. + * Non-systematic recursive codes are not supported. + */ +static int gen_recursive_state_info(uint8_t *val, + unsigned reg, int16_t *output, const struct osmo_conv_code *code) +{ + int i, j, pos = -1; + int ns = NUM_STATES(code->K); + unsigned out; + struct vstate state; + + /* Previous '0' and '1' states */ + state.state = reg; + state.prev[0] = vstate_lshift(reg, code->K, 0); + state.prev[1] = vstate_lshift(reg, code->K, 1); + + /* Find recursive bit location */ + for (i = 0; i < code->N; i++) { + for (j = 0; j < ns; j++) { + if ((code->next_output[j][0] >> i) & 0x01) + break; + } + + if (j == ns) { + pos = i; + break; + } + } + + /* Non-systematic recursive code not supported */ + if (pos < 0) + return -EPROTO; + + /* Transition output */ + out = gen_recursive_output(&state, val, reg, code, pos); + + /* Unpack to NRZ */ + for (i = 0; i < code->N; i++) + output[i] = BIT2NRZ(out, i); + + return 0; +} + +/* Release the trellis */ +static void free_trellis(struct vtrellis *trellis) +{ + if (!trellis) + return; + + free(trellis->vals); + free(trellis->outputs); + free(trellis->sums); + free(trellis); +} + +/* Allocate and initialize the trellis object + * Initialization consists of generating the outputs and output value of a + * given state. Due to trellis symmetry and anti-symmetry, only one of the + * transition paths is utilized by the butterfly operation in the forward + * recursion, so only one set of N outputs is required per state variable. + */ +static struct vtrellis *generate_trellis(const struct osmo_conv_code *code) +{ + int i, rc = -1; + struct vtrellis *trellis; + int16_t *outputs; + + int ns = NUM_STATES(code->K); + int recursive = conv_code_recursive(code); + int olen = (code->N == 2) ? 2 : 4; + + trellis = (struct vtrellis *) calloc(1, sizeof(struct vtrellis)); + trellis->num_states = ns; + trellis->sums = vdec_malloc(ns); + trellis->outputs = vdec_malloc(ns * olen); + trellis->vals = (uint8_t *) malloc(ns * sizeof(uint8_t)); + + if (!trellis->sums || !trellis->outputs) + goto fail; + + /* Populate the trellis state objects */ + for (i = 0; i < ns; i++) { + outputs = &trellis->outputs[olen * i]; + if (recursive) { + rc = gen_recursive_state_info(&trellis->vals[i], + i, outputs, code); + } else { + rc = gen_state_info(&trellis->vals[i], + i, outputs, code); + } + } + + if (rc < 0) + goto fail; + + return trellis; + +fail: + free_trellis(trellis); + return NULL; +} + +/* Reset decoder + * Set accumulated path metrics to zero. For termination other than + * tail-biting, initialize the zero state as the encoder starting state. + * Initialize with the maximum accumulated sum at length equal to the + * constraint length. + */ +static void reset_decoder(struct vdecoder *dec, int term) +{ + int ns = dec->trellis->num_states; + + memset(dec->trellis->sums, 0, sizeof(int16_t) * ns); + + if (term != CONV_TERM_TAIL_BITING) + dec->trellis->sums[0] = INT8_MAX * dec->n * dec->k; +} + +static void _traceback(struct vdecoder *dec, + unsigned state, uint8_t *out, int len) +{ + int i; + unsigned path; + + for (i = len - 1; i >= 0; i--) { + path = dec->paths[i][state] + 1; + out[i] = dec->trellis->vals[state]; + state = vstate_lshift(state, dec->k, path); + } +} + +static void _traceback_rec(struct vdecoder *dec, + unsigned state, uint8_t *out, int len) +{ + int i; + unsigned path; + + for (i = len - 1; i >= 0; i--) { + path = dec->paths[i][state] + 1; + out[i] = path ^ dec->trellis->vals[state]; + state = vstate_lshift(state, dec->k, path); + } +} + +/* Traceback and generate decoded output + * Find the largest accumulated path metric at the final state except for + * the zero terminated case, where we assume the final state is always zero. + */ +static int traceback(struct vdecoder *dec, uint8_t *out, int term, int len) +{ + int i, sum, max = -1; + unsigned path, state = 0; + + if (term != CONV_TERM_FLUSH) { + for (i = 0; i < dec->trellis->num_states; i++) { + sum = dec->trellis->sums[i]; + if (sum > max) { + max = sum; + state = i; + } + } + + if (max < 0) + return -EPROTO; + } + + for (i = dec->len - 1; i >= len; i--) { + path = dec->paths[i][state] + 1; + state = vstate_lshift(state, dec->k, path); + } + + if (dec->recursive) + _traceback_rec(dec, state, out, len); + else + _traceback(dec, state, out, len); + + return 0; +} + +/* Release decoder object */ +static void free_vdec(struct vdecoder *dec) +{ + if (!dec) + return; + + free(dec->paths[0]); + free(dec->paths); + free_trellis(dec->trellis); + free(dec); +} + +/* Allocate decoder object + * Subtract the constraint length K on the normalization interval to + * accommodate the initialization path metric at state zero. + */ +static struct vdecoder *alloc_vdec(const struct osmo_conv_code *code) +{ + int i, ns; + struct vdecoder *dec; + + ns = NUM_STATES(code->K); + + dec = (struct vdecoder *) calloc(1, sizeof(struct vdecoder)); + dec->n = code->N; + dec->k = code->K; + dec->recursive = conv_code_recursive(code); + dec->intrvl = INT16_MAX / (dec->n * INT8_MAX) - dec->k; + + if (dec->k == 5) { + switch (dec->n) { + case 2: + dec->metric_func = osmo_conv_gen_metrics_k5_n2; + break; + case 3: + dec->metric_func = osmo_conv_gen_metrics_k5_n3; + break; + case 4: + dec->metric_func = osmo_conv_gen_metrics_k5_n4; + break; + default: + goto fail; + } + } else if (dec->k == 7) { + switch (dec->n) { + case 2: + dec->metric_func = osmo_conv_gen_metrics_k7_n2; + break; + case 3: + dec->metric_func = osmo_conv_gen_metrics_k7_n3; + break; + case 4: + dec->metric_func = osmo_conv_gen_metrics_k7_n4; + break; + default: + goto fail; + } + } else { + goto fail; + } + + if (code->term == CONV_TERM_FLUSH) + dec->len = code->len + code->K - 1; + else + dec->len = code->len; + + dec->trellis = generate_trellis(code); + if (!dec->trellis) + goto fail; + + dec->paths = (int16_t **) malloc(sizeof(int16_t *) * dec->len); + dec->paths[0] = vdec_malloc(ns * dec->len); + for (i = 1; i < dec->len; i++) + dec->paths[i] = &dec->paths[0][i * ns]; + + return dec; + +fail: + free_vdec(dec); + return NULL; +} + +/* Depuncture sequence with nagative value terminated puncturing matrix */ +static int depuncture(const int8_t *in, const int *punc, int8_t *out, int len) +{ + int i, n = 0, m = 0; + + for (i = 0; i < len; i++) { + if (i == punc[n]) { + out[i] = 0; + n++; + continue; + } + + out[i] = in[m++]; + } + + return 0; +} + +/* Forward trellis recursion + * Generate branch metrics and path metrics with a combined function. Only + * accumulated path metric sums and path selections are stored. Normalize on + * the interval specified by the decoder. + */ +static void _conv_decode(struct vdecoder *dec, const int8_t *seq, int _cnt) +{ + int i, len = dec->len; + struct vtrellis *trellis = dec->trellis; + + for (i = 0; i < len; i++) { + dec->metric_func(&seq[dec->n * i], + trellis->outputs, + trellis->sums, + dec->paths[i], + !(i % dec->intrvl)); + } +} + +/* Convolutional decode with a decoder object + * Initial puncturing run if necessary followed by the forward recursion. + * For tail-biting perform a second pass before running the backward + * traceback operation. + */ +static int conv_decode(struct vdecoder *dec, const int8_t *seq, + const int *punc, uint8_t *out, int len, int term) +{ + int cnt = 0; + int8_t depunc[dec->len * dec->n]; + + reset_decoder(dec, term); + + if (punc) { + depuncture(seq, punc, depunc, dec->len * dec->n); + seq = depunc; + } + + /* Propagate through the trellis with interval normalization */ + _conv_decode(dec, seq, cnt); + + if (term == CONV_TERM_TAIL_BITING) + _conv_decode(dec, seq, cnt); + + return traceback(dec, out, term, len); +} + +/* All-in-one Viterbi decoding */ +int osmo_conv_decode_acc(const struct osmo_conv_code *code, + const sbit_t *input, ubit_t *output) +{ + int rc; + struct vdecoder *vdec; + + if ((code->N < 2) || (code->N > 4) || (code->len < 1) || + ((code->K != 5) && (code->K != 7))) + return -EINVAL; + + vdec = alloc_vdec(code); + if (!vdec) + return -EFAULT; + + rc = conv_decode(vdec, input, code->puncture, + output, code->len, code->term); + + free_vdec(vdec); + + return rc; +} diff --git a/src/viterbi_gen.c b/src/viterbi_gen.c new file mode 100644 index 0000000..219b25b --- /dev/null +++ b/src/viterbi_gen.c @@ -0,0 +1,193 @@ +/* + * Viterbi decoder + * + * Copyright (C) 2013, 2014 Thomas Tsou + * + * 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 2 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. + */ + +#include +#include + +/* Add-Compare-Select (ACS-Butterfly) + * Compute 4 accumulated path metrics and 4 path selections. Note that path + * selections are store as -1 and 0 rather than 0 and 1. This is to match + * the output format of the SSE packed compare instruction 'pmaxuw'. + */ + +static void acs_butterfly(int state, int num_states, + int16_t metric, int16_t *sum, + int16_t *new_sum, int16_t *path) +{ + int state0, state1; + int sum0, sum1, sum2, sum3; + + state0 = *(sum + (2 * state + 0)); + state1 = *(sum + (2 * state + 1)); + + sum0 = state0 + metric; + sum1 = state1 - metric; + sum2 = state0 - metric; + sum3 = state1 + metric; + + if (sum0 > sum1) { + *new_sum = sum0; + *path = -1; + } else { + *new_sum = sum1; + *path = 0; + } + + if (sum2 > sum3) { + *(new_sum + num_states / 2) = sum2; + *(path + num_states / 2) = -1; + } else { + *(new_sum + num_states / 2) = sum3; + *(path + num_states / 2) = 0; + } +} + +/* Branch metrics unit N=2 */ +static void gen_branch_metrics_n2(int num_states, const int8_t *seq, + const int16_t *out, int16_t *metrics) +{ + int i; + + for (i = 0; i < num_states / 2; i++) { + metrics[i] = seq[0] * out[2 * i + 0] + + seq[1] * out[2 * i + 1]; + } +} + +/* Branch metrics unit N=3 */ +static void gen_branch_metrics_n3(int num_states, const int8_t *seq, + const int16_t *out, int16_t *metrics) +{ + int i; + + for (i = 0; i < num_states / 2; i++) { + metrics[i] = seq[0] * out[4 * i + 0] + + seq[1] * out[4 * i + 1] + + seq[2] * out[4 * i + 2]; + } +} + +/* Branch metrics unit N=4 */ +static void gen_branch_metrics_n4(int num_states, const int8_t *seq, + const int16_t *out, int16_t *metrics) +{ + int i; + + for (i = 0; i < num_states / 2; i++) { + metrics[i] = seq[0] * out[4 * i + 0] + + seq[1] * out[4 * i + 1] + + seq[2] * out[4 * i + 2] + + seq[3] * out[4 * i + 3]; + } +} + +/* Path metric unit */ +static void gen_path_metrics(int num_states, int16_t *sums, + int16_t *metrics, int16_t *paths, int norm) +{ + int i; + int16_t min; + int16_t new_sums[num_states]; + + for (i = 0; i < num_states / 2; i++) + acs_butterfly(i, num_states, metrics[i], + sums, &new_sums[i], &paths[i]); + + if (norm) { + min = new_sums[0]; + + for (i = 1; i < num_states; i++) + if (new_sums[i] < min) + min = new_sums[i]; + + for (i = 0; i < num_states; i++) + new_sums[i] -= min; + } + + memcpy(sums, new_sums, num_states * sizeof(int16_t)); +} + +/* 16-state branch-path metrics units (K=5) */ +__attribute__ ((visibility("hidden"))) +void osmo_conv_gen_metrics_k5_n2(const int8_t *seq, const int16_t *out, + int16_t *sums, int16_t *paths, int norm) +{ + int16_t metrics[8]; + + gen_branch_metrics_n2(16, seq, out, metrics); + gen_path_metrics(16, sums, metrics, paths, norm); +} + +__attribute__ ((visibility("hidden"))) +void osmo_conv_gen_metrics_k5_n3(const int8_t *seq, const int16_t *out, + int16_t *sums, int16_t *paths, int norm) +{ + int16_t metrics[8]; + + gen_branch_metrics_n3(16, seq, out, metrics); + gen_path_metrics(16, sums, metrics, paths, norm); + +} + +__attribute__ ((visibility("hidden"))) +void osmo_conv_gen_metrics_k5_n4(const int8_t *seq, const int16_t *out, + int16_t *sums, int16_t *paths, int norm) +{ + int16_t metrics[8]; + + gen_branch_metrics_n4(16, seq, out, metrics); + gen_path_metrics(16, sums, metrics, paths, norm); + +} + +/* 64-state branch-path metrics units (K=7) */ +__attribute__ ((visibility("hidden"))) +void osmo_conv_gen_metrics_k7_n2(const int8_t *seq, const int16_t *out, + int16_t *sums, int16_t *paths, int norm) +{ + int16_t metrics[32]; + + gen_branch_metrics_n2(64, seq, out, metrics); + gen_path_metrics(64, sums, metrics, paths, norm); + +} + +__attribute__ ((visibility("hidden"))) +void osmo_conv_gen_metrics_k7_n3(const int8_t *seq, const int16_t *out, + int16_t *sums, int16_t *paths, int norm) +{ + int16_t metrics[32]; + + gen_branch_metrics_n3(64, seq, out, metrics); + gen_path_metrics(64, sums, metrics, paths, norm); + +} + +__attribute__ ((visibility("hidden"))) +void osmo_conv_gen_metrics_k7_n4(const int8_t *seq, const int16_t *out, + int16_t *sums, int16_t *paths, int norm) +{ + int16_t metrics[32]; + + gen_branch_metrics_n4(64, seq, out, metrics); + gen_path_metrics(64, sums, metrics, paths, norm); +} -- To view, visit https://gerrit.osmocom.org/1337 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I74d355274b4176a7d924f91ef3c96912ce338fb2 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Alexander Chemeris Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Tom Tsou Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt From gerrit-no-reply at lists.osmocom.org Thu Jan 12 13:18:00 2017 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Thu, 12 Jan 2017 13:18:00 +0000 Subject: osmo-pcu[master]: Sanitizer fix for invalid value of egprs_puncturing_values In-Reply-To: References: Message-ID: Patch Set 4: Neels, Please review the patch. Currently, build is failing for the existing reason in PCU host environment. -- To view, visit https://gerrit.osmocom.org/1411 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ice54edc7e4a936eb2f2dd8a243673a30dceef542 Gerrit-PatchSet: 4 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 12 15:48:09 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 12 Jan 2017 15:48:09 +0000 Subject: [PATCH] libosmocore[master]: logging: remove code duplication Message-ID: Review at https://gerrit.osmocom.org/1580 logging: remove code duplication * make DEBUGP* macro into simple wrappers around LOGP* * remove unused logp() function Related: OS#71 Change-Id: Ia6c92bd4824c44fc22cc733ce7a88da86e58ed93 --- M TODO-RELEASE M include/osmocom/core/logging.h M src/logging.c 3 files changed, 28 insertions(+), 56 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/80/1580/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index fb0bfea..429fdda 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,3 +7,4 @@ # If any interfaces have been added since the last public release: c:r:a + 1. # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line +libosmocore API/ABI change remove unused logp() function diff --git a/include/osmocom/core/logging.h b/include/osmocom/core/logging.h index fe9ae93..910d5ab 100644 --- a/include/osmocom/core/logging.h +++ b/include/osmocom/core/logging.h @@ -17,46 +17,6 @@ /*! \brief Maximum number of logging filters */ #define LOG_MAX_FILTERS 8 -#define DEBUG - -#ifdef DEBUG -/*! \brief Log a debug message through the Osmocom logging framework - * \param[in] ss logging subsystem (e.g. \ref DLGLOBAL) - * \param[in] fmt format string - * \param[in] args variable argument list - */ -#define DEBUGP(ss, fmt, args...) \ - do { \ - if (log_check_level(ss, LOGL_DEBUG)) \ - logp(ss, __BASE_FILE__, __LINE__, 0, fmt, ## args); \ - } while(0) - -#define DEBUGPC(ss, fmt, args...) \ - do { \ - if (log_check_level(ss, LOGL_DEBUG)) \ - logp(ss, __BASE_FILE__, __LINE__, 1, fmt, ## args); \ - } while(0) - -#else -#define DEBUGP(xss, fmt, args...) -#define DEBUGPC(ss, fmt, args...) -#endif - - -void osmo_vlogp(int subsys, int level, const char *file, int line, - int cont, const char *format, va_list ap); - -void logp(int subsys, const char *file, int line, int cont, const char *format, ...) __attribute__ ((format (printf, 5, 6))); - -/*! \brief Log a new message through the Osmocom logging framework - * \param[in] ss logging subsystem (e.g. \ref DLGLOBAL) - * \param[in] level logging level (e.g. \ref LOGL_NOTICE) - * \param[in] fmt format string - * \param[in] args variable argument list - */ -#define LOGP(ss, level, fmt, args...) \ - LOGPSRC(ss, level, NULL, 0, fmt, ## args) - /*! \brief Continue a log message through the Osmocom logging framework * \param[in] ss logging subsystem (e.g. \ref DLGLOBAL) * \param[in] level logging level (e.g. \ref LOGL_NOTICE) @@ -68,6 +28,15 @@ if (log_check_level(ss, level)) \ logp2(ss, level, __BASE_FILE__, __LINE__, 1, fmt, ##args); \ } while(0) + +/*! \brief Log a new message through the Osmocom logging framework + * \param[in] ss logging subsystem (e.g. \ref DLGLOBAL) + * \param[in] level logging level (e.g. \ref LOGL_NOTICE) + * \param[in] fmt format string + * \param[in] args variable argument list + */ +#define LOGP(ss, level, fmt, args...) \ + LOGPSRC(ss, level, NULL, 0, fmt, ## args) /*! \brief Log through the Osmocom logging framework with explicit source. * If caller_file is passed as NULL, __BASE_FILE__ and __LINE__ are used @@ -91,6 +60,24 @@ }\ } while(0) +#define DEBUG + +#ifdef DEBUG +/*! \brief Log a debug message through the Osmocom logging framework + * \param[in] ss logging subsystem (e.g. \ref DLGLOBAL) + * \param[in] fmt format string + * \param[in] args variable argument list + */ +#define DEBUGP(ss, fmt, args...) LOGP(ss, LOGL_DEBUG, fmt, ##args) +#define DEBUGPC(ss, fmt, args...) LOGPC(ss, LOGL_DEBUG, fmt, ##args) +#else +#define DEBUGP(xss, fmt, args...) +#define DEBUGPC(ss, fmt, args...) +#endif + +void osmo_vlogp(int subsys, int level, const char *file, int line, + int cont, const char *format, va_list ap); + /*! \brief different log levels */ #define LOGL_DEBUG 1 /*!< \brief debugging information */ #define LOGL_INFO 3 /*!< \brief general information */ diff --git a/src/logging.c b/src/logging.c index b0bca54..e901b8a 100644 --- a/src/logging.c +++ b/src/logging.c @@ -417,22 +417,6 @@ } } -/*! \brief logging function used by DEBUGP() macro - * \param[in] subsys Logging sub-system - * \param[in] file name of source code file - * \param[in] cont continuation (1) or new line (0) - * \param[in] format format string - */ -void logp(int subsys, const char *file, int line, int cont, - const char *format, ...) -{ - va_list ap; - - va_start(ap, format); - osmo_vlogp(subsys, LOGL_DEBUG, file, line, cont, format, ap); - va_end(ap); -} - /*! \brief logging function used by LOGP() macro * \param[in] subsys Logging sub-system * \param[in] level Log level -- To view, visit https://gerrit.osmocom.org/1580 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia6c92bd4824c44fc22cc733ce7a88da86e58ed93 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Jan 12 15:48:10 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 12 Jan 2017 15:48:10 +0000 Subject: [PATCH] libosmocore[master]: Fix compilation warnings Message-ID: Review at https://gerrit.osmocom.org/1581 Fix compilation warnings Fix compile warnings due to missing headers with function declarations. Change-Id: Id524327b3f44e22e3aa44c5e8e4965b084cb326a --- M src/gsm/gsm0411_utils.c M src/gsm/lapd_core.c M tests/oap/oap_test.c 3 files changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/81/1581/1 diff --git a/src/gsm/gsm0411_utils.c b/src/gsm/gsm0411_utils.c index 5d18b12..b84c9f2 100644 --- a/src/gsm/gsm0411_utils.c +++ b/src/gsm/gsm0411_utils.c @@ -33,6 +33,7 @@ #include #include +#include #include #include #include diff --git a/src/gsm/lapd_core.c b/src/gsm/lapd_core.c index cdd9b56..bf5c388 100644 --- a/src/gsm/lapd_core.c +++ b/src/gsm/lapd_core.c @@ -82,6 +82,7 @@ #include #include #include +#include /* TS 04.06 Table 4 / Section 3.8.1 */ #define LAPD_U_SABM 0x7 diff --git a/tests/oap/oap_test.c b/tests/oap/oap_test.c index f7fe0b7..ccf4906 100644 --- a/tests/oap/oap_test.c +++ b/tests/oap/oap_test.c @@ -21,6 +21,7 @@ * */ +#include #include #include #include -- To view, visit https://gerrit.osmocom.org/1581 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id524327b3f44e22e3aa44c5e8e4965b084cb326a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Jan 12 15:50:37 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 12 Jan 2017 15:50:37 +0000 Subject: osmo-pcu[master]: Sanitizer fix for invalid value of egprs_puncturing_values In-Reply-To: References: Message-ID: Patch Set 4: Please have a look at #1579 - it should the build failure. -- To view, visit https://gerrit.osmocom.org/1411 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ice54edc7e4a936eb2f2dd8a243673a30dceef542 Gerrit-PatchSet: 4 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 12 16:00:13 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 12 Jan 2017 16:00:13 +0000 Subject: [PATCH] libosmocore[master]: vty: remove ignored logging parameters Message-ID: Review at https://gerrit.osmocom.org/1582 vty: remove ignored logging parameters Related: OS#71 Change-Id: Ib51987fb2f64a70fca130f3799dc8fd71cc7085c --- M src/vty/logging_vty.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/82/1582/1 diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c index 6004c47..e870e6a 100644 --- a/src/vty/logging_vty.c +++ b/src/vty/logging_vty.c @@ -750,8 +750,8 @@ install_element_ve(&logging_set_category_mask_old_cmd); /* Logging level strings are generated dynamically. */ - logging_level_cmd.string = log_vty_command_string(cat); - logging_level_cmd.doc = log_vty_command_description(cat); + logging_level_cmd.string = log_vty_command_string(NULL); + logging_level_cmd.doc = log_vty_command_description(NULL); install_element_ve(&logging_level_cmd); install_element_ve(&show_logging_vty_cmd); install_element_ve(&show_alarms_cmd); -- To view, visit https://gerrit.osmocom.org/1582 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib51987fb2f64a70fca130f3799dc8fd71cc7085c Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Jan 12 16:13:44 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 12 Jan 2017 16:13:44 +0000 Subject: [PATCH] libosmocore[master]: vty: remove ignored logging parameters In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1582 to look at the new patch set (#2). vty: remove ignored logging parameters Related: OS#71 Change-Id: Ib51987fb2f64a70fca130f3799dc8fd71cc7085c --- M include/osmocom/vty/logging.h M src/vty/logging_vty.c M tests/vty/vty_test.c 3 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/82/1582/2 diff --git a/include/osmocom/vty/logging.h b/include/osmocom/vty/logging.h index 9e4b98f..a23a1ad 100644 --- a/include/osmocom/vty/logging.h +++ b/include/osmocom/vty/logging.h @@ -4,6 +4,6 @@ #define FILTER_STR "Filter log messages\n" struct log_info; -void logging_vty_add_cmds(const struct log_info *cat); +void logging_vty_add_cmds(const struct log_info *unused_info); struct vty; struct log_target *osmo_log_vty2tgt(struct vty *vty); diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c index 6004c47..1c51ec7 100644 --- a/src/vty/logging_vty.c +++ b/src/vty/logging_vty.c @@ -737,7 +737,7 @@ return 1; } -void logging_vty_add_cmds(const struct log_info *cat) +void logging_vty_add_cmds(const struct log_info *unused_info) { install_element_ve(&enable_logging_cmd); install_element_ve(&disable_logging_cmd); @@ -750,8 +750,8 @@ install_element_ve(&logging_set_category_mask_old_cmd); /* Logging level strings are generated dynamically. */ - logging_level_cmd.string = log_vty_command_string(cat); - logging_level_cmd.doc = log_vty_command_description(cat); + logging_level_cmd.string = log_vty_command_string(NULL); + logging_level_cmd.doc = log_vty_command_description(NULL); install_element_ve(&logging_level_cmd); install_element_ve(&show_logging_vty_cmd); install_element_ve(&show_alarms_cmd); diff --git a/tests/vty/vty_test.c b/tests/vty/vty_test.c index 865c93e..51a6529 100644 --- a/tests/vty/vty_test.c +++ b/tests/vty/vty_test.c @@ -318,7 +318,7 @@ vty_init(&vty_info); /* Setup VTY commands */ - logging_vty_add_cmds(&log_info); + logging_vty_add_cmds(NULL); osmo_stats_vty_add_cmds(); test_cmd_string_from_valstr(); -- To view, visit https://gerrit.osmocom.org/1582 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib51987fb2f64a70fca130f3799dc8fd71cc7085c Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Jan 12 18:36:00 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 12 Jan 2017 18:36:00 +0000 Subject: [PATCH] openbsc[master]: vty: remove ignored logging parameters Message-ID: Review at https://gerrit.osmocom.org/1583 vty: remove ignored logging parameters Change-Id: I62f752fd88f1d8fefa563648f9864c7c31f87991 --- M openbsc/include/openbsc/vty.h M openbsc/src/gprs/gb_proxy_main.c M openbsc/src/gprs/gtphub_main.c M openbsc/src/gprs/sgsn_main.c M openbsc/src/libbsc/bsc_vty.c M openbsc/src/osmo-bsc/osmo_bsc_main.c M openbsc/src/osmo-bsc_mgcp/mgcp_main.c M openbsc/src/osmo-bsc_nat/bsc_nat.c M openbsc/src/osmo-bsc_nat/bsc_nat_vty.c M openbsc/src/osmo-nitb/bsc_hack.c 10 files changed, 12 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/83/1583/1 diff --git a/openbsc/include/openbsc/vty.h b/openbsc/include/openbsc/vty.h index ad2cd2a..f79eab5 100644 --- a/openbsc/include/openbsc/vty.h +++ b/openbsc/include/openbsc/vty.h @@ -44,7 +44,7 @@ extern void bsc_replace_string(void *ctx, char **dst, const char *newstr); struct log_info; -int bsc_vty_init(const struct log_info *cat, struct gsm_network *network); +int bsc_vty_init(struct gsm_network *network); int bsc_vty_init_extra(void); struct gsm_network *gsmnet_from_vty(struct vty *vty); diff --git a/openbsc/src/gprs/gb_proxy_main.c b/openbsc/src/gprs/gb_proxy_main.c index 04875c7..69a93b6 100644 --- a/openbsc/src/gprs/gb_proxy_main.c +++ b/openbsc/src/gprs/gb_proxy_main.c @@ -241,7 +241,7 @@ vty_info.copyright = openbsc_copyright; vty_init(&vty_info); - logging_vty_add_cmds(&gprs_log_info); + logging_vty_add_cmds(NULL); osmo_stats_vty_add_cmds(&gprs_log_info); gbproxy_vty_init(); diff --git a/openbsc/src/gprs/gtphub_main.c b/openbsc/src/gprs/gtphub_main.c index 46360f9..73a122c 100644 --- a/openbsc/src/gprs/gtphub_main.c +++ b/openbsc/src/gprs/gtphub_main.c @@ -311,7 +311,7 @@ vty_info.copyright = gtphub_copyright; vty_init(&vty_info); - logging_vty_add_cmds(>phub_log_info); + logging_vty_add_cmds(NULL); gtphub_vty_init(hub, cfg); rate_ctr_init(osmo_gtphub_ctx); diff --git a/openbsc/src/gprs/sgsn_main.c b/openbsc/src/gprs/sgsn_main.c index b4be631..af5cced 100644 --- a/openbsc/src/gprs/sgsn_main.c +++ b/openbsc/src/gprs/sgsn_main.c @@ -340,7 +340,7 @@ vty_info.copyright = openbsc_copyright; vty_init(&vty_info); - logging_vty_add_cmds(&gprs_log_info); + logging_vty_add_cmds(NULL); osmo_stats_vty_add_cmds(&gprs_log_info); sgsn_vty_init(); ctrl_vty_init(tall_bsc_ctx); diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c index 01ee4df..81fec8e 100644 --- a/openbsc/src/libbsc/bsc_vty.c +++ b/openbsc/src/libbsc/bsc_vty.c @@ -3830,7 +3830,7 @@ extern int bsc_vty_init_extra(void); -int bsc_vty_init(const struct log_info *cat, struct gsm_network *network) +int bsc_vty_init(struct gsm_network *network) { cfg_ts_pchan_cmd.string = vty_cmd_string_from_valstr(tall_bsc_ctx, @@ -3866,7 +3866,7 @@ install_element_ve(&show_paging_cmd); install_element_ve(&show_paging_group_cmd); - logging_vty_add_cmds(cat); + logging_vty_add_cmds(NULL); osmo_stats_vty_add_cmds(); install_element(GSMNET_NODE, &cfg_net_neci_cmd); diff --git a/openbsc/src/osmo-bsc/osmo_bsc_main.c b/openbsc/src/osmo-bsc/osmo_bsc_main.c index 1d96bb4..adce775 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_main.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_main.c @@ -212,7 +212,7 @@ /* This needs to precede handle_options() */ vty_info.copyright = openbsc_copyright; vty_init(&vty_info); - bsc_vty_init(&log_info, bsc_gsmnet); + bsc_vty_init(bsc_gsmnet); bsc_msg_lst_vty_init(tall_bsc_ctx, &access_lists, BSC_NODE); ctrl_vty_init(tall_bsc_ctx); diff --git a/openbsc/src/osmo-bsc_mgcp/mgcp_main.c b/openbsc/src/osmo-bsc_mgcp/mgcp_main.c index 964768e..4ea0700 100644 --- a/openbsc/src/osmo-bsc_mgcp/mgcp_main.c +++ b/openbsc/src/osmo-bsc_mgcp/mgcp_main.c @@ -220,7 +220,7 @@ vty_info.copyright = openbsc_copyright; vty_init(&vty_info); - logging_vty_add_cmds(&log_info); + logging_vty_add_cmds(NULL); osmo_stats_vty_add_cmds(&log_info); mgcp_vty_init(); diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat.c b/openbsc/src/osmo-bsc_nat/bsc_nat.c index a4dd679..80e89fd 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c @@ -1616,7 +1616,7 @@ vty_info.copyright = openbsc_copyright; vty_init(&vty_info); - logging_vty_add_cmds(&log_info); + logging_vty_add_cmds(NULL); osmo_stats_vty_add_cmds(&log_info); bsc_nat_vty_init(nat); ctrl_vty_init(tall_bsc_ctx); diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c b/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c index 706e507..deb98fc 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c @@ -1329,8 +1329,8 @@ /* called by the telnet interface... we have our own init above */ -int bsc_vty_init(const struct log_info *cat, struct gsm_network *network) +int bsc_vty_init(struct gsm_network *network) { - logging_vty_add_cmds(cat); + logging_vty_add_cmds(NULL); return 0; } diff --git a/openbsc/src/osmo-nitb/bsc_hack.c b/openbsc/src/osmo-nitb/bsc_hack.c index bbcdd1b..2bdfada 100644 --- a/openbsc/src/osmo-nitb/bsc_hack.c +++ b/openbsc/src/osmo-nitb/bsc_hack.c @@ -283,7 +283,7 @@ } /* Initialize VTY */ - bsc_vty_init(&log_info, bsc_gsmnet); + bsc_vty_init(bsc_gsmnet); ctrl_vty_init(tall_bsc_ctx); #ifdef BUILD_SMPP -- To view, visit https://gerrit.osmocom.org/1583 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I62f752fd88f1d8fefa563648f9864c7c31f87991 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Jan 12 20:44:41 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 12 Jan 2017 20:44:41 +0000 Subject: [PATCH] libosmocore[master]: utils/conv_gen.py: improve application flexibility Message-ID: Review at https://gerrit.osmocom.org/1584 utils/conv_gen.py: improve application flexibility This change makes the conv_gen application more interactive and flexible, allowing to generate not only code definitions but also the test vectors and header files in the future. Moreover, it becomes possible to select exact code family, such as GSM, GMR etc. Change-Id: I0b476b00234c17f78b41d695cf3bfd13edb64c28 --- M src/gsm/Makefile.am M utils/conv_gen.py 2 files changed, 34 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/84/1584/1 diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am index 4ec441f..653bdb9 100644 --- a/src/gsm/Makefile.am +++ b/src/gsm/Makefile.am @@ -35,6 +35,6 @@ # Convolutional codes generation gsm0503_conv.c: - $(AM_V_GEN)python2 $(top_srcdir)/utils/conv_gen.py + $(AM_V_GEN)python2 $(top_srcdir)/utils/conv_gen.py gen_codes gsm CLEANFILES = gsm0503_conv.c diff --git a/utils/conv_gen.py b/utils/conv_gen.py index 60580ed..57e9ca6 100644 --- a/utils/conv_gen.py +++ b/utils/conv_gen.py @@ -261,6 +261,8 @@ f.write("#include \n") f.write("#include \n\n") + sys.stderr.write("Generating convolutional codes...\n") + # Print shared tables first if hasattr(codes, "shared_polys"): print_shared(f, codes.shared_polys) @@ -279,12 +281,39 @@ code.gen_tables(prefix, f, shared_tables = shared) +def print_help(error = None): + print("Usage: python %s action code_type [path]" % sys.argv[0]) + + print("\nAvailable actions:") + print(" gen_codes - generate convolutional code definitions") + + print("\nAvailable code types:") + print(" gsm - GSM specific codes") + + if error is not None: + print("\n%s" % error) + if __name__ == '__main__': - path = sys.argv[1] if len(sys.argv) > 1 else os.getcwd() + if len(sys.argv) < 3: + print_help() + sys.exit(1) - sys.stderr.write("Generating convolutional codes...\n") + action = sys.argv[1] + code_type = sys.argv[2] + path = sys.argv[3] if len(sys.argv) > 3 else os.getcwd() - # Generate GSM specific codes - generate_codes(conv_codes_gsm, path, "gsm0503") + # Determine convolutional code type + if code_type == "gsm": + codes = conv_codes_gsm + else: + print_help("Error: Unknown code type!") + sys.exit(1) + + # What to generate? + if action == "gen_codes": + generate_codes(codes, path, "gsm0503") + else: + print_help("Error: Unknown action!") + sys.exit(1) sys.stderr.write("Generation complete.\n") -- To view, visit https://gerrit.osmocom.org/1584 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0b476b00234c17f78b41d695cf3bfd13edb64c28 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Thu Jan 12 20:44:43 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 12 Jan 2017 20:44:43 +0000 Subject: [PATCH] libosmocore[master]: utils/conv_gen.py: add test vector generation feature Message-ID: Review at https://gerrit.osmocom.org/1585 utils/conv_gen.py: add test vector generation feature Change-Id: Ie10c47ee952f253b1ba77ecf6e79f2c033545bc1 --- M utils/conv_gen.py 1 file changed, 81 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/85/1585/1 diff --git a/utils/conv_gen.py b/utils/conv_gen.py index 57e9ca6..34e164a 100644 --- a/utils/conv_gen.py +++ b/utils/conv_gen.py @@ -30,13 +30,16 @@ class ConvolutionalCode(object): def __init__(self, block_len, polys, name, - description = None, puncture = [], term_type = None): + description = None, puncture = [], term_type = None, + vec_in = None, vec_out = None): # Save simple params self.block_len = block_len self.k = 1 self.puncture = puncture self.rate_inv = len(polys) self.term_type = term_type + self.vec_in = vec_in + self.vec_out = vec_out # Infos self.name = name @@ -226,6 +229,44 @@ fi.write("\t.puncture = %s_puncture,\n" % self.name) fi.write("};\n\n") + def calc_out_len(self): + out_len = self.block_len * self.rate_inv + + # By default CONV_TERM_FLUSH + if self.term_type is None: + out_len += self.rate_inv * (self.k - 1) + + if len(self.puncture): + out_len -= len(self.puncture) - 1 + + return out_len + + def gen_test_vector(self, fi, prefix): + code_name = "%s_%s" % (prefix, self.name) + + fi.write("\t{\n") + fi.write("\t\t.name = \"%s\",\n" % code_name) + fi.write("\t\t.code = &%s,\n" % code_name) + + fi.write("\t\t.in_len = %d,\n" % self.block_len) + fi.write("\t\t.out_len = %d,\n" % self.calc_out_len()) + + # Print pre computed vectors if preset + if self.vec_in is not None and self.vec_out is not None: + fi.write("\t\t.has_vec = 1,\n") + fi.write("\t\t.vec_in = {\n") + print_formatted(self.vec_in, "0x%02x, ", 8, fi, indent = "\t\t\t") + fi.write("\t\t},\n") + fi.write("\t\t.vec_out = {\n") + print_formatted(self.vec_out, "0x%02x, ", 8, fi, indent = "\t\t\t") + fi.write("\t\t},\n") + else: + fi.write("\t\t.has_vec = 0,\n") + fi.write("\t\t.vec_in = { },\n") + fi.write("\t\t.vec_out = { },\n") + + fi.write("\t},\n") + poly = lambda *args: sum([(1 << x) for x in args]) def combine(src, sel, nb): @@ -233,15 +274,15 @@ fn_xor = lambda x, y: x ^ y return reduce(fn_xor, [(x >> n) & 1 for n in range(nb)]) -def print_formatted(items, format, count, fi): +def print_formatted(items, format, count, fi, indent = "\t"): counter = 0 # Print initial indent - fi.write("\t") + fi.write(indent) for item in items: if counter > 0 and counter % count == 0: - fi.write("\n\t") + fi.write("\n" + indent) fi.write(format % item) counter += 1 @@ -281,11 +322,37 @@ code.gen_tables(prefix, f, shared_tables = shared) +def generate_vectors(codes, path, prefix, inc = None): + # Open a new file for writing + f = open(os.path.join(path, prefix + "_vectors.c"), 'w') + f.write(mod_license + "\n") + f.write("#include \n") + if inc is not None: + for item in inc: + f.write("%s\n" % item) + f.write("\n") + + sys.stderr.write("Generating test vectors...\n") + + vec_count = len(codes.conv_codes) + f.write("int %s_vectors_count = %d;\n\n" + % (prefix, vec_count)) + f.write("const struct conv_test_vector %s_vectors[%d] = {\n" + % (prefix, vec_count)) + + # Generate the vectors one by one + for code in codes.conv_codes: + sys.stderr.write("Generate '%s' test vector\n" % code.name) + code.gen_test_vector(f, prefix) + + f.write("};\n") + def print_help(error = None): print("Usage: python %s action code_type [path]" % sys.argv[0]) print("\nAvailable actions:") - print(" gen_codes - generate convolutional code definitions") + print(" gen_codes - generate convolutional code definitions") + print(" gen_vectors - generate test vectors") print("\nAvailable code types:") print(" gsm - GSM specific codes") @@ -302,9 +369,16 @@ code_type = sys.argv[2] path = sys.argv[3] if len(sys.argv) > 3 else os.getcwd() + # Code family specific includes + inc = None + # Determine convolutional code type if code_type == "gsm": codes = conv_codes_gsm + inc = [ + "#include ", + "#include \"conv_test.h\"" + ] else: print_help("Error: Unknown code type!") sys.exit(1) @@ -312,6 +386,8 @@ # What to generate? if action == "gen_codes": generate_codes(codes, path, "gsm0503") + elif action == "gen_vectors": + generate_vectors(codes, path, "gsm0503", inc) else: print_help("Error: Unknown action!") sys.exit(1) -- To view, visit https://gerrit.osmocom.org/1585 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie10c47ee952f253b1ba77ecf6e79f2c033545bc1 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Thu Jan 12 21:34:46 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 12 Jan 2017 21:34:46 +0000 Subject: [PATCH] libosmocore[master]: gprs_ns_vty: guard against duplicate VTY elements Message-ID: Review at https://gerrit.osmocom.org/1586 gprs_ns_vty: guard against duplicate VTY elements The TbfTest in osmo-pcu calls gprs_ns_vty_init() repeatedly, which aborts because of duplicate VTY elements. Fix this by skipping the VTY init if it already happened. Change-Id: I05c7f25a4e873ae76b206819180b8b043b60103e --- M src/gb/gprs_ns_vty.c 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/86/1586/1 diff --git a/src/gb/gprs_ns_vty.c b/src/gb/gprs_ns_vty.c index 5a951dc..ee305ba 100644 --- a/src/gb/gprs_ns_vty.c +++ b/src/gb/gprs_ns_vty.c @@ -573,8 +573,16 @@ int gprs_ns_vty_init(struct gprs_ns_inst *nsi) { + static bool vty_elements_installed = false; + vty_nsi = nsi; + /* Regression test code may call this function repeatedly, so make sure + * that VTY elements are not duplicated, which would assert. */ + if (vty_elements_installed) + return 0; + vty_elements_installed = true; + install_element_ve(&show_ns_cmd); install_element_ve(&show_ns_stats_cmd); install_element_ve(&show_nse_cmd); -- To view, visit https://gerrit.osmocom.org/1586 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I05c7f25a4e873ae76b206819180b8b043b60103e Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Jan 12 21:41:27 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 12 Jan 2017 21:41:27 +0000 Subject: osmo-pcu[master]: Fix segfault in tbf test In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (1 comment) This is *not* about a segfault. It's about an assertion and abort() (SIGABRT is not SIGSEGV). Nice, by this patch I understand where the problem is, but... I find that the API added by this patch is bad, and I'd rather solve the issue like this: https://gerrit.osmocom.org/1586 Nicest would be if the test case itself could either remove the VTY elements to get a clean start for each individual test run, or maybe split TbfTest into several separate binaries to achieve the same. But the least effort is #1586, which has no footprint in production API and no adverse effects. Do you agree? https://gerrit.osmocom.org/#/c/1579/1/src/gprs_bssgp_pcu.cpp File src/gprs_bssgp_pcu.cpp: Line 849: gprs_ns_vty_init(bssgp_nsi); problem: this omits the step where the vty_nsi pointer is set to point at bssgp_nsi. The bool init_vty arg thus makes no sense except for a (clumsy) test case setup. -- To view, visit https://gerrit.osmocom.org/1579 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I975cee6b2b21e1e83649f2ce23203568f225bd7a Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Jan 12 21:42:42 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 12 Jan 2017 21:42:42 +0000 Subject: libosmocore[master]: gprs_ns_vty: guard against duplicate VTY elements In-Reply-To: References: Message-ID: Patch Set 1: NOTE: this is an alternative fix for https://gerrit.osmocom.org/1579 -- do not submit both, only one of these two should be merged. -- To view, visit https://gerrit.osmocom.org/1586 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I05c7f25a4e873ae76b206819180b8b043b60103e Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 12 21:59:03 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 12 Jan 2017 21:59:03 +0000 Subject: libosmocore[master]: logging: remove code duplication In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (2 comments) nice, it seems DEBUGP so far didn't take advantage of early exiting to prevent performance loss when debug level is not enabled? Excellent catch! two minor details... https://gerrit.osmocom.org/#/c/1580/1/include/osmocom/core/logging.h File include/osmocom/core/logging.h: Line 39: LOGPSRC(ss, level, NULL, 0, fmt, ## args) why move this around? IMHO its place above LOGPC makes more sense than below. https://gerrit.osmocom.org/#/c/1580/1/src/logging.c File src/logging.c: Line 434 We should probably keep this implementation around for backwards compat with binary code built with old DEBUGP macros ... until when, the next major release? forever? -- To view, visit https://gerrit.osmocom.org/1580 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia6c92bd4824c44fc22cc733ce7a88da86e58ed93 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Jan 12 22:04:59 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 12 Jan 2017 22:04:59 +0000 Subject: [PATCH] libosmocore[master]: Fix compilation warnings: missing includes: gsm0411_utils.c, ... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1581 to look at the new patch set (#2). Fix compilation warnings: missing includes: gsm0411_utils.c, lapd_core.c, oap_test.c Change-Id: Id524327b3f44e22e3aa44c5e8e4965b084cb326a --- M src/gsm/gsm0411_utils.c M src/gsm/lapd_core.c M tests/oap/oap_test.c 3 files changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/81/1581/2 diff --git a/src/gsm/gsm0411_utils.c b/src/gsm/gsm0411_utils.c index 5d18b12..b84c9f2 100644 --- a/src/gsm/gsm0411_utils.c +++ b/src/gsm/gsm0411_utils.c @@ -33,6 +33,7 @@ #include #include +#include #include #include #include diff --git a/src/gsm/lapd_core.c b/src/gsm/lapd_core.c index cdd9b56..bf5c388 100644 --- a/src/gsm/lapd_core.c +++ b/src/gsm/lapd_core.c @@ -82,6 +82,7 @@ #include #include #include +#include /* TS 04.06 Table 4 / Section 3.8.1 */ #define LAPD_U_SABM 0x7 diff --git a/tests/oap/oap_test.c b/tests/oap/oap_test.c index f7fe0b7..ccf4906 100644 --- a/tests/oap/oap_test.c +++ b/tests/oap/oap_test.c @@ -21,6 +21,7 @@ * */ +#include #include #include #include -- To view, visit https://gerrit.osmocom.org/1581 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id524327b3f44e22e3aa44c5e8e4965b084cb326a Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Jan 12 22:05:03 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 12 Jan 2017 22:05:03 +0000 Subject: libosmocore[master]: Fix compilation warnings: missing includes: gsm0411_utils.c, ... In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1581 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id524327b3f44e22e3aa44c5e8e4965b084cb326a Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 12 22:11:16 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 12 Jan 2017 22:11:16 +0000 Subject: openbsc[master]: vty: remove ignored logging parameters In-Reply-To: References: Message-ID: Patch Set 1: IMHO commit log lacks critical info why this is unused: log_vty_command_*() no longer use their argument. Thus logging_vty_add_cmds() doesn't either. Maybe also add API doc to mention unused parameter to logging_vty_add_cmds()? Maybe remove the parameter altogether? -- To view, visit https://gerrit.osmocom.org/1583 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I62f752fd88f1d8fefa563648f9864c7c31f87991 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 12 22:27:11 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 12 Jan 2017 22:27:11 +0000 Subject: osmo-pcu[master]: Sanitizer fix for invalid value of egprs_puncturing_values In-Reply-To: References: Message-ID: Patch Set 4: Code-Review-2 (2 comments) we're not making any progress here. It would be less work for me to fix it myself than reiterating the same reviews on half-baked efforts. Would you please for once verify the code that you're writing. Observe the results of this trivial test program that shows what happens with your choice of initialization for two enum values: #include #include enum myvals { FOO, BAR, BAZ }; int main(void) { enum myvals vals[2]; memset(vals, BAR, sizeof(vals)); printf("sizeof: %zu\n", sizeof(vals)); printf("0: %d\n", vals[0]); printf("1: %d\n", vals[1]); return 0; } https://gerrit.osmocom.org/#/c/1411/4/src/tbf_dl.cpp File src/tbf_dl.cpp: Line 636: memset(punct, EGPRS_PS_INVALID, sizeof(punct)); memset is useful only for values of 8 bit size. enum egprs_puncturing_values is possibly an int and this will not work. Line 771: rlc.cps = gprs_rlc_mcs_cps(cs, punct[0], punct[1], need_padding); I don't see how this relates to my comments at all. Would you explain please? -- To view, visit https://gerrit.osmocom.org/1411 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ice54edc7e4a936eb2f2dd8a243673a30dceef542 Gerrit-PatchSet: 4 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Jan 12 22:32:28 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 12 Jan 2017 22:32:28 +0000 Subject: libosmocore[master]: CTRL: add write-only helpers In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 (2 comments) I see that it's copying from _RO, but couldn't resist to comment... https://gerrit.osmocom.org/#/c/1574/2/include/osmocom/ctrl/control_cmd.h File include/osmocom/ctrl/control_cmd.h: Line 192: static int get_##cmdname(struct ctrl_cmd *cmd, void *data) \ backslashes don't line up Line 194: cmd->reply = "Write Only attribute"; \ could be nice to add the #cmdstr in the reply message? -- To view, visit https://gerrit.osmocom.org/1574 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I66b7990db590c1f8e56326e392e6c1d2eafebd9a Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Jan 12 23:12:51 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 12 Jan 2017 23:12:51 +0000 Subject: [PATCH] libosmocore[master]: stats_test: fix mismatching osmo_stats_reporter->send_item s... Message-ID: Review at https://gerrit.osmocom.org/1587 stats_test: fix mismatching osmo_stats_reporter->send_item signature The function pointer expects the last arg as int64_t, stats_test.c uses an int instead. Fix the argument type as well as the printf format for it. Fixes this compiler warning seen on our FreeBSD build slave: CC stats/stats_test.o ../../tests/stats/stats_test.c:288:18: warning: incompatible pointer types assigning to 'int (*)(struct osmo_stats_reporter *, const struct osmo_stat_item_group *, const struct osmo_stat_item_desc *, int64_t)' from 'int (struct osmo_stats_reporter *, const struct osmo_stat_item_group *, const struct osmo_stat_item_desc *, int)' [-Wincompatible-pointer-types] srep->send_item = stats_reporter_test_send_item; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. Change-Id: I91cbfd4dd25a881b803943430101dabf07dafc7c --- M tests/stats/stats_test.c 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/87/1587/1 diff --git a/tests/stats/stats_test.c b/tests/stats/stats_test.c index 75ddf18..0234460 100644 --- a/tests/stats/stats_test.c +++ b/tests/stats/stats_test.c @@ -27,6 +27,7 @@ #include #include +#include enum test_ctr { TEST_A_CTR, @@ -251,9 +252,9 @@ static int stats_reporter_test_send_item(struct osmo_stats_reporter *srep, const struct osmo_stat_item_group *statg, - const struct osmo_stat_item_desc *desc, int value) + const struct osmo_stat_item_desc *desc, int64_t value) { - printf(" %s: item p=%s g=%s i=%u n=%s v=%d u=%s\n", + printf(" %s: item p=%s g=%s i=%u n=%s v=%"PRId64" u=%s\n", srep->name, srep->name_prefix ? srep->name_prefix : "", statg->desc->group_name_prefix, statg->idx, -- To view, visit https://gerrit.osmocom.org/1587 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I91cbfd4dd25a881b803943430101dabf07dafc7c Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Jan 12 23:32:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 12 Jan 2017 23:32:12 +0000 Subject: openbsc[master]: Turn some warnings into errors In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1368 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ied9c950dafa65f324cf31298b13b590f56139700 Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 12 23:32:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 12 Jan 2017 23:32:15 +0000 Subject: [MERGED] openbsc[master]: Turn some warnings into errors In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Turn some warnings into errors ...................................................................... Turn some warnings into errors Make warnings (when available) related to common memory-related issues into errors to harden the source and decrease chance of errors. Change-Id: Ied9c950dafa65f324cf31298b13b590f56139700 --- M debian/control M openbsc/configure.ac 2 files changed, 9 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/control b/debian/control index 79f18df..d9432e2 100644 --- a/debian/control +++ b/debian/control @@ -4,6 +4,7 @@ Priority: optional Build-Depends: debhelper (>= 9), autotools-dev, + autoconf-archive, pkg-config, libgtp0-dev, libosmocore-dev, diff --git a/openbsc/configure.ac b/openbsc/configure.ac index 0753834..9fd7325 100644 --- a/openbsc/configure.ac +++ b/openbsc/configure.ac @@ -140,6 +140,14 @@ CFLAGS="$saved_CFLAGS" AC_SUBST(SYMBOL_VISIBILITY) +# FIXME: use CC_CHECK_CFLAG_APPEND([-Werror=implicit]) +AX_CHECK_COMPILE_FLAG([-Werror=implicit], [CFLAGS="$CFLAGS -Werror=implicit"]) +AX_CHECK_COMPILE_FLAG([-Werror=maybe-uninitialized], [CFLAGS="$CFLAGS -Werror=maybe-uninitialized"]) +AX_CHECK_COMPILE_FLAG([-Werror=memset-transposed-args], [CFLAGS="$CFLAGS -Werror=memset-transposed-args"]) +AX_CHECK_COMPILE_FLAG([-Werror=null-dereference], [CFLAGS="$CFLAGS -Werror=null-dereference"]) +AX_CHECK_COMPILE_FLAG([-Werror=sizeof-array-argument], [CFLAGS="$CFLAGS -Werror=sizeof-array-argument"]) +AX_CHECK_COMPILE_FLAG([-Werror=sizeof-pointer-memaccess], [CFLAGS="$CFLAGS -Werror=sizeof-pointer-memaccess"]) + # Coverage build taken from WebKit's configure.in AC_MSG_CHECKING([whether to enable code coverage support]) AC_ARG_ENABLE(coverage, -- To view, visit https://gerrit.osmocom.org/1368 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ied9c950dafa65f324cf31298b13b590f56139700 Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Jan 12 23:34:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 12 Jan 2017 23:34:03 +0000 Subject: libosmocore[master]: gprs_ns_vty: guard against duplicate VTY elements In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1586 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I05c7f25a4e873ae76b206819180b8b043b60103e Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 12 23:34:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 12 Jan 2017 23:34:05 +0000 Subject: [MERGED] libosmocore[master]: gprs_ns_vty: guard against duplicate VTY elements In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gprs_ns_vty: guard against duplicate VTY elements ...................................................................... gprs_ns_vty: guard against duplicate VTY elements The TbfTest in osmo-pcu calls gprs_ns_vty_init() repeatedly, which aborts because of duplicate VTY elements. Fix this by skipping the VTY init if it already happened. Change-Id: I05c7f25a4e873ae76b206819180b8b043b60103e --- M src/gb/gprs_ns_vty.c 1 file changed, 8 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gb/gprs_ns_vty.c b/src/gb/gprs_ns_vty.c index 5a951dc..ee305ba 100644 --- a/src/gb/gprs_ns_vty.c +++ b/src/gb/gprs_ns_vty.c @@ -573,8 +573,16 @@ int gprs_ns_vty_init(struct gprs_ns_inst *nsi) { + static bool vty_elements_installed = false; + vty_nsi = nsi; + /* Regression test code may call this function repeatedly, so make sure + * that VTY elements are not duplicated, which would assert. */ + if (vty_elements_installed) + return 0; + vty_elements_installed = true; + install_element_ve(&show_ns_cmd); install_element_ve(&show_ns_stats_cmd); install_element_ve(&show_nse_cmd); -- To view, visit https://gerrit.osmocom.org/1586 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I05c7f25a4e873ae76b206819180b8b043b60103e Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Jan 12 23:35:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 12 Jan 2017 23:35:29 +0000 Subject: osmo-pcu[master]: Fix segfault in tbf test In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-2 I agree with neels that this is not the way to solve this. Whether or not we want to be safe against multiple *_init() calls in our libraries is a policy decision. There are arguments both ways. However, we should make it consistent, i.e. as we now accept multiple *_init() calls for the GPRS NS, we should audit the code and ensure the same works for other *_init() functions. -- To view, visit https://gerrit.osmocom.org/1579 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I975cee6b2b21e1e83649f2ce23203568f225bd7a Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 12 23:36:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 12 Jan 2017 23:36:03 +0000 Subject: osmo-bts[master]: l1sap: Fix expired rach slot counting In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1573 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I87f40f5f160a4f6750c4f3d06997fc4f24049303 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 12 23:36:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 12 Jan 2017 23:36:04 +0000 Subject: [MERGED] osmo-bts[master]: l1sap: Fix expired rach slot counting In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: l1sap: Fix expired rach slot counting ...................................................................... l1sap: Fix expired rach slot counting The counting of the expired rach slots in l1sap.c is not correctly implemented. This commit fixes the implementation. The expired rach slots are now conted correctly according to the configured channel combination. If a CCCH and SDCCH are combined, only the frames related to rach slots are counted. Change-Id: I87f40f5f160a4f6750c4f3d06997fc4f24049303 --- M src/common/l1sap.c 1 file changed, 56 insertions(+), 16 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 968237f..0ce1e4a 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -352,17 +352,66 @@ return 0; } +/* Calculate the number of RACH slots that expire in a certain GSM frame + * See also 3GPP TS 05.02 Clause 7 Table 5 of 9 */ +static unsigned int calc_exprd_rach_frames(struct gsm_bts *bts, uint32_t fn) +{ + int rach_frames_expired = 0; + uint8_t ccch_conf; + struct gsm48_system_information_type_3 *si3; + unsigned int blockno; + + si3 = GSM_BTS_SI(bts, SYSINFO_TYPE_3); + ccch_conf = si3->control_channel_desc.ccch_conf; + + if (ccch_conf == RSL_BCCH_CCCH_CONF_1_C) { + /* It is possible to combine a CCCH with an SDCCH4, in this + * case the CCCH will have to share the available frames with + * the other channel, this results in a limited number of + * available rach slots */ + blockno = fn % 51; + if (blockno == 4 || blockno == 5 + || (blockno >= 15 && blockno <= 36) || blockno == 45 + || blockno == 46) + rach_frames_expired = 1; + } else { + /* It is possible to have multiple CCCH channels on + * different physical channels (large cells), this + * also multiplies the available/expired RACH channels. + * See also TS 04.08, Chapter 10.5.2.11, table 10.29 */ + if (ccch_conf == RSL_BCCH_CCCH_CONF_2_NC) + rach_frames_expired = 2; + if (ccch_conf == RSL_BCCH_CCCH_CONF_3_NC) + rach_frames_expired = 3; + if (ccch_conf == RSL_BCCH_CCCH_CONF_4_NC) + rach_frames_expired = 4; + else + rach_frames_expired = 1; + } + + /* Each Frame has room for 4 RACH slots, since RACH + * slots are short enough to fit into a single radio + * burst, so we need to multiply the final result by 4 */ + return rach_frames_expired * 4; +} + /* time information received from bts model */ static int l1sap_info_time_ind(struct gsm_bts *bts, - struct osmo_phsap_prim *l1sap, - struct info_time_ind_param *info_time_ind) + struct osmo_phsap_prim *l1sap, + struct info_time_ind_param *info_time_ind) { struct gsm_bts_trx *trx; struct gsm_bts_role_bts *btsb = bts->role; - - int frames_expired = info_time_ind->fn - btsb->gsm_time.fn; + int frames_expired; DEBUGP(DL1P, "MPH_INFO time ind %u\n", info_time_ind->fn); + + /* Calculate and check frame difference */ + frames_expired = info_time_ind->fn - btsb->gsm_time.fn; + if (frames_expired > 1) { + LOGP(DL1P, LOGL_ERROR, + "Invalid condition detected: Frame difference is > 1!\n"); + } /* Update our data structures with the current GSM time */ gsm_fn2gsmtime(&btsb->gsm_time, info_time_ind->fn); @@ -373,24 +422,15 @@ /* check if the measurement period of some lchan has ended * and pre-compute the respective measurement */ llist_for_each_entry(trx, &bts->trx_list, list) - trx_meas_check_compute(trx, info_time_ind->fn - 1); + trx_meas_check_compute(trx, info_time_ind->fn - 1); /* increment number of RACH slots that have passed by since the * last time indication */ - if (trx == bts->c0) { - unsigned int num_rach_per_frame; - /* 27 / 51 taken from TS 05.01 Figure 3 */ - if (bts->c0->ts[0].pchan == GSM_PCHAN_CCCH_SDCCH4) - num_rach_per_frame = 27; - else - num_rach_per_frame = 51; - - btsb->load.rach.total += frames_expired * num_rach_per_frame; - } + btsb->load.rach.total += + calc_exprd_rach_frames(bts, info_time_ind->fn) * frames_expired; return 0; } - /* measurement information received from bts model */ static int l1sap_info_meas_ind(struct gsm_bts_trx *trx, struct osmo_phsap_prim *l1sap, -- To view, visit https://gerrit.osmocom.org/1573 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I87f40f5f160a4f6750c4f3d06997fc4f24049303 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Jan 13 02:15:23 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 13 Jan 2017 02:15:23 +0000 Subject: [PATCH] openbsc[master]: add strncpy0.h for safe/convenient strncpy() wrappers Message-ID: Review at https://gerrit.osmocom.org/1588 add strncpy0.h for safe/convenient strncpy() wrappers strncpy() is easily invoked in an unsafe way: strncpy(dest, src, sizeof(dest)); A safe way that ensures the terminating NUL: strncpy(dest, src, sizeof(dest) - 1); dest[sizeof(dest) - 1] = '\0'; A variant would be inst = talloc_zero(...); strncpy(inst->dest, src, sizeof(inst->dest) - 1); /* last byte is already zero */ One could argue that zero initialization is different from '\0' -- merely a theoretical difference. Provide strncpy0() as a safe wrapper for strncpy(), and provide a convenience macro strncpy0s() to also imply the sizeof(dest). Consistent use of these ensures that strncpy() is always invoked safely. Change-Id: I505d58a02fe46d492087a3dcbff59e287521d5ad --- M openbsc/include/openbsc/Makefile.am A openbsc/include/openbsc/strncpy0.h 2 files changed, 35 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/88/1588/1 diff --git a/openbsc/include/openbsc/Makefile.am b/openbsc/include/openbsc/Makefile.am index 2466ce8..e83b40e 100644 --- a/openbsc/include/openbsc/Makefile.am +++ b/openbsc/include/openbsc/Makefile.am @@ -74,6 +74,7 @@ smpp.h \ sms_queue.h \ socket.h \ + strncpy0.h \ system_information.h \ token_auth.h \ transaction.h \ diff --git a/openbsc/include/openbsc/strncpy0.h b/openbsc/include/openbsc/strncpy0.h new file mode 100644 index 0000000..4f4ab15 --- /dev/null +++ b/openbsc/include/openbsc/strncpy0.h @@ -0,0 +1,34 @@ +/* Safety wrapper around strncpy() to ensure a terminating NUL byte. */ + +/* (C) 2016 by sysmocom s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Neels Hofmeyr + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero 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 Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include + +#define strncpy0s(dest, src) \ + strncpy0(dest, src, sizeof(dest)) + +static inline char *strncpy0(char *dest, const char *src, size_t n) +{ + char *res = strncpy(dest, src, n - 1); + dest[n - 1] = '\0'; + return res; +} -- To view, visit https://gerrit.osmocom.org/1588 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I505d58a02fe46d492087a3dcbff59e287521d5ad Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 13 02:15:24 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 13 Jan 2017 02:15:24 +0000 Subject: [PATCH] openbsc[master]: fix strncpy() invocation in vty_interface_layer3.c and 3 tests Message-ID: Review at https://gerrit.osmocom.org/1589 fix strncpy() invocation in vty_interface_layer3.c and 3 tests Use strncpy0s() to fix unsafe invocation of strncpy(), which potentially leaves the result unterminated. Change-Id: I1a119b1760a3e3262538b4b012d476fdce505482 --- M openbsc/src/libcommon/gsup_test_client.c M openbsc/src/libmsc/vty_interface_layer3.c M openbsc/tests/mgcp/mgcp_test.c M openbsc/tests/sgsn/sgsn_test.c 4 files changed, 10 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/89/1589/1 diff --git a/openbsc/src/libcommon/gsup_test_client.c b/openbsc/src/libcommon/gsup_test_client.c index 1889c6f..6af5fef 100644 --- a/openbsc/src/libcommon/gsup_test_client.c +++ b/openbsc/src/libcommon/gsup_test_client.c @@ -11,6 +11,7 @@ #include #include +#include static struct gsup_client *g_gc; @@ -108,7 +109,7 @@ struct osmo_gsup_message gsup = {0}; struct msgb *msg = msgb_alloc_headroom(1200, 200, __func__); - strncpy(gsup.imsi, io->imsi, sizeof(gsup.imsi)); + strncpy0s(gsup.imsi, io->imsi); gsup.message_type = OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST; osmo_gsup_encode(msg, &gsup); @@ -123,7 +124,7 @@ struct osmo_gsup_message gsup = {0}; struct msgb *msg = msgb_alloc_headroom(1200, 200, __func__); - strncpy(gsup.imsi, io->imsi, sizeof(gsup.imsi)); + strncpy0s(gsup.imsi, io->imsi); gsup.message_type = OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST; osmo_gsup_encode(msg, &gsup); @@ -136,7 +137,7 @@ struct osmo_gsup_message gsup = {0}; struct msgb *msg = msgb_alloc_headroom(1200, 200, __func__); - strncpy(gsup.imsi, io->imsi, sizeof(gsup.imsi)); + strncpy0s(gsup.imsi, io->imsi); gsup.message_type = OSMO_GSUP_MSGT_INSERT_DATA_RESULT; osmo_gsup_encode(msg, &gsup); diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index edece51..a02f70c 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -50,6 +50,7 @@ #include #include #include +#include #include @@ -601,7 +602,7 @@ return CMD_WARNING; } - strncpy(subscr->extension, ext, sizeof(subscr->extension)); + strncpy0s(subscr->extension, ext); db_sync_subscriber(subscr); subscr_put(subscr); diff --git a/openbsc/tests/mgcp/mgcp_test.c b/openbsc/tests/mgcp/mgcp_test.c index e2dc8fa..f278a4e 100644 --- a/openbsc/tests/mgcp/mgcp_test.c +++ b/openbsc/tests/mgcp/mgcp_test.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -54,7 +55,7 @@ char buf[2048]; int counter = 0; - strncpy(buf, strline_test_data, sizeof(buf)); + strncpy0s(buf, strline_test_data); for (line = strline_r(buf, &save); line; line = strline_r(NULL, &save)) { diff --git a/openbsc/tests/sgsn/sgsn_test.c b/openbsc/tests/sgsn/sgsn_test.c index b4bcaf6..a12aaf8 100644 --- a/openbsc/tests/sgsn/sgsn_test.c +++ b/openbsc/tests/sgsn/sgsn_test.c @@ -28,6 +28,7 @@ #include #include #include +#include #include @@ -1292,7 +1293,7 @@ rc = osmo_gsup_decode(msgb_data(msg), msgb_length(msg), &to_peer); OSMO_ASSERT(rc >= 0); OSMO_ASSERT(to_peer.imsi[0] != 0); - strncpy(from_peer.imsi, to_peer.imsi, sizeof(from_peer.imsi)); + strncpy0s(from_peer.imsi, to_peer.imsi); /* This invalidates the pointers in to_peer */ msgb_free(msg); -- To view, visit https://gerrit.osmocom.org/1589 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1a119b1760a3e3262538b4b012d476fdce505482 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 13 02:41:13 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 13 Jan 2017 02:41:13 +0000 Subject: [PATCH] openbsc[master]: gprs subscr: fix: intended strcmp(), but is strcpy() Message-ID: Review at https://gerrit.osmocom.org/1590 gprs subscr: fix: intended strcmp(), but is strcpy() The code checked 'if (strcpy(..) != 0)' which is always true and thus always copied twice -- luckily we want to copy anyway and so this is not an actual functional failure. We could correct to strcmp, but instead of iterating to compare, we might as well copy right away. Change-Id: I0ea035bd478f7022ed65e9e84d8aaf5e423309b7 --- M openbsc/src/gprs/gprs_subscriber.c 1 file changed, 3 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/90/1590/1 diff --git a/openbsc/src/gprs/gprs_subscriber.c b/openbsc/src/gprs/gprs_subscriber.c index 23dbdd4..29e21ce 100644 --- a/openbsc/src/gprs/gprs_subscriber.c +++ b/openbsc/src/gprs/gprs_subscriber.c @@ -778,11 +778,9 @@ subscr->flags &= ~GPRS_SUBSCRIBER_ENABLE_PURGE; } - if (strcpy(subscr->equipment.imei, mmctx->imei) != 0) { - strncpy(subscr->equipment.imei, mmctx->imei, - sizeof(subscr->equipment.imei)-1); - subscr->equipment.imei[sizeof(subscr->equipment.imei)-1] = 0; - } + strncpy(subscr->equipment.imei, mmctx->imei, + sizeof(subscr->equipment.imei)-1); + subscr->equipment.imei[sizeof(subscr->equipment.imei)-1] = 0; if (subscr->lac != mmctx->ra.lac) subscr->lac = mmctx->ra.lac; -- To view, visit https://gerrit.osmocom.org/1590 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0ea035bd478f7022ed65e9e84d8aaf5e423309b7 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 13 02:51:22 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 13 Jan 2017 02:51:22 +0000 Subject: [PATCH] openbsc[master]: Revert "Turn some warnings into errors" Message-ID: Review at https://gerrit.osmocom.org/1591 Revert "Turn some warnings into errors" This introduces a failure with ./configure on my machine: ../configure: line 6612: syntax error near unexpected token `-Werror=implicit,' ../configure: line 6612: `AX_CHECK_COMPILE_FLAG(-Werror=implicit, CFLAGS="$CFLAGS -Werror=implicit")' Makefile:420: recipe for target 'config.status' failed make[1]: *** [config.status] Error 2 Installing autoconf-archive did not fix the error. So even though jenkins seems to accept this, I cannot build with this patch. Let's find out how to do this in a way that all systems can still build and then re-apply this patch. This reverts commit fd161ccce8ecaad3ddd32dd8b696902e81593ae3. Change-Id: I2b368500b07f233882ef854eca1fa21f6df39e29 --- M debian/control M openbsc/configure.ac 2 files changed, 0 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/91/1591/1 diff --git a/debian/control b/debian/control index d9432e2..79f18df 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,6 @@ Priority: optional Build-Depends: debhelper (>= 9), autotools-dev, - autoconf-archive, pkg-config, libgtp0-dev, libosmocore-dev, diff --git a/openbsc/configure.ac b/openbsc/configure.ac index 9fd7325..0753834 100644 --- a/openbsc/configure.ac +++ b/openbsc/configure.ac @@ -140,14 +140,6 @@ CFLAGS="$saved_CFLAGS" AC_SUBST(SYMBOL_VISIBILITY) -# FIXME: use CC_CHECK_CFLAG_APPEND([-Werror=implicit]) -AX_CHECK_COMPILE_FLAG([-Werror=implicit], [CFLAGS="$CFLAGS -Werror=implicit"]) -AX_CHECK_COMPILE_FLAG([-Werror=maybe-uninitialized], [CFLAGS="$CFLAGS -Werror=maybe-uninitialized"]) -AX_CHECK_COMPILE_FLAG([-Werror=memset-transposed-args], [CFLAGS="$CFLAGS -Werror=memset-transposed-args"]) -AX_CHECK_COMPILE_FLAG([-Werror=null-dereference], [CFLAGS="$CFLAGS -Werror=null-dereference"]) -AX_CHECK_COMPILE_FLAG([-Werror=sizeof-array-argument], [CFLAGS="$CFLAGS -Werror=sizeof-array-argument"]) -AX_CHECK_COMPILE_FLAG([-Werror=sizeof-pointer-memaccess], [CFLAGS="$CFLAGS -Werror=sizeof-pointer-memaccess"]) - # Coverage build taken from WebKit's configure.in AC_MSG_CHECKING([whether to enable code coverage support]) AC_ARG_ENABLE(coverage, -- To view, visit https://gerrit.osmocom.org/1591 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2b368500b07f233882ef854eca1fa21f6df39e29 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 13 02:51:22 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 13 Jan 2017 02:51:22 +0000 Subject: openbsc[master]: Revert "Turn some warnings into errors" In-Reply-To: References: Message-ID: Neels Hofmeyr has reverted this change. Change subject: Revert "Turn some warnings into errors" ...................................................................... Uploaded patch set 1. -- To view, visit https://gerrit.osmocom.org/1591 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: revert Gerrit-Change-Id: I2b368500b07f233882ef854eca1fa21f6df39e29 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 13 02:52:01 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 13 Jan 2017 02:52:01 +0000 Subject: openbsc[master]: Revert "Turn some warnings into errors" In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1591 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2b368500b07f233882ef854eca1fa21f6df39e29 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 13 02:52:06 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 13 Jan 2017 02:52:06 +0000 Subject: openbsc[master]: Revert "Turn some warnings into errors" In-Reply-To: References: Message-ID: Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/1591 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2b368500b07f233882ef854eca1fa21f6df39e29 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 13 02:52:08 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 13 Jan 2017 02:52:08 +0000 Subject: [MERGED] openbsc[master]: Revert "Turn some warnings into errors" In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: Revert "Turn some warnings into errors" ...................................................................... Revert "Turn some warnings into errors" This introduces a failure with ./configure on my machine: ../configure: line 6612: syntax error near unexpected token `-Werror=implicit,' ../configure: line 6612: `AX_CHECK_COMPILE_FLAG(-Werror=implicit, CFLAGS="$CFLAGS -Werror=implicit")' Makefile:420: recipe for target 'config.status' failed make[1]: *** [config.status] Error 2 Installing autoconf-archive did not fix the error. So even though jenkins seems to accept this, I cannot build with this patch. Let's find out how to do this in a way that all systems can still build and then re-apply this patch. This reverts commit fd161ccce8ecaad3ddd32dd8b696902e81593ae3. Change-Id: I2b368500b07f233882ef854eca1fa21f6df39e29 --- M debian/control M openbsc/configure.ac 2 files changed, 0 insertions(+), 9 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved; Verified diff --git a/debian/control b/debian/control index d9432e2..79f18df 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,6 @@ Priority: optional Build-Depends: debhelper (>= 9), autotools-dev, - autoconf-archive, pkg-config, libgtp0-dev, libosmocore-dev, diff --git a/openbsc/configure.ac b/openbsc/configure.ac index 9fd7325..0753834 100644 --- a/openbsc/configure.ac +++ b/openbsc/configure.ac @@ -140,14 +140,6 @@ CFLAGS="$saved_CFLAGS" AC_SUBST(SYMBOL_VISIBILITY) -# FIXME: use CC_CHECK_CFLAG_APPEND([-Werror=implicit]) -AX_CHECK_COMPILE_FLAG([-Werror=implicit], [CFLAGS="$CFLAGS -Werror=implicit"]) -AX_CHECK_COMPILE_FLAG([-Werror=maybe-uninitialized], [CFLAGS="$CFLAGS -Werror=maybe-uninitialized"]) -AX_CHECK_COMPILE_FLAG([-Werror=memset-transposed-args], [CFLAGS="$CFLAGS -Werror=memset-transposed-args"]) -AX_CHECK_COMPILE_FLAG([-Werror=null-dereference], [CFLAGS="$CFLAGS -Werror=null-dereference"]) -AX_CHECK_COMPILE_FLAG([-Werror=sizeof-array-argument], [CFLAGS="$CFLAGS -Werror=sizeof-array-argument"]) -AX_CHECK_COMPILE_FLAG([-Werror=sizeof-pointer-memaccess], [CFLAGS="$CFLAGS -Werror=sizeof-pointer-memaccess"]) - # Coverage build taken from WebKit's configure.in AC_MSG_CHECKING([whether to enable code coverage support]) AC_ARG_ENABLE(coverage, -- To view, visit https://gerrit.osmocom.org/1591 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2b368500b07f233882ef854eca1fa21f6df39e29 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 13 02:54:32 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 13 Jan 2017 02:54:32 +0000 Subject: openbsc[master]: Turn some warnings into errors In-Reply-To: References: Message-ID: Patch Set 3: Sorry, I had to revert this, see https://gerrit.osmocom.org/1591 -- To view, visit https://gerrit.osmocom.org/1368 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ied9c950dafa65f324cf31298b13b590f56139700 Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 13 02:56:56 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 13 Jan 2017 02:56:56 +0000 Subject: [PATCH] openbsc[master]: cosmetic: use strncpy0s() or strncpy0() everywhere Message-ID: Review at https://gerrit.osmocom.org/1592 cosmetic: use strncpy0s() or strncpy0() everywhere Shorten some code and make obvious to the reader that strncpy() is invoked in a safe way. Change-Id: I900726cf06d34128db22a3d3d911ee0d1423b1bd --- M openbsc/src/gprs/gprs_gmm.c M openbsc/src/gprs/gprs_subscriber.c M openbsc/src/gprs/gtphub.c M openbsc/src/gprs/gtphub_ares.c M openbsc/src/gprs/sgsn_auth.c M openbsc/src/libbsc/abis_nm.c M openbsc/src/libbsc/bsc_rf_ctrl.c M openbsc/src/libcommon/gsm_subscriber_base.c M openbsc/src/libcommon/gsup_test_client.c M openbsc/src/libmsc/ctrl_commands.c M openbsc/src/libmsc/db.c M openbsc/src/libmsc/gsm_04_08.c M openbsc/src/libmsc/gsm_04_11.c M openbsc/src/libmsc/meas_feed.c M openbsc/src/libmsc/smpp_openbsc.c M openbsc/src/libmsc/vty_interface_layer3.c M openbsc/src/libtrau/rtp_proxy.c M openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c M openbsc/src/utils/meas_vis.c M openbsc/tests/gtphub/gtphub_test.c M openbsc/tests/sgsn/sgsn_test.c 21 files changed, 87 insertions(+), 118 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/92/1592/1 diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c index 363b457..6394a03 100644 --- a/openbsc/src/gprs/gprs_gmm.c +++ b/openbsc/src/gprs/gprs_gmm.c @@ -66,6 +66,7 @@ #include #include #include +#include #include @@ -681,11 +682,10 @@ /* Prepend a '+' for international numbers */ if (called.plan == 1 && called.type == 1) { ctx->msisdn[0] = '+'; - strncpy(&ctx->msisdn[1], called.number, + strncpy0(&ctx->msisdn[1], called.number, sizeof(ctx->msisdn) - 1); } else { - strncpy(&ctx->msisdn[0], called.number, - sizeof(ctx->msisdn) - 1); + strncpy0s(ctx->msisdn, called.number); } } @@ -723,7 +723,7 @@ return; } - strncpy(&ctx->hlr[0], called.number, sizeof(ctx->hlr) - 1); + strncpy0s(ctx->hlr, called.number); } #ifdef BUILD_IU @@ -1032,10 +1032,10 @@ mm_ctx_cleanup_free(ictx, "GPRS IMSI re-use"); } } - strncpy(ctx->imsi, mi_string, sizeof(ctx->imsi) - 1); + strncpy0s(ctx->imsi, mi_string); break; case GSM_MI_TYPE_IMEI: - strncpy(ctx->imei, mi_string, sizeof(ctx->imei) - 1); + strncpy0s(ctx->imei, mi_string); break; case GSM_MI_TYPE_IMEISV: break; @@ -1136,7 +1136,7 @@ reject_cause = GMM_CAUSE_NET_FAIL; goto rejected; } - strncpy(ctx->imsi, mi_string, sizeof(ctx->imsi) - 1); + strncpy0s(ctx->imsi, mi_string); #endif } if (ctx->ran_type == MM_CTX_T_GERAN_Gb) { diff --git a/openbsc/src/gprs/gprs_subscriber.c b/openbsc/src/gprs/gprs_subscriber.c index 23dbdd4..cdeebfa 100644 --- a/openbsc/src/gprs/gprs_subscriber.c +++ b/openbsc/src/gprs/gprs_subscriber.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -164,7 +165,7 @@ struct msgb *msg = gsup_client_msgb_alloc(); if (strlen(gsup_msg->imsi) == 0 && subscr) - strncpy(gsup_msg->imsi, subscr->imsi, sizeof(gsup_msg->imsi) - 1); + strncpy0s(gsup_msg->imsi, subscr->imsi); gsup_msg->cn_domain = OSMO_GSUP_CN_DOMAIN_PS; osmo_gsup_encode(msg, gsup_msg); @@ -185,7 +186,7 @@ { struct osmo_gsup_message gsup_reply = {0}; - strncpy(gsup_reply.imsi, gsup_orig->imsi, sizeof(gsup_reply.imsi) - 1); + strncpy0s(gsup_reply.imsi, gsup_orig->imsi); gsup_reply.cause = cause; gsup_reply.message_type = OSMO_GSUP_TO_MSGT_ERROR(gsup_orig->message_type); @@ -778,11 +779,8 @@ subscr->flags &= ~GPRS_SUBSCRIBER_ENABLE_PURGE; } - if (strcpy(subscr->equipment.imei, mmctx->imei) != 0) { - strncpy(subscr->equipment.imei, mmctx->imei, - sizeof(subscr->equipment.imei)-1); - subscr->equipment.imei[sizeof(subscr->equipment.imei)-1] = 0; - } + if (strcpy(subscr->equipment.imei, mmctx->imei) != 0) + strncpy0s(subscr->equipment.imei, mmctx->imei); if (subscr->lac != mmctx->ra.lac) subscr->lac = mmctx->ra.lac; diff --git a/openbsc/src/gprs/gtphub.c b/openbsc/src/gprs/gtphub.c index a0af42b..3def95a 100644 --- a/openbsc/src/gprs/gtphub.c +++ b/openbsc/src/gprs/gtphub.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -2360,8 +2361,7 @@ ggsn->peer = pp; gtphub_port_ref_count_inc(pp); - strncpy(ggsn->apn_oi_str, apn_oi_str, sizeof(ggsn->apn_oi_str)); - ggsn->apn_oi_str[sizeof(ggsn->apn_oi_str) - 1] = '\0'; + strncpy0s(ggsn->apn_oi_str, apn_oi_str); ggsn->expiry_entry.del_cb = resolved_gssn_del_cb; expiry_add(&hub->expire_slowly, &ggsn->expiry_entry, now); diff --git a/openbsc/src/gprs/gtphub_ares.c b/openbsc/src/gprs/gtphub_ares.c index 667013b..f74d307 100644 --- a/openbsc/src/gprs/gtphub_ares.c +++ b/openbsc/src/gprs/gtphub_ares.c @@ -30,6 +30,7 @@ #include #include +#include #include #include @@ -121,8 +122,7 @@ apn_oi_str = osmo_apn_qualify_from_imsi(lookup->imsi_str, lookup->apn_ni_str, lookup->have_3dig_mnc); - strncpy(lookup->apn_oi_str, apn_oi_str, sizeof(lookup->apn_oi_str)); - lookup->apn_oi_str[sizeof(lookup->apn_oi_str)-1] = '\0'; + strncpy0s(lookup->apn_oi_str, apn_oi_str); } static int start_ares_query(struct ggsn_lookup *lookup) @@ -170,11 +170,8 @@ expiring_item_init(&lookup->expiry_entry); lookup->hub = hub; - strncpy(lookup->imsi_str, imsi_str, sizeof(lookup->imsi_str)); - lookup->imsi_str[sizeof(lookup->imsi_str)-1] = '\0'; - - strncpy(lookup->apn_ni_str, apn_ni_str, sizeof(lookup->apn_ni_str)); - lookup->apn_ni_str[sizeof(lookup->apn_ni_str)-1] = '\0'; + strncpy0s(lookup->imsi_str, imsi_str); + strncpy0s(lookup->apn_ni_str, apn_ni_str); make_addr_str(lookup); diff --git a/openbsc/src/gprs/sgsn_auth.c b/openbsc/src/gprs/sgsn_auth.c index 4b69a0d..1b29641 100644 --- a/openbsc/src/gprs/sgsn_auth.c +++ b/openbsc/src/gprs/sgsn_auth.c @@ -25,6 +25,7 @@ #include #include #include +#include const struct value_string auth_state_names[] = { { SGSN_AUTH_ACCEPTED, "accepted"}, @@ -62,7 +63,7 @@ acl = talloc_zero(NULL, struct imsi_acl_entry); if (!acl) return -ENOMEM; - strncpy(acl->imsi, imsi, sizeof(acl->imsi) - 1); + strncpy0s(acl->imsi, imsi); llist_add(&acl->list, &cfg->imsi_acl); diff --git a/openbsc/src/libbsc/abis_nm.c b/openbsc/src/libbsc/abis_nm.c index 0c723e8..4e3c086 100644 --- a/openbsc/src/libbsc/abis_nm.c +++ b/openbsc/src/libbsc/abis_nm.c @@ -43,6 +43,7 @@ #include #include #include +#include #include #define OM_ALLOC_SIZE 1024 @@ -2235,8 +2236,7 @@ } /* construct new filename */ - strncpy(dir, bs11_sw->swl_fname, sizeof(dir)); - dir[sizeof(dir)-1] = '\0'; + strncpy0s(dir, bs11_sw->swl_fname); strncat(fle->fname, dirname(dir), sizeof(fle->fname) - 1); strcat(fle->fname, "/"); strncat(fle->fname, file_id, sizeof(fle->fname) - 1 -strlen(fle->fname)); @@ -2307,8 +2307,7 @@ bs11_sw->user_cb = cbfn; bs11_sw->forced = forced; - strncpy(bs11_sw->swl_fname, fname, sizeof(bs11_sw->swl_fname)); - bs11_sw->swl_fname[sizeof(bs11_sw->swl_fname)-1] = '\0'; + strncpy0s(bs11_sw->swl_fname, fname); rc = bs11_read_swl_file(bs11_sw); if (rc < 0) return rc; diff --git a/openbsc/src/libbsc/bsc_rf_ctrl.c b/openbsc/src/libbsc/bsc_rf_ctrl.c index 0538482..e1e2060 100644 --- a/openbsc/src/libbsc/bsc_rf_ctrl.c +++ b/openbsc/src/libbsc/bsc_rf_ctrl.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -451,8 +452,7 @@ } local.sun_family = AF_UNIX; - strncpy(local.sun_path, path, sizeof(local.sun_path)); - local.sun_path[sizeof(local.sun_path) - 1] = '\0'; + strncpy0s(local.sun_path, path); unlink(local.sun_path); /* we use the same magic that X11 uses in Xtranssock.c for diff --git a/openbsc/src/libcommon/gsm_subscriber_base.c b/openbsc/src/libcommon/gsm_subscriber_base.c index 1f98cc6..d063489 100644 --- a/openbsc/src/libcommon/gsm_subscriber_base.c +++ b/openbsc/src/libcommon/gsm_subscriber_base.c @@ -30,6 +30,7 @@ #include #include #include +#include LLIST_HEAD(active_subscribers); void *tall_subscr_ctx; @@ -115,7 +116,7 @@ if (!subscr) return NULL; - strncpy(subscr->imsi, imsi, sizeof(subscr->imsi)-1); + strncpy0s(subscr->imsi, imsi); subscr->group = sgrp; return subscr; } diff --git a/openbsc/src/libcommon/gsup_test_client.c b/openbsc/src/libcommon/gsup_test_client.c index 6af5fef..d72dca7 100644 --- a/openbsc/src/libcommon/gsup_test_client.c +++ b/openbsc/src/libcommon/gsup_test_client.c @@ -75,8 +75,7 @@ return NULL; io = talloc_zero(ctx, struct imsi_op); - strncpy(io->imsi, imsi, sizeof(io->imsi)); - io->imsi[sizeof(io->imsi)-1] = '\0'; + strncpy0s(io->imsi, imsi); io->type = type; io->timer.cb = imsi_op_timer_cb; io->timer.data = io; diff --git a/openbsc/src/libmsc/ctrl_commands.c b/openbsc/src/libmsc/ctrl_commands.c index 79e136d..7af8076 100644 --- a/openbsc/src/libmsc/ctrl_commands.c +++ b/openbsc/src/libmsc/ctrl_commands.c @@ -24,6 +24,7 @@ #include #include #include +#include #include @@ -103,8 +104,7 @@ goto fail; subscr->authorized = 1; - strncpy(subscr->extension, msisdn, GSM_EXTENSION_LENGTH - 1); - subscr->extension[GSM_EXTENSION_LENGTH-1] = '\0'; + strncpy0s(subscr->extension, msisdn); /* put it back to the db */ rc = db_sync_subscriber(subscr); diff --git a/openbsc/src/libmsc/db.c b/openbsc/src/libmsc/db.c index 5cccb32..d6290c3 100644 --- a/openbsc/src/libmsc/db.c +++ b/openbsc/src/libmsc/db.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -240,7 +241,7 @@ snprintf(buf, sizeof(buf), "%llu", sender_id); sender = db_get_subscriber(GSM_SUBSCRIBER_ID, buf); OSMO_ASSERT(sender); - strncpy(sms->src.addr, sender->extension, sizeof(sms->src.addr)-1); + strncpy0s(sms->src.addr, sender->extension); subscr_direct_free(sender); sender = NULL; @@ -252,10 +253,8 @@ "data_coding_scheme"); daddr = dbi_result_get_string(result, "dest_addr"); - if (daddr) { - strncpy(sms->dst.addr, daddr, sizeof(sms->dst.addr)); - sms->dst.addr[sizeof(sms->dst.addr)-1] = '\0'; - } + if (daddr) + strncpy0s(sms->dst.addr, daddr); sms->user_data_len = dbi_result_get_field_length(result, "user_data"); user_data = dbi_result_get_binary(result, "user_data"); @@ -264,10 +263,8 @@ memcpy(sms->user_data, user_data, sms->user_data_len); text = dbi_result_get_string(result, "text"); - if (text) { - strncpy(sms->text, text, sizeof(sms->text)); - sms->text[sizeof(sms->text)-1] = '\0'; - } + if (text) + strncpy0s(sms->text, text); return sms; } @@ -549,7 +546,7 @@ return NULL; } subscr->id = dbi_conn_sequence_last(conn, NULL); - strncpy(subscr->imsi, imsi, sizeof(subscr->imsi)-1); + strncpy0s(subscr->imsi, imsi); dbi_result_free(result); LOGP(DDB, LOGL_INFO, "New Subscriber: ID %llu, IMSI %s\n", subscr->id, subscr->imsi); if (alloc_exten) @@ -585,7 +582,7 @@ string = dbi_result_get_string(result, "imei"); if (string) - strncpy(equip->imei, string, sizeof(equip->imei)-1); + strncpy0s(equip->imei, string); string = dbi_result_get_string(result, "classmark1"); if (string) { @@ -824,21 +821,19 @@ const char *string; string = dbi_result_get_string(result, "imsi"); if (string) - strncpy(subscr->imsi, string, sizeof(subscr->imsi)-1); + strncpy0s(subscr->imsi, string); string = dbi_result_get_string(result, "tmsi"); if (string) subscr->tmsi = tmsi_from_string(string); string = dbi_result_get_string(result, "name"); - if (string) { - strncpy(subscr->name, string, GSM_NAME_LENGTH); - subscr->name[sizeof(subscr->name)-1] = '\0'; - } + if (string) + strncpy0s(subscr->name, string); string = dbi_result_get_string(result, "extension"); if (string) - strncpy(subscr->extension, string, GSM_EXTENSION_LENGTH); + strncpy0s(subscr->extension, string); subscr->lac = dbi_result_get_ulonglong(result, "lac"); @@ -1351,8 +1346,7 @@ unsigned long long equipment_id, watch_id; dbi_result result; - strncpy(subscriber->equipment.imei, imei, - sizeof(subscriber->equipment.imei)-1); + strncpy0s(subscriber->equipment.imei, imei); result = dbi_conn_queryf(conn, "INSERT OR IGNORE INTO Equipment " @@ -1502,19 +1496,15 @@ sms->dst.npi = dbi_result_get_ulonglong(result, "dest_npi"); sms->dst.ton = dbi_result_get_ulonglong(result, "dest_ton"); daddr = dbi_result_get_string(result, "dest_addr"); - if (daddr) { - strncpy(sms->dst.addr, daddr, sizeof(sms->dst.addr)); - sms->dst.addr[sizeof(sms->dst.addr)-1] = '\0'; - } + if (daddr) + strncpy0s(sms->dst.addr, daddr); sms->receiver = subscr_get_by_extension(net->subscr_group, sms->dst.addr); sms->src.npi = dbi_result_get_ulonglong(result, "src_npi"); sms->src.ton = dbi_result_get_ulonglong(result, "src_ton"); saddr = dbi_result_get_string(result, "src_addr"); - if (saddr) { - strncpy(sms->src.addr, saddr, sizeof(sms->src.addr)); - sms->src.addr[sizeof(sms->src.addr)-1] = '\0'; - } + if (saddr) + strncpy0s(sms->src.addr, saddr); sms->user_data_len = dbi_result_get_field_length(result, "user_data"); user_data = dbi_result_get_binary(result, "user_data"); @@ -1523,10 +1513,8 @@ memcpy(sms->user_data, user_data, sms->user_data_len); text = dbi_result_get_string(result, "text"); - if (text) { - strncpy(sms->text, text, sizeof(sms->text)); - sms->text[sizeof(sms->text)-1] = '\0'; - } + if (text) + strncpy0s(sms->text, text); return sms; } diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index 34492bb..37d148d 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -56,6 +56,7 @@ #include #include #include +#include #include #include @@ -1973,10 +1974,8 @@ /* use subscriber as calling party number */ setup.fields |= MNCC_F_CALLING; - strncpy(setup.calling.number, trans->subscr->extension, - sizeof(setup.calling.number)-1); - strncpy(setup.imsi, trans->subscr->imsi, - sizeof(setup.imsi)-1); + strncpy0s(setup.calling.number, trans->subscr->extension); + strncpy0s(setup.imsi, trans->subscr->imsi); /* bearer capability */ if (TLVP_PRESENT(&tp, GSM48_IE_BEARER_CAP)) { @@ -2153,8 +2152,7 @@ } /* IMSI of called subscriber */ - strncpy(call_conf.imsi, trans->subscr->imsi, - sizeof(call_conf.imsi)-1); + strncpy0s(call_conf.imsi, trans->subscr->imsi); new_cc_state(trans, GSM_CSTATE_MO_TERM_CALL_CONF); @@ -2307,10 +2305,8 @@ tlv_parse(&tp, &gsm48_att_tlvdef, gh->data, payload_len, 0, 0); /* use subscriber as connected party number */ connect.fields |= MNCC_F_CONNECTED; - strncpy(connect.connected.number, trans->subscr->extension, - sizeof(connect.connected.number)-1); - strncpy(connect.imsi, trans->subscr->imsi, - sizeof(connect.imsi)-1); + strncpy0s(connect.connected.number, trans->subscr->extension); + strncpy0s(connect.imsi, trans->subscr->imsi); /* facility */ if (TLVP_PRESENT(&tp, GSM48_IE_FACILITY)) { diff --git a/openbsc/src/libmsc/gsm_04_11.c b/openbsc/src/libmsc/gsm_04_11.c index 48a87e0..330249a 100644 --- a/openbsc/src/libmsc/gsm_04_11.c +++ b/openbsc/src/libmsc/gsm_04_11.c @@ -55,6 +55,7 @@ #include #include #include +#include #ifdef BUILD_SMPP #include "smpp_smsc.h" @@ -92,15 +93,15 @@ return NULL; sms->receiver = subscr_get(receiver); - strncpy(sms->text, text, sizeof(sms->text)-1); + strncpy0s(sms->text, text); - strncpy(sms->src.addr, sender->extension, sizeof(sms->src.addr)-1); + strncpy0s(sms->src.addr, sender->extension); sms->reply_path_req = 0; sms->status_rep_req = 0; sms->ud_hdr_ind = 0; sms->protocol_id = 0; /* implicit */ sms->data_coding_scheme = dcs; - strncpy(sms->dst.addr, receiver->extension, sizeof(sms->dst.addr)-1); + strncpy0s(sms->dst.addr, receiver->extension); /* Generate user_data */ sms->user_data_len = gsm_7bit_encode_n(sms->user_data, sizeof(sms->user_data), sms->text, NULL); @@ -464,7 +465,7 @@ } } - strncpy(gsms->src.addr, conn->subscr->extension, sizeof(gsms->src.addr)-1); + strncpy0s(gsms->src.addr, conn->subscr->extension); LOGP(DLSMS, LOGL_INFO, "RX SMS: Sender: %s, MTI: 0x%02x, VPF: 0x%02x, " "MR: 0x%02x PID: 0x%02x, DCS: 0x%02x, DA: %s, " diff --git a/openbsc/src/libmsc/meas_feed.c b/openbsc/src/libmsc/meas_feed.c index cd2b648..05be23b 100644 --- a/openbsc/src/libmsc/meas_feed.c +++ b/openbsc/src/libmsc/meas_feed.c @@ -17,6 +17,7 @@ #include #include #include +#include #include "meas_feed.h" @@ -52,12 +53,9 @@ mfm->hdr.version = MEAS_FEED_VERSION; /* fill in MEAS_FEED_MEAS specific header */ - strncpy(mfm->imsi, subscr->imsi, sizeof(mfm->imsi)-1); - mfm->imsi[sizeof(mfm->imsi)-1] = '\0'; - strncpy(mfm->name, subscr->name, sizeof(mfm->name)-1); - mfm->name[sizeof(mfm->name)-1] = '\0'; - strncpy(mfm->scenario, g_mfs.scenario, sizeof(mfm->scenario)); - mfm->scenario[sizeof(mfm->scenario)-1] = '\0'; + strncpy0s(mfm->imsi, subscr->imsi); + strncpy0s(mfm->name, subscr->name); + strncpy0s(mfm->scenario, g_mfs.scenario); /* copy the entire measurement report */ memcpy(&mfm->mr, mr, sizeof(mfm->mr)); @@ -160,8 +158,7 @@ void meas_feed_scenario_set(const char *name) { - strncpy(g_mfs.scenario, name, sizeof(g_mfs.scenario)-1); - g_mfs.scenario[sizeof(g_mfs.scenario)-1] = '\0'; + strncpy0s(g_mfs.scenario, name); } const char *meas_feed_scenario_get(void) diff --git a/openbsc/src/libmsc/smpp_openbsc.c b/openbsc/src/libmsc/smpp_openbsc.c index 228e61d..1e1d91a 100644 --- a/openbsc/src/libmsc/smpp_openbsc.c +++ b/openbsc/src/libmsc/smpp_openbsc.c @@ -44,6 +44,7 @@ #include #include #include +#include #include "smpp_smsc.h" @@ -133,12 +134,12 @@ sms->receiver = dest; sms->dst.ton = submit->dest_addr_ton; sms->dst.npi = submit->dest_addr_npi; - strncpy(sms->dst.addr, dest->extension, sizeof(sms->dst.addr)-1); + strncpy0s(sms->dst.addr, dest->extension); /* fill in the source address */ sms->src.ton = submit->source_addr_ton; sms->src.npi = submit->source_addr_npi; - strncpy(sms->src.addr, (char *)submit->source_addr, sizeof(sms->src.addr)-1); + strncpy0s(sms->src.addr, (char *)submit->source_addr); if (submit->esm_class & 0x40) sms->ud_hdr_ind = 1; diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index a02f70c..97375a6 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -568,8 +568,7 @@ return CMD_WARNING; } - strncpy(subscr->name, name, sizeof(subscr->name)); - subscr->name[sizeof(subscr->name)-1] = '\0'; + strncpy0s(subscr->name, name); talloc_free(name); db_sync_subscriber(subscr); diff --git a/openbsc/src/libtrau/rtp_proxy.c b/openbsc/src/libtrau/rtp_proxy.c index ed19175..bc8812f 100644 --- a/openbsc/src/libtrau/rtp_proxy.c +++ b/openbsc/src/libtrau/rtp_proxy.c @@ -36,6 +36,7 @@ #include #include #include +#include #include @@ -368,9 +369,7 @@ } if (rtph->type == RTCP_TYPE_SDES) { char new_cname[255]; - strncpy(new_cname, inet_ntoa(rss->sin_local.sin_addr), - sizeof(new_cname)); - new_cname[sizeof(new_cname)-1] = '\0'; + strncpy0s(new_cname, inet_ntoa(rss->sin_local.sin_addr)); rc = rtcp_sdes_cname_mangle(msg, rtph, &old_len, new_cname); if (rc < 0) diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c b/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c index 58667fe..698059f 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -129,15 +130,13 @@ { if (strncmp(chosen_number, "00", 2) == 0) { called->type = 1; - strncpy(called->number, chosen_number + 2, sizeof(called->number)); + strncpy0s(called->number, chosen_number + 2); } else { /* rewrite international to unknown */ if (called->type == 1) called->type = 0; - strncpy(called->number, chosen_number, sizeof(called->number)); + strncpy0s(called->number, chosen_number); } - - called->number[sizeof(called->number) - 1] = '\0'; } /** diff --git a/openbsc/src/utils/meas_vis.c b/openbsc/src/utils/meas_vis.c index 061a7a4..8460a66 100644 --- a/openbsc/src/utils/meas_vis.c +++ b/openbsc/src/utils/meas_vis.c @@ -17,6 +17,7 @@ #include #include +#include struct ms_state_uni { CDKSLIDER *cdk; @@ -73,7 +74,7 @@ ms = find_ms(imsi); if (!ms) { ms = talloc_zero(NULL, struct ms_state); - strncpy(ms->imsi, imsi, sizeof(ms->imsi)-1); + strncpy0s(ms->imsi, imsi); ms->ul._lbl[0] = ms->ul.label; ms->dl._lbl[0] = ms->dl.label; llist_add_tail(&ms->list, &g_st.ms_list); @@ -88,7 +89,7 @@ struct ms_state *ms = find_alloc_ms(mfm->imsi); time_t now = time(NULL); - strncpy(ms->name, mfm->name, sizeof(ms->imsi)-1); + strncpy0s(ms->name, mfm->name); memcpy(&ms->mr, &mfm->mr, sizeof(ms->mr)); ms->ul.last_update = now; if (ms->mr.flags & MEAS_REP_F_DL_VALID) diff --git a/openbsc/tests/gtphub/gtphub_test.c b/openbsc/tests/gtphub/gtphub_test.c index 7d7673b..49ca73c 100644 --- a/openbsc/tests/gtphub/gtphub_test.c +++ b/openbsc/tests/gtphub/gtphub_test.c @@ -29,6 +29,7 @@ #include #include +#include #include #include @@ -449,21 +450,13 @@ " returning GGSN addr from imsi %s ni %s: %s\n", imsi_str, apn_ni_str, gtphub_port_str(pp)); - if (imsi_str) { - strncpy(resolve_ggsn_got_imsi, imsi_str, - sizeof(resolve_ggsn_got_imsi)); - resolve_ggsn_got_imsi[sizeof(resolve_ggsn_got_imsi) - 1] = '\0'; - } - else - strcpy(resolve_ggsn_got_imsi, "(null)"); + if (!imsi_str) + imsi_str = "(null)"; + strncpy0s(resolve_ggsn_got_imsi, imsi_str); - if (apn_ni_str) { - strncpy(resolve_ggsn_got_ni, apn_ni_str, - sizeof(resolve_ggsn_got_ni)); - resolve_ggsn_got_ni[sizeof(resolve_ggsn_got_ni) - 1] = '\0'; - } - else - strcpy(resolve_ggsn_got_ni, "(null)"); + if (!apn_ni_str) + apn_ni_str = "(null)"; + strncpy0s(resolve_ggsn_got_ni, apn_ni_str); return pp; } diff --git a/openbsc/tests/sgsn/sgsn_test.c b/openbsc/tests/sgsn/sgsn_test.c index a12aaf8..051b273 100644 --- a/openbsc/tests/sgsn/sgsn_test.c +++ b/openbsc/tests/sgsn/sgsn_test.c @@ -2248,7 +2248,7 @@ /* Create a context */ OSMO_ASSERT(count(gprs_llme_list()) == 0); ctx = alloc_mm_ctx(local_tlli, &raid); - strncpy(ctx->imsi, imsi1, sizeof(ctx->imsi) - 1); + strncpy0s(ctx->imsi, imsi1); /* Allocate and attach a subscriber */ s1 = gprs_subscr_get_or_create_by_mmctx(ctx); @@ -2273,7 +2273,7 @@ pdp_data = sgsn_subscriber_pdp_data_alloc(s1->sgsn_data); pdp_data->context_id = 1; pdp_data->pdp_type = 0x0121; - strncpy(pdp_data->apn_str, "*", sizeof(pdp_data->apn_str)-1); + strncpy0s(pdp_data->apn_str, "*"); /* Resolve GGSNs */ @@ -2326,7 +2326,7 @@ /* Add PDP data entry to subscriber */ - strncpy(pdp_data->apn_str, "Test.Apn", sizeof(pdp_data->apn_str)-1); + strncpy0s(pdp_data->apn_str, "Test.Apn"); tp.lv[GSM48_IE_GSM_APN].len = gprs_str_to_apn(apn_enc, sizeof(apn_enc), "Test.Apn"); -- To view, visit https://gerrit.osmocom.org/1592 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I900726cf06d34128db22a3d3d911ee0d1423b1bd Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 13 06:49:53 2017 From: gerrit-no-reply at lists.osmocom.org (sivasankari) Date: Fri, 13 Jan 2017 06:49:53 +0000 Subject: osmo-pcu[master]: Add compression support in EGPRS PUAN In-Reply-To: References: Message-ID: Patch Set 4: Hi, The build is failed due to the dependency in TbfTest in osmo-pcu. I observed that the fix has been provided for the issue with the patch - https://gerrit.osmocom.org/#/c/1586/. Could you please retrigger the Jenkins Build for this patch? -- To view, visit https://gerrit.osmocom.org/413 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I30d88769f6a699a5e0c2e11e4f3c3c48f63c979a Gerrit-PatchSet: 4 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: prasadkg Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: prasadkg Gerrit-Reviewer: pravin Gerrit-Reviewer: sivasankari Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 13 08:06:21 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 13 Jan 2017 08:06:21 +0000 Subject: [PATCH] libosmocore[master]: utils/conv_gen.py: add header generation feature Message-ID: Review at https://gerrit.osmocom.org/1593 utils/conv_gen.py: add header generation feature Change-Id: Iae830d716f01810972edbef14fc5383ac647d0ea --- M utils/conv_gen.py 1 file changed, 43 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/93/1593/1 diff --git a/utils/conv_gen.py b/utils/conv_gen.py index 34e164a..24dc395 100644 --- a/utils/conv_gen.py +++ b/utils/conv_gen.py @@ -168,6 +168,20 @@ # Up to 12 numbers should be placed per line print_formatted(self.puncture, "%3d, ", 12, fi) + def print_description(self, fi, brief = False): + if brief is True: + fi.write("/*! \\brief ") + fi.write("structure describing %s\n" + % self.description[0]) + for line in self.description[1:]: + fi.write(" * %s\n" % line) + else: + fi.write("/**\n") + for line in self.description: + fi.write(" * %s\n" % line) + + fi.write(" */\n") + def print_state_and_output(self, fi): pack = lambda n: \ sum([x << (self.rate_inv - i - 1) for i, x in enumerate(n)]) @@ -205,10 +219,7 @@ # Write description as a multi-line comment if self.description is not None: - fi.write("/**\n") - for line in self.description: - fi.write(" * %s\n" % line) - fi.write(" */\n") + self.print_description(fi) # Print a final convolutional code definition fi.write("const struct osmo_conv_code %s_%s = {\n" % (pref, self.name)) @@ -347,12 +358,38 @@ f.write("};\n") +def generate_header(codes, path, prefix, description = None): + # Open a new file for writing + f = open(os.path.join(path, prefix + ".h"), 'w') + + # Print license and includes + f.write(mod_license + "\n") + f.write("#pragma once\n\n") + f.write("#include \n") + f.write("#include \n\n") + + # Print general file description if preset + if description is not None: + f.write("/*! \\file %s.h\n" % prefix) + f.write(" * %s\n" % description) + f.write(" */\n\n") + + sys.stderr.write("Generating header file...\n") + + # Generate declarations one by one + for code in codes.conv_codes: + sys.stderr.write("Generate '%s' declaration\n" % code.name) + code.print_description(f, True) + f.write("extern const struct osmo_conv_code %s_%s;\n\n" + % (prefix, code.name)) + def print_help(error = None): print("Usage: python %s action code_type [path]" % sys.argv[0]) print("\nAvailable actions:") print(" gen_codes - generate convolutional code definitions") print(" gen_vectors - generate test vectors") + print(" gen_header - generate header file") print("\nAvailable code types:") print(" gsm - GSM specific codes") @@ -388,6 +425,8 @@ generate_codes(codes, path, "gsm0503") elif action == "gen_vectors": generate_vectors(codes, path, "gsm0503", inc) + elif action == "gen_header": + generate_header(codes, path, "gsm0503") else: print_help("Error: Unknown action!") sys.exit(1) -- To view, visit https://gerrit.osmocom.org/1593 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iae830d716f01810972edbef14fc5383ac647d0ea Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Fri Jan 13 09:06:58 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 13 Jan 2017 09:06:58 +0000 Subject: [PATCH] libosmocore[master]: gsm0503.h: generate header automatically Message-ID: Review at https://gerrit.osmocom.org/1594 gsm0503.h: generate header automatically Since we have automatic header generation, implemented in the utils/conv_gen.py, it's time to use this feature! Change-Id: I21caa4e433b2cc1861611e35350a9671da444c2a --- M .gitignore M include/Makefile.am D include/osmocom/gsm/gsm0503.h 3 files changed, 7 insertions(+), 174 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/94/1594/1 diff --git a/.gitignore b/.gitignore index fb159c3..c1bde0f 100644 --- a/.gitignore +++ b/.gitignore @@ -116,6 +116,7 @@ src/gsm/gsm0503_conv.c include/osmocom/core/crc*gen.h include/osmocom/core/bit*gen.h +include/osmocom/gsm/gsm0503.h # vi files *.sw? diff --git a/include/Makefile.am b/include/Makefile.am index 0a300a8..200f93f 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -143,3 +143,9 @@ osmocom/core/crc%gen.h: osmocom/core/crcXXgen.h.tpl $(AM_V_GEN)$(MKDIR_P) $(dir $@) $(AM_V_GEN)sed -e's/XX/$*/g' $< > $@ + +osmocom/gsm/gsm0503.h: + $(AM_V_GEN)python2 $(top_srcdir)/utils/conv_gen.py gen_header gsm \ + $(top_srcdir)/include/osmocom/gsm/ + +CLEANFILES = osmocom/gsm/gsm0503.h diff --git a/include/osmocom/gsm/gsm0503.h b/include/osmocom/gsm/gsm0503.h deleted file mode 100644 index de28ad2..0000000 --- a/include/osmocom/gsm/gsm0503.h +++ /dev/null @@ -1,174 +0,0 @@ -/* - * gsm0503.h - * - * 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 2 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. - */ - -#pragma once - -#include - -#include - -/*! \file gsm0503.h - * Osmocom convolutional encoder/decoder for xCCH channels, see 3GPP TS 05.03 - */ - -/*! \brief structure describing convolutional code xCCH - * - * Non-recursive code, flushed, not punctured code. - */ -extern const struct osmo_conv_code gsm0503_xcch; - -/*! \brief structure describing convolutional code RACH - */ -extern const struct osmo_conv_code gsm0503_rach; - -/*! \brief structure describing convolutional code SCH - */ -extern const struct osmo_conv_code gsm0503_sch; - -/*! \brief structures describing convolutional codes CS2/3 - */ -extern const struct osmo_conv_code gsm0503_cs2; -extern const struct osmo_conv_code gsm0503_cs3; - -/*! \brief structure describing convolutional code TCH/FR - */ -extern const struct osmo_conv_code gsm0503_tch_fr; - -/*! \brief structure describing convolutional code TCH/HR - */ -extern const struct osmo_conv_code gsm0503_tch_hr; - -/*! \brief structure describing convolutional code TCH/AFS 12.2 - */ -extern const struct osmo_conv_code gsm0503_tch_afs_12_2; - -/*! \brief structure describing convolutional code TCH/AFS 10.2 - */ -extern const struct osmo_conv_code gsm0503_tch_afs_10_2; - -/*! \brief structure describing convolutional code TCH/AFS 7.95 - */ -extern const struct osmo_conv_code gsm0503_tch_afs_7_95; - -/*! \brief structure describing convolutional code TCH/AFS 7.4 - */ -extern const struct osmo_conv_code gsm0503_tch_afs_7_4; - -/*! \brief structure describing convolutional code TCH/AFS 6.7 - */ -extern const struct osmo_conv_code gsm0503_tch_afs_6_7; - -/*! \brief structure describing convolutional code TCH/AFS 5.9 - */ -extern const struct osmo_conv_code gsm0503_tch_afs_5_9; - -/*! \brief structure describing convolutional code TCH/AFS 5.15 - */ -extern const struct osmo_conv_code gsm0503_tch_afs_5_15; - -/*! \brief structure describing convolutional code TCH/AFS 4.75 - */ -extern const struct osmo_conv_code gsm0503_tch_afs_4_75; - -/*! \brief structure describing convolutional code TCH/AHS 7.95 - */ -extern const struct osmo_conv_code gsm0503_tch_ahs_7_95; - -/*! \brief structure describing convolutional code TCH/AHS 7.4 - */ -extern const struct osmo_conv_code gsm0503_tch_ahs_7_4; - -/*! \brief structure describing convolutional code TCH/AHS 6.7 - */ -extern const struct osmo_conv_code gsm0503_tch_ahs_6_7; - -/*! \brief structure describing convolutional code TCH/AHS 5.9 - */ -extern const struct osmo_conv_code gsm0503_tch_ahs_5_9; - -/*! \brief structure describing convolutional code TCH/AHS 5.15 - */ -extern const struct osmo_conv_code gsm0503_tch_ahs_5_15; - -/*! \brief structure describing convolutional code TCH/AHS 4.75 - */ -extern const struct osmo_conv_code gsm0503_tch_ahs_4_75; - -/*! \brief structure describing convolutional code EDGE MCS-1 DL HDR - */ -extern const struct osmo_conv_code gsm0503_mcs1_dl_hdr; - -/*! \brief structure describing convolutional code EDGE MCS-1 UL HDR - */ -extern const struct osmo_conv_code gsm0503_mcs1_ul_hdr; - -/*! \brief structure describing convolutional code EDGE MCS-1 - */ -extern const struct osmo_conv_code gsm0503_mcs1; - -/*! \brief structure describing convolutional code EDGE MCS-2 - */ -extern const struct osmo_conv_code gsm0503_mcs2; - -/*! \brief structure describing convolutional code EDGE MCS-3 - */ -extern const struct osmo_conv_code gsm0503_mcs3; - -/*! \brief structure describing convolutional code EDGE MCS-4 - */ -extern const struct osmo_conv_code gsm0503_mcs4; - -/*! \brief structure describing convolutional code EDGE MCS-5 DL HDR - */ -extern const struct osmo_conv_code gsm0503_mcs5_dl_hdr; - -/*! \brief structure describing convolutional code EDGE MCS-5 UL HDR - */ -extern const struct osmo_conv_code gsm0503_mcs5_ul_hdr; - -/*! \brief structure describing convolutional code EDGE MCS-5 - */ -extern const struct osmo_conv_code gsm0503_mcs5; - -/*! \brief structure describing convolutional code EDGE MCS-6 - */ -extern const struct osmo_conv_code gsm0503_mcs6; - -/*! \brief structure describing convolutional code EDGE MCS-7 DL HDR - */ -extern const struct osmo_conv_code gsm0503_mcs7_dl_hdr; - -/*! \brief structure describing convolutional code EDGE MCS-7 UL HDR - */ -extern const struct osmo_conv_code gsm0503_mcs7_ul_hdr; - -/*! \brief structure describing convolutional code EDGE MCS-7 - */ -extern const struct osmo_conv_code gsm0503_mcs7; - -/*! \brief structure describing convolutional code EDGE MCS-8 - */ -extern const struct osmo_conv_code gsm0503_mcs8; - -/*! \brief structure describing convolutional code EDGE MCS-9 - */ -extern const struct osmo_conv_code gsm0503_mcs9; -- To view, visit https://gerrit.osmocom.org/1594 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I21caa4e433b2cc1861611e35350a9671da444c2a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Fri Jan 13 09:36:26 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 13 Jan 2017 09:36:26 +0000 Subject: [MERGED] libosmocore[master]: Fix compilation warnings: missing includes: gsm0411_utils.c, ... In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Fix compilation warnings: missing includes: gsm0411_utils.c, lapd_core.c, oap_test.c ...................................................................... Fix compilation warnings: missing includes: gsm0411_utils.c, lapd_core.c, oap_test.c Change-Id: Id524327b3f44e22e3aa44c5e8e4965b084cb326a --- M src/gsm/gsm0411_utils.c M src/gsm/lapd_core.c M tests/oap/oap_test.c 3 files changed, 3 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gsm/gsm0411_utils.c b/src/gsm/gsm0411_utils.c index 5d18b12..b84c9f2 100644 --- a/src/gsm/gsm0411_utils.c +++ b/src/gsm/gsm0411_utils.c @@ -33,6 +33,7 @@ #include #include +#include #include #include #include diff --git a/src/gsm/lapd_core.c b/src/gsm/lapd_core.c index cdd9b56..bf5c388 100644 --- a/src/gsm/lapd_core.c +++ b/src/gsm/lapd_core.c @@ -82,6 +82,7 @@ #include #include #include +#include /* TS 04.06 Table 4 / Section 3.8.1 */ #define LAPD_U_SABM 0x7 diff --git a/tests/oap/oap_test.c b/tests/oap/oap_test.c index f7fe0b7..ccf4906 100644 --- a/tests/oap/oap_test.c +++ b/tests/oap/oap_test.c @@ -21,6 +21,7 @@ * */ +#include #include #include #include -- To view, visit https://gerrit.osmocom.org/1581 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id524327b3f44e22e3aa44c5e8e4965b084cb326a Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 13 09:39:40 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 13 Jan 2017 09:39:40 +0000 Subject: libosmocore[master]: CTRL: add write-only helpers In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) Sure, I can change tabbing to make it consistent within the define at the cost of being inconsistent with the other defines :) https://gerrit.osmocom.org/#/c/1574/2/include/osmocom/ctrl/control_cmd.h File include/osmocom/ctrl/control_cmd.h: Line 194: cmd->reply = "Write Only attribute"; \ > could be nice to add the #cmdstr in the reply message? Why bother? Each request in CTRL protocol is uniquely identified by id so whoever sent this already know that string. -- To view, visit https://gerrit.osmocom.org/1574 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I66b7990db590c1f8e56326e392e6c1d2eafebd9a Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Jan 13 09:41:59 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 13 Jan 2017 09:41:59 +0000 Subject: [ABANDON] osmo-pcu[master]: Fix segfault in tbf test In-Reply-To: References: Message-ID: Max has abandoned this change. Change subject: Fix segfault in tbf test ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/1579 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I975cee6b2b21e1e83649f2ce23203568f225bd7a Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 13 09:59:57 2017 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Fri, 13 Jan 2017 09:59:57 +0000 Subject: osmo-pcu[master]: Sanitizer fix for invalid value of egprs_puncturing_values In-Reply-To: References: Message-ID: Patch Set 4: (1 comment) https://gerrit.osmocom.org/#/c/1411/4/src/tbf_dl.cpp File src/tbf_dl.cpp: Line 771: rlc.cps = gprs_rlc_mcs_cps(cs, punct[0], punct[1], need_padding); > I don't see how this relates to my comments at all. Would you explain pleas The CPS field is valid only for EGPRS case. hence calling this function is not relevant and also in the logs shared by you earlier, we can easily see loading error for GPRS case(CS1). -- To view, visit https://gerrit.osmocom.org/1411 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ice54edc7e4a936eb2f2dd8a243673a30dceef542 Gerrit-PatchSet: 4 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Jan 13 10:01:56 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 13 Jan 2017 10:01:56 +0000 Subject: [PATCH] libosmocore[master]: logging: remove code duplication In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1580 to look at the new patch set (#2). logging: remove code duplication * make DEBUGP* macro into simple wrappers around LOGP* * deprecate unused logp() function Related: OS#71 Change-Id: Ia6c92bd4824c44fc22cc733ce7a88da86e58ed93 --- M include/osmocom/core/logging.h 1 file changed, 4 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/80/1580/2 diff --git a/include/osmocom/core/logging.h b/include/osmocom/core/logging.h index fe9ae93..fcf77f0 100644 --- a/include/osmocom/core/logging.h +++ b/include/osmocom/core/logging.h @@ -10,6 +10,7 @@ #include #include #include +#include #include /*! \brief Maximum number of logging contexts */ @@ -25,18 +26,8 @@ * \param[in] fmt format string * \param[in] args variable argument list */ -#define DEBUGP(ss, fmt, args...) \ - do { \ - if (log_check_level(ss, LOGL_DEBUG)) \ - logp(ss, __BASE_FILE__, __LINE__, 0, fmt, ## args); \ - } while(0) - -#define DEBUGPC(ss, fmt, args...) \ - do { \ - if (log_check_level(ss, LOGL_DEBUG)) \ - logp(ss, __BASE_FILE__, __LINE__, 1, fmt, ## args); \ - } while(0) - +#define DEBUGP(ss, fmt, args...) LOGP(ss, LOGL_DEBUG, fmt, ##args) +#define DEBUGPC(ss, fmt, args...) LOGPC(ss, LOGL_DEBUG, fmt, ##args) #else #define DEBUGP(xss, fmt, args...) #define DEBUGPC(ss, fmt, args...) @@ -46,7 +37,7 @@ void osmo_vlogp(int subsys, int level, const char *file, int line, int cont, const char *format, va_list ap); -void logp(int subsys, const char *file, int line, int cont, const char *format, ...) __attribute__ ((format (printf, 5, 6))); +void logp(int subsys, const char *file, int line, int cont, const char *format, ...) OSMO_DEPRECATED("Use DEBUGP* macros instead"); /*! \brief Log a new message through the Osmocom logging framework * \param[in] ss logging subsystem (e.g. \ref DLGLOBAL) -- To view, visit https://gerrit.osmocom.org/1580 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia6c92bd4824c44fc22cc733ce7a88da86e58ed93 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 13 10:09:33 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 13 Jan 2017 10:09:33 +0000 Subject: [PATCH] libosmocore[master]: CTRL: add write-only helpers In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1574 to look at the new patch set (#3). CTRL: add write-only helpers Similar to CTRL_CMD_DEFINE_RO() add helper for control commands which are not meant to be read, only to set. Similarly, add CTRL_CMD_DEFINE_WO_NOVRF() for commands which do not perform inbound data verification. Change-Id: I66b7990db590c1f8e56326e392e6c1d2eafebd9a --- M include/osmocom/ctrl/control_cmd.h 1 file changed, 24 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/74/1574/3 diff --git a/include/osmocom/ctrl/control_cmd.h b/include/osmocom/ctrl/control_cmd.h index 8f2eaa2..a63557d 100644 --- a/include/osmocom/ctrl/control_cmd.h +++ b/include/osmocom/ctrl/control_cmd.h @@ -187,4 +187,28 @@ } \ CTRL_CMD_DEFINE_STRUCT(cmdname, cmdstr, verify_##cmdname) +#define CTRL_CMD_DEFINE_WO(cmdname, cmdstr) \ +static int set_##cmdname(struct ctrl_cmd *cmd, void *data); \ +static int get_##cmdname(struct ctrl_cmd *cmd, void *data) \ +{ \ + cmd->reply = "Write Only attribute"; \ + return CTRL_CMD_ERROR; \ +} \ +static int verify_##cmdname(struct ctrl_cmd *cmd, const char *val, void *data); \ +CTRL_CMD_DEFINE_STRUCT(cmdname, cmdstr, verify_##cmdname) + + +#define CTRL_CMD_DEFINE_WO_NOVRF(cmdname, cmdstr) \ +static int set_##cmdname(struct ctrl_cmd *cmd, void *data); \ +static int get_##cmdname(struct ctrl_cmd *cmd, void *data) \ +{ \ + cmd->reply = "Write Only attribute"; \ + return CTRL_CMD_ERROR; \ +} \ +static int verify_##cmdname(struct ctrl_cmd *cmd, const char *val, void *data) \ +{ \ + return 0; \ +} \ +CTRL_CMD_DEFINE_STRUCT(cmdname, cmdstr, verify_##cmdname) + struct gsm_network; -- To view, visit https://gerrit.osmocom.org/1574 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I66b7990db590c1f8e56326e392e6c1d2eafebd9a Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 13 10:14:49 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 13 Jan 2017 10:14:49 +0000 Subject: libosmocore[master]: utils/conv_gen.py: improve application flexibility In-Reply-To: References: Message-ID: Patch Set 2: If we're extending options parsing to smth non-trivial I think it might make sense to start using argparse module. -- To view, visit https://gerrit.osmocom.org/1584 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0b476b00234c17f78b41d695cf3bfd13edb64c28 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 13 10:16:32 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 13 Jan 2017 10:16:32 +0000 Subject: openbsc[master]: add strncpy0.h for safe/convenient strncpy() wrappers In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 I think this belongs to library. -- To view, visit https://gerrit.osmocom.org/1588 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I505d58a02fe46d492087a3dcbff59e287521d5ad Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 13 10:18:22 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 13 Jan 2017 10:18:22 +0000 Subject: openbsc[master]: gprs subscr: fix: intended strcmp(), but is strcpy() In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1590 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0ea035bd478f7022ed65e9e84d8aaf5e423309b7 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 13 10:19:18 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 13 Jan 2017 10:19:18 +0000 Subject: libosmocore[master]: stats_test: fix mismatching osmo_stats_reporter->send_item s... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1587 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I91cbfd4dd25a881b803943430101dabf07dafc7c Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 13 11:24:47 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 13 Jan 2017 11:24:47 +0000 Subject: openbsc[master]: add strncpy0.h for safe/convenient strncpy() wrappers In-Reply-To: References: Message-ID: Patch Set 2: Also, why not use strncat? if(sizeof(dst)) { *dst = '\0'; strncat(dst, src, sizeof(dst)-1); } looks easier to me. -- To view, visit https://gerrit.osmocom.org/1588 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I505d58a02fe46d492087a3dcbff59e287521d5ad Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 13 11:46:19 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 13 Jan 2017 11:46:19 +0000 Subject: openbsc[master]: Revert "Turn some warnings into errors" In-Reply-To: References: Message-ID: Patch Set 1: What kind of system are you using? Would it make sense to add it as another build slave to make sure jenkins catch this automatically in future? -- To view, visit https://gerrit.osmocom.org/1591 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2b368500b07f233882ef854eca1fa21f6df39e29 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 13 12:20:16 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 13 Jan 2017 12:20:16 +0000 Subject: openbsc[master]: add strncpy0.h for safe/convenient strncpy() wrappers In-Reply-To: References: Message-ID: Patch Set 2: > Also, why not use strncat? if(sizeof(dst)) { *dst = '\0'; > strncat(dst, src, sizeof(dst)-1); } looks easier to me. Ah, the 'if (len)' check should definitely be in there. Otherwise, using strncat is possible, never thought of it because all of the code was using strncpy(); dest[n-1] = '\0' strncpy() doesn't first go and find out the strlen to jump to the end, but agreed that with *dst = '\0' that would probably be optimized away. -- To view, visit https://gerrit.osmocom.org/1588 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I505d58a02fe46d492087a3dcbff59e287521d5ad Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 13 12:46:38 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 13 Jan 2017 12:46:38 +0000 Subject: [PATCH] libosmocore[master]: Mark deprecated function as such Message-ID: Review at https://gerrit.osmocom.org/1595 Mark deprecated function as such Mark abis_nm_debugp_foh() function superseded by macro with the same name as deprecated. Change-Id: I2d3ea2b56aff6b687f72f832360b8cb8a24164e9 --- M src/gsm/abis_nm.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/95/1595/1 diff --git a/src/gsm/abis_nm.c b/src/gsm/abis_nm.c index 73e3c7e..f392a90 100644 --- a/src/gsm/abis_nm.c +++ b/src/gsm/abis_nm.c @@ -597,7 +597,7 @@ /* this is just for compatibility reasons, it is now a macro */ #undef abis_nm_debugp_foh -void abis_nm_debugp_foh(int ss, struct abis_om_fom_hdr *foh) +void abis_nm_debugp_foh(int ss, struct abis_om_fom_hdr *foh) OSMO_DEPRECATED("Use abis_nm_debugp_foh macro instead") { DEBUGP(ss, "OC=%s(%02x) INST=(%02x,%02x,%02x) ", get_value_string(abis_nm_obj_class_names, foh->obj_class), -- To view, visit https://gerrit.osmocom.org/1595 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2d3ea2b56aff6b687f72f832360b8cb8a24164e9 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Jan 13 12:49:47 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 13 Jan 2017 12:49:47 +0000 Subject: [ABANDON] openbsc[master]: add strncpy0.h for safe/convenient strncpy() wrappers In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: add strncpy0.h for safe/convenient strncpy() wrappers ...................................................................... Abandoned damn, we already have osmo_strlcpy()! It could be optimized to not use strlen() first, but I shouldn't be adding another one. Also interesting that it returns strlen(src) instead of the bytes written. We don't ever use strncpy()'s return value anyway. -- To view, visit https://gerrit.osmocom.org/1588 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I505d58a02fe46d492087a3dcbff59e287521d5ad Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 13 13:01:42 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 13 Jan 2017 13:01:42 +0000 Subject: [PATCH] libosmocore[master]: Mark deprecated function as such In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1595 to look at the new patch set (#2). Mark deprecated function as such Mark abis_nm_debugp_foh() function superseded by macro with the same name as deprecated. Change-Id: I2d3ea2b56aff6b687f72f832360b8cb8a24164e9 --- M src/gsm/abis_nm.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/95/1595/2 diff --git a/src/gsm/abis_nm.c b/src/gsm/abis_nm.c index 73e3c7e..9839d29 100644 --- a/src/gsm/abis_nm.c +++ b/src/gsm/abis_nm.c @@ -597,6 +597,7 @@ /* this is just for compatibility reasons, it is now a macro */ #undef abis_nm_debugp_foh +OSMO_DEPRECATED("Use abis_nm_debugp_foh macro instead") void abis_nm_debugp_foh(int ss, struct abis_om_fom_hdr *foh) { DEBUGP(ss, "OC=%s(%02x) INST=(%02x,%02x,%02x) ", -- To view, visit https://gerrit.osmocom.org/1595 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2d3ea2b56aff6b687f72f832360b8cb8a24164e9 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Jan 13 13:17:59 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 13 Jan 2017 13:17:59 +0000 Subject: osmo-trx[master]: Remove embedded sqlite3 In-Reply-To: References: Message-ID: Patch Set 1: Btw, this will also few few coverity warnings triggered by embedded sqlite. -- To view, visit https://gerrit.osmocom.org/1485 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie8e751cc62132fe1f7748ccd78c5d48469027329 Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Tom Tsou Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 13 13:41:27 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 13 Jan 2017 13:41:27 +0000 Subject: [PATCH] libosmocore[master]: doc: clarify osmo_strlcpy() doc Message-ID: Review at https://gerrit.osmocom.org/1596 doc: clarify osmo_strlcpy() doc Stating that it 'truncates src' is misleading. Also clarify whether siz includes the space needed for the terminating NUL. Change-Id: I01c1a94408b471f7f54576178a60938bf9ee3261 --- M src/utils.c 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/96/1596/1 diff --git a/src/utils.c b/src/utils.c index 02c2443..df806df 100644 --- a/src/utils.c +++ b/src/utils.c @@ -343,12 +343,12 @@ /*! \brief Copy a C-string into a sized buffer * \param[in] src source string * \param[out] dst destination string - * \param[in] siz size of the \a dst string - * \returns length of source string + * \param[in] siz size of the \a dst buffer + * \returns length of \a src * - * Copies up to \a siz characters from \a src to \a dst, but ensures - * that the last character of \a dst is always a NUL character. May - * truncate \a src to do achieve this. + * Copy at most \a siz bytes from \a src to \a dst, ensuring that the result is + * NUL terminated. The NUL character is included in \a siz, i.e. passing the + * actual sizeof(*dst) is correct. */ size_t osmo_strlcpy(char *dst, const char *src, size_t siz) { -- To view, visit https://gerrit.osmocom.org/1596 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I01c1a94408b471f7f54576178a60938bf9ee3261 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 13 13:41:27 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 13 Jan 2017 13:41:27 +0000 Subject: [PATCH] libosmocore[master]: doc: fix doxygen 'utils' group closing brace Message-ID: Review at https://gerrit.osmocom.org/1597 doc: fix doxygen 'utils' group closing brace osmo_strlcpy() was excluded from the group because the closing brace was above it. Change-Id: I6701261f5854342ac4cd4f2da62e49eb40362938 --- M src/utils.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/97/1597/1 diff --git a/src/utils.c b/src/utils.c index df806df..34b2bca 100644 --- a/src/utils.c +++ b/src/utils.c @@ -338,7 +338,6 @@ osmo_store64be_ext(value, buf, data_len); return buf; } -/*! @} */ /*! \brief Copy a C-string into a sized buffer * \param[in] src source string @@ -361,3 +360,5 @@ } return ret; } + +/*! @} */ -- To view, visit https://gerrit.osmocom.org/1597 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6701261f5854342ac4cd4f2da62e49eb40362938 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 13 13:41:28 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 13 Jan 2017 13:41:28 +0000 Subject: [PATCH] libosmocore[master]: utils: add osmo_strncpy(), as drop-in replacement for strncpy() Message-ID: Review at https://gerrit.osmocom.org/1598 utils: add osmo_strncpy(), as drop-in replacement for strncpy() osmo_strlcpy() already exists, but it returns strlen(src). This does not match the stock strncpy() signature, so is not a real drop-in replacement. Also, the returned value and thus the iteration of src for strlen is usually not needed. Change-Id: If8ba5361c1d0c90973a1447ce30c1198946a5265 --- M include/osmocom/core/utils.h M src/utils.c 2 files changed, 32 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/98/1598/1 diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index 41bbc27..0d61901 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -87,5 +87,6 @@ uint8_t *osmo_encode_big_endian(uint64_t value, size_t data_len); size_t osmo_strlcpy(char *dst, const char *src, size_t siz); +char *osmo_strncpy(char *dst, const char *src, size_t siz); /*! @} */ diff --git a/src/utils.c b/src/utils.c index 34b2bca..e2a5db2 100644 --- a/src/utils.c +++ b/src/utils.c @@ -348,6 +348,8 @@ * Copy at most \a siz bytes from \a src to \a dst, ensuring that the result is * NUL terminated. The NUL character is included in \a siz, i.e. passing the * actual sizeof(*dst) is correct. + * + * \see osmo_strncpy() */ size_t osmo_strlcpy(char *dst, const char *src, size_t siz) { @@ -361,4 +363,33 @@ return ret; } +/*! \brief Copy a C-string into a sized buffer safely. + * \param[in] src source string + * \param[out] dst destination string + * \param[in] siz size of the \a dst buffer + * \returns \a dst + * + * Copy at most \a siz bytes from \a src to \a dst, ensuring that the result is + * NUL terminated. The NUL character is included in \a siz, i.e. passing the + * actual sizeof(*dst) is correct. + * + * This function is the same as osmo_strlcpy(), but does not return the length + * of \a src. Like the usual strncpy(), this returns \a dst instead. This saves + * one iteration of \a src, so should be more optimal than osmo_strlcpy(). + * + * If \a siz is zero or \a src is NULL, copy nothing and return \a dst. + * + * \see osmo_strlcpy + */ +char *osmo_strncpy(char *dst, const char *src, size_t siz) +{ + if (!siz || !dst) + return dst; + OSMO_ASSERT(src); + *dst = '\0'; + /* strncat writes n chars *plus* a terminating '\0', + * e.g. strncat(dst, src, 0) still writes a '\0'. */ + return strncat(dst, src, siz - 1); +} + /*! @} */ -- To view, visit https://gerrit.osmocom.org/1598 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If8ba5361c1d0c90973a1447ce30c1198946a5265 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 13 13:41:28 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 13 Jan 2017 13:41:28 +0000 Subject: [PATCH] libosmocore[master]: utils: add osmo_strscpy() macro to use sizeof(dst) Message-ID: Review at https://gerrit.osmocom.org/1599 utils: add osmo_strscpy() macro to use sizeof(dst) Change-Id: Ie973fc51835066540eba7ed2946ddf33a268b022 --- M include/osmocom/core/utils.h M src/utils.c 2 files changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/99/1599/1 diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index 0d61901..4ff9726 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -89,4 +89,8 @@ size_t osmo_strlcpy(char *dst, const char *src, size_t siz); char *osmo_strncpy(char *dst, const char *src, size_t siz); +/*! \brief Call osmo_strncpy() with the \a siz arg passed as sizeof(dst). */ +#define osmo_strscpy(dest, src) \ + osmo_strncpy(dest, src, sizeof(dest)) + /*! @} */ diff --git a/src/utils.c b/src/utils.c index e2a5db2..a884785 100644 --- a/src/utils.c +++ b/src/utils.c @@ -379,7 +379,7 @@ * * If \a siz is zero or \a src is NULL, copy nothing and return \a dst. * - * \see osmo_strlcpy + * \see osmo_strlcpy, osmo_strscpy */ char *osmo_strncpy(char *dst, const char *src, size_t siz) { -- To view, visit https://gerrit.osmocom.org/1599 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie973fc51835066540eba7ed2946ddf33a268b022 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 13 14:32:36 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 13 Jan 2017 14:32:36 +0000 Subject: [PATCH] openbsc[master]: fix strncpy() invocation in vty_interface_layer3.c and 3 tests In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1589 to look at the new patch set (#3). fix strncpy() invocation in vty_interface_layer3.c and 3 tests Use osmo_strscpy() to fix unsafe invocation of strncpy(), which potentially left the result unterminated. Depends on libosmocore Change-Id Ie973fc51835066540eba7ed2946ddf33a268b022 Change-Id: I1a119b1760a3e3262538b4b012d476fdce505482 --- M openbsc/src/libcommon/gsup_test_client.c M openbsc/src/libmsc/vty_interface_layer3.c M openbsc/tests/mgcp/mgcp_test.c M openbsc/tests/sgsn/sgsn_test.c 4 files changed, 9 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/89/1589/3 diff --git a/openbsc/src/libcommon/gsup_test_client.c b/openbsc/src/libcommon/gsup_test_client.c index 1889c6f..17de4f0 100644 --- a/openbsc/src/libcommon/gsup_test_client.c +++ b/openbsc/src/libcommon/gsup_test_client.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -108,7 +109,7 @@ struct osmo_gsup_message gsup = {0}; struct msgb *msg = msgb_alloc_headroom(1200, 200, __func__); - strncpy(gsup.imsi, io->imsi, sizeof(gsup.imsi)); + osmo_strscpy(gsup.imsi, io->imsi); gsup.message_type = OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST; osmo_gsup_encode(msg, &gsup); @@ -123,7 +124,7 @@ struct osmo_gsup_message gsup = {0}; struct msgb *msg = msgb_alloc_headroom(1200, 200, __func__); - strncpy(gsup.imsi, io->imsi, sizeof(gsup.imsi)); + osmo_strscpy(gsup.imsi, io->imsi); gsup.message_type = OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST; osmo_gsup_encode(msg, &gsup); @@ -136,7 +137,7 @@ struct osmo_gsup_message gsup = {0}; struct msgb *msg = msgb_alloc_headroom(1200, 200, __func__); - strncpy(gsup.imsi, io->imsi, sizeof(gsup.imsi)); + osmo_strscpy(gsup.imsi, io->imsi); gsup.message_type = OSMO_GSUP_MSGT_INSERT_DATA_RESULT; osmo_gsup_encode(msg, &gsup); diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index edece51..24a3cdd 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -601,7 +601,7 @@ return CMD_WARNING; } - strncpy(subscr->extension, ext, sizeof(subscr->extension)); + osmo_strscpy(subscr->extension, ext); db_sync_subscriber(subscr); subscr_put(subscr); diff --git a/openbsc/tests/mgcp/mgcp_test.c b/openbsc/tests/mgcp/mgcp_test.c index e2dc8fa..f961f2d 100644 --- a/openbsc/tests/mgcp/mgcp_test.c +++ b/openbsc/tests/mgcp/mgcp_test.c @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -54,7 +55,7 @@ char buf[2048]; int counter = 0; - strncpy(buf, strline_test_data, sizeof(buf)); + osmo_strscpy(buf, strline_test_data); for (line = strline_r(buf, &save); line; line = strline_r(NULL, &save)) { diff --git a/openbsc/tests/sgsn/sgsn_test.c b/openbsc/tests/sgsn/sgsn_test.c index b4bcaf6..d3179e3 100644 --- a/openbsc/tests/sgsn/sgsn_test.c +++ b/openbsc/tests/sgsn/sgsn_test.c @@ -36,6 +36,7 @@ #include #include #include +#include #include @@ -1292,7 +1293,7 @@ rc = osmo_gsup_decode(msgb_data(msg), msgb_length(msg), &to_peer); OSMO_ASSERT(rc >= 0); OSMO_ASSERT(to_peer.imsi[0] != 0); - strncpy(from_peer.imsi, to_peer.imsi, sizeof(from_peer.imsi)); + osmo_strscpy(from_peer.imsi, to_peer.imsi); /* This invalidates the pointers in to_peer */ msgb_free(msg); -- To view, visit https://gerrit.osmocom.org/1589 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I1a119b1760a3e3262538b4b012d476fdce505482 Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Jan 13 14:32:36 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 13 Jan 2017 14:32:36 +0000 Subject: [PATCH] openbsc[master]: cosmetic: use osmo_strscpy() or osmo_strncpy() everywhere In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1592 to look at the new patch set (#2). cosmetic: use osmo_strscpy() or osmo_strncpy() everywhere Shorten some code and make obvious to the reader that strncpy() is invoked in a safe way. Depends on libosmocore Change-Id Ie973fc51835066540eba7ed2946ddf33a268b022 Change-Id: I900726cf06d34128db22a3d3d911ee0d1423b1bd --- M openbsc/src/gprs/gprs_gmm.c M openbsc/src/gprs/gprs_subscriber.c M openbsc/src/gprs/gtphub.c M openbsc/src/gprs/gtphub_ares.c M openbsc/src/gprs/sgsn_auth.c M openbsc/src/libbsc/abis_nm.c M openbsc/src/libbsc/bsc_rf_ctrl.c M openbsc/src/libcommon/gsm_subscriber_base.c M openbsc/src/libcommon/gsup_test_client.c M openbsc/src/libmsc/ctrl_commands.c M openbsc/src/libmsc/db.c M openbsc/src/libmsc/gsm_04_08.c M openbsc/src/libmsc/gsm_04_11.c M openbsc/src/libmsc/meas_feed.c M openbsc/src/libmsc/smpp_openbsc.c M openbsc/src/libmsc/vty_interface_layer3.c M openbsc/src/libtrau/rtp_proxy.c M openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c M openbsc/src/utils/meas_vis.c M openbsc/tests/gtphub/gtphub_test.c M openbsc/tests/sgsn/sgsn_test.c 21 files changed, 82 insertions(+), 119 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/92/1592/2 diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c index 363b457..d9ffb77 100644 --- a/openbsc/src/gprs/gprs_gmm.c +++ b/openbsc/src/gprs/gprs_gmm.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -681,11 +682,10 @@ /* Prepend a '+' for international numbers */ if (called.plan == 1 && called.type == 1) { ctx->msisdn[0] = '+'; - strncpy(&ctx->msisdn[1], called.number, - sizeof(ctx->msisdn) - 1); + osmo_strncpy(&ctx->msisdn[1], called.number, + sizeof(ctx->msisdn) - 1); } else { - strncpy(&ctx->msisdn[0], called.number, - sizeof(ctx->msisdn) - 1); + osmo_strscpy(ctx->msisdn, called.number); } } @@ -723,7 +723,7 @@ return; } - strncpy(&ctx->hlr[0], called.number, sizeof(ctx->hlr) - 1); + osmo_strscpy(ctx->hlr, called.number); } #ifdef BUILD_IU @@ -1032,10 +1032,10 @@ mm_ctx_cleanup_free(ictx, "GPRS IMSI re-use"); } } - strncpy(ctx->imsi, mi_string, sizeof(ctx->imsi) - 1); + osmo_strscpy(ctx->imsi, mi_string); break; case GSM_MI_TYPE_IMEI: - strncpy(ctx->imei, mi_string, sizeof(ctx->imei) - 1); + osmo_strscpy(ctx->imei, mi_string); break; case GSM_MI_TYPE_IMEISV: break; @@ -1136,7 +1136,7 @@ reject_cause = GMM_CAUSE_NET_FAIL; goto rejected; } - strncpy(ctx->imsi, mi_string, sizeof(ctx->imsi) - 1); + osmo_strscpy(ctx->imsi, mi_string); #endif } if (ctx->ran_type == MM_CTX_T_GERAN_Gb) { diff --git a/openbsc/src/gprs/gprs_subscriber.c b/openbsc/src/gprs/gprs_subscriber.c index 23dbdd4..133213b 100644 --- a/openbsc/src/gprs/gprs_subscriber.c +++ b/openbsc/src/gprs/gprs_subscriber.c @@ -22,6 +22,7 @@ #include #include +#include #include #include @@ -164,7 +165,7 @@ struct msgb *msg = gsup_client_msgb_alloc(); if (strlen(gsup_msg->imsi) == 0 && subscr) - strncpy(gsup_msg->imsi, subscr->imsi, sizeof(gsup_msg->imsi) - 1); + osmo_strscpy(gsup_msg->imsi, subscr->imsi); gsup_msg->cn_domain = OSMO_GSUP_CN_DOMAIN_PS; osmo_gsup_encode(msg, gsup_msg); @@ -185,7 +186,7 @@ { struct osmo_gsup_message gsup_reply = {0}; - strncpy(gsup_reply.imsi, gsup_orig->imsi, sizeof(gsup_reply.imsi) - 1); + osmo_strscpy(gsup_reply.imsi, gsup_orig->imsi); gsup_reply.cause = cause; gsup_reply.message_type = OSMO_GSUP_TO_MSGT_ERROR(gsup_orig->message_type); @@ -778,11 +779,8 @@ subscr->flags &= ~GPRS_SUBSCRIBER_ENABLE_PURGE; } - if (strcpy(subscr->equipment.imei, mmctx->imei) != 0) { - strncpy(subscr->equipment.imei, mmctx->imei, - sizeof(subscr->equipment.imei)-1); - subscr->equipment.imei[sizeof(subscr->equipment.imei)-1] = 0; - } + if (strcpy(subscr->equipment.imei, mmctx->imei) != 0) + osmo_strscpy(subscr->equipment.imei, mmctx->imei); if (subscr->lac != mmctx->ra.lac) subscr->lac = mmctx->ra.lac; diff --git a/openbsc/src/gprs/gtphub.c b/openbsc/src/gprs/gtphub.c index a0af42b..e3ff5d8 100644 --- a/openbsc/src/gprs/gtphub.c +++ b/openbsc/src/gprs/gtphub.c @@ -2360,8 +2360,7 @@ ggsn->peer = pp; gtphub_port_ref_count_inc(pp); - strncpy(ggsn->apn_oi_str, apn_oi_str, sizeof(ggsn->apn_oi_str)); - ggsn->apn_oi_str[sizeof(ggsn->apn_oi_str) - 1] = '\0'; + osmo_strscpy(ggsn->apn_oi_str, apn_oi_str); ggsn->expiry_entry.del_cb = resolved_gssn_del_cb; expiry_add(&hub->expire_slowly, &ggsn->expiry_entry, now); diff --git a/openbsc/src/gprs/gtphub_ares.c b/openbsc/src/gprs/gtphub_ares.c index 667013b..1df2ffb 100644 --- a/openbsc/src/gprs/gtphub_ares.c +++ b/openbsc/src/gprs/gtphub_ares.c @@ -121,8 +121,7 @@ apn_oi_str = osmo_apn_qualify_from_imsi(lookup->imsi_str, lookup->apn_ni_str, lookup->have_3dig_mnc); - strncpy(lookup->apn_oi_str, apn_oi_str, sizeof(lookup->apn_oi_str)); - lookup->apn_oi_str[sizeof(lookup->apn_oi_str)-1] = '\0'; + osmo_strscpy(lookup->apn_oi_str, apn_oi_str); } static int start_ares_query(struct ggsn_lookup *lookup) @@ -170,11 +169,8 @@ expiring_item_init(&lookup->expiry_entry); lookup->hub = hub; - strncpy(lookup->imsi_str, imsi_str, sizeof(lookup->imsi_str)); - lookup->imsi_str[sizeof(lookup->imsi_str)-1] = '\0'; - - strncpy(lookup->apn_ni_str, apn_ni_str, sizeof(lookup->apn_ni_str)); - lookup->apn_ni_str[sizeof(lookup->apn_ni_str)-1] = '\0'; + osmo_strscpy(lookup->imsi_str, imsi_str); + osmo_strscpy(lookup->apn_ni_str, apn_ni_str); make_addr_str(lookup); diff --git a/openbsc/src/gprs/sgsn_auth.c b/openbsc/src/gprs/sgsn_auth.c index 4b69a0d..e413e3e 100644 --- a/openbsc/src/gprs/sgsn_auth.c +++ b/openbsc/src/gprs/sgsn_auth.c @@ -20,6 +20,7 @@ */ #include +#include #include #include #include @@ -62,7 +63,7 @@ acl = talloc_zero(NULL, struct imsi_acl_entry); if (!acl) return -ENOMEM; - strncpy(acl->imsi, imsi, sizeof(acl->imsi) - 1); + osmo_strscpy(acl->imsi, imsi); llist_add(&acl->list, &cfg->imsi_acl); diff --git a/openbsc/src/libbsc/abis_nm.c b/openbsc/src/libbsc/abis_nm.c index 0c723e8..e49f052 100644 --- a/openbsc/src/libbsc/abis_nm.c +++ b/openbsc/src/libbsc/abis_nm.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -2235,8 +2236,7 @@ } /* construct new filename */ - strncpy(dir, bs11_sw->swl_fname, sizeof(dir)); - dir[sizeof(dir)-1] = '\0'; + osmo_strscpy(dir, bs11_sw->swl_fname); strncat(fle->fname, dirname(dir), sizeof(fle->fname) - 1); strcat(fle->fname, "/"); strncat(fle->fname, file_id, sizeof(fle->fname) - 1 -strlen(fle->fname)); @@ -2307,8 +2307,7 @@ bs11_sw->user_cb = cbfn; bs11_sw->forced = forced; - strncpy(bs11_sw->swl_fname, fname, sizeof(bs11_sw->swl_fname)); - bs11_sw->swl_fname[sizeof(bs11_sw->swl_fname)-1] = '\0'; + osmo_strscpy(bs11_sw->swl_fname, fname); rc = bs11_read_swl_file(bs11_sw); if (rc < 0) return rc; diff --git a/openbsc/src/libbsc/bsc_rf_ctrl.c b/openbsc/src/libbsc/bsc_rf_ctrl.c index 0538482..76c0ebc 100644 --- a/openbsc/src/libbsc/bsc_rf_ctrl.c +++ b/openbsc/src/libbsc/bsc_rf_ctrl.c @@ -451,8 +451,7 @@ } local.sun_family = AF_UNIX; - strncpy(local.sun_path, path, sizeof(local.sun_path)); - local.sun_path[sizeof(local.sun_path) - 1] = '\0'; + osmo_strscpy(local.sun_path, path); unlink(local.sun_path); /* we use the same magic that X11 uses in Xtranssock.c for diff --git a/openbsc/src/libcommon/gsm_subscriber_base.c b/openbsc/src/libcommon/gsm_subscriber_base.c index 1f98cc6..e838acd 100644 --- a/openbsc/src/libcommon/gsm_subscriber_base.c +++ b/openbsc/src/libcommon/gsm_subscriber_base.c @@ -28,6 +28,7 @@ #include #include +#include #include #include @@ -115,7 +116,7 @@ if (!subscr) return NULL; - strncpy(subscr->imsi, imsi, sizeof(subscr->imsi)-1); + osmo_strscpy(subscr->imsi, imsi); subscr->group = sgrp; return subscr; } diff --git a/openbsc/src/libcommon/gsup_test_client.c b/openbsc/src/libcommon/gsup_test_client.c index 17de4f0..1e7fca4 100644 --- a/openbsc/src/libcommon/gsup_test_client.c +++ b/openbsc/src/libcommon/gsup_test_client.c @@ -75,8 +75,7 @@ return NULL; io = talloc_zero(ctx, struct imsi_op); - strncpy(io->imsi, imsi, sizeof(io->imsi)); - io->imsi[sizeof(io->imsi)-1] = '\0'; + osmo_strscpy(io->imsi, imsi); io->type = type; io->timer.cb = imsi_op_timer_cb; io->timer.data = io; diff --git a/openbsc/src/libmsc/ctrl_commands.c b/openbsc/src/libmsc/ctrl_commands.c index 79e136d..87bf58e 100644 --- a/openbsc/src/libmsc/ctrl_commands.c +++ b/openbsc/src/libmsc/ctrl_commands.c @@ -20,6 +20,7 @@ */ #include +#include #include #include #include @@ -103,8 +104,7 @@ goto fail; subscr->authorized = 1; - strncpy(subscr->extension, msisdn, GSM_EXTENSION_LENGTH - 1); - subscr->extension[GSM_EXTENSION_LENGTH-1] = '\0'; + osmo_strscpy(subscr->extension, msisdn); /* put it back to the db */ rc = db_sync_subscriber(subscr); diff --git a/openbsc/src/libmsc/db.c b/openbsc/src/libmsc/db.c index 5cccb32..633d071 100644 --- a/openbsc/src/libmsc/db.c +++ b/openbsc/src/libmsc/db.c @@ -39,6 +39,7 @@ #include #include #include +#include #include @@ -240,7 +241,7 @@ snprintf(buf, sizeof(buf), "%llu", sender_id); sender = db_get_subscriber(GSM_SUBSCRIBER_ID, buf); OSMO_ASSERT(sender); - strncpy(sms->src.addr, sender->extension, sizeof(sms->src.addr)-1); + osmo_strscpy(sms->src.addr, sender->extension); subscr_direct_free(sender); sender = NULL; @@ -252,10 +253,8 @@ "data_coding_scheme"); daddr = dbi_result_get_string(result, "dest_addr"); - if (daddr) { - strncpy(sms->dst.addr, daddr, sizeof(sms->dst.addr)); - sms->dst.addr[sizeof(sms->dst.addr)-1] = '\0'; - } + if (daddr) + osmo_strscpy(sms->dst.addr, daddr); sms->user_data_len = dbi_result_get_field_length(result, "user_data"); user_data = dbi_result_get_binary(result, "user_data"); @@ -264,10 +263,8 @@ memcpy(sms->user_data, user_data, sms->user_data_len); text = dbi_result_get_string(result, "text"); - if (text) { - strncpy(sms->text, text, sizeof(sms->text)); - sms->text[sizeof(sms->text)-1] = '\0'; - } + if (text) + osmo_strscpy(sms->text, text); return sms; } @@ -549,7 +546,7 @@ return NULL; } subscr->id = dbi_conn_sequence_last(conn, NULL); - strncpy(subscr->imsi, imsi, sizeof(subscr->imsi)-1); + osmo_strscpy(subscr->imsi, imsi); dbi_result_free(result); LOGP(DDB, LOGL_INFO, "New Subscriber: ID %llu, IMSI %s\n", subscr->id, subscr->imsi); if (alloc_exten) @@ -585,7 +582,7 @@ string = dbi_result_get_string(result, "imei"); if (string) - strncpy(equip->imei, string, sizeof(equip->imei)-1); + osmo_strscpy(equip->imei, string); string = dbi_result_get_string(result, "classmark1"); if (string) { @@ -824,21 +821,19 @@ const char *string; string = dbi_result_get_string(result, "imsi"); if (string) - strncpy(subscr->imsi, string, sizeof(subscr->imsi)-1); + osmo_strscpy(subscr->imsi, string); string = dbi_result_get_string(result, "tmsi"); if (string) subscr->tmsi = tmsi_from_string(string); string = dbi_result_get_string(result, "name"); - if (string) { - strncpy(subscr->name, string, GSM_NAME_LENGTH); - subscr->name[sizeof(subscr->name)-1] = '\0'; - } + if (string) + osmo_strscpy(subscr->name, string); string = dbi_result_get_string(result, "extension"); if (string) - strncpy(subscr->extension, string, GSM_EXTENSION_LENGTH); + osmo_strscpy(subscr->extension, string); subscr->lac = dbi_result_get_ulonglong(result, "lac"); @@ -1351,8 +1346,7 @@ unsigned long long equipment_id, watch_id; dbi_result result; - strncpy(subscriber->equipment.imei, imei, - sizeof(subscriber->equipment.imei)-1); + osmo_strscpy(subscriber->equipment.imei, imei); result = dbi_conn_queryf(conn, "INSERT OR IGNORE INTO Equipment " @@ -1502,19 +1496,15 @@ sms->dst.npi = dbi_result_get_ulonglong(result, "dest_npi"); sms->dst.ton = dbi_result_get_ulonglong(result, "dest_ton"); daddr = dbi_result_get_string(result, "dest_addr"); - if (daddr) { - strncpy(sms->dst.addr, daddr, sizeof(sms->dst.addr)); - sms->dst.addr[sizeof(sms->dst.addr)-1] = '\0'; - } + if (daddr) + osmo_strscpy(sms->dst.addr, daddr); sms->receiver = subscr_get_by_extension(net->subscr_group, sms->dst.addr); sms->src.npi = dbi_result_get_ulonglong(result, "src_npi"); sms->src.ton = dbi_result_get_ulonglong(result, "src_ton"); saddr = dbi_result_get_string(result, "src_addr"); - if (saddr) { - strncpy(sms->src.addr, saddr, sizeof(sms->src.addr)); - sms->src.addr[sizeof(sms->src.addr)-1] = '\0'; - } + if (saddr) + osmo_strscpy(sms->src.addr, saddr); sms->user_data_len = dbi_result_get_field_length(result, "user_data"); user_data = dbi_result_get_binary(result, "user_data"); @@ -1523,10 +1513,8 @@ memcpy(sms->user_data, user_data, sms->user_data_len); text = dbi_result_get_string(result, "text"); - if (text) { - strncpy(sms->text, text, sizeof(sms->text)); - sms->text[sizeof(sms->text)-1] = '\0'; - } + if (text) + osmo_strscpy(sms->text, text); return sms; } diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index 34492bb..1d13440 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -65,6 +65,7 @@ #include #include #include +#include #include #include @@ -1973,10 +1974,8 @@ /* use subscriber as calling party number */ setup.fields |= MNCC_F_CALLING; - strncpy(setup.calling.number, trans->subscr->extension, - sizeof(setup.calling.number)-1); - strncpy(setup.imsi, trans->subscr->imsi, - sizeof(setup.imsi)-1); + osmo_strscpy(setup.calling.number, trans->subscr->extension); + osmo_strscpy(setup.imsi, trans->subscr->imsi); /* bearer capability */ if (TLVP_PRESENT(&tp, GSM48_IE_BEARER_CAP)) { @@ -2153,8 +2152,7 @@ } /* IMSI of called subscriber */ - strncpy(call_conf.imsi, trans->subscr->imsi, - sizeof(call_conf.imsi)-1); + osmo_strscpy(call_conf.imsi, trans->subscr->imsi); new_cc_state(trans, GSM_CSTATE_MO_TERM_CALL_CONF); @@ -2307,10 +2305,8 @@ tlv_parse(&tp, &gsm48_att_tlvdef, gh->data, payload_len, 0, 0); /* use subscriber as connected party number */ connect.fields |= MNCC_F_CONNECTED; - strncpy(connect.connected.number, trans->subscr->extension, - sizeof(connect.connected.number)-1); - strncpy(connect.imsi, trans->subscr->imsi, - sizeof(connect.imsi)-1); + osmo_strscpy(connect.connected.number, trans->subscr->extension); + osmo_strscpy(connect.imsi, trans->subscr->imsi); /* facility */ if (TLVP_PRESENT(&tp, GSM48_IE_FACILITY)) { diff --git a/openbsc/src/libmsc/gsm_04_11.c b/openbsc/src/libmsc/gsm_04_11.c index 48a87e0..40d4487 100644 --- a/openbsc/src/libmsc/gsm_04_11.c +++ b/openbsc/src/libmsc/gsm_04_11.c @@ -37,6 +37,7 @@ #include #include +#include #include #include @@ -92,15 +93,15 @@ return NULL; sms->receiver = subscr_get(receiver); - strncpy(sms->text, text, sizeof(sms->text)-1); + osmo_strscpy(sms->text, text); - strncpy(sms->src.addr, sender->extension, sizeof(sms->src.addr)-1); + osmo_strscpy(sms->src.addr, sender->extension); sms->reply_path_req = 0; sms->status_rep_req = 0; sms->ud_hdr_ind = 0; sms->protocol_id = 0; /* implicit */ sms->data_coding_scheme = dcs; - strncpy(sms->dst.addr, receiver->extension, sizeof(sms->dst.addr)-1); + osmo_strscpy(sms->dst.addr, receiver->extension); /* Generate user_data */ sms->user_data_len = gsm_7bit_encode_n(sms->user_data, sizeof(sms->user_data), sms->text, NULL); @@ -464,7 +465,7 @@ } } - strncpy(gsms->src.addr, conn->subscr->extension, sizeof(gsms->src.addr)-1); + osmo_strscpy(gsms->src.addr, conn->subscr->extension); LOGP(DLSMS, LOGL_INFO, "RX SMS: Sender: %s, MTI: 0x%02x, VPF: 0x%02x, " "MR: 0x%02x PID: 0x%02x, DCS: 0x%02x, DA: %s, " diff --git a/openbsc/src/libmsc/meas_feed.c b/openbsc/src/libmsc/meas_feed.c index cd2b648..28f0f0b 100644 --- a/openbsc/src/libmsc/meas_feed.c +++ b/openbsc/src/libmsc/meas_feed.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -52,12 +53,9 @@ mfm->hdr.version = MEAS_FEED_VERSION; /* fill in MEAS_FEED_MEAS specific header */ - strncpy(mfm->imsi, subscr->imsi, sizeof(mfm->imsi)-1); - mfm->imsi[sizeof(mfm->imsi)-1] = '\0'; - strncpy(mfm->name, subscr->name, sizeof(mfm->name)-1); - mfm->name[sizeof(mfm->name)-1] = '\0'; - strncpy(mfm->scenario, g_mfs.scenario, sizeof(mfm->scenario)); - mfm->scenario[sizeof(mfm->scenario)-1] = '\0'; + osmo_strscpy(mfm->imsi, subscr->imsi); + osmo_strscpy(mfm->name, subscr->name); + osmo_strscpy(mfm->scenario, g_mfs.scenario); /* copy the entire measurement report */ memcpy(&mfm->mr, mr, sizeof(mfm->mr)); @@ -160,8 +158,7 @@ void meas_feed_scenario_set(const char *name) { - strncpy(g_mfs.scenario, name, sizeof(g_mfs.scenario)-1); - g_mfs.scenario[sizeof(g_mfs.scenario)-1] = '\0'; + osmo_strscpy(g_mfs.scenario, name); } const char *meas_feed_scenario_get(void) diff --git a/openbsc/src/libmsc/smpp_openbsc.c b/openbsc/src/libmsc/smpp_openbsc.c index 228e61d..642a1a7 100644 --- a/openbsc/src/libmsc/smpp_openbsc.c +++ b/openbsc/src/libmsc/smpp_openbsc.c @@ -133,12 +133,12 @@ sms->receiver = dest; sms->dst.ton = submit->dest_addr_ton; sms->dst.npi = submit->dest_addr_npi; - strncpy(sms->dst.addr, dest->extension, sizeof(sms->dst.addr)-1); + osmo_strscpy(sms->dst.addr, dest->extension); /* fill in the source address */ sms->src.ton = submit->source_addr_ton; sms->src.npi = submit->source_addr_npi; - strncpy(sms->src.addr, (char *)submit->source_addr, sizeof(sms->src.addr)-1); + osmo_strscpy(sms->src.addr, (char *)submit->source_addr); if (submit->esm_class & 0x40) sms->ud_hdr_ind = 1; diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index 24a3cdd..9635fc0 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -567,8 +567,7 @@ return CMD_WARNING; } - strncpy(subscr->name, name, sizeof(subscr->name)); - subscr->name[sizeof(subscr->name)-1] = '\0'; + osmo_strscpy(subscr->name, name); talloc_free(name); db_sync_subscriber(subscr); diff --git a/openbsc/src/libtrau/rtp_proxy.c b/openbsc/src/libtrau/rtp_proxy.c index ed19175..39dd46d 100644 --- a/openbsc/src/libtrau/rtp_proxy.c +++ b/openbsc/src/libtrau/rtp_proxy.c @@ -29,6 +29,7 @@ #include /* uname() */ #include +#include #include #include #include @@ -368,9 +369,7 @@ } if (rtph->type == RTCP_TYPE_SDES) { char new_cname[255]; - strncpy(new_cname, inet_ntoa(rss->sin_local.sin_addr), - sizeof(new_cname)); - new_cname[sizeof(new_cname)-1] = '\0'; + osmo_strscpy(new_cname, inet_ntoa(rss->sin_local.sin_addr)); rc = rtcp_sdes_cname_mangle(msg, rtph, &old_len, new_cname); if (rc < 0) diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c b/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c index 58667fe..7003e39 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c @@ -31,6 +31,7 @@ #include #include +#include #include #include @@ -129,15 +130,13 @@ { if (strncmp(chosen_number, "00", 2) == 0) { called->type = 1; - strncpy(called->number, chosen_number + 2, sizeof(called->number)); + osmo_strscpy(called->number, chosen_number + 2); } else { /* rewrite international to unknown */ if (called->type == 1) called->type = 0; - strncpy(called->number, chosen_number, sizeof(called->number)); + osmo_strscpy(called->number, chosen_number); } - - called->number[sizeof(called->number) - 1] = '\0'; } /** diff --git a/openbsc/src/utils/meas_vis.c b/openbsc/src/utils/meas_vis.c index 061a7a4..67ce574 100644 --- a/openbsc/src/utils/meas_vis.c +++ b/openbsc/src/utils/meas_vis.c @@ -73,7 +73,7 @@ ms = find_ms(imsi); if (!ms) { ms = talloc_zero(NULL, struct ms_state); - strncpy(ms->imsi, imsi, sizeof(ms->imsi)-1); + osmo_strscpy(ms->imsi, imsi); ms->ul._lbl[0] = ms->ul.label; ms->dl._lbl[0] = ms->dl.label; llist_add_tail(&ms->list, &g_st.ms_list); @@ -88,7 +88,7 @@ struct ms_state *ms = find_alloc_ms(mfm->imsi); time_t now = time(NULL); - strncpy(ms->name, mfm->name, sizeof(ms->imsi)-1); + osmo_strscpy(ms->name, mfm->name); memcpy(&ms->mr, &mfm->mr, sizeof(ms->mr)); ms->ul.last_update = now; if (ms->mr.flags & MEAS_REP_F_DL_VALID) diff --git a/openbsc/tests/gtphub/gtphub_test.c b/openbsc/tests/gtphub/gtphub_test.c index 7d7673b..ebb74de 100644 --- a/openbsc/tests/gtphub/gtphub_test.c +++ b/openbsc/tests/gtphub/gtphub_test.c @@ -449,21 +449,13 @@ " returning GGSN addr from imsi %s ni %s: %s\n", imsi_str, apn_ni_str, gtphub_port_str(pp)); - if (imsi_str) { - strncpy(resolve_ggsn_got_imsi, imsi_str, - sizeof(resolve_ggsn_got_imsi)); - resolve_ggsn_got_imsi[sizeof(resolve_ggsn_got_imsi) - 1] = '\0'; - } - else - strcpy(resolve_ggsn_got_imsi, "(null)"); + if (!imsi_str) + imsi_str = "(null)"; + osmo_strscpy(resolve_ggsn_got_imsi, imsi_str); - if (apn_ni_str) { - strncpy(resolve_ggsn_got_ni, apn_ni_str, - sizeof(resolve_ggsn_got_ni)); - resolve_ggsn_got_ni[sizeof(resolve_ggsn_got_ni) - 1] = '\0'; - } - else - strcpy(resolve_ggsn_got_ni, "(null)"); + if (!apn_ni_str) + apn_ni_str = "(null)"; + osmo_strscpy(resolve_ggsn_got_ni, apn_ni_str); return pp; } diff --git a/openbsc/tests/sgsn/sgsn_test.c b/openbsc/tests/sgsn/sgsn_test.c index d3179e3..1b4d6ea 100644 --- a/openbsc/tests/sgsn/sgsn_test.c +++ b/openbsc/tests/sgsn/sgsn_test.c @@ -2248,7 +2248,7 @@ /* Create a context */ OSMO_ASSERT(count(gprs_llme_list()) == 0); ctx = alloc_mm_ctx(local_tlli, &raid); - strncpy(ctx->imsi, imsi1, sizeof(ctx->imsi) - 1); + osmo_strscpy(ctx->imsi, imsi1); /* Allocate and attach a subscriber */ s1 = gprs_subscr_get_or_create_by_mmctx(ctx); @@ -2273,7 +2273,7 @@ pdp_data = sgsn_subscriber_pdp_data_alloc(s1->sgsn_data); pdp_data->context_id = 1; pdp_data->pdp_type = 0x0121; - strncpy(pdp_data->apn_str, "*", sizeof(pdp_data->apn_str)-1); + osmo_strscpy(pdp_data->apn_str, "*"); /* Resolve GGSNs */ @@ -2326,7 +2326,7 @@ /* Add PDP data entry to subscriber */ - strncpy(pdp_data->apn_str, "Test.Apn", sizeof(pdp_data->apn_str)-1); + osmo_strscpy(pdp_data->apn_str, "Test.Apn"); tp.lv[GSM48_IE_GSM_APN].len = gprs_str_to_apn(apn_enc, sizeof(apn_enc), "Test.Apn"); -- To view, visit https://gerrit.osmocom.org/1592 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I900726cf06d34128db22a3d3d911ee0d1423b1bd Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Jan 13 14:41:38 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 13 Jan 2017 14:41:38 +0000 Subject: [PATCH] libosmocore[master]: utils: add osmo_strncpy(), as drop-in replacement for strncpy() In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1598 to look at the new patch set (#2). utils: add osmo_strncpy(), as drop-in replacement for strncpy() osmo_strlcpy() already exists, but it returns strlen(src). This does not match the stock strncpy() signature, so is not a real drop-in replacement. Also, the returned value and thus the iteration of src for strlen is usually not needed. Change-Id: If8ba5361c1d0c90973a1447ce30c1198946a5265 --- M include/osmocom/core/utils.h M src/utils.c 2 files changed, 34 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/98/1598/2 diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index 41bbc27..0d61901 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -87,5 +87,6 @@ uint8_t *osmo_encode_big_endian(uint64_t value, size_t data_len); size_t osmo_strlcpy(char *dst, const char *src, size_t siz); +char *osmo_strncpy(char *dst, const char *src, size_t siz); /*! @} */ diff --git a/src/utils.c b/src/utils.c index 34b2bca..1daa7ea 100644 --- a/src/utils.c +++ b/src/utils.c @@ -348,6 +348,8 @@ * Copy at most \a siz bytes from \a src to \a dst, ensuring that the result is * NUL terminated. The NUL character is included in \a siz, i.e. passing the * actual sizeof(*dst) is correct. + * + * \see osmo_strncpy() */ size_t osmo_strlcpy(char *dst, const char *src, size_t siz) { @@ -361,4 +363,35 @@ return ret; } +/*! \brief Copy a C-string into a sized buffer safely. + * \param[in] src source string + * \param[out] dst destination string + * \param[in] siz size of the \a dst buffer + * \returns \a dst + * + * Copy at most \a siz bytes from \a src to \a dst, ensuring that the result is + * NUL terminated. The NUL character is included in \a siz, i.e. passing the + * actual sizeof(*dst) is correct. + * + * This function is the same as osmo_strlcpy(), but does not return the length + * of \a src. Like the usual strncpy(), this returns \a dst instead. This saves + * one iteration of \a src, so should be more optimal than osmo_strlcpy(). + * + * If \a dst is NULL or \a siz is zero, copy nothing and return \a dst. + * Otherwise, if \a src is NULL, merely write NUL to the start of \a dst. + * + * \see osmo_strlcpy + */ +char *osmo_strncpy(char *dst, const char *src, size_t siz) +{ + if (!dst || !siz) + return dst; + *dst = '\0'; + if (!src) + return dst; + /* strncat writes n chars *plus* a terminating '\0', + * e.g. strncat(dst, src, 0) still writes a '\0'. */ + return strncat(dst, src, siz - 1); +} + /*! @} */ -- To view, visit https://gerrit.osmocom.org/1598 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If8ba5361c1d0c90973a1447ce30c1198946a5265 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Jan 13 18:19:46 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 13 Jan 2017 18:19:46 +0000 Subject: [PATCH] openbsc[master]: Log expected SRES on GPRS AUTH REJECT Message-ID: Review at https://gerrit.osmocom.org/1600 Log expected SRES on GPRS AUTH REJECT Change-Id: I19b0001650979bf7f1832f04f9fd5a26beb577d0 --- M openbsc/src/gprs/gprs_gmm.c 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/00/1600/1 diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c index 363b457..ed129bd 100644 --- a/openbsc/src/gprs/gprs_gmm.c +++ b/openbsc/src/gprs/gprs_gmm.c @@ -640,7 +640,9 @@ memcmp(TLVP_VAL(&tp, GSM48_IE_GMM_AUTH_SRES), at->vec.sres, sizeof(at->vec.sres)) != 0) { - LOGMMCTXP(LOGL_NOTICE, ctx, "Received SRES doesn't match\n"); + LOGMMCTXP(LOGL_NOTICE, ctx, "Received SRES doesn't match " + "expected RES %s\n", osmo_hexdump(at->vec.sres, + sizeof(at->vec.sres)); rc = gsm48_tx_gmm_auth_ciph_rej(ctx); mm_ctx_cleanup_free(ctx, "GPRS AUTH AND CIPH REJECT"); return rc; -- To view, visit https://gerrit.osmocom.org/1600 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I19b0001650979bf7f1832f04f9fd5a26beb577d0 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Jan 13 18:32:34 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 13 Jan 2017 18:32:34 +0000 Subject: [PATCH] openbsc[master]: Log expected SRES on GPRS AUTH REJECT In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1600 to look at the new patch set (#2). Log expected SRES on GPRS AUTH REJECT Change-Id: I19b0001650979bf7f1832f04f9fd5a26beb577d0 --- M openbsc/src/gprs/gprs_gmm.c 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/00/1600/2 diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c index 363b457..e3d5c7d 100644 --- a/openbsc/src/gprs/gprs_gmm.c +++ b/openbsc/src/gprs/gprs_gmm.c @@ -640,7 +640,9 @@ memcmp(TLVP_VAL(&tp, GSM48_IE_GMM_AUTH_SRES), at->vec.sres, sizeof(at->vec.sres)) != 0) { - LOGMMCTXP(LOGL_NOTICE, ctx, "Received SRES doesn't match\n"); + LOGMMCTXP(LOGL_NOTICE, ctx, "Received SRES doesn't match " + "expected RES %s\n", osmo_hexdump(at->vec.sres, + sizeof(at->vec.sres))); rc = gsm48_tx_gmm_auth_ciph_rej(ctx); mm_ctx_cleanup_free(ctx, "GPRS AUTH AND CIPH REJECT"); return rc; -- To view, visit https://gerrit.osmocom.org/1600 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I19b0001650979bf7f1832f04f9fd5a26beb577d0 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Jan 15 03:56:38 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 15 Jan 2017 03:56:38 +0000 Subject: [PATCH] libosmocore[master]: utils/conv_gen.py: improve application flexibility In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1584 to look at the new patch set (#3). utils/conv_gen.py: improve application flexibility This change makes the conv_gen application more interactive and flexible, allowing to generate not only code definitions but also the test vectors and header files in the future. Moreover, it becomes possible to select exact code family, such as GSM, GMR etc. Change-Id: I0b476b00234c17f78b41d695cf3bfd13edb64c28 --- M src/gsm/Makefile.am M utils/conv_gen.py 2 files changed, 91 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/84/1584/3 diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am index 4ec441f..5c3d75c 100644 --- a/src/gsm/Makefile.am +++ b/src/gsm/Makefile.am @@ -35,6 +35,7 @@ # Convolutional codes generation gsm0503_conv.c: - $(AM_V_GEN)python2 $(top_srcdir)/utils/conv_gen.py + $(AM_V_GEN)python2 $(top_srcdir)/utils/conv_gen.py \ + --action gen_codes --code-family gsm CLEANFILES = gsm0503_conv.c diff --git a/utils/conv_gen.py b/utils/conv_gen.py index 60580ed..d89b7ce 100644 --- a/utils/conv_gen.py +++ b/utils/conv_gen.py @@ -23,7 +23,7 @@ */ """ -import sys, os, math +import sys, os, math, getopt from functools import reduce import conv_codes_gsm @@ -254,12 +254,14 @@ code = ConvolutionalCode(0, polys, name = name) code.print_state_and_output(fi) -def generate_codes(codes, path, prefix): +def generate_codes(codes, path, prefix, name): # Open a new file for writing - f = open(os.path.join(path, prefix + "_conv.c"), 'w') + f = open(os.path.join(path, name), 'w') f.write(mod_license + "\n") f.write("#include \n") f.write("#include \n\n") + + sys.stderr.write("Generating convolutional codes...\n") # Print shared tables first if hasattr(codes, "shared_polys"): @@ -279,12 +281,92 @@ code.gen_tables(prefix, f, shared_tables = shared) +def print_help(error = None): + print("Usage: python %s [options]" % sys.argv[0]) + + print("\nOptions:") + print(" -h, --help show this help message") + print(" -a, --action what to generate") + print(" -f, --code-family convolutional code family") + + print("\nAdditional options:") + print(" -p, --prefix internal naming prefix") + print(" -n, --target-name convolutional code family") + print(" -P, --target-path target path for generated file(s)") + + print("\nAvailable actions:") + print(" gen_codes - generate convolutional code definitions") + + print("\nAvailable code families:") + print(" gsm - GSM/GPRS/EDGE specific codes") + + if error is not None: + print("\n%s" % error) + +def parse_argv(): + try: + opts, args = getopt.getopt(sys.argv[1:], + "a:f:p:n:P:h", + [ + "help", "action=", "code-family=", "prefix=", + "target-name=", "target-path=" + ]) + except getopt.GetoptError as err: + # Print help and exit + print_help(str(err)) + sys.exit(2) + + action = None + family = None + prefix = None + name = None + path = None + + for o, v in opts: + if o in ("-h", "--help"): + print_help() + sys.exit(2) + elif o in ("-a", "--action"): + action = v + elif o in ("-f", "--code-family"): + family = v + elif o in ("-p", "--prefix"): + prefix = v + elif o in ("-n", "--target-name"): + name = v + elif o in ("-P", "--target-path"): + path = v + + if path is None: + path = os.getcwd() + if action is None or family is None: + print_help("Error: Please specify both action and code family!") + sys.exit(2) + + return (action, family, prefix, name, path) + if __name__ == '__main__': - path = sys.argv[1] if len(sys.argv) > 1 else os.getcwd() + argv = parse_argv() + action = argv[0] + family = argv[1] + prefix = argv[2] + name = argv[3] + path = argv[4] - sys.stderr.write("Generating convolutional codes...\n") + # Determine convolutional code family + if family == "gsm": + codes = conv_codes_gsm + prefix = "gsm0503" if prefix is None else prefix + name = prefix + "_conv.c" if name is None else name + else: + print_help("Error: Unknown code family!") + sys.exit(1) - # Generate GSM specific codes - generate_codes(conv_codes_gsm, path, "gsm0503") + # What to generate? + if action == "gen_codes": + generate_codes(codes, path, prefix, name) + else: + print_help("Error: Unknown action!") + sys.exit(1) sys.stderr.write("Generation complete.\n") -- To view, visit https://gerrit.osmocom.org/1584 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0b476b00234c17f78b41d695cf3bfd13edb64c28 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: tnt From gerrit-no-reply at lists.osmocom.org Sun Jan 15 03:56:38 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 15 Jan 2017 03:56:38 +0000 Subject: [PATCH] libosmocore[master]: utils/conv_gen.py: add test vector generation feature In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1585 to look at the new patch set (#3). utils/conv_gen.py: add test vector generation feature Change-Id: Ie10c47ee952f253b1ba77ecf6e79f2c033545bc1 --- M utils/conv_gen.py 1 file changed, 122 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/85/1585/3 diff --git a/utils/conv_gen.py b/utils/conv_gen.py index d89b7ce..43e6b99 100644 --- a/utils/conv_gen.py +++ b/utils/conv_gen.py @@ -30,13 +30,16 @@ class ConvolutionalCode(object): def __init__(self, block_len, polys, name, - description = None, puncture = [], term_type = None): + description = None, puncture = [], term_type = None, + vec_in = None, vec_out = None): # Save simple params self.block_len = block_len self.k = 1 self.puncture = puncture self.rate_inv = len(polys) self.term_type = term_type + self.vec_in = vec_in + self.vec_out = vec_out # Infos self.name = name @@ -165,6 +168,20 @@ # Up to 12 numbers should be placed per line print_formatted(self.puncture, "%3d, ", 12, fi) + def print_description(self, fi, brief = False): + if brief is True: + fi.write("/*! \\brief ") + fi.write("structure describing %s\n" + % self.description[0]) + for line in self.description[1:]: + fi.write(" * %s\n" % line) + else: + fi.write("/**\n") + for line in self.description: + fi.write(" * %s\n" % line) + + fi.write(" */\n") + def print_state_and_output(self, fi): pack = lambda n: \ sum([x << (self.rate_inv - i - 1) for i, x in enumerate(n)]) @@ -202,10 +219,7 @@ # Write description as a multi-line comment if self.description is not None: - fi.write("/**\n") - for line in self.description: - fi.write(" * %s\n" % line) - fi.write(" */\n") + self.print_description(fi) # Print a final convolutional code definition fi.write("const struct osmo_conv_code %s_%s = {\n" % (pref, self.name)) @@ -226,6 +240,44 @@ fi.write("\t.puncture = %s_puncture,\n" % self.name) fi.write("};\n\n") + def calc_out_len(self): + out_len = self.block_len * self.rate_inv + + # By default CONV_TERM_FLUSH + if self.term_type is None: + out_len += self.rate_inv * (self.k - 1) + + if len(self.puncture): + out_len -= len(self.puncture) - 1 + + return out_len + + def gen_test_vector(self, fi, prefix): + code_name = "%s_%s" % (prefix, self.name) + + fi.write("\t{\n") + fi.write("\t\t.name = \"%s\",\n" % code_name) + fi.write("\t\t.code = &%s,\n" % code_name) + + fi.write("\t\t.in_len = %d,\n" % self.block_len) + fi.write("\t\t.out_len = %d,\n" % self.calc_out_len()) + + # Print pre computed vectors if preset + if self.vec_in is not None and self.vec_out is not None: + fi.write("\t\t.has_vec = 1,\n") + fi.write("\t\t.vec_in = {\n") + print_formatted(self.vec_in, "0x%02x, ", 8, fi, indent = "\t\t\t") + fi.write("\t\t},\n") + fi.write("\t\t.vec_out = {\n") + print_formatted(self.vec_out, "0x%02x, ", 8, fi, indent = "\t\t\t") + fi.write("\t\t},\n") + else: + fi.write("\t\t.has_vec = 0,\n") + fi.write("\t\t.vec_in = { },\n") + fi.write("\t\t.vec_out = { },\n") + + fi.write("\t},\n") + poly = lambda *args: sum([(1 << x) for x in args]) def combine(src, sel, nb): @@ -233,15 +285,15 @@ fn_xor = lambda x, y: x ^ y return reduce(fn_xor, [(x >> n) & 1 for n in range(nb)]) -def print_formatted(items, format, count, fi): +def print_formatted(items, format, count, fi, indent = "\t"): counter = 0 # Print initial indent - fi.write("\t") + fi.write(indent) for item in items: if counter > 0 and counter % count == 0: - fi.write("\n\t") + fi.write("\n" + indent) fi.write(format % item) counter += 1 @@ -281,6 +333,56 @@ code.gen_tables(prefix, f, shared_tables = shared) +def generate_vectors(codes, path, prefix, name, inc = None): + # Open a new file for writing + f = open(os.path.join(path, name), 'w') + f.write(mod_license + "\n") + f.write("#include \n") + if inc is not None: + for item in inc: + f.write("%s\n" % item) + f.write("\n") + + sys.stderr.write("Generating test vectors...\n") + + vec_count = len(codes.conv_codes) + f.write("int %s_vectors_count = %d;\n\n" + % (prefix, vec_count)) + f.write("const struct conv_test_vector %s_vectors[%d] = {\n" + % (prefix, vec_count)) + + # Generate the vectors one by one + for code in codes.conv_codes: + sys.stderr.write("Generate '%s' test vector\n" % code.name) + code.gen_test_vector(f, prefix) + + f.write("};\n") + +def generate_header(codes, path, prefix, description = None): + # Open a new file for writing + f = open(os.path.join(path, prefix + ".h"), 'w') + + # Print license and includes + f.write(mod_license + "\n") + f.write("#pragma once\n\n") + f.write("#include \n") + f.write("#include \n\n") + + # Print general file description if preset + if description is not None: + f.write("/*! \\file %s.h\n" % prefix) + f.write(" * %s\n" % description) + f.write(" */\n\n") + + sys.stderr.write("Generating header file...\n") + + # Generate declarations one by one + for code in codes.conv_codes: + sys.stderr.write("Generate '%s' declaration\n" % code.name) + code.print_description(f, True) + f.write("extern const struct osmo_conv_code %s_%s;\n\n" + % (prefix, code.name)) + def print_help(error = None): print("Usage: python %s [options]" % sys.argv[0]) @@ -295,7 +397,9 @@ print(" -P, --target-path target path for generated file(s)") print("\nAvailable actions:") - print(" gen_codes - generate convolutional code definitions") + print(" gen_codes - generate convolutional code definitions") + print(" gen_vectors - generate test vectors") + print(" gen_header - generate header file") print("\nAvailable code families:") print(" gsm - GSM/GPRS/EDGE specific codes") @@ -352,12 +456,17 @@ prefix = argv[2] name = argv[3] path = argv[4] + inc = None # Determine convolutional code family if family == "gsm": codes = conv_codes_gsm prefix = "gsm0503" if prefix is None else prefix name = prefix + "_conv.c" if name is None else name + inc = [ + "#include ", + "#include \"conv_test.h\"" + ] else: print_help("Error: Unknown code family!") sys.exit(1) @@ -365,6 +474,10 @@ # What to generate? if action == "gen_codes": generate_codes(codes, path, prefix, name) + elif action == "gen_vectors": + generate_vectors(codes, path, prefix, name, inc) + elif action == "gen_header": + generate_header(codes, path, "gsm0503") else: print_help("Error: Unknown action!") sys.exit(1) -- To view, visit https://gerrit.osmocom.org/1585 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie10c47ee952f253b1ba77ecf6e79f2c033545bc1 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: tnt From gerrit-no-reply at lists.osmocom.org Sun Jan 15 03:56:38 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 15 Jan 2017 03:56:38 +0000 Subject: [PATCH] libosmocore[master]: gsm0503.h: generate header automatically In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1594 to look at the new patch set (#2). gsm0503.h: generate header automatically Since we have automatic header generation, implemented in the utils/conv_gen.py, it's time to use this feature! Change-Id: I21caa4e433b2cc1861611e35350a9671da444c2a --- M .gitignore M include/Makefile.am D include/osmocom/gsm/gsm0503.h 3 files changed, 8 insertions(+), 174 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/94/1594/2 diff --git a/.gitignore b/.gitignore index fb159c3..c1bde0f 100644 --- a/.gitignore +++ b/.gitignore @@ -116,6 +116,7 @@ src/gsm/gsm0503_conv.c include/osmocom/core/crc*gen.h include/osmocom/core/bit*gen.h +include/osmocom/gsm/gsm0503.h # vi files *.sw? diff --git a/include/Makefile.am b/include/Makefile.am index 0a300a8..e40ef04 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -143,3 +143,10 @@ osmocom/core/crc%gen.h: osmocom/core/crcXXgen.h.tpl $(AM_V_GEN)$(MKDIR_P) $(dir $@) $(AM_V_GEN)sed -e's/XX/$*/g' $< > $@ + +osmocom/gsm/gsm0503.h: + $(AM_V_GEN)python2 $(top_srcdir)/utils/conv_gen.py \ + --action gen_header --code-family gsm \ + --target-path $(top_srcdir)/include/osmocom/gsm/ + +CLEANFILES = osmocom/gsm/gsm0503.h diff --git a/include/osmocom/gsm/gsm0503.h b/include/osmocom/gsm/gsm0503.h deleted file mode 100644 index de28ad2..0000000 --- a/include/osmocom/gsm/gsm0503.h +++ /dev/null @@ -1,174 +0,0 @@ -/* - * gsm0503.h - * - * 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 2 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. - */ - -#pragma once - -#include - -#include - -/*! \file gsm0503.h - * Osmocom convolutional encoder/decoder for xCCH channels, see 3GPP TS 05.03 - */ - -/*! \brief structure describing convolutional code xCCH - * - * Non-recursive code, flushed, not punctured code. - */ -extern const struct osmo_conv_code gsm0503_xcch; - -/*! \brief structure describing convolutional code RACH - */ -extern const struct osmo_conv_code gsm0503_rach; - -/*! \brief structure describing convolutional code SCH - */ -extern const struct osmo_conv_code gsm0503_sch; - -/*! \brief structures describing convolutional codes CS2/3 - */ -extern const struct osmo_conv_code gsm0503_cs2; -extern const struct osmo_conv_code gsm0503_cs3; - -/*! \brief structure describing convolutional code TCH/FR - */ -extern const struct osmo_conv_code gsm0503_tch_fr; - -/*! \brief structure describing convolutional code TCH/HR - */ -extern const struct osmo_conv_code gsm0503_tch_hr; - -/*! \brief structure describing convolutional code TCH/AFS 12.2 - */ -extern const struct osmo_conv_code gsm0503_tch_afs_12_2; - -/*! \brief structure describing convolutional code TCH/AFS 10.2 - */ -extern const struct osmo_conv_code gsm0503_tch_afs_10_2; - -/*! \brief structure describing convolutional code TCH/AFS 7.95 - */ -extern const struct osmo_conv_code gsm0503_tch_afs_7_95; - -/*! \brief structure describing convolutional code TCH/AFS 7.4 - */ -extern const struct osmo_conv_code gsm0503_tch_afs_7_4; - -/*! \brief structure describing convolutional code TCH/AFS 6.7 - */ -extern const struct osmo_conv_code gsm0503_tch_afs_6_7; - -/*! \brief structure describing convolutional code TCH/AFS 5.9 - */ -extern const struct osmo_conv_code gsm0503_tch_afs_5_9; - -/*! \brief structure describing convolutional code TCH/AFS 5.15 - */ -extern const struct osmo_conv_code gsm0503_tch_afs_5_15; - -/*! \brief structure describing convolutional code TCH/AFS 4.75 - */ -extern const struct osmo_conv_code gsm0503_tch_afs_4_75; - -/*! \brief structure describing convolutional code TCH/AHS 7.95 - */ -extern const struct osmo_conv_code gsm0503_tch_ahs_7_95; - -/*! \brief structure describing convolutional code TCH/AHS 7.4 - */ -extern const struct osmo_conv_code gsm0503_tch_ahs_7_4; - -/*! \brief structure describing convolutional code TCH/AHS 6.7 - */ -extern const struct osmo_conv_code gsm0503_tch_ahs_6_7; - -/*! \brief structure describing convolutional code TCH/AHS 5.9 - */ -extern const struct osmo_conv_code gsm0503_tch_ahs_5_9; - -/*! \brief structure describing convolutional code TCH/AHS 5.15 - */ -extern const struct osmo_conv_code gsm0503_tch_ahs_5_15; - -/*! \brief structure describing convolutional code TCH/AHS 4.75 - */ -extern const struct osmo_conv_code gsm0503_tch_ahs_4_75; - -/*! \brief structure describing convolutional code EDGE MCS-1 DL HDR - */ -extern const struct osmo_conv_code gsm0503_mcs1_dl_hdr; - -/*! \brief structure describing convolutional code EDGE MCS-1 UL HDR - */ -extern const struct osmo_conv_code gsm0503_mcs1_ul_hdr; - -/*! \brief structure describing convolutional code EDGE MCS-1 - */ -extern const struct osmo_conv_code gsm0503_mcs1; - -/*! \brief structure describing convolutional code EDGE MCS-2 - */ -extern const struct osmo_conv_code gsm0503_mcs2; - -/*! \brief structure describing convolutional code EDGE MCS-3 - */ -extern const struct osmo_conv_code gsm0503_mcs3; - -/*! \brief structure describing convolutional code EDGE MCS-4 - */ -extern const struct osmo_conv_code gsm0503_mcs4; - -/*! \brief structure describing convolutional code EDGE MCS-5 DL HDR - */ -extern const struct osmo_conv_code gsm0503_mcs5_dl_hdr; - -/*! \brief structure describing convolutional code EDGE MCS-5 UL HDR - */ -extern const struct osmo_conv_code gsm0503_mcs5_ul_hdr; - -/*! \brief structure describing convolutional code EDGE MCS-5 - */ -extern const struct osmo_conv_code gsm0503_mcs5; - -/*! \brief structure describing convolutional code EDGE MCS-6 - */ -extern const struct osmo_conv_code gsm0503_mcs6; - -/*! \brief structure describing convolutional code EDGE MCS-7 DL HDR - */ -extern const struct osmo_conv_code gsm0503_mcs7_dl_hdr; - -/*! \brief structure describing convolutional code EDGE MCS-7 UL HDR - */ -extern const struct osmo_conv_code gsm0503_mcs7_ul_hdr; - -/*! \brief structure describing convolutional code EDGE MCS-7 - */ -extern const struct osmo_conv_code gsm0503_mcs7; - -/*! \brief structure describing convolutional code EDGE MCS-8 - */ -extern const struct osmo_conv_code gsm0503_mcs8; - -/*! \brief structure describing convolutional code EDGE MCS-9 - */ -extern const struct osmo_conv_code gsm0503_mcs9; -- To view, visit https://gerrit.osmocom.org/1594 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I21caa4e433b2cc1861611e35350a9671da444c2a Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Jan 15 03:58:35 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 15 Jan 2017 03:58:35 +0000 Subject: libosmocore[master]: utils/conv_gen.py: improve application flexibility In-Reply-To: References: Message-ID: Patch Set 3: > If we're extending options parsing to smth non-trivial I think it > might make sense to start using argparse module. Done using optarg. -- To view, visit https://gerrit.osmocom.org/1584 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0b476b00234c17f78b41d695cf3bfd13edb64c28 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Jan 15 05:02:15 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 15 Jan 2017 05:02:15 +0000 Subject: [PATCH] libosmocore[master]: utils/conv_gen.py: add test vector generation feature In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1585 to look at the new patch set (#4). utils/conv_gen.py: add test vector generation feature Change-Id: Ie10c47ee952f253b1ba77ecf6e79f2c033545bc1 --- M utils/conv_gen.py 1 file changed, 76 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/85/1585/4 diff --git a/utils/conv_gen.py b/utils/conv_gen.py index d89b7ce..af3f7a3 100644 --- a/utils/conv_gen.py +++ b/utils/conv_gen.py @@ -30,13 +30,16 @@ class ConvolutionalCode(object): def __init__(self, block_len, polys, name, - description = None, puncture = [], term_type = None): + description = None, puncture = [], term_type = None, + vec_in = None, vec_out = None): # Save simple params self.block_len = block_len self.k = 1 self.puncture = puncture self.rate_inv = len(polys) self.term_type = term_type + self.vec_in = vec_in + self.vec_out = vec_out # Infos self.name = name @@ -226,6 +229,44 @@ fi.write("\t.puncture = %s_puncture,\n" % self.name) fi.write("};\n\n") + def calc_out_len(self): + out_len = self.block_len * self.rate_inv + + # By default CONV_TERM_FLUSH + if self.term_type is None: + out_len += self.rate_inv * (self.k - 1) + + if len(self.puncture): + out_len -= len(self.puncture) - 1 + + return out_len + + def gen_test_vector(self, fi, prefix): + code_name = "%s_%s" % (prefix, self.name) + + fi.write("\t{\n") + fi.write("\t\t.name = \"%s\",\n" % code_name) + fi.write("\t\t.code = &%s,\n" % code_name) + + fi.write("\t\t.in_len = %d,\n" % self.block_len) + fi.write("\t\t.out_len = %d,\n" % self.calc_out_len()) + + # Print pre computed vectors if preset + if self.vec_in is not None and self.vec_out is not None: + fi.write("\t\t.has_vec = 1,\n") + fi.write("\t\t.vec_in = {\n") + print_formatted(self.vec_in, "0x%02x, ", 8, fi, indent = "\t\t\t") + fi.write("\t\t},\n") + fi.write("\t\t.vec_out = {\n") + print_formatted(self.vec_out, "0x%02x, ", 8, fi, indent = "\t\t\t") + fi.write("\t\t},\n") + else: + fi.write("\t\t.has_vec = 0,\n") + fi.write("\t\t.vec_in = { },\n") + fi.write("\t\t.vec_out = { },\n") + + fi.write("\t},\n") + poly = lambda *args: sum([(1 << x) for x in args]) def combine(src, sel, nb): @@ -281,6 +322,31 @@ code.gen_tables(prefix, f, shared_tables = shared) +def generate_vectors(codes, path, prefix, name, inc = None): + # Open a new file for writing + f = open(os.path.join(path, name), 'w') + f.write(mod_license + "\n") + f.write("#include \n") + if inc is not None: + for item in inc: + f.write("%s\n" % item) + f.write("\n") + + sys.stderr.write("Generating test vectors...\n") + + vec_count = len(codes.conv_codes) + f.write("int %s_vectors_count = %d;\n\n" + % (prefix, vec_count)) + f.write("const struct conv_test_vector %s_vectors[%d] = {\n" + % (prefix, vec_count)) + + # Generate the vectors one by one + for code in codes.conv_codes: + sys.stderr.write("Generate '%s' test vector\n" % code.name) + code.gen_test_vector(f, prefix) + + f.write("};\n") + def print_help(error = None): print("Usage: python %s [options]" % sys.argv[0]) @@ -295,7 +361,8 @@ print(" -P, --target-path target path for generated file(s)") print("\nAvailable actions:") - print(" gen_codes - generate convolutional code definitions") + print(" gen_codes - generate convolutional code definitions") + print(" gen_vectors - generate test vectors") print("\nAvailable code families:") print(" gsm - GSM/GPRS/EDGE specific codes") @@ -352,12 +419,17 @@ prefix = argv[2] name = argv[3] path = argv[4] + inc = None # Determine convolutional code family if family == "gsm": codes = conv_codes_gsm prefix = "gsm0503" if prefix is None else prefix name = prefix + "_conv.c" if name is None else name + inc = [ + "#include ", + "#include \"conv_test.h\"" + ] else: print_help("Error: Unknown code family!") sys.exit(1) @@ -365,6 +437,8 @@ # What to generate? if action == "gen_codes": generate_codes(codes, path, prefix, name) + elif action == "gen_vectors": + generate_vectors(codes, path, prefix, name, inc) else: print_help("Error: Unknown action!") sys.exit(1) -- To view, visit https://gerrit.osmocom.org/1585 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie10c47ee952f253b1ba77ecf6e79f2c033545bc1 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: tnt From gerrit-no-reply at lists.osmocom.org Sun Jan 15 05:43:54 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 15 Jan 2017 05:43:54 +0000 Subject: [ABANDON] libosmocore[master]: tests/conv: separate both test codes and vectors In-Reply-To: References: Message-ID: Vadim Yanitskiy has abandoned this change. Change subject: tests/conv: separate both test codes and vectors ...................................................................... Abandoned I think, it would be better to create a new test instead of changing extending existing one. -- To view, visit https://gerrit.osmocom.org/1542 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Iffee60ad19d38bcfdce2e5f47a4e886f6f74e271 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: tnt From gerrit-no-reply at lists.osmocom.org Sun Jan 15 05:56:19 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 15 Jan 2017 05:56:19 +0000 Subject: [PATCH] libosmocore[master]: tests/conv: add LTE PBCH test vector Message-ID: Review at https://gerrit.osmocom.org/1601 tests/conv: add LTE PBCH test vector Change-Id: I1a3a48bba9ee32a0bacc0b05d25358496dbcbc1b --- M tests/conv/conv_test.c M tests/conv/conv_test.ok 2 files changed, 68 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/01/1601/1 diff --git a/tests/conv/conv_test.c b/tests/conv/conv_test.c index 608f829..ed1257e 100644 --- a/tests/conv/conv_test.c +++ b/tests/conv/conv_test.c @@ -120,6 +120,57 @@ .next_state = conv_wimax_fch_next_state, }; +/** + * LTE PBCH + * Non recursive code, tail-biting, non-punctured + */ +static const uint8_t conv_lte_pbch_next_output[][2] = { + { 0, 7 }, { 3, 4 }, { 7, 0 }, { 4 , 3 }, + { 6, 1 }, { 5, 2 }, { 1, 6 }, { 2 , 5 }, + { 1, 6 }, { 2, 5 }, { 6, 1 }, { 5 , 2 }, + { 7, 0 }, { 4, 3 }, { 0, 7 }, { 3 , 4 }, + { 4, 3 }, { 7, 0 }, { 3, 4 }, { 0 , 7 }, + { 2, 5 }, { 1, 6 }, { 5, 2 }, { 6 , 1 }, + { 5, 2 }, { 6, 1 }, { 2, 5 }, { 1 , 6 }, + { 3, 4 }, { 0, 7 }, { 4, 3 }, { 7 , 0 }, + { 7, 0 }, { 4, 3 }, { 0, 7 }, { 3 , 4 }, + { 1, 6 }, { 2, 5 }, { 6, 1 }, { 5 , 2 }, + { 6, 1 }, { 5, 2 }, { 1, 6 }, { 2 , 5 }, + { 0, 7 }, { 3, 4 }, { 7, 0 }, { 4 , 3 }, + { 3, 4 }, { 0, 7 }, { 4, 3 }, { 7 , 0 }, + { 5, 2 }, { 6, 1 }, { 2, 5 }, { 1 , 6 }, + { 2, 5 }, { 1, 6 }, { 5, 2 }, { 6 , 1 }, + { 4, 3 }, { 7, 0 }, { 3, 4 }, { 0 , 7 }, +}; + +static const uint8_t conv_lte_pbch_next_state[][2] = { + { 0, 1 }, { 2, 3 }, { 4, 5 }, { 6, 7 }, + { 8, 9 }, { 10, 11 }, { 12, 13 }, { 14, 15 }, + { 16, 17 }, { 18, 19 }, { 20, 21 }, { 22, 23 }, + { 24, 25 }, { 26, 27 }, { 28, 29 }, { 30, 31 }, + { 32, 33 }, { 34, 35 }, { 36, 37 }, { 38, 39 }, + { 40, 41 }, { 42, 43 }, { 44, 45 }, { 46, 47 }, + { 48, 49 }, { 50, 51 }, { 52, 53 }, { 54, 55 }, + { 56, 57 }, { 58, 59 }, { 60, 61 }, { 62, 63 }, + { 0, 1 }, { 2, 3 }, { 4, 5 }, { 6, 7 }, + { 8, 9 }, { 10, 11 }, { 12, 13 }, { 14, 15 }, + { 16, 17 }, { 18, 19 }, { 20, 21 }, { 22, 23 }, + { 24, 25 }, { 26, 27 }, { 28, 29 }, { 30, 31 }, + { 32, 33 }, { 34, 35 }, { 36, 37 }, { 38, 39 }, + { 40, 41 }, { 42, 43 }, { 44, 45 }, { 46, 47 }, + { 48, 49 }, { 50, 51 }, { 52, 53 }, { 54, 55 }, + { 56, 57 }, { 58, 59 }, { 60, 61 }, { 62, 63 }, +}; + +const struct osmo_conv_code conv_lte_pbch = { + .N = 3, + .K = 7, + .len = 40, + .term = CONV_TERM_TAIL_BITING, + .next_output = conv_lte_pbch_next_output, + .next_state = conv_lte_pbch_next_state, +}; + /* ------------------------------------------------------------------------ */ /* Test vectors */ /* ------------------------------------------------------------------------ */ @@ -219,6 +270,15 @@ 0x8a, 0xed, 0x21, 0xed }, }, { + .name = "LTE PBCH (non-recursive, tail-biting, non-punctured)", + .code = &conv_lte_pbch, + .in_len = 40, + .out_len = 120, + .has_vec = 0, + .vec_in = { }, + .vec_out = { }, + }, + { .name = "??? (non-recursive, direct truncation, not punctured)", .code = &conv_trunc, .in_len = 224, diff --git a/tests/conv/conv_test.ok b/tests/conv/conv_test.ok index 2122961..eceadb0 100644 --- a/tests/conv/conv_test.ok +++ b/tests/conv/conv_test.ok @@ -42,6 +42,14 @@ [..] Encoding / Decoding cycle : OK [..] Encoding / Decoding cycle : OK +[+] Testing: LTE PBCH (non-recursive, tail-biting, non-punctured) +[.] Input length : ret = 40 exp = 40 -> OK +[.] Output length : ret = 120 exp = 120 -> OK +[.] Random vector checks: +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK + [+] Testing: ??? (non-recursive, direct truncation, not punctured) [.] Input length : ret = 224 exp = 224 -> OK [.] Output length : ret = 448 exp = 448 -> OK -- To view, visit https://gerrit.osmocom.org/1601 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1a3a48bba9ee32a0bacc0b05d25358496dbcbc1b Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Sun Jan 15 06:00:54 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 15 Jan 2017 06:00:54 +0000 Subject: [PATCH] libosmocore[master]: tests/conv: whitespece fix Message-ID: Review at https://gerrit.osmocom.org/1602 tests/conv: whitespece fix Change-Id: I73ab4614c5c23390862d3ecaa2561a6749604a15 --- M tests/conv/conv_test.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/02/1602/1 diff --git a/tests/conv/conv_test.c b/tests/conv/conv_test.c index ed1257e..3064f9c 100644 --- a/tests/conv/conv_test.c +++ b/tests/conv/conv_test.c @@ -256,7 +256,7 @@ .in_len = 48, .out_len = 72, .has_vec = 1, - .vec_in = { 0x4d, 0xcb, 0xfc, 0x72, 0xf4, 0x8c }, + .vec_in = { 0x4d, 0xcb, 0xfc, 0x72, 0xf4, 0x8c }, .vec_out = { 0xc0, 0x86, 0x63, 0x4b, 0x8b, 0xd4, 0x6a, 0x76, 0xb2 }, }, { -- To view, visit https://gerrit.osmocom.org/1602 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I73ab4614c5c23390862d3ecaa2561a6749604a15 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Sun Jan 15 06:05:09 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 15 Jan 2017 06:05:09 +0000 Subject: [ABANDON] libosmocore[master]: tests/conv: add LTE PBCH test vector In-Reply-To: References: Message-ID: Vadim Yanitskiy has abandoned this change. Change subject: tests/conv: add LTE PBCH test vector ...................................................................... Abandoned Unrelated to the current patch set. See https://gerrit.osmocom.org/1601 -- To view, visit https://gerrit.osmocom.org/1543 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Ifea601d49c82c36d7c8d4a527b7422d701833806 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: tnt From gerrit-no-reply at lists.osmocom.org Sun Jan 15 17:07:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 17:07:14 +0000 Subject: [PATCH] libosmocore[master]: configure.ac: Introduce --disable-ctrl Message-ID: Review at https://gerrit.osmocom.org/1603 configure.ac: Introduce --disable-ctrl Using --disable-ctrl, one can disable the building of libosmoctrl. The 'embedded' target will also automaticall disable ctrl. Change-Id: I6912396338c5b23ae860fef2a55854d6df9a579d --- M configure.ac M src/ctrl/Makefile.am 2 files changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/03/1603/1 diff --git a/configure.ac b/configure.ac index ec03c26..bbbe241 100644 --- a/configure.ac +++ b/configure.ac @@ -185,6 +185,14 @@ [enable_gb=$enableval], [enable_gb="yes"]) AM_CONDITIONAL(ENABLE_GB, test x"$enable_gb" = x"yes") +AC_ARG_ENABLE(ctrl, + [AS_HELP_STRING( + [--disable-ctrl], + [Disable building CTRL library], + )], + [enable_ctrl=$enableval], [enable_ctrl="yes"]) +AM_CONDITIONAL(ENABLE_CTRL, test x"$enable_ctrl" = x"yes") + AC_ARG_ENABLE(embedded, [AS_HELP_STRING( [--enable-embedded], @@ -198,6 +206,7 @@ AM_CONDITIONAL(ENABLE_MSGFILE, false) AM_CONDITIONAL(ENABLE_SERIAL, false) AM_CONDITIONAL(ENABLE_VTY, false) + AM_CONDITIONAL(ENABLE_CTRL, false) AM_CONDITIONAL(ENABLE_UTILITIES, false) AM_CONDITIONAL(ENABLE_GB, false) AC_DEFINE([PANIC_INFLOOP],[1],[Use infinite loop on panic rather than fprintf/abort]) diff --git a/src/ctrl/Makefile.am b/src/ctrl/Makefile.am index 8bf3442..1817cac 100644 --- a/src/ctrl/Makefile.am +++ b/src/ctrl/Makefile.am @@ -5,6 +5,7 @@ AM_CFLAGS = -Wall $(all_includes) -I$(top_srcdir)/include -I$(top_builddir)/include $(TALLOC_CFLAGS) +if ENABLE_CTRL lib_LTLIBRARIES = libosmoctrl.la libosmoctrl_la_SOURCES = control_cmd.c control_if.c @@ -18,3 +19,5 @@ if ENABLE_VTY libosmoctrl_la_SOURCES += control_vty.c endif + +endif -- To view, visit https://gerrit.osmocom.org/1603 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6912396338c5b23ae860fef2a55854d6df9a579d Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Jan 15 17:07:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 17:07:23 +0000 Subject: [PATCH] libosmocore[master]: configure.ac: Disable PCSC related code on EMBEDDED Message-ID: Review at https://gerrit.osmocom.org/1604 configure.ac: Disable PCSC related code on EMBEDDED The EMBEDDED conditional is used for building inside 'bare iron' embedded devices like OsmocomBB phones. There's no PC/SC in them. Change-Id: I2ef7561d7fdb1ef1c060f8ac73d8588fc0f8eb3f --- M configure.ac 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/04/1604/1 diff --git a/configure.ac b/configure.ac index bbbe241..20b5e63 100644 --- a/configure.ac +++ b/configure.ac @@ -209,6 +209,7 @@ AM_CONDITIONAL(ENABLE_CTRL, false) AM_CONDITIONAL(ENABLE_UTILITIES, false) AM_CONDITIONAL(ENABLE_GB, false) + AM_CONDITIONAL(ENABLE_PCSC, false) AC_DEFINE([PANIC_INFLOOP],[1],[Use infinite loop on panic rather than fprintf/abort]) fi -- To view, visit https://gerrit.osmocom.org/1604 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2ef7561d7fdb1ef1c060f8ac73d8588fc0f8eb3f Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Jan 15 17:07:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 17:07:23 +0000 Subject: [PATCH] libosmocore[master]: Always include and not Message-ID: Review at https://gerrit.osmocom.org/1605 Always include and not In EMBEDDED builds we don't have a system-wide talloc Change-Id: Icc526016bda45b36e584afee8669996752d6d89c --- M include/osmocom/core/bitvec.h M src/ctrl/control_vty.c 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/05/1605/1 diff --git a/include/osmocom/core/bitvec.h b/include/osmocom/core/bitvec.h index 0e17ba7..280039b 100644 --- a/include/osmocom/core/bitvec.h +++ b/include/osmocom/core/bitvec.h @@ -41,7 +41,7 @@ */ #include -#include +#include #include /*! \brief A single GSM bit diff --git a/src/ctrl/control_vty.c b/src/ctrl/control_vty.c index 7acb973..a67dbe2 100644 --- a/src/ctrl/control_vty.c +++ b/src/ctrl/control_vty.c @@ -21,7 +21,7 @@ */ #include -#include +#include #include #include -- To view, visit https://gerrit.osmocom.org/1605 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icc526016bda45b36e584afee8669996752d6d89c Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Jan 15 17:07:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 17:07:24 +0000 Subject: [PATCH] libosmocore[master]: bitvec: Ensure bitvec.h and bitvec.c agree on function argum... Message-ID: Review at https://gerrit.osmocom.org/1606 bitvec: Ensure bitvec.h and bitvec.c agree on function argument type uint32_t may or may not be unsigned int. Change-Id: I21c96985fcbb72372b6df949301c21f1ebca41f2 --- M include/osmocom/core/bitvec.h 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/06/1606/1 diff --git a/include/osmocom/core/bitvec.h b/include/osmocom/core/bitvec.h index 280039b..6944770 100644 --- a/include/osmocom/core/bitvec.h +++ b/include/osmocom/core/bitvec.h @@ -71,7 +71,7 @@ int bitvec_set_bit(struct bitvec *bv, enum bit_value bit); int bitvec_get_bit_high(struct bitvec *bv); int bitvec_set_bits(struct bitvec *bv, const enum bit_value *bits, unsigned int count); -int bitvec_set_uint(struct bitvec *bv, uint32_t in, unsigned int count); +int bitvec_set_uint(struct bitvec *bv, unsigned int in, unsigned int count); int bitvec_get_uint(struct bitvec *bv, unsigned int num_bits); int bitvec_find_bit_pos(const struct bitvec *bv, unsigned int n, enum bit_value val); int bitvec_spare_padding(struct bitvec *bv, unsigned int up_to_bit); -- To view, visit https://gerrit.osmocom.org/1606 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I21c96985fcbb72372b6df949301c21f1ebca41f2 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Jan 15 17:07:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 17:07:24 +0000 Subject: [PATCH] libosmocore[master]: stats: Build UDP socket code only if sys/socket.h exists Message-ID: Review at https://gerrit.osmocom.org/1607 stats: Build UDP socket code only if sys/socket.h exists Change-Id: I6beb4fcc394ed7d3f8dd7a097b6e998245ecf401 --- M include/osmocom/core/stats.h M src/stats.c 2 files changed, 17 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/07/1607/1 diff --git a/include/osmocom/core/stats.h b/include/osmocom/core/stats.h index f754e41..cb5c62f 100644 --- a/include/osmocom/core/stats.h +++ b/include/osmocom/core/stats.h @@ -19,7 +19,11 @@ */ #pragma once +#ifdef HAVE_SYS_SOCKET_H #include +#include +#endif + #include #include @@ -59,10 +63,12 @@ /* state */ int running; +#ifdef HAVE_SYS_SOCKET_H struct sockaddr dest_addr; int dest_addr_len; struct sockaddr bind_addr; int bind_addr_len; +#endif int fd; struct msgb *buffer; int agg_enabled; diff --git a/src/stats.c b/src/stats.c index 1efc8cd..039f1cb 100644 --- a/src/stats.c +++ b/src/stats.c @@ -21,6 +21,8 @@ * */ +#include "config.h" + #include #include @@ -29,9 +31,6 @@ #include #include #include -#include -#include -#include #include #include @@ -162,6 +161,8 @@ return NULL; } +#ifdef HAVE_SYS_SOCKET_H + int osmo_stats_reporter_set_remote_addr(struct osmo_stats_reporter *srep, const char *addr) { int rc; @@ -239,6 +240,7 @@ return update_srep_config(srep); } +#endif int osmo_stats_reporter_set_max_class(struct osmo_stats_reporter *srep, enum osmo_stats_class class_id) @@ -287,6 +289,11 @@ } /*** i/o helper functions ***/ + +#ifdef HAVE_SYS_SOCKET_H +#include +#include +#include int osmo_stats_reporter_udp_open(struct osmo_stats_reporter *srep) { @@ -380,6 +387,7 @@ return rc; } +#endif /* HAVE_SYS_SOCKET_H */ /*** log reporter ***/ -- To view, visit https://gerrit.osmocom.org/1607 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6beb4fcc394ed7d3f8dd7a097b6e998245ecf401 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Jan 15 17:07:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 17:07:24 +0000 Subject: [PATCH] libosmocore[master]: disable various code if building for bare-iron embedded Message-ID: Review at https://gerrit.osmocom.org/1608 disable various code if building for bare-iron embedded We don't have file-based I/O nor ethernet devices with mac addresses when building for OsmocomBB. Change-Id: I01a9e6d8dbe885dbeac2769b84931a4d44f7a3a5 --- M src/logging.c M src/macaddr.c 2 files changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/08/1608/1 diff --git a/src/logging.c b/src/logging.c index b0bca54..9b7d6f4 100644 --- a/src/logging.c +++ b/src/logging.c @@ -584,12 +584,14 @@ target->categories[category].loglevel = level; } +#if (!EMBEDDED) static void _file_output(struct log_target *target, unsigned int level, const char *log) { fprintf(target->tgt_file.out, "%s", log); fflush(target->tgt_file.out); } +#endif /*! \brief Create a new log target skeleton * \returns dynamically-allocated log target @@ -654,6 +656,7 @@ #endif /* stderr */ } +#if (!EMBEDDED) /*! \brief Create a new file-based log target * \param[in] fname File name of the new log file * \returns Log target in case of success, NULL otherwise @@ -677,6 +680,7 @@ return target; } +#endif /*! \brief Find a registered log target * \param[in] type Log target type @@ -707,6 +711,7 @@ /* just in case, to make sure we don't have any references */ log_del_target(target); +#if (!EMBEDDED) if (target->output == &_file_output) { /* since C89/C99 says stderr is a macro, we can safely do this! */ #ifdef stderr @@ -718,6 +723,7 @@ target->tgt_file.out = NULL; } } +#endif talloc_free(target); } diff --git a/src/macaddr.c b/src/macaddr.c index f83e054..ceb1e0a 100644 --- a/src/macaddr.c +++ b/src/macaddr.c @@ -26,6 +26,8 @@ /*! \file loggingrb.c */ +#include "config.h" + #include #include #include @@ -103,6 +105,8 @@ #else +#if (!EMBEDDED) + #include #include #include @@ -134,6 +138,8 @@ return 0; } +#endif /* !EMBEDDED */ + #endif /*! @} */ -- To view, visit https://gerrit.osmocom.org/1608 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I01a9e6d8dbe885dbeac2769b84931a4d44f7a3a5 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Jan 15 17:07:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 17:07:24 +0000 Subject: [PATCH] libosmocore[master]: utils.h: #include as we use fprintf() Message-ID: Review at https://gerrit.osmocom.org/1609 utils.h: #include as we use fprintf() Change-Id: I911c7f4bcadde414ce0b384e13a3a9a4a953e2fb --- M include/osmocom/core/utils.h 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/09/1609/1 diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index 41bbc27..d9c3097 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -21,6 +21,7 @@ #define OSMO_VALUE_STRING(x) { x, OSMO_STRINGIFY(x) } #include +#include /*! \brief A mapping between human-readable string and numeric value */ struct value_string { -- To view, visit https://gerrit.osmocom.org/1609 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I911c7f4bcadde414ce0b384e13a3a9a4a953e2fb Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Jan 15 17:07:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 17:07:25 +0000 Subject: [PATCH] libosmocore[master]: ipa: Remove unneeded #include statement Message-ID: Review at https://gerrit.osmocom.org/1610 ipa: Remove unneeded #include statement Change-Id: I69f2891a2bea6f87f079b6778aa01ee27a25001b --- M src/gsm/ipa.c 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/10/1610/1 diff --git a/src/gsm/ipa.c b/src/gsm/ipa.c index f44c328..6dc3ab6 100644 --- a/src/gsm/ipa.c +++ b/src/gsm/ipa.c @@ -28,7 +28,6 @@ #include #include -#include #include #include -- To view, visit https://gerrit.osmocom.org/1610 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I69f2891a2bea6f87f079b6778aa01ee27a25001b Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Jan 15 17:32:57 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 17:32:57 +0000 Subject: libosmocore[master]: configure.ac: Introduce --disable-ctrl In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1603 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6912396338c5b23ae860fef2a55854d6df9a579d Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Jan 15 17:33:02 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 17:33:02 +0000 Subject: libosmocore[master]: configure.ac: Disable PCSC related code on EMBEDDED In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1604 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2ef7561d7fdb1ef1c060f8ac73d8588fc0f8eb3f Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Jan 15 17:33:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 17:33:05 +0000 Subject: libosmocore[master]: Always include and not In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1605 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icc526016bda45b36e584afee8669996752d6d89c Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Jan 15 17:33:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 17:33:09 +0000 Subject: libosmocore[master]: bitvec: Ensure bitvec.h and bitvec.c agree on function argum... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1606 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I21c96985fcbb72372b6df949301c21f1ebca41f2 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Jan 15 17:34:01 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 17:34:01 +0000 Subject: [MERGED] libosmocore[master]: bitvec: Ensure bitvec.h and bitvec.c agree on function argum... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: bitvec: Ensure bitvec.h and bitvec.c agree on function argument type ...................................................................... bitvec: Ensure bitvec.h and bitvec.c agree on function argument type uint32_t may or may not be unsigned int. Change-Id: I21c96985fcbb72372b6df949301c21f1ebca41f2 --- M include/osmocom/core/bitvec.h 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/core/bitvec.h b/include/osmocom/core/bitvec.h index 280039b..6944770 100644 --- a/include/osmocom/core/bitvec.h +++ b/include/osmocom/core/bitvec.h @@ -71,7 +71,7 @@ int bitvec_set_bit(struct bitvec *bv, enum bit_value bit); int bitvec_get_bit_high(struct bitvec *bv); int bitvec_set_bits(struct bitvec *bv, const enum bit_value *bits, unsigned int count); -int bitvec_set_uint(struct bitvec *bv, uint32_t in, unsigned int count); +int bitvec_set_uint(struct bitvec *bv, unsigned int in, unsigned int count); int bitvec_get_uint(struct bitvec *bv, unsigned int num_bits); int bitvec_find_bit_pos(const struct bitvec *bv, unsigned int n, enum bit_value val); int bitvec_spare_padding(struct bitvec *bv, unsigned int up_to_bit); -- To view, visit https://gerrit.osmocom.org/1606 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I21c96985fcbb72372b6df949301c21f1ebca41f2 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Jan 15 17:34:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 17:34:03 +0000 Subject: [MERGED] libosmocore[master]: Always include and not In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Always include and not ...................................................................... Always include and not In EMBEDDED builds we don't have a system-wide talloc Change-Id: Icc526016bda45b36e584afee8669996752d6d89c --- M include/osmocom/core/bitvec.h M src/ctrl/control_vty.c 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/core/bitvec.h b/include/osmocom/core/bitvec.h index 0e17ba7..280039b 100644 --- a/include/osmocom/core/bitvec.h +++ b/include/osmocom/core/bitvec.h @@ -41,7 +41,7 @@ */ #include -#include +#include #include /*! \brief A single GSM bit diff --git a/src/ctrl/control_vty.c b/src/ctrl/control_vty.c index 7acb973..a67dbe2 100644 --- a/src/ctrl/control_vty.c +++ b/src/ctrl/control_vty.c @@ -21,7 +21,7 @@ */ #include -#include +#include #include #include -- To view, visit https://gerrit.osmocom.org/1605 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icc526016bda45b36e584afee8669996752d6d89c Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Jan 15 17:34:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 17:34:04 +0000 Subject: [MERGED] libosmocore[master]: configure.ac: Disable PCSC related code on EMBEDDED In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: configure.ac: Disable PCSC related code on EMBEDDED ...................................................................... configure.ac: Disable PCSC related code on EMBEDDED The EMBEDDED conditional is used for building inside 'bare iron' embedded devices like OsmocomBB phones. There's no PC/SC in them. Change-Id: I2ef7561d7fdb1ef1c060f8ac73d8588fc0f8eb3f --- M configure.ac 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index bbbe241..20b5e63 100644 --- a/configure.ac +++ b/configure.ac @@ -209,6 +209,7 @@ AM_CONDITIONAL(ENABLE_CTRL, false) AM_CONDITIONAL(ENABLE_UTILITIES, false) AM_CONDITIONAL(ENABLE_GB, false) + AM_CONDITIONAL(ENABLE_PCSC, false) AC_DEFINE([PANIC_INFLOOP],[1],[Use infinite loop on panic rather than fprintf/abort]) fi -- To view, visit https://gerrit.osmocom.org/1604 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2ef7561d7fdb1ef1c060f8ac73d8588fc0f8eb3f Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Jan 15 17:34:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 17:34:05 +0000 Subject: [MERGED] libosmocore[master]: configure.ac: Introduce --disable-ctrl In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: configure.ac: Introduce --disable-ctrl ...................................................................... configure.ac: Introduce --disable-ctrl Using --disable-ctrl, one can disable the building of libosmoctrl. The 'embedded' target will also automaticall disable ctrl. Change-Id: I6912396338c5b23ae860fef2a55854d6df9a579d --- M configure.ac M src/ctrl/Makefile.am 2 files changed, 12 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index ec03c26..bbbe241 100644 --- a/configure.ac +++ b/configure.ac @@ -185,6 +185,14 @@ [enable_gb=$enableval], [enable_gb="yes"]) AM_CONDITIONAL(ENABLE_GB, test x"$enable_gb" = x"yes") +AC_ARG_ENABLE(ctrl, + [AS_HELP_STRING( + [--disable-ctrl], + [Disable building CTRL library], + )], + [enable_ctrl=$enableval], [enable_ctrl="yes"]) +AM_CONDITIONAL(ENABLE_CTRL, test x"$enable_ctrl" = x"yes") + AC_ARG_ENABLE(embedded, [AS_HELP_STRING( [--enable-embedded], @@ -198,6 +206,7 @@ AM_CONDITIONAL(ENABLE_MSGFILE, false) AM_CONDITIONAL(ENABLE_SERIAL, false) AM_CONDITIONAL(ENABLE_VTY, false) + AM_CONDITIONAL(ENABLE_CTRL, false) AM_CONDITIONAL(ENABLE_UTILITIES, false) AM_CONDITIONAL(ENABLE_GB, false) AC_DEFINE([PANIC_INFLOOP],[1],[Use infinite loop on panic rather than fprintf/abort]) diff --git a/src/ctrl/Makefile.am b/src/ctrl/Makefile.am index 8bf3442..1817cac 100644 --- a/src/ctrl/Makefile.am +++ b/src/ctrl/Makefile.am @@ -5,6 +5,7 @@ AM_CFLAGS = -Wall $(all_includes) -I$(top_srcdir)/include -I$(top_builddir)/include $(TALLOC_CFLAGS) +if ENABLE_CTRL lib_LTLIBRARIES = libosmoctrl.la libosmoctrl_la_SOURCES = control_cmd.c control_if.c @@ -18,3 +19,5 @@ if ENABLE_VTY libosmoctrl_la_SOURCES += control_vty.c endif + +endif -- To view, visit https://gerrit.osmocom.org/1603 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6912396338c5b23ae860fef2a55854d6df9a579d Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Jan 15 17:50:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 17:50:36 +0000 Subject: libosmocore[master]: tests/conv: whitespece fix In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1602 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I73ab4614c5c23390862d3ecaa2561a6749604a15 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Jan 15 17:50:49 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 17:50:49 +0000 Subject: libosmocore[master]: tests/conv: add LTE PBCH test vector In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1601 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1a3a48bba9ee32a0bacc0b05d25358496dbcbc1b Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Jan 15 17:51:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 17:51:20 +0000 Subject: libosmocore[master]: utils/conv_gen.py: add test vector generation feature In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1585 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie10c47ee952f253b1ba77ecf6e79f2c033545bc1 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Jan 15 17:52:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 17:52:23 +0000 Subject: libosmocore[master]: utils/conv_gen.py: improve application flexibility In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1584 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0b476b00234c17f78b41d695cf3bfd13edb64c28 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Jan 15 17:53:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 17:53:04 +0000 Subject: libosmocore[master]: utils/conv_gen.py: add header generation feature In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1593 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iae830d716f01810972edbef14fc5383ac647d0ea Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Jan 15 17:56:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 17:56:05 +0000 Subject: libosmocore[master]: logging: remove code duplication In-Reply-To: References: Message-ID: Patch Set 1: agreeing with neels: We should to keep the old logp() symbol to prevent uneeded ABI breakage. There's no need to intentionally break backwards compatibility. -- To view, visit https://gerrit.osmocom.org/1580 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia6c92bd4824c44fc22cc733ce7a88da86e58ed93 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Jan 15 17:56:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 17:56:36 +0000 Subject: libosmocore[master]: gsm0503.h: generate header automatically In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1594 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I21caa4e433b2cc1861611e35350a9671da444c2a Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Jan 15 17:58:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 17:58:19 +0000 Subject: libosmocore[master]: doc: clarify osmo_strlcpy() doc In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1596 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I01c1a94408b471f7f54576178a60938bf9ee3261 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Jan 15 17:58:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 17:58:29 +0000 Subject: [MERGED] libosmocore[master]: doc: clarify osmo_strlcpy() doc In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: doc: clarify osmo_strlcpy() doc ...................................................................... doc: clarify osmo_strlcpy() doc Stating that it 'truncates src' is misleading. Also clarify whether siz includes the space needed for the terminating NUL. Change-Id: I01c1a94408b471f7f54576178a60938bf9ee3261 --- M src/utils.c 1 file changed, 5 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/utils.c b/src/utils.c index 02c2443..df806df 100644 --- a/src/utils.c +++ b/src/utils.c @@ -343,12 +343,12 @@ /*! \brief Copy a C-string into a sized buffer * \param[in] src source string * \param[out] dst destination string - * \param[in] siz size of the \a dst string - * \returns length of source string + * \param[in] siz size of the \a dst buffer + * \returns length of \a src * - * Copies up to \a siz characters from \a src to \a dst, but ensures - * that the last character of \a dst is always a NUL character. May - * truncate \a src to do achieve this. + * Copy at most \a siz bytes from \a src to \a dst, ensuring that the result is + * NUL terminated. The NUL character is included in \a siz, i.e. passing the + * actual sizeof(*dst) is correct. */ size_t osmo_strlcpy(char *dst, const char *src, size_t siz) { -- To view, visit https://gerrit.osmocom.org/1596 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I01c1a94408b471f7f54576178a60938bf9ee3261 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Jan 15 17:58:41 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 17:58:41 +0000 Subject: libosmocore[master]: doc: fix doxygen 'utils' group closing brace In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1597 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6701261f5854342ac4cd4f2da62e49eb40362938 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Jan 15 18:04:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 18:04:32 +0000 Subject: libosmocore[master]: utils: add osmo_strncpy(), as drop-in replacement for strncpy() In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/1598/2/src/utils.c File src/utils.c: Line 378: * one iteration of \a src, so should be more optimal than osmo_strlcpy(). I really don't think we need to worry about this, given the number of string copies we typically do in protocol processing (not many, all our protocols are binary, except maybe ctrl interface). Also, given the fact that the strlen() call pre-fetches the entire string data into the cache, not sure how much perfomance difference there is n practise? Overall I'm not sure if we should proliferate various str*cpy() functions or rather use one (osmo_strlcpy) everywhere and migrate related code. -- To view, visit https://gerrit.osmocom.org/1598 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If8ba5361c1d0c90973a1447ce30c1198946a5265 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sun Jan 15 18:05:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 18:05:19 +0000 Subject: libosmocore[master]: Mark deprecated function as such In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1595 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2d3ea2b56aff6b687f72f832360b8cb8a24164e9 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Jan 15 18:06:10 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 18:06:10 +0000 Subject: libosmocore[master]: logging: remove code duplication In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1580 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia6c92bd4824c44fc22cc733ce7a88da86e58ed93 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Jan 15 18:07:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 18:07:16 +0000 Subject: libosmocore[master]: CTRL: add write-only helpers In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1574 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I66b7990db590c1f8e56326e392e6c1d2eafebd9a Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Jan 15 18:08:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 18:08:08 +0000 Subject: osmo-pcu[master]: Log additional info for radio errors In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/1578/3/src/bts.cpp File src/bts.cpp: Line 925: "unknown TBF correspond to MS with IMSI %s, TA %d, " corresponds? corresponding? -- To view, visit https://gerrit.osmocom.org/1578 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I936a07ce87f05d9c3dc351dc3bdc4f00d78265e0 Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sun Jan 15 18:08:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 18:08:52 +0000 Subject: openbsc[master]: CTRL: remove boilerplate In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1576 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5bcea0b4f4b8f535bef2b423f2013b8b4a218b5b Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Jan 15 18:09:06 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 18:09:06 +0000 Subject: openbsc[master]: Log expected SRES on GPRS AUTH REJECT In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1600 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I19b0001650979bf7f1832f04f9fd5a26beb577d0 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Jan 15 18:09:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 18:09:15 +0000 Subject: [MERGED] openbsc[master]: Log expected SRES on GPRS AUTH REJECT In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Log expected SRES on GPRS AUTH REJECT ...................................................................... Log expected SRES on GPRS AUTH REJECT Change-Id: I19b0001650979bf7f1832f04f9fd5a26beb577d0 --- M openbsc/src/gprs/gprs_gmm.c 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c index 363b457..e3d5c7d 100644 --- a/openbsc/src/gprs/gprs_gmm.c +++ b/openbsc/src/gprs/gprs_gmm.c @@ -640,7 +640,9 @@ memcmp(TLVP_VAL(&tp, GSM48_IE_GMM_AUTH_SRES), at->vec.sres, sizeof(at->vec.sres)) != 0) { - LOGMMCTXP(LOGL_NOTICE, ctx, "Received SRES doesn't match\n"); + LOGMMCTXP(LOGL_NOTICE, ctx, "Received SRES doesn't match " + "expected RES %s\n", osmo_hexdump(at->vec.sres, + sizeof(at->vec.sres))); rc = gsm48_tx_gmm_auth_ciph_rej(ctx); mm_ctx_cleanup_free(ctx, "GPRS AUTH AND CIPH REJECT"); return rc; -- To view, visit https://gerrit.osmocom.org/1600 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I19b0001650979bf7f1832f04f9fd5a26beb577d0 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Jan 15 18:10:10 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 18:10:10 +0000 Subject: libosmocore[master]: stats_test: fix mismatching osmo_stats_reporter->send_item s... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1587 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I91cbfd4dd25a881b803943430101dabf07dafc7c Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Jan 15 18:10:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 18:10:17 +0000 Subject: [MERGED] libosmocore[master]: stats_test: fix mismatching osmo_stats_reporter->send_item s... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: stats_test: fix mismatching osmo_stats_reporter->send_item signature ...................................................................... stats_test: fix mismatching osmo_stats_reporter->send_item signature The function pointer expects the last arg as int64_t, stats_test.c uses an int instead. Fix the argument type as well as the printf format for it. Fixes this compiler warning seen on our FreeBSD build slave: CC stats/stats_test.o ../../tests/stats/stats_test.c:288:18: warning: incompatible pointer types assigning to 'int (*)(struct osmo_stats_reporter *, const struct osmo_stat_item_group *, const struct osmo_stat_item_desc *, int64_t)' from 'int (struct osmo_stats_reporter *, const struct osmo_stat_item_group *, const struct osmo_stat_item_desc *, int)' [-Wincompatible-pointer-types] srep->send_item = stats_reporter_test_send_item; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. Change-Id: I91cbfd4dd25a881b803943430101dabf07dafc7c --- M tests/stats/stats_test.c 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/stats/stats_test.c b/tests/stats/stats_test.c index 75ddf18..0234460 100644 --- a/tests/stats/stats_test.c +++ b/tests/stats/stats_test.c @@ -27,6 +27,7 @@ #include #include +#include enum test_ctr { TEST_A_CTR, @@ -251,9 +252,9 @@ static int stats_reporter_test_send_item(struct osmo_stats_reporter *srep, const struct osmo_stat_item_group *statg, - const struct osmo_stat_item_desc *desc, int value) + const struct osmo_stat_item_desc *desc, int64_t value) { - printf(" %s: item p=%s g=%s i=%u n=%s v=%d u=%s\n", + printf(" %s: item p=%s g=%s i=%u n=%s v=%"PRId64" u=%s\n", srep->name, srep->name_prefix ? srep->name_prefix : "", statg->desc->group_name_prefix, statg->idx, -- To view, visit https://gerrit.osmocom.org/1587 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I91cbfd4dd25a881b803943430101dabf07dafc7c Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Sun Jan 15 18:10:43 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 18:10:43 +0000 Subject: openbsc[master]: gprs subscr: fix: intended strcmp(), but is strcpy() In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1590 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0ea035bd478f7022ed65e9e84d8aaf5e423309b7 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Jan 15 18:10:48 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 18:10:48 +0000 Subject: [MERGED] openbsc[master]: gprs subscr: fix: intended strcmp(), but is strcpy() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gprs subscr: fix: intended strcmp(), but is strcpy() ...................................................................... gprs subscr: fix: intended strcmp(), but is strcpy() The code checked 'if (strcpy(..) != 0)' which is always true and thus always copied twice -- luckily we want to copy anyway and so this is not an actual functional failure. We could correct to strcmp, but instead of iterating to compare, we might as well copy right away. Change-Id: I0ea035bd478f7022ed65e9e84d8aaf5e423309b7 --- M openbsc/src/gprs/gprs_subscriber.c 1 file changed, 3 insertions(+), 5 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/src/gprs/gprs_subscriber.c b/openbsc/src/gprs/gprs_subscriber.c index 23dbdd4..29e21ce 100644 --- a/openbsc/src/gprs/gprs_subscriber.c +++ b/openbsc/src/gprs/gprs_subscriber.c @@ -778,11 +778,9 @@ subscr->flags &= ~GPRS_SUBSCRIBER_ENABLE_PURGE; } - if (strcpy(subscr->equipment.imei, mmctx->imei) != 0) { - strncpy(subscr->equipment.imei, mmctx->imei, - sizeof(subscr->equipment.imei)-1); - subscr->equipment.imei[sizeof(subscr->equipment.imei)-1] = 0; - } + strncpy(subscr->equipment.imei, mmctx->imei, + sizeof(subscr->equipment.imei)-1); + subscr->equipment.imei[sizeof(subscr->equipment.imei)-1] = 0; if (subscr->lac != mmctx->ra.lac) subscr->lac = mmctx->ra.lac; -- To view, visit https://gerrit.osmocom.org/1590 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0ea035bd478f7022ed65e9e84d8aaf5e423309b7 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Sun Jan 15 18:11:30 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 15 Jan 2017 18:11:30 +0000 Subject: osmo-trx[master]: uhd: Add X300 sample timing for 4 SPS In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1577 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9153171fe3af95e1cb0d9d35a9287dfde155d184 Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Tom Tsou Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Jan 15 18:25:58 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 15 Jan 2017 18:25:58 +0000 Subject: libosmocore[master]: utils/conv_gen.py: improve application flexibility In-Reply-To: References: Message-ID: Patch Set 3: Code-Review-1 This patch set isn't ready yet. I'll finish soon... -- To view, visit https://gerrit.osmocom.org/1584 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0b476b00234c17f78b41d695cf3bfd13edb64c28 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 16 08:53:21 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 16 Jan 2017 08:53:21 +0000 Subject: [MERGED] libosmocore[master]: Mark deprecated function as such In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Mark deprecated function as such ...................................................................... Mark deprecated function as such Mark abis_nm_debugp_foh() function superseded by macro with the same name as deprecated. Change-Id: I2d3ea2b56aff6b687f72f832360b8cb8a24164e9 --- M src/gsm/abis_nm.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gsm/abis_nm.c b/src/gsm/abis_nm.c index 73e3c7e..9839d29 100644 --- a/src/gsm/abis_nm.c +++ b/src/gsm/abis_nm.c @@ -597,6 +597,7 @@ /* this is just for compatibility reasons, it is now a macro */ #undef abis_nm_debugp_foh +OSMO_DEPRECATED("Use abis_nm_debugp_foh macro instead") void abis_nm_debugp_foh(int ss, struct abis_om_fom_hdr *foh) { DEBUGP(ss, "OC=%s(%02x) INST=(%02x,%02x,%02x) ", -- To view, visit https://gerrit.osmocom.org/1595 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2d3ea2b56aff6b687f72f832360b8cb8a24164e9 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Mon Jan 16 08:54:18 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 16 Jan 2017 08:54:18 +0000 Subject: [MERGED] libosmocore[master]: CTRL: add write-only helpers In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: CTRL: add write-only helpers ...................................................................... CTRL: add write-only helpers Similar to CTRL_CMD_DEFINE_RO() add helper for control commands which are not meant to be read, only to set. Similarly, add CTRL_CMD_DEFINE_WO_NOVRF() for commands which do not perform inbound data verification. Change-Id: I66b7990db590c1f8e56326e392e6c1d2eafebd9a --- M include/osmocom/ctrl/control_cmd.h 1 file changed, 24 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/ctrl/control_cmd.h b/include/osmocom/ctrl/control_cmd.h index 8f2eaa2..a63557d 100644 --- a/include/osmocom/ctrl/control_cmd.h +++ b/include/osmocom/ctrl/control_cmd.h @@ -187,4 +187,28 @@ } \ CTRL_CMD_DEFINE_STRUCT(cmdname, cmdstr, verify_##cmdname) +#define CTRL_CMD_DEFINE_WO(cmdname, cmdstr) \ +static int set_##cmdname(struct ctrl_cmd *cmd, void *data); \ +static int get_##cmdname(struct ctrl_cmd *cmd, void *data) \ +{ \ + cmd->reply = "Write Only attribute"; \ + return CTRL_CMD_ERROR; \ +} \ +static int verify_##cmdname(struct ctrl_cmd *cmd, const char *val, void *data); \ +CTRL_CMD_DEFINE_STRUCT(cmdname, cmdstr, verify_##cmdname) + + +#define CTRL_CMD_DEFINE_WO_NOVRF(cmdname, cmdstr) \ +static int set_##cmdname(struct ctrl_cmd *cmd, void *data); \ +static int get_##cmdname(struct ctrl_cmd *cmd, void *data) \ +{ \ + cmd->reply = "Write Only attribute"; \ + return CTRL_CMD_ERROR; \ +} \ +static int verify_##cmdname(struct ctrl_cmd *cmd, const char *val, void *data) \ +{ \ + return 0; \ +} \ +CTRL_CMD_DEFINE_STRUCT(cmdname, cmdstr, verify_##cmdname) + struct gsm_network; -- To view, visit https://gerrit.osmocom.org/1574 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I66b7990db590c1f8e56326e392e6c1d2eafebd9a Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Jan 16 09:10:29 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 16 Jan 2017 09:10:29 +0000 Subject: [PATCH] osmo-pcu[master]: Log additional info for radio errors In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1578 to look at the new patch set (#4). Log additional info for radio errors Change-Id: I936a07ce87f05d9c3dc351dc3bdc4f00d78265e0 Related: OS#1553 --- M src/bts.cpp M src/sba.cpp 2 files changed, 14 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/78/1578/4 diff --git a/src/bts.cpp b/src/bts.cpp index a47d7d8..b4e18e3 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -909,9 +909,9 @@ void gprs_rlcmac_pdch::rcv_control_ack(Packet_Control_Acknowledgement_t *packet, uint32_t fn) { struct gprs_rlcmac_tbf *tbf, *new_tbf; - uint32_t tlli = 0; + uint32_t tlli = packet->TLLI; + GprsMs *ms = bts()->ms_by_tlli(tlli); - tlli = packet->TLLI; tbf = bts()->ul_tbf_by_poll_fn(fn, trx_no(), ts_no); if (!tbf) tbf = bts()->dl_tbf_by_poll_fn(fn, trx_no(), ts_no); @@ -920,6 +920,15 @@ LOGP(DRLCMAC, LOGL_NOTICE, "PACKET CONTROL ACK with " "unknown FN=%u TLLI=0x%08x (TRX %d TS %d)\n", fn, tlli, trx_no(), ts_no); + if (ms) + LOGP(DRLCMAC, LOGL_NOTICE, "PACKET CONTROL ACK with " + "unknown TBF corresponds to MS with IMSI %s, TA %d, " + "uTBF (TFI=%d, state=%s), uTBF (TFI=%d, state=%s)\n", + ms->imsi(), ms->ta(), + ms->ul_tbf() ? ms->ul_tbf()->tfi() : 0, + ms->ul_tbf() ? ms->ul_tbf()->state_name() : "None", + ms->dl_tbf() ? ms->dl_tbf()->tfi() : 0, + ms->dl_tbf() ? ms->dl_tbf()->state_name() : "None"); return; } tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF); diff --git a/src/sba.cpp b/src/sba.cpp index 46c1431..5d75b17 100644 --- a/src/sba.cpp +++ b/src/sba.cpp @@ -127,7 +127,9 @@ int SBAController::timeout(struct gprs_rlcmac_sba *sba) { - LOGP(DRLCMAC, LOGL_NOTICE, "Poll timeout for SBA\n"); + LOGP(DRLCMAC, LOGL_NOTICE, + "Poll timeout for SBA (TRX=%u, TS=%u, FN=%u, TA=%u)\n", sba->trx_no, + sba->ts_no, sba->fn, sba->ta); m_bts.sba_timedout(); free_sba(sba); return 0; -- To view, visit https://gerrit.osmocom.org/1578 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I936a07ce87f05d9c3dc351dc3bdc4f00d78265e0 Gerrit-PatchSet: 4 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Jan 16 09:13:35 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 16 Jan 2017 09:13:35 +0000 Subject: libosmocore[master]: utils.h: #include as we use fprintf() In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1609 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I911c7f4bcadde414ce0b384e13a3a9a4a953e2fb Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 16 09:14:11 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 16 Jan 2017 09:14:11 +0000 Subject: libosmocore[master]: ipa: Remove unneeded #include statement In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1610 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I69f2891a2bea6f87f079b6778aa01ee27a25001b Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 16 09:15:18 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 16 Jan 2017 09:15:18 +0000 Subject: libosmocore[master]: disable various code if building for bare-iron embedded In-Reply-To: References: Message-ID: Patch Set 2: I think we should add embedded build variant to jenkins before merging this. -- To view, visit https://gerrit.osmocom.org/1608 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I01a9e6d8dbe885dbeac2769b84931a4d44f7a3a5 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 16 09:18:40 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 16 Jan 2017 09:18:40 +0000 Subject: libosmocore[master]: logging: remove code duplication In-Reply-To: References: Message-ID: Patch Set 2: PS2 avoids API/ABI breakage. -- To view, visit https://gerrit.osmocom.org/1580 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia6c92bd4824c44fc22cc733ce7a88da86e58ed93 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 16 09:34:47 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 16 Jan 2017 09:34:47 +0000 Subject: [PATCH] osmo-bts[master]: DTX: fix "unexpected burst" error Message-ID: Review at https://gerrit.osmocom.org/1611 DTX: fix "unexpected burst" error Fix error during FACCH interruption of DTX for AMR HR. Max's note: added fix for sysmobts. Change-Id: Ib064952331b4f89676ee68a3d8078b1d9debe570 Related: OS#1801 --- M src/osmo-bts-litecell15/l1_if.c M src/osmo-bts-sysmo/l1_if.c 2 files changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/11/1611/1 diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index c70bd9e..ad336b0 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -417,6 +417,7 @@ if (sapi == GsmL1_Sapi_FacchH) { sapi = GsmL1_Sapi_TchH; subCh = L1SAP_CHAN2SS_TCHH(chan_nr); + u8BlockNbr = (u32Fn % 13) >> 2; } if (sapi == GsmL1_Sapi_TchH || sapi == GsmL1_Sapi_TchF) { /* FACCH interruption of DTX silence */ diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 82db8d7..533adf9 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -412,6 +412,7 @@ if (sapi == GsmL1_Sapi_FacchH) { sapi = GsmL1_Sapi_TchH; subCh = L1SAP_CHAN2SS_TCHH(chan_nr); + u8BlockNbr = (u32Fn % 13) >> 2; } if (sapi == GsmL1_Sapi_TchH || sapi == GsmL1_Sapi_TchF) { /* FACCH interruption of DTX silence */ -- To view, visit https://gerrit.osmocom.org/1611 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib064952331b4f89676ee68a3d8078b1d9debe570 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Jan 16 10:13:01 2017 From: gerrit-no-reply at lists.osmocom.org (sivasankari) Date: Mon, 16 Jan 2017 10:13:01 +0000 Subject: [PATCH] osmo-pcu[master]: Add compression support in EGPRS PUAN In-Reply-To: References: Message-ID: Hello Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/413 to look at the new patch set (#5). Add compression support in EGPRS PUAN This adds compression of bitmap in PUAN. The compressed bitmap is used only if the number of bits in the bitmap does not fit in the message and there is a gain after compression. The algorithm is part of libosmocore and so there is dependency on the libosmocore for compilation. The algorithm is tested on integration setup by forcing compression. Change-Id: Id2eec4b5eb6da0ebd24054b541b09b700b9b40ba --- M src/egprs_rlc_compression.cpp M src/egprs_rlc_compression.h M src/encoding.cpp M src/rlc.cpp M src/rlc.h M src/tbf.cpp M src/tbf.h M src/tbf_ul.cpp M tests/tbf/TbfTest.err 9 files changed, 537 insertions(+), 27 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/13/413/5 diff --git a/src/egprs_rlc_compression.cpp b/src/egprs_rlc_compression.cpp index f4e6bde..82605ff 100644 --- a/src/egprs_rlc_compression.cpp +++ b/src/egprs_rlc_compression.cpp @@ -84,8 +84,203 @@ } } -/* The code words for one run length and zero run length are described in - * table 9.1.10.1 of 3gpp 44.060 +/* + * Terminating codes for uninterrupted sequences of 0 and 1 up to 64 bit length + * according to TS 44.060 9.1.10 + */ +static const unsigned t4_term[2][64] = { + { + 0b0000110111, + 0b10, + 0b11, + 0b010, + 0b011, + 0b0011, + 0b0010, + 0b00011, + 0b000101, + 0b000100, + 0b0000100, + 0b0000101, + 0b0000111, + 0b00000100, + 0b00000111, + 0b000011000, + 0b0000010111, + 0b0000011000, + 0b0000001000, + 0b00001100111, + 0b00001101000, + 0b00001101100, + 0b00000110111, + 0b00000101000, + 0b00000010111, + 0b00000011000, + 0b000011001010, + 0b000011001011, + 0b000011001100, + 0b000011001101, + 0b000001101000, + 0b000001101001, + 0b000001101010, + 0b000001101011, + 0b000011010010, + 0b000011010011, + 0b000011010100, + 0b000011010101, + 0b000011010110, + 0b000011010111, + 0b000001101100, + 0b000001101101, + 0b000011011010, + 0b000011011011, + 0b000001010100, + 0b000001010101, + 0b000001010110, + 0b000001010111, + 0b000001100100, + 0b000001100101, + 0b000001010010, + 0b000001010011, + 0b000000100100, + 0b000000110111, + 0b000000111000, + 0b000000100111, + 0b000000101000, + 0b000001011000, + 0b000001011001, + 0b000000101011, + 0b000000101100, + 0b000001011010, + 0b000001100110, + 0b000001100111 + + }, + { + 0b00110101, + 0b000111, + 0b0111, + 0b1000, + 0b1011, + 0b1100, + 0b1110, + 0b1111, + 0b10011, + 0b10100, + 0b00111, + 0b01000, + 0b001000, + 0b000011, + 0b110100, + 0b110101, + 0b101010, + 0b101011, + 0b0100111, + 0b0001100, + 0b0001000, + 0b0010111, + 0b0000011, + 0b0000100, + 0b0101000, + 0b0101011, + 0b0010011, + 0b0100100, + 0b0011000, + 0b00000010, + 0b00000011, + 0b00011010, + 0b00011011, + 0b00010010, + 0b00010011, + 0b00010100, + 0b00010101, + 0b00010110, + 0b00010111, + 0b00101000, + 0b00101001, + 0b00101010, + 0b00101011, + 0b00101100, + 0b00101101, + 0b00000100, + 0b00000101, + 0b00001010, + 0b00001011, + 0b01010010, + 0b01010011, + 0b01010100, + 0b01010101, + 0b00100100, + 0b00100101, + 0b01011000, + 0b01011001, + 0b01011010, + 0b01011011, + 0b01001010, + 0b01001011, + 0b00110010, + 0b00110011, + 0b00110100 + } +}; +static const unsigned t4_term_length[2][64] = { + {10, 2, 2, 3, 3, 4, 4, 5, 6, 6, 7, 7, 7, 8, 8, 9, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12}, + {8, 6, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8} +}; + +static const unsigned t4_min_term_length[] = {2, 4}; +static const unsigned t4_min_make_up_length[] = {10, 5}; + +static const unsigned t4_max_term_length[] = {12, 8}; +static const unsigned t4_max_make_up_length[] = {13, 9}; + +static const unsigned t4_make_up_length[2][15] = { + {10, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13}, + {5, 5, 6, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9} +}; + +static const unsigned t4_make_up_ind[15] = {64, 128, 192, 256, 320, 384, 448, 512, 576, 640, 704, 768, 832, 896, 960}; + +static const unsigned t4_make_up[2][15] = { + { + 0b0000001111, + 0b000011001000, + 0b000011001001, + 0b000001011011, + 0b000000110011, + 0b000000110100, + 0b000000110101, + 0b0000001101100, + 0b0000001101101, + 0b0000001001010, + 0b0000001001011, + 0b0000001001100, + 0b0000001001101, + 0b0000001110010, + 0b0000001110011 + }, + { + 0b11011, + 0b10010, + 0b010111, + 0b0110111, + 0b00110110, + 0b00110111, + 0b01100100, + 0b01100101, + 0b01101000, + 0b01100111, + 0b011001100, + 0b011001101, + 0b011010010, + 0b011010011, + 0b011010100 + } +}; + +/* The code words for one run length and zero + * run length are described in table 9.1.10.1 + * of 3gpp 44.060 */ const char *one_run_len_code_list[EGPRS_CODEWORDS] = { "00110101", @@ -359,3 +554,138 @@ decode_tree_init(); } +/* Compress received block bitmap + * \param run_len_cnt[in] Count of number of 1's and 0's + * \param codewrd_bitmap[in] Code word for coresponding run length. + * \param crbb_vec[out] compressed bitvector. + */ +static void compress_bitmap( + uint16_t *run_len_cnt, /* cnt: run length count */ + uint16_t *codewrd_bitmap, /* code word */ + int16_t *codewrd_len, /* number of bits in the code word */ + bitvec *crbb_vec, /* bitmap buffer to put code word in */ + bool start) +{ + int i = 0; + unsigned writeIndex = crbb_vec->cur_bit; + *codewrd_bitmap = 0; + *codewrd_len = 0; + if (*run_len_cnt >= 64) { + for (i = 0; i < 15; i++) { + if (t4_make_up_ind[i] == *run_len_cnt) { + *codewrd_bitmap = t4_make_up[start][i]; + *codewrd_len = t4_make_up_length[start][i]; + } + } + } else { + *codewrd_bitmap = t4_term[start][*run_len_cnt]; + *codewrd_len = t4_term_length[start][*run_len_cnt]; + } + bitvec_write_field(crbb_vec, writeIndex, *codewrd_bitmap, *codewrd_len); +} + +/* Compress received block bitmap */ +int egprs_compress::osmo_t4_compress(struct bitvec *bv) +{ + uint8_t crbb_len = 0; + uint8_t uclen_crbb = 0; + uint8_t crbb_bitmap[127] = {'\0'}; + bool start = (bv->data[0] & 0x80)>>7; + struct bitvec crbb_vec; + + crbb_vec.data = crbb_bitmap; + crbb_vec.cur_bit = 0; + crbb_vec.data_len = 127; + bv->data_len = bv->cur_bit; + bv->cur_bit = 0; + if (egprs_compress::compress_rbb(bv, &crbb_vec, &uclen_crbb, 23*8)) { + memcpy(bv->data, crbb_bitmap, (crbb_len+7)/8); + bv->cur_bit = crbb_len; + bv->data_len = (crbb_len+7)/8; + return start; + } + else + printf("Encode failed\n"); + return -1; +} + +/*! \brief compression algorithm using T4 encoding + * the compressed bitmap's are copied in crbb_bitmap + * \param[in] rbb_vec bit vector to be encoded + * \return 1 if compression is success or 0 for failure + */ +int egprs_compress::compress_rbb( + struct bitvec *urbb_vec, + struct bitvec *crbb_vec, + uint8_t *uclen_crbb, /* Uncompressed bitmap len in CRBB */ + uint8_t max_bits) /* max remaining bits */ +{ + bool run_len_bit; + int buflen = urbb_vec->cur_bit; + int total_bits = urbb_vec->cur_bit; + uint16_t rlen; + uint16_t temprl = 0; + uint16_t cbmap = 0; /* Compressed code word */ + int16_t nbits; /* Length of code word */ + uint16_t uclen = 0; + int16_t clen = 0; + bool start; /* Starting color code see 9.1.10, 3GPP 44.060 */ + urbb_vec->cur_bit = 0; + run_len_bit = (urbb_vec->data[0] & 0x80)>>7; + while (buflen > 0) { + temprl = 0; + /* Find Run length */ + if (run_len_bit == 1) + rlen = bitvec_rl_curbit(urbb_vec, true, total_bits); + else + rlen = bitvec_rl_curbit(urbb_vec, false, total_bits); + buflen = buflen - rlen; + /* if rlen > 64 need Makeup code word */ + /*Compress the bits */ + if (run_len_bit == 0) { + start = 0; + if (rlen >= 64) { + temprl = (rlen/64)*64; + compress_bitmap(&temprl, &cbmap, &nbits, + crbb_vec, start); + clen = clen + nbits; + } + temprl = MOD64(rlen); + compress_bitmap(&temprl, &cbmap, &nbits, + crbb_vec, start); + /* next time the run length will be Ones */ + run_len_bit = 1; + } else { + start = 1; + if (rlen >= 64) { + temprl = (rlen/64)*64; + compress_bitmap(&temprl, &cbmap, &nbits, + crbb_vec, start); + clen = clen + nbits; + } + temprl = MOD64(rlen); + compress_bitmap(&temprl, &cbmap, &nbits, + crbb_vec, start); + + /* next time the run length will be Zeros */ + run_len_bit = 0; + } + uclen = uclen + rlen; + clen = clen + nbits; + /*compressed bitmap exceeds the buffer space */ + if (clen > max_bits) { + uclen = uclen - rlen; + clen = clen - nbits; + break; + } + } + crbb_vec->cur_bit = clen; + *uclen_crbb = uclen; + if (clen >= uclen) + /* No Gain is observed, So no need to compress */ + return 0; + else + LOGP(DRLCMACUL, LOGL_DEBUG, "CRBB bitmap = %s\n", osmo_hexdump(crbb_vec->data, (crbb_vec->cur_bit+7)/8)); + /* Add compressed bitmap to final buffer */ + return 1; +} diff --git a/src/egprs_rlc_compression.h b/src/egprs_rlc_compression.h index c5f0f1a..4d2501b 100644 --- a/src/egprs_rlc_compression.h +++ b/src/egprs_rlc_compression.h @@ -5,6 +5,7 @@ #pragma once struct egprs_compress_node; +#define MOD64(X) (((X) + 64) & 0x3F) /* Singleton to manage the EGPRS compression algorithm. */ class egprs_compress @@ -14,6 +15,9 @@ bool start, const uint8_t *orig_buf, bitvec *dest); egprs_compress(); + int osmo_t4_compress(struct bitvec *bv); + static int compress_rbb(struct bitvec *urbb_vec, struct bitvec *crbb_vec, + uint8_t *uclen_crbb, uint8_t max_bits); private: egprs_compress_node *ones_list; diff --git a/src/encoding.cpp b/src/encoding.cpp index 8fa4bf6..ea38b77 100644 --- a/src/encoding.cpp +++ b/src/encoding.cpp @@ -24,6 +24,7 @@ #include #include #include +#include extern "C" { #include @@ -699,20 +700,44 @@ static void write_packet_ack_nack_desc_egprs( struct gprs_rlcmac_bts *bts, bitvec * dest, unsigned& wp, - gprs_rlc_ul_window *window, bool is_final) + gprs_rlc_ul_window *window, bool is_final, unsigned& rest_bits) { - int urbb_len = 0; - int len; + unsigned int urbb_len = 0; + uint8_t crbb_len = 0; + uint8_t len; bool bow = true; bool eow = true; int ssn = window->mod_sns(window->v_q() + 1); - int num_blocks = window->mod_sns(window->v_r() - window->v_q()); + unsigned int num_blocks = window->mod_sns(window->v_r() - window->v_q()); int esn_crbb = window->mod_sns(ssn - 1); - /* Bit 0 at the end is mandatory Table 11.2.28.1 in 44.060 */ - int rest_bits = dest->data_len * 8 - wp - 1; + static uint8_t rbb[RLC_EGPRS_MAX_WS] = {'\0'}; + uint8_t iter = 0; int is_compressed = 0; + bool try_compression = false; + uint8_t ucmp_bmplen; + uint8_t crbb_bitmap[23] = {'\0'}; + bitvec ucmp_vec; + bitvec crbb_vec; + uint8_t uclen_crbb = 0; bool len_coded = true; + uint8_t crbb_start_clr_code; uint8_t i; +#if 0 + /* static size of 16 bits*/ + ..0. .... = ACKNACK: (Union) + Desc + + ...0 .... = FINAL_ACK_INDICATION: False + + .... 1... = BEGINNING_OF_WINDOW: 1 + + .... .1.. = END_OF_WINDOW: 1 + + .... ..10 0101 0001 1... .... = STARTING_SEQUENCE_NUMBER: 1187 + + .0.. .... = CRBB Exist: 0 +#endif + rest_bits -= 16; if (num_blocks > 0) /* V(Q) is NACK and omitted -> SSN = V(Q) + 1 */ @@ -720,27 +745,67 @@ if (num_blocks > window->ws()) num_blocks = window->ws(); - /* TODO Compression support */ - if (is_compressed == 0) { - /* Union bit takes 1 bit */ - /* Other fields in descr for uncompresed bitmap takes 15 bits*/ + /* Try Compression as number of blocks does not fit */ + if (num_blocks > rest_bits) { + try_compression = true; + } + if (try_compression == true) { + ucmp_bmplen = window->update_egprs_rbb(rbb); + ucmp_vec.data = rbb; + ucmp_vec.cur_bit = ucmp_bmplen; + ucmp_vec.data_len = 127; + crbb_vec.data = crbb_bitmap; + crbb_vec.cur_bit = 0; + crbb_vec.data_len = 127; + LOGP(DRLCMACUL, LOGL_DEBUG, + "rest_bits=%d uncompressed len %d and uncompressed bitmap = %s\n", + rest_bits, ucmp_bmplen, + osmo_hexdump(ucmp_vec.data, (ucmp_bmplen+7)/8)); - if (num_blocks > rest_bits - 15 - 1) { + is_compressed = egprs_compress::compress_rbb(&ucmp_vec, /* Uncompressed bitmap*/ + &crbb_vec, /*Compressed bitmap vector */ + &uclen_crbb, + (rest_bits - 16));/* CRBBlength:7 colourcode:1 dissector length:8*/ + LOGP(DRLCMACUL, LOGL_DEBUG, + "the ucmp len=%d uclen_crbb=%d num_blocks=%d crbb length %d, " + "and the CRBB bitmap = %s\n", + ucmp_bmplen, uclen_crbb, num_blocks, crbb_vec.cur_bit, + osmo_hexdump(crbb_bitmap, (crbb_vec.cur_bit+7)/8)); + crbb_len = crbb_vec.cur_bit; + } + + if (is_compressed == 0) { + /* length field takes 8 bits*/ + if (num_blocks > rest_bits - 8) { eow = false; - urbb_len = rest_bits - 15 - 1; + urbb_len = rest_bits; len_coded = false; - } else if (num_blocks == rest_bits - 15 - 1) { - urbb_len = rest_bits - 15 - 1; + } else if (num_blocks == rest_bits) { + urbb_len = rest_bits; len_coded = false; - /* Union bit takes 1 bit length field takes 8 bits*/ - } else if (num_blocks > rest_bits - 15 - 9) { - eow = false; - urbb_len = rest_bits - 15 - 9; } else urbb_len = num_blocks; + len = urbb_len + 15; } else { - /* TODO Compressed bitmap */ + if (num_blocks > uclen_crbb) { + eow = false; + urbb_len = num_blocks - uclen_crbb; + } + /* Union bit takes 1 bit */ + /* Other fields in descr of compresed bitmap takes 23 bits + * -8 = CRBB_STARTING_COLOR_CODE + CRBB_LENGTH */ + if (urbb_len > (rest_bits - crbb_len - 8)) { + eow = false; + len_coded = false; + urbb_len = rest_bits - crbb_len - 8; + /* -16 = ACKNACK Dissector length + CRBB_STARTING_COLOR_CODE + CRBB_LENGTH */ + } else if (urbb_len > (rest_bits - crbb_len - 16)) { + eow = false; + len_coded = false; + urbb_len = rest_bits - crbb_len - 16; + } + len = urbb_len + crbb_len + 23; } /* EGPRS Ack/Nack Description IE */ @@ -756,14 +821,32 @@ bitvec_write_field(dest, wp, eow, 1); // END_OF_WINDOW bitvec_write_field(dest, wp, ssn, 11); // STARTING_SEQUENCE_NUMBER if (is_compressed) { - /* TODO Add CRBB support */ - } else + bitvec_write_field(dest, wp, 1, 1); // CRBB_Exist + bitvec_write_field(dest, wp, crbb_len, 7); // CRBB_LENGTH + crbb_start_clr_code = (0x80 & ucmp_vec.data[0])>>7; + bitvec_write_field(dest, wp, crbb_start_clr_code, 1); // CRBB_clr_code + LOGP(DRLCMACUL, LOGL_DEBUG, + "EGPRS CRBB, crbb_len = %d, crbb_start_clr_code = %d\n", + crbb_len, crbb_start_clr_code); + while (crbb_len != 0) { + if (crbb_len > 8) { + bitvec_write_field(dest, wp, crbb_bitmap[iter], 8); + crbb_len = crbb_len - 8; + iter++; + } else { + bitvec_write_field(dest, wp, crbb_bitmap[iter], crbb_len); + crbb_len = 0; + } + } + esn_crbb = window->mod_sns(esn_crbb + uclen_crbb); + } else { bitvec_write_field(dest, wp, 0, 1); // CRBB_Exist + } LOGP(DRLCMACUL, LOGL_DEBUG, "EGPRS URBB, urbb len = %d, SSN = %d, ESN_CRBB = %d, " "len present = %s,desc len = %d, " "SNS = %d, WS = %d, V(Q) = %d, V(R) = %d%s%s\n", - urbb_len, ssn, esn_crbb, len_coded ? "yes" : "No", len, + urbb_len, ssn, esn_crbb, len_coded ? "yes" : "No" , len, window->sns(), window->ws(), window->v_q(), window->v_r(), bow ? ", BOW" : "", eow ? ", EOW" : ""); @@ -795,7 +878,9 @@ bitvec_write_field(dest, wp, 0, 1); // 0: don't have Power Control Parameters bitvec_write_field(dest, wp, 0, 1); // 0: don't have Extension Bits - write_packet_ack_nack_desc_egprs(bts, dest, wp, &tbf->m_window, is_final); + /* -2 for last bit 0 mandatory and REL5 not supported */ + unsigned bits_ack_nack = dest->data_len * 8 - wp - 2; + write_packet_ack_nack_desc_egprs(bts, dest, wp, &tbf->m_window, is_final, bits_ack_nack); bitvec_write_field(dest, wp, 0, 1); // fixed 0 bitvec_write_field(dest, wp, 0, 1); // 0: don't have REL 5 diff --git a/src/rlc.cpp b/src/rlc.cpp index 2bffccb..d13045e 100644 --- a/src/rlc.cpp +++ b/src/rlc.cpp @@ -83,6 +83,32 @@ return resend; } +/* Update the receive block bitmap */ +uint16_t gprs_rlc_ul_window::update_egprs_rbb(uint8_t *rbb) +{ + int i; + uint16_t bsn; + uint16_t bitmask = 0x80; + int8_t pos = 0; + int8_t bit_pos = 0; + for (i = 0, bsn = (v_q()+1); ((bsn < (v_r())) && (i < ws())); i++, + bsn = this->mod_sns(bsn + 1)) { + if (m_v_n.is_received(bsn)) { + rbb[pos] = rbb[pos] | bitmask; + } else { + rbb[pos] = rbb[pos] & (~bitmask); + } + bitmask = bitmask >> 1; + bit_pos++; + bit_pos = bit_pos % 8; + if (bit_pos == 0) { + pos++; + bitmask = 0x80; + } + } + return i; +} + int gprs_rlc_dl_window::count_unacked() { uint16_t unacked = 0; @@ -219,6 +245,8 @@ void gprs_rlc_window::set_ws(uint16_t ws) { + LOGP(DRLCMAC, LOGL_INFO, "ws(%d)\n", + ws); OSMO_ASSERT(ws >= RLC_GPRS_SNS/2); OSMO_ASSERT(ws <= RLC_MAX_SNS/2); m_ws = ws; diff --git a/src/rlc.h b/src/rlc.h index b2fcd95..7db205d 100644 --- a/src/rlc.h +++ b/src/rlc.h @@ -347,6 +347,7 @@ bool is_received(uint16_t bsn) const; void update_rbb(char *rbb); + uint16_t update_egprs_rbb(uint8_t *rbb); void raise_v_r_to(int moves); void raise_v_r(const uint16_t bsn); uint16_t raise_v_q(); diff --git a/src/tbf.cpp b/src/tbf.cpp index 657255d..33d94a8 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -827,14 +827,16 @@ if (egprs_ms_class > 0 && bts->egprs_enabled) { tbf->enable_egprs(); tbf->m_window.set_sns(RLC_EGPRS_SNS); - /* TODO: Allow bigger UL windows when CRBB encoding is supported */ - tbf->m_window.set_ws(RLC_EGPRS_MIN_WS); setup_egprs_mode(bts, ms); LOGP(DRLCMAC, LOGL_INFO, "Enabled EGPRS for %s, mode %s\n", tbf->name(), GprsCodingScheme::modeName(ms->mode())); } rc = setup_tbf(tbf, ms, use_trx, ms_class, egprs_ms_class, single_slot); + + if (tbf->is_egprs_enabled()) + tbf->egprs_calc_ulwindow_size(); + /* if no resource */ if (rc < 0) { talloc_free(tbf); diff --git a/src/tbf.h b/src/tbf.h index adb7dcc..0389595 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -523,6 +523,8 @@ struct gprs_rlc_data *block, uint8_t *data, const uint8_t block_idx); + void egprs_calc_ulwindow_size(); + void update_coding_scheme_counter_ul(const GprsCodingScheme cs); /* Please note that all variables here will be reset when changing diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 0de0127..2598174 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -29,6 +29,8 @@ #include #include +#include "pcu_utils.h" + extern "C" { #include #include @@ -587,3 +589,22 @@ } } } + +void gprs_rlcmac_ul_tbf::egprs_calc_ulwindow_size() +{ + struct gprs_rlcmac_bts *bts_data = bts->bts_data(); + unsigned int num_pdch = pcu_bitcount(ul_slots()); + unsigned int ws = bts_data->ws_base + num_pdch * bts_data->ws_pdch; + ws = (ws / 32) * 32; + ws = OSMO_MAX(64, ws); + + if (num_pdch == 1) + ws = OSMO_MIN(192, ws); + else + ws = OSMO_MIN(128 * num_pdch, ws); + + LOGP(DRLCMAC, LOGL_INFO, "%s: Setting EGPRS window size to %d, base(%d) slots(%d) ws_pdch(%d)\n", + name(), ws, bts_data->ws_base, num_pdch, bts_data->ws_pdch); + + m_window.set_ws(ws); +} diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index 38d85d9..5f5456b 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -3342,6 +3342,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 3c TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 384 +ws(384) DL TBF slots: 0x3c, N: 4, WS: 384 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to RELEASING TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=RELEASING EGPRS) free @@ -3386,6 +3387,8 @@ - Setting Control TS 7 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 00 +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): Setting EGPRS window size to 64, base(0) slots(1) ws_pdch(0) +ws(64) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer 3169. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed @@ -3438,6 +3441,7 @@ Attaching TBF to MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 80 TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI: 0xf1223344 confirmed TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) [DOWNLINK] START Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' @@ -3479,6 +3483,8 @@ - Setting Control TS 7 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 00 +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): Setting EGPRS window size to 64, base(0) slots(1) ws_pdch(0) +ws(64) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer 3169. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed @@ -3694,6 +3700,7 @@ Attaching TBF to MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 80 TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI: 0xf1223344 confirmed TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) [DOWNLINK] START Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' @@ -3723,6 +3730,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -4057,6 +4065,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -4336,6 +4345,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -4574,6 +4584,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -4776,6 +4787,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -4956,6 +4968,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -5117,6 +5130,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -5274,6 +5288,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -5418,6 +5433,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -5563,6 +5579,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -5614,6 +5631,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -5665,6 +5683,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -5716,6 +5735,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -5786,6 +5806,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -5856,6 +5877,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -5926,6 +5948,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -5996,6 +6019,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -6053,6 +6077,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -6110,6 +6135,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -6167,6 +6193,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -6242,6 +6269,8 @@ - Setting Control TS 7 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 00 +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): Setting EGPRS window size to 64, base(0) slots(1) ws_pdch(0) +ws(64) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer 3169. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed @@ -6324,6 +6353,7 @@ Attaching TBF to MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 80 TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI: 0xf1223344 confirmed TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) [DOWNLINK] START Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' @@ -6355,6 +6385,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 192 +ws(192) DL TBF slots: 0x10, N: 1, WS: 192 ********** TBF update ********** PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. @@ -6371,6 +6402,7 @@ - Assigning DL TS 5 PDCH(TS 5, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS), 1 TBFs, USFs = 00, TFIs = 00000001. TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 384 +ws(384) DL TBF slots: 0x3c, N: 4, WS: 384 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to RELEASING TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=RELEASING EGPRS) free @@ -6415,6 +6447,8 @@ - Setting Control TS 7 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 00 +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): Setting EGPRS window size to 64, base(0) slots(1) ws_pdch(0) +ws(64) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer 3169. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed @@ -6485,6 +6519,7 @@ Attaching TBF to MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 80 TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI: 0xf1223344 confirmed TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) [DOWNLINK] START Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' @@ -6514,9 +6549,11 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed +ws(480) TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - ack: (BSN=1176)"RRRRRRRRRRIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIRRRIRRRRRRRRRRRRRRRRRRRRRRRRRRI"(BSN=1287) R=ACK I=NACK TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) DL analysis, range=1176:1288, lost=73, recv=39, skipped=0, bsn=1944, info='RRRRRRRRRRRRRRRRRRRRRRRRRRLRRRLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLRRRRRRRRRR................................................................................................................................................................................................................................................................................................................................................................................' -- To view, visit https://gerrit.osmocom.org/413 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id2eec4b5eb6da0ebd24054b541b09b700b9b40ba Gerrit-PatchSet: 5 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: prasadkg Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: prasadkg Gerrit-Reviewer: pravin Gerrit-Reviewer: sivasankari From gerrit-no-reply at lists.osmocom.org Mon Jan 16 10:30:44 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 16 Jan 2017 10:30:44 +0000 Subject: [PATCH] libosmo-netif[master]: deb: fix lib version Message-ID: Review at https://gerrit.osmocom.org/1612 deb: fix lib version The library version does not match LIBVERSION from Makefile.am and -dev package dependency - bump it. Change-Id: Ie9bcd71ffcaeaa78aeef74ec329a6966ce1f1ba6 Related: OS#1860 --- M debian/control R debian/libosmonetif3.install 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/12/1612/1 diff --git a/debian/control b/debian/control index f499728..f4c94bb 100644 --- a/debian/control +++ b/debian/control @@ -20,7 +20,7 @@ Vcs-Git: git://git.osmocom.org/libosmo-netif.git Homepage: https://projects.osmocom.org/projects/libosmo-netif -Package: libosmonetif2 +Package: libosmonetif3 Section: libs Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} @@ -51,7 +51,7 @@ Section: debug Architecture: any Priority: extra -Depends: libosmonetif2 (= ${binary:Version}), ${misc:Depends} +Depends: libosmonetif3 (= ${binary:Version}), ${misc:Depends} Multi-Arch: same Description: Debug symbols for Osmocom network interface library The libosmo-netif library is one of the libraries needed by the diff --git a/debian/libosmonetif2.install b/debian/libosmonetif3.install similarity index 100% rename from debian/libosmonetif2.install rename to debian/libosmonetif3.install -- To view, visit https://gerrit.osmocom.org/1612 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie9bcd71ffcaeaa78aeef74ec329a6966ce1f1ba6 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Jan 16 11:26:04 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 16 Jan 2017 11:26:04 +0000 Subject: osmo-pcu[master]: Enable padding support for retransmission in EGPRS DL TBF In-Reply-To: References: Message-ID: Patch Set 2: Ok, so I'd like to check if osmo-bts-sysmo has this problem too. Which configuration shall I use for tests? Which tests shall I make and which logfiles/options/whatever I should look into to understand if the problem with padding exists there or not? -- To view, visit https://gerrit.osmocom.org/1513 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idaf956244aa029c4bef70ecf94163044a3c85f59 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 16 12:05:42 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 16 Jan 2017 12:05:42 +0000 Subject: libosmocore[master]: utils/conv_gen.py: add test vector generation feature In-Reply-To: References: Message-ID: Patch Set 4: (1 comment) https://gerrit.osmocom.org/#/c/1585/4/utils/conv_gen.py File utils/conv_gen.py: Line 254: # Print pre computed vectors if preset So if if vec_in is available but vec_out isn't than both will be omitted. Is this intentional? -- To view, visit https://gerrit.osmocom.org/1585 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie10c47ee952f253b1ba77ecf6e79f2c033545bc1 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: tnt Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Jan 16 12:10:17 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 16 Jan 2017 12:10:17 +0000 Subject: libosmocore[master]: gsm0503.h: generate header automatically In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 Out of curiosity - will it work with python3? -- To view, visit https://gerrit.osmocom.org/1594 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I21caa4e433b2cc1861611e35350a9671da444c2a Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 16 12:22:19 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 16 Jan 2017 12:22:19 +0000 Subject: [PATCH] openbsc[master]: cosmetic: use osmo_strscpy() or osmo_strncpy() everywhere In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1592 to look at the new patch set (#3). cosmetic: use osmo_strscpy() or osmo_strncpy() everywhere Shorten some code and make obvious to the reader that strncpy() is invoked in a safe way. Depends on libosmocore Change-Id Ie973fc51835066540eba7ed2946ddf33a268b022 Change-Id: I900726cf06d34128db22a3d3d911ee0d1423b1bd --- M openbsc/src/gprs/gprs_gmm.c M openbsc/src/gprs/gprs_subscriber.c M openbsc/src/gprs/gtphub.c M openbsc/src/gprs/gtphub_ares.c M openbsc/src/gprs/sgsn_auth.c M openbsc/src/libbsc/abis_nm.c M openbsc/src/libbsc/bsc_rf_ctrl.c M openbsc/src/libcommon/gsm_subscriber_base.c M openbsc/src/libcommon/gsup_test_client.c M openbsc/src/libmsc/ctrl_commands.c M openbsc/src/libmsc/db.c M openbsc/src/libmsc/gsm_04_08.c M openbsc/src/libmsc/gsm_04_11.c M openbsc/src/libmsc/meas_feed.c M openbsc/src/libmsc/smpp_openbsc.c M openbsc/src/libmsc/vty_interface_layer3.c M openbsc/src/libtrau/rtp_proxy.c M openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c M openbsc/src/utils/meas_vis.c M openbsc/tests/gtphub/gtphub_test.c M openbsc/tests/sgsn/sgsn_test.c 21 files changed, 81 insertions(+), 117 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/92/1592/3 diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c index e3d5c7d..bd87c41 100644 --- a/openbsc/src/gprs/gprs_gmm.c +++ b/openbsc/src/gprs/gprs_gmm.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -683,11 +684,10 @@ /* Prepend a '+' for international numbers */ if (called.plan == 1 && called.type == 1) { ctx->msisdn[0] = '+'; - strncpy(&ctx->msisdn[1], called.number, - sizeof(ctx->msisdn) - 1); + osmo_strncpy(&ctx->msisdn[1], called.number, + sizeof(ctx->msisdn) - 1); } else { - strncpy(&ctx->msisdn[0], called.number, - sizeof(ctx->msisdn) - 1); + osmo_strscpy(ctx->msisdn, called.number); } } @@ -725,7 +725,7 @@ return; } - strncpy(&ctx->hlr[0], called.number, sizeof(ctx->hlr) - 1); + osmo_strscpy(ctx->hlr, called.number); } #ifdef BUILD_IU @@ -1034,10 +1034,10 @@ mm_ctx_cleanup_free(ictx, "GPRS IMSI re-use"); } } - strncpy(ctx->imsi, mi_string, sizeof(ctx->imsi) - 1); + osmo_strscpy(ctx->imsi, mi_string); break; case GSM_MI_TYPE_IMEI: - strncpy(ctx->imei, mi_string, sizeof(ctx->imei) - 1); + osmo_strscpy(ctx->imei, mi_string); break; case GSM_MI_TYPE_IMEISV: break; @@ -1138,7 +1138,7 @@ reject_cause = GMM_CAUSE_NET_FAIL; goto rejected; } - strncpy(ctx->imsi, mi_string, sizeof(ctx->imsi) - 1); + osmo_strscpy(ctx->imsi, mi_string); #endif } if (ctx->ran_type == MM_CTX_T_GERAN_Gb) { diff --git a/openbsc/src/gprs/gprs_subscriber.c b/openbsc/src/gprs/gprs_subscriber.c index 29e21ce..491e712 100644 --- a/openbsc/src/gprs/gprs_subscriber.c +++ b/openbsc/src/gprs/gprs_subscriber.c @@ -22,6 +22,7 @@ #include #include +#include #include #include @@ -164,7 +165,7 @@ struct msgb *msg = gsup_client_msgb_alloc(); if (strlen(gsup_msg->imsi) == 0 && subscr) - strncpy(gsup_msg->imsi, subscr->imsi, sizeof(gsup_msg->imsi) - 1); + osmo_strscpy(gsup_msg->imsi, subscr->imsi); gsup_msg->cn_domain = OSMO_GSUP_CN_DOMAIN_PS; osmo_gsup_encode(msg, gsup_msg); @@ -185,7 +186,7 @@ { struct osmo_gsup_message gsup_reply = {0}; - strncpy(gsup_reply.imsi, gsup_orig->imsi, sizeof(gsup_reply.imsi) - 1); + osmo_strscpy(gsup_reply.imsi, gsup_orig->imsi); gsup_reply.cause = cause; gsup_reply.message_type = OSMO_GSUP_TO_MSGT_ERROR(gsup_orig->message_type); @@ -778,9 +779,7 @@ subscr->flags &= ~GPRS_SUBSCRIBER_ENABLE_PURGE; } - strncpy(subscr->equipment.imei, mmctx->imei, - sizeof(subscr->equipment.imei)-1); - subscr->equipment.imei[sizeof(subscr->equipment.imei)-1] = 0; + osmo_strscpy(subscr->equipment.imei, mmctx->imei); if (subscr->lac != mmctx->ra.lac) subscr->lac = mmctx->ra.lac; diff --git a/openbsc/src/gprs/gtphub.c b/openbsc/src/gprs/gtphub.c index a0af42b..e3ff5d8 100644 --- a/openbsc/src/gprs/gtphub.c +++ b/openbsc/src/gprs/gtphub.c @@ -2360,8 +2360,7 @@ ggsn->peer = pp; gtphub_port_ref_count_inc(pp); - strncpy(ggsn->apn_oi_str, apn_oi_str, sizeof(ggsn->apn_oi_str)); - ggsn->apn_oi_str[sizeof(ggsn->apn_oi_str) - 1] = '\0'; + osmo_strscpy(ggsn->apn_oi_str, apn_oi_str); ggsn->expiry_entry.del_cb = resolved_gssn_del_cb; expiry_add(&hub->expire_slowly, &ggsn->expiry_entry, now); diff --git a/openbsc/src/gprs/gtphub_ares.c b/openbsc/src/gprs/gtphub_ares.c index 667013b..1df2ffb 100644 --- a/openbsc/src/gprs/gtphub_ares.c +++ b/openbsc/src/gprs/gtphub_ares.c @@ -121,8 +121,7 @@ apn_oi_str = osmo_apn_qualify_from_imsi(lookup->imsi_str, lookup->apn_ni_str, lookup->have_3dig_mnc); - strncpy(lookup->apn_oi_str, apn_oi_str, sizeof(lookup->apn_oi_str)); - lookup->apn_oi_str[sizeof(lookup->apn_oi_str)-1] = '\0'; + osmo_strscpy(lookup->apn_oi_str, apn_oi_str); } static int start_ares_query(struct ggsn_lookup *lookup) @@ -170,11 +169,8 @@ expiring_item_init(&lookup->expiry_entry); lookup->hub = hub; - strncpy(lookup->imsi_str, imsi_str, sizeof(lookup->imsi_str)); - lookup->imsi_str[sizeof(lookup->imsi_str)-1] = '\0'; - - strncpy(lookup->apn_ni_str, apn_ni_str, sizeof(lookup->apn_ni_str)); - lookup->apn_ni_str[sizeof(lookup->apn_ni_str)-1] = '\0'; + osmo_strscpy(lookup->imsi_str, imsi_str); + osmo_strscpy(lookup->apn_ni_str, apn_ni_str); make_addr_str(lookup); diff --git a/openbsc/src/gprs/sgsn_auth.c b/openbsc/src/gprs/sgsn_auth.c index 4b69a0d..e413e3e 100644 --- a/openbsc/src/gprs/sgsn_auth.c +++ b/openbsc/src/gprs/sgsn_auth.c @@ -20,6 +20,7 @@ */ #include +#include #include #include #include @@ -62,7 +63,7 @@ acl = talloc_zero(NULL, struct imsi_acl_entry); if (!acl) return -ENOMEM; - strncpy(acl->imsi, imsi, sizeof(acl->imsi) - 1); + osmo_strscpy(acl->imsi, imsi); llist_add(&acl->list, &cfg->imsi_acl); diff --git a/openbsc/src/libbsc/abis_nm.c b/openbsc/src/libbsc/abis_nm.c index 0c723e8..e49f052 100644 --- a/openbsc/src/libbsc/abis_nm.c +++ b/openbsc/src/libbsc/abis_nm.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -2235,8 +2236,7 @@ } /* construct new filename */ - strncpy(dir, bs11_sw->swl_fname, sizeof(dir)); - dir[sizeof(dir)-1] = '\0'; + osmo_strscpy(dir, bs11_sw->swl_fname); strncat(fle->fname, dirname(dir), sizeof(fle->fname) - 1); strcat(fle->fname, "/"); strncat(fle->fname, file_id, sizeof(fle->fname) - 1 -strlen(fle->fname)); @@ -2307,8 +2307,7 @@ bs11_sw->user_cb = cbfn; bs11_sw->forced = forced; - strncpy(bs11_sw->swl_fname, fname, sizeof(bs11_sw->swl_fname)); - bs11_sw->swl_fname[sizeof(bs11_sw->swl_fname)-1] = '\0'; + osmo_strscpy(bs11_sw->swl_fname, fname); rc = bs11_read_swl_file(bs11_sw); if (rc < 0) return rc; diff --git a/openbsc/src/libbsc/bsc_rf_ctrl.c b/openbsc/src/libbsc/bsc_rf_ctrl.c index 0538482..76c0ebc 100644 --- a/openbsc/src/libbsc/bsc_rf_ctrl.c +++ b/openbsc/src/libbsc/bsc_rf_ctrl.c @@ -451,8 +451,7 @@ } local.sun_family = AF_UNIX; - strncpy(local.sun_path, path, sizeof(local.sun_path)); - local.sun_path[sizeof(local.sun_path) - 1] = '\0'; + osmo_strscpy(local.sun_path, path); unlink(local.sun_path); /* we use the same magic that X11 uses in Xtranssock.c for diff --git a/openbsc/src/libcommon/gsm_subscriber_base.c b/openbsc/src/libcommon/gsm_subscriber_base.c index 1f98cc6..e838acd 100644 --- a/openbsc/src/libcommon/gsm_subscriber_base.c +++ b/openbsc/src/libcommon/gsm_subscriber_base.c @@ -28,6 +28,7 @@ #include #include +#include #include #include @@ -115,7 +116,7 @@ if (!subscr) return NULL; - strncpy(subscr->imsi, imsi, sizeof(subscr->imsi)-1); + osmo_strscpy(subscr->imsi, imsi); subscr->group = sgrp; return subscr; } diff --git a/openbsc/src/libcommon/gsup_test_client.c b/openbsc/src/libcommon/gsup_test_client.c index 17de4f0..1e7fca4 100644 --- a/openbsc/src/libcommon/gsup_test_client.c +++ b/openbsc/src/libcommon/gsup_test_client.c @@ -75,8 +75,7 @@ return NULL; io = talloc_zero(ctx, struct imsi_op); - strncpy(io->imsi, imsi, sizeof(io->imsi)); - io->imsi[sizeof(io->imsi)-1] = '\0'; + osmo_strscpy(io->imsi, imsi); io->type = type; io->timer.cb = imsi_op_timer_cb; io->timer.data = io; diff --git a/openbsc/src/libmsc/ctrl_commands.c b/openbsc/src/libmsc/ctrl_commands.c index 79e136d..87bf58e 100644 --- a/openbsc/src/libmsc/ctrl_commands.c +++ b/openbsc/src/libmsc/ctrl_commands.c @@ -20,6 +20,7 @@ */ #include +#include #include #include #include @@ -103,8 +104,7 @@ goto fail; subscr->authorized = 1; - strncpy(subscr->extension, msisdn, GSM_EXTENSION_LENGTH - 1); - subscr->extension[GSM_EXTENSION_LENGTH-1] = '\0'; + osmo_strscpy(subscr->extension, msisdn); /* put it back to the db */ rc = db_sync_subscriber(subscr); diff --git a/openbsc/src/libmsc/db.c b/openbsc/src/libmsc/db.c index 5cccb32..633d071 100644 --- a/openbsc/src/libmsc/db.c +++ b/openbsc/src/libmsc/db.c @@ -39,6 +39,7 @@ #include #include #include +#include #include @@ -240,7 +241,7 @@ snprintf(buf, sizeof(buf), "%llu", sender_id); sender = db_get_subscriber(GSM_SUBSCRIBER_ID, buf); OSMO_ASSERT(sender); - strncpy(sms->src.addr, sender->extension, sizeof(sms->src.addr)-1); + osmo_strscpy(sms->src.addr, sender->extension); subscr_direct_free(sender); sender = NULL; @@ -252,10 +253,8 @@ "data_coding_scheme"); daddr = dbi_result_get_string(result, "dest_addr"); - if (daddr) { - strncpy(sms->dst.addr, daddr, sizeof(sms->dst.addr)); - sms->dst.addr[sizeof(sms->dst.addr)-1] = '\0'; - } + if (daddr) + osmo_strscpy(sms->dst.addr, daddr); sms->user_data_len = dbi_result_get_field_length(result, "user_data"); user_data = dbi_result_get_binary(result, "user_data"); @@ -264,10 +263,8 @@ memcpy(sms->user_data, user_data, sms->user_data_len); text = dbi_result_get_string(result, "text"); - if (text) { - strncpy(sms->text, text, sizeof(sms->text)); - sms->text[sizeof(sms->text)-1] = '\0'; - } + if (text) + osmo_strscpy(sms->text, text); return sms; } @@ -549,7 +546,7 @@ return NULL; } subscr->id = dbi_conn_sequence_last(conn, NULL); - strncpy(subscr->imsi, imsi, sizeof(subscr->imsi)-1); + osmo_strscpy(subscr->imsi, imsi); dbi_result_free(result); LOGP(DDB, LOGL_INFO, "New Subscriber: ID %llu, IMSI %s\n", subscr->id, subscr->imsi); if (alloc_exten) @@ -585,7 +582,7 @@ string = dbi_result_get_string(result, "imei"); if (string) - strncpy(equip->imei, string, sizeof(equip->imei)-1); + osmo_strscpy(equip->imei, string); string = dbi_result_get_string(result, "classmark1"); if (string) { @@ -824,21 +821,19 @@ const char *string; string = dbi_result_get_string(result, "imsi"); if (string) - strncpy(subscr->imsi, string, sizeof(subscr->imsi)-1); + osmo_strscpy(subscr->imsi, string); string = dbi_result_get_string(result, "tmsi"); if (string) subscr->tmsi = tmsi_from_string(string); string = dbi_result_get_string(result, "name"); - if (string) { - strncpy(subscr->name, string, GSM_NAME_LENGTH); - subscr->name[sizeof(subscr->name)-1] = '\0'; - } + if (string) + osmo_strscpy(subscr->name, string); string = dbi_result_get_string(result, "extension"); if (string) - strncpy(subscr->extension, string, GSM_EXTENSION_LENGTH); + osmo_strscpy(subscr->extension, string); subscr->lac = dbi_result_get_ulonglong(result, "lac"); @@ -1351,8 +1346,7 @@ unsigned long long equipment_id, watch_id; dbi_result result; - strncpy(subscriber->equipment.imei, imei, - sizeof(subscriber->equipment.imei)-1); + osmo_strscpy(subscriber->equipment.imei, imei); result = dbi_conn_queryf(conn, "INSERT OR IGNORE INTO Equipment " @@ -1502,19 +1496,15 @@ sms->dst.npi = dbi_result_get_ulonglong(result, "dest_npi"); sms->dst.ton = dbi_result_get_ulonglong(result, "dest_ton"); daddr = dbi_result_get_string(result, "dest_addr"); - if (daddr) { - strncpy(sms->dst.addr, daddr, sizeof(sms->dst.addr)); - sms->dst.addr[sizeof(sms->dst.addr)-1] = '\0'; - } + if (daddr) + osmo_strscpy(sms->dst.addr, daddr); sms->receiver = subscr_get_by_extension(net->subscr_group, sms->dst.addr); sms->src.npi = dbi_result_get_ulonglong(result, "src_npi"); sms->src.ton = dbi_result_get_ulonglong(result, "src_ton"); saddr = dbi_result_get_string(result, "src_addr"); - if (saddr) { - strncpy(sms->src.addr, saddr, sizeof(sms->src.addr)); - sms->src.addr[sizeof(sms->src.addr)-1] = '\0'; - } + if (saddr) + osmo_strscpy(sms->src.addr, saddr); sms->user_data_len = dbi_result_get_field_length(result, "user_data"); user_data = dbi_result_get_binary(result, "user_data"); @@ -1523,10 +1513,8 @@ memcpy(sms->user_data, user_data, sms->user_data_len); text = dbi_result_get_string(result, "text"); - if (text) { - strncpy(sms->text, text, sizeof(sms->text)); - sms->text[sizeof(sms->text)-1] = '\0'; - } + if (text) + osmo_strscpy(sms->text, text); return sms; } diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index 34492bb..1d13440 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -65,6 +65,7 @@ #include #include #include +#include #include #include @@ -1973,10 +1974,8 @@ /* use subscriber as calling party number */ setup.fields |= MNCC_F_CALLING; - strncpy(setup.calling.number, trans->subscr->extension, - sizeof(setup.calling.number)-1); - strncpy(setup.imsi, trans->subscr->imsi, - sizeof(setup.imsi)-1); + osmo_strscpy(setup.calling.number, trans->subscr->extension); + osmo_strscpy(setup.imsi, trans->subscr->imsi); /* bearer capability */ if (TLVP_PRESENT(&tp, GSM48_IE_BEARER_CAP)) { @@ -2153,8 +2152,7 @@ } /* IMSI of called subscriber */ - strncpy(call_conf.imsi, trans->subscr->imsi, - sizeof(call_conf.imsi)-1); + osmo_strscpy(call_conf.imsi, trans->subscr->imsi); new_cc_state(trans, GSM_CSTATE_MO_TERM_CALL_CONF); @@ -2307,10 +2305,8 @@ tlv_parse(&tp, &gsm48_att_tlvdef, gh->data, payload_len, 0, 0); /* use subscriber as connected party number */ connect.fields |= MNCC_F_CONNECTED; - strncpy(connect.connected.number, trans->subscr->extension, - sizeof(connect.connected.number)-1); - strncpy(connect.imsi, trans->subscr->imsi, - sizeof(connect.imsi)-1); + osmo_strscpy(connect.connected.number, trans->subscr->extension); + osmo_strscpy(connect.imsi, trans->subscr->imsi); /* facility */ if (TLVP_PRESENT(&tp, GSM48_IE_FACILITY)) { diff --git a/openbsc/src/libmsc/gsm_04_11.c b/openbsc/src/libmsc/gsm_04_11.c index 48a87e0..40d4487 100644 --- a/openbsc/src/libmsc/gsm_04_11.c +++ b/openbsc/src/libmsc/gsm_04_11.c @@ -37,6 +37,7 @@ #include #include +#include #include #include @@ -92,15 +93,15 @@ return NULL; sms->receiver = subscr_get(receiver); - strncpy(sms->text, text, sizeof(sms->text)-1); + osmo_strscpy(sms->text, text); - strncpy(sms->src.addr, sender->extension, sizeof(sms->src.addr)-1); + osmo_strscpy(sms->src.addr, sender->extension); sms->reply_path_req = 0; sms->status_rep_req = 0; sms->ud_hdr_ind = 0; sms->protocol_id = 0; /* implicit */ sms->data_coding_scheme = dcs; - strncpy(sms->dst.addr, receiver->extension, sizeof(sms->dst.addr)-1); + osmo_strscpy(sms->dst.addr, receiver->extension); /* Generate user_data */ sms->user_data_len = gsm_7bit_encode_n(sms->user_data, sizeof(sms->user_data), sms->text, NULL); @@ -464,7 +465,7 @@ } } - strncpy(gsms->src.addr, conn->subscr->extension, sizeof(gsms->src.addr)-1); + osmo_strscpy(gsms->src.addr, conn->subscr->extension); LOGP(DLSMS, LOGL_INFO, "RX SMS: Sender: %s, MTI: 0x%02x, VPF: 0x%02x, " "MR: 0x%02x PID: 0x%02x, DCS: 0x%02x, DA: %s, " diff --git a/openbsc/src/libmsc/meas_feed.c b/openbsc/src/libmsc/meas_feed.c index cd2b648..28f0f0b 100644 --- a/openbsc/src/libmsc/meas_feed.c +++ b/openbsc/src/libmsc/meas_feed.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -52,12 +53,9 @@ mfm->hdr.version = MEAS_FEED_VERSION; /* fill in MEAS_FEED_MEAS specific header */ - strncpy(mfm->imsi, subscr->imsi, sizeof(mfm->imsi)-1); - mfm->imsi[sizeof(mfm->imsi)-1] = '\0'; - strncpy(mfm->name, subscr->name, sizeof(mfm->name)-1); - mfm->name[sizeof(mfm->name)-1] = '\0'; - strncpy(mfm->scenario, g_mfs.scenario, sizeof(mfm->scenario)); - mfm->scenario[sizeof(mfm->scenario)-1] = '\0'; + osmo_strscpy(mfm->imsi, subscr->imsi); + osmo_strscpy(mfm->name, subscr->name); + osmo_strscpy(mfm->scenario, g_mfs.scenario); /* copy the entire measurement report */ memcpy(&mfm->mr, mr, sizeof(mfm->mr)); @@ -160,8 +158,7 @@ void meas_feed_scenario_set(const char *name) { - strncpy(g_mfs.scenario, name, sizeof(g_mfs.scenario)-1); - g_mfs.scenario[sizeof(g_mfs.scenario)-1] = '\0'; + osmo_strscpy(g_mfs.scenario, name); } const char *meas_feed_scenario_get(void) diff --git a/openbsc/src/libmsc/smpp_openbsc.c b/openbsc/src/libmsc/smpp_openbsc.c index 228e61d..642a1a7 100644 --- a/openbsc/src/libmsc/smpp_openbsc.c +++ b/openbsc/src/libmsc/smpp_openbsc.c @@ -133,12 +133,12 @@ sms->receiver = dest; sms->dst.ton = submit->dest_addr_ton; sms->dst.npi = submit->dest_addr_npi; - strncpy(sms->dst.addr, dest->extension, sizeof(sms->dst.addr)-1); + osmo_strscpy(sms->dst.addr, dest->extension); /* fill in the source address */ sms->src.ton = submit->source_addr_ton; sms->src.npi = submit->source_addr_npi; - strncpy(sms->src.addr, (char *)submit->source_addr, sizeof(sms->src.addr)-1); + osmo_strscpy(sms->src.addr, (char *)submit->source_addr); if (submit->esm_class & 0x40) sms->ud_hdr_ind = 1; diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index 24a3cdd..9635fc0 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -567,8 +567,7 @@ return CMD_WARNING; } - strncpy(subscr->name, name, sizeof(subscr->name)); - subscr->name[sizeof(subscr->name)-1] = '\0'; + osmo_strscpy(subscr->name, name); talloc_free(name); db_sync_subscriber(subscr); diff --git a/openbsc/src/libtrau/rtp_proxy.c b/openbsc/src/libtrau/rtp_proxy.c index ed19175..39dd46d 100644 --- a/openbsc/src/libtrau/rtp_proxy.c +++ b/openbsc/src/libtrau/rtp_proxy.c @@ -29,6 +29,7 @@ #include /* uname() */ #include +#include #include #include #include @@ -368,9 +369,7 @@ } if (rtph->type == RTCP_TYPE_SDES) { char new_cname[255]; - strncpy(new_cname, inet_ntoa(rss->sin_local.sin_addr), - sizeof(new_cname)); - new_cname[sizeof(new_cname)-1] = '\0'; + osmo_strscpy(new_cname, inet_ntoa(rss->sin_local.sin_addr)); rc = rtcp_sdes_cname_mangle(msg, rtph, &old_len, new_cname); if (rc < 0) diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c b/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c index 58667fe..7003e39 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c @@ -31,6 +31,7 @@ #include #include +#include #include #include @@ -129,15 +130,13 @@ { if (strncmp(chosen_number, "00", 2) == 0) { called->type = 1; - strncpy(called->number, chosen_number + 2, sizeof(called->number)); + osmo_strscpy(called->number, chosen_number + 2); } else { /* rewrite international to unknown */ if (called->type == 1) called->type = 0; - strncpy(called->number, chosen_number, sizeof(called->number)); + osmo_strscpy(called->number, chosen_number); } - - called->number[sizeof(called->number) - 1] = '\0'; } /** diff --git a/openbsc/src/utils/meas_vis.c b/openbsc/src/utils/meas_vis.c index 061a7a4..67ce574 100644 --- a/openbsc/src/utils/meas_vis.c +++ b/openbsc/src/utils/meas_vis.c @@ -73,7 +73,7 @@ ms = find_ms(imsi); if (!ms) { ms = talloc_zero(NULL, struct ms_state); - strncpy(ms->imsi, imsi, sizeof(ms->imsi)-1); + osmo_strscpy(ms->imsi, imsi); ms->ul._lbl[0] = ms->ul.label; ms->dl._lbl[0] = ms->dl.label; llist_add_tail(&ms->list, &g_st.ms_list); @@ -88,7 +88,7 @@ struct ms_state *ms = find_alloc_ms(mfm->imsi); time_t now = time(NULL); - strncpy(ms->name, mfm->name, sizeof(ms->imsi)-1); + osmo_strscpy(ms->name, mfm->name); memcpy(&ms->mr, &mfm->mr, sizeof(ms->mr)); ms->ul.last_update = now; if (ms->mr.flags & MEAS_REP_F_DL_VALID) diff --git a/openbsc/tests/gtphub/gtphub_test.c b/openbsc/tests/gtphub/gtphub_test.c index 7d7673b..ebb74de 100644 --- a/openbsc/tests/gtphub/gtphub_test.c +++ b/openbsc/tests/gtphub/gtphub_test.c @@ -449,21 +449,13 @@ " returning GGSN addr from imsi %s ni %s: %s\n", imsi_str, apn_ni_str, gtphub_port_str(pp)); - if (imsi_str) { - strncpy(resolve_ggsn_got_imsi, imsi_str, - sizeof(resolve_ggsn_got_imsi)); - resolve_ggsn_got_imsi[sizeof(resolve_ggsn_got_imsi) - 1] = '\0'; - } - else - strcpy(resolve_ggsn_got_imsi, "(null)"); + if (!imsi_str) + imsi_str = "(null)"; + osmo_strscpy(resolve_ggsn_got_imsi, imsi_str); - if (apn_ni_str) { - strncpy(resolve_ggsn_got_ni, apn_ni_str, - sizeof(resolve_ggsn_got_ni)); - resolve_ggsn_got_ni[sizeof(resolve_ggsn_got_ni) - 1] = '\0'; - } - else - strcpy(resolve_ggsn_got_ni, "(null)"); + if (!apn_ni_str) + apn_ni_str = "(null)"; + osmo_strscpy(resolve_ggsn_got_ni, apn_ni_str); return pp; } diff --git a/openbsc/tests/sgsn/sgsn_test.c b/openbsc/tests/sgsn/sgsn_test.c index d3179e3..1b4d6ea 100644 --- a/openbsc/tests/sgsn/sgsn_test.c +++ b/openbsc/tests/sgsn/sgsn_test.c @@ -2248,7 +2248,7 @@ /* Create a context */ OSMO_ASSERT(count(gprs_llme_list()) == 0); ctx = alloc_mm_ctx(local_tlli, &raid); - strncpy(ctx->imsi, imsi1, sizeof(ctx->imsi) - 1); + osmo_strscpy(ctx->imsi, imsi1); /* Allocate and attach a subscriber */ s1 = gprs_subscr_get_or_create_by_mmctx(ctx); @@ -2273,7 +2273,7 @@ pdp_data = sgsn_subscriber_pdp_data_alloc(s1->sgsn_data); pdp_data->context_id = 1; pdp_data->pdp_type = 0x0121; - strncpy(pdp_data->apn_str, "*", sizeof(pdp_data->apn_str)-1); + osmo_strscpy(pdp_data->apn_str, "*"); /* Resolve GGSNs */ @@ -2326,7 +2326,7 @@ /* Add PDP data entry to subscriber */ - strncpy(pdp_data->apn_str, "Test.Apn", sizeof(pdp_data->apn_str)-1); + osmo_strscpy(pdp_data->apn_str, "Test.Apn"); tp.lv[GSM48_IE_GSM_APN].len = gprs_str_to_apn(apn_enc, sizeof(apn_enc), "Test.Apn"); -- To view, visit https://gerrit.osmocom.org/1592 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I900726cf06d34128db22a3d3d911ee0d1423b1bd Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Jan 16 12:33:13 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 16 Jan 2017 12:33:13 +0000 Subject: libosmocore[master]: logging: remove code duplication In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 (ah, I was wrong, the previous DEBUGP did actually use the early exiting via log_check_level()) -- To view, visit https://gerrit.osmocom.org/1580 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia6c92bd4824c44fc22cc733ce7a88da86e58ed93 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 16 12:36:06 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 16 Jan 2017 12:36:06 +0000 Subject: osmo-pcu[master]: Sanitizer fix for invalid value of egprs_puncturing_values In-Reply-To: References: Message-ID: Patch Set 4: (1 comment) https://gerrit.osmocom.org/#/c/1411/4/src/tbf_dl.cpp File src/tbf_dl.cpp: Line 771: rlc.cps = gprs_rlc_mcs_cps(cs, punct[0], punct[1], need_padding); > The CPS field is valid only for EGPRS case. hence calling this function is This fix should be in a separate commit: it is unrelated to the sanitizer issue discussed in this patch, right? -- To view, visit https://gerrit.osmocom.org/1411 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ice54edc7e4a936eb2f2dd8a243673a30dceef542 Gerrit-PatchSet: 4 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Jan 16 12:37:03 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 16 Jan 2017 12:37:03 +0000 Subject: libosmocore[master]: Add osmo_rand() function In-Reply-To: References: Message-ID: Patch Set 2: looks like I'm out of my depth, you decide :) -- To view, visit https://gerrit.osmocom.org/1526 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0241b814ea4c4ce1458f7ad76e31d390383c2048 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 16 12:40:13 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 16 Jan 2017 12:40:13 +0000 Subject: openbsc[master]: libbsc: add chreq type for CHREQ_T_PDCH_ONE_PHASE & CHREQ_T_... In-Reply-To: References: Message-ID: Patch Set 3: > jenkins will fail until the libosmocom patch get's into master > (again). The master patch has +2 now, you could go ahead now ... ? -- To view, visit https://gerrit.osmocom.org/1360 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie7f4ed000cf1b40d269873cf0ddf5ff9f5bbc18a Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 16 12:51:24 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 16 Jan 2017 12:51:24 +0000 Subject: osmo-bts[master]: octphy: Improving OML ADM state handling In-Reply-To: References: Message-ID: Patch Set 10: Code-Review+1 (3 comments) some details... https://gerrit.osmocom.org/#/c/906/10//COMMIT_MSG Commit Message: Line 7: octphy: Improving OML ADM state handling "Improve", rather avoid "ing"s as discussed last week :) https://gerrit.osmocom.org/#/c/906/10/src/osmo-bts-octphy/l1_oml.c File src/osmo-bts-octphy/l1_oml.c: Line 1561: "pending procedure on RC %d\n", trx->nr); "RC " ? why not "TRX " ? Line 1579: "Cannot close TRX, it is already closed!\n"); ah, missed this one: generally in all log messages, we should identify the object. Can we also log the TRX number plz? Personally I dislike exclamation marks in log messages, but one is better than three -- which do exist in our code base... :P -- To view, visit https://gerrit.osmocom.org/906 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I034114beca95210169429d8ac1eb8648df12fc6c Gerrit-PatchSet: 10 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Jan 16 12:52:01 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 16 Jan 2017 12:52:01 +0000 Subject: [MERGED] libosmocore[master]: tests/conv: add LTE PBCH test vector In-Reply-To: References: Message-ID: Vadim Yanitskiy has submitted this change and it was merged. Change subject: tests/conv: add LTE PBCH test vector ...................................................................... tests/conv: add LTE PBCH test vector Change-Id: I1a3a48bba9ee32a0bacc0b05d25358496dbcbc1b --- M tests/conv/conv_test.c M tests/conv/conv_test.ok 2 files changed, 68 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/conv/conv_test.c b/tests/conv/conv_test.c index 608f829..ed1257e 100644 --- a/tests/conv/conv_test.c +++ b/tests/conv/conv_test.c @@ -120,6 +120,57 @@ .next_state = conv_wimax_fch_next_state, }; +/** + * LTE PBCH + * Non recursive code, tail-biting, non-punctured + */ +static const uint8_t conv_lte_pbch_next_output[][2] = { + { 0, 7 }, { 3, 4 }, { 7, 0 }, { 4 , 3 }, + { 6, 1 }, { 5, 2 }, { 1, 6 }, { 2 , 5 }, + { 1, 6 }, { 2, 5 }, { 6, 1 }, { 5 , 2 }, + { 7, 0 }, { 4, 3 }, { 0, 7 }, { 3 , 4 }, + { 4, 3 }, { 7, 0 }, { 3, 4 }, { 0 , 7 }, + { 2, 5 }, { 1, 6 }, { 5, 2 }, { 6 , 1 }, + { 5, 2 }, { 6, 1 }, { 2, 5 }, { 1 , 6 }, + { 3, 4 }, { 0, 7 }, { 4, 3 }, { 7 , 0 }, + { 7, 0 }, { 4, 3 }, { 0, 7 }, { 3 , 4 }, + { 1, 6 }, { 2, 5 }, { 6, 1 }, { 5 , 2 }, + { 6, 1 }, { 5, 2 }, { 1, 6 }, { 2 , 5 }, + { 0, 7 }, { 3, 4 }, { 7, 0 }, { 4 , 3 }, + { 3, 4 }, { 0, 7 }, { 4, 3 }, { 7 , 0 }, + { 5, 2 }, { 6, 1 }, { 2, 5 }, { 1 , 6 }, + { 2, 5 }, { 1, 6 }, { 5, 2 }, { 6 , 1 }, + { 4, 3 }, { 7, 0 }, { 3, 4 }, { 0 , 7 }, +}; + +static const uint8_t conv_lte_pbch_next_state[][2] = { + { 0, 1 }, { 2, 3 }, { 4, 5 }, { 6, 7 }, + { 8, 9 }, { 10, 11 }, { 12, 13 }, { 14, 15 }, + { 16, 17 }, { 18, 19 }, { 20, 21 }, { 22, 23 }, + { 24, 25 }, { 26, 27 }, { 28, 29 }, { 30, 31 }, + { 32, 33 }, { 34, 35 }, { 36, 37 }, { 38, 39 }, + { 40, 41 }, { 42, 43 }, { 44, 45 }, { 46, 47 }, + { 48, 49 }, { 50, 51 }, { 52, 53 }, { 54, 55 }, + { 56, 57 }, { 58, 59 }, { 60, 61 }, { 62, 63 }, + { 0, 1 }, { 2, 3 }, { 4, 5 }, { 6, 7 }, + { 8, 9 }, { 10, 11 }, { 12, 13 }, { 14, 15 }, + { 16, 17 }, { 18, 19 }, { 20, 21 }, { 22, 23 }, + { 24, 25 }, { 26, 27 }, { 28, 29 }, { 30, 31 }, + { 32, 33 }, { 34, 35 }, { 36, 37 }, { 38, 39 }, + { 40, 41 }, { 42, 43 }, { 44, 45 }, { 46, 47 }, + { 48, 49 }, { 50, 51 }, { 52, 53 }, { 54, 55 }, + { 56, 57 }, { 58, 59 }, { 60, 61 }, { 62, 63 }, +}; + +const struct osmo_conv_code conv_lte_pbch = { + .N = 3, + .K = 7, + .len = 40, + .term = CONV_TERM_TAIL_BITING, + .next_output = conv_lte_pbch_next_output, + .next_state = conv_lte_pbch_next_state, +}; + /* ------------------------------------------------------------------------ */ /* Test vectors */ /* ------------------------------------------------------------------------ */ @@ -219,6 +270,15 @@ 0x8a, 0xed, 0x21, 0xed }, }, { + .name = "LTE PBCH (non-recursive, tail-biting, non-punctured)", + .code = &conv_lte_pbch, + .in_len = 40, + .out_len = 120, + .has_vec = 0, + .vec_in = { }, + .vec_out = { }, + }, + { .name = "??? (non-recursive, direct truncation, not punctured)", .code = &conv_trunc, .in_len = 224, diff --git a/tests/conv/conv_test.ok b/tests/conv/conv_test.ok index 2122961..eceadb0 100644 --- a/tests/conv/conv_test.ok +++ b/tests/conv/conv_test.ok @@ -42,6 +42,14 @@ [..] Encoding / Decoding cycle : OK [..] Encoding / Decoding cycle : OK +[+] Testing: LTE PBCH (non-recursive, tail-biting, non-punctured) +[.] Input length : ret = 40 exp = 40 -> OK +[.] Output length : ret = 120 exp = 120 -> OK +[.] Random vector checks: +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK + [+] Testing: ??? (non-recursive, direct truncation, not punctured) [.] Input length : ret = 224 exp = 224 -> OK [.] Output length : ret = 448 exp = 448 -> OK -- To view, visit https://gerrit.osmocom.org/1601 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1a3a48bba9ee32a0bacc0b05d25358496dbcbc1b Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Mon Jan 16 12:55:11 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 16 Jan 2017 12:55:11 +0000 Subject: libosmocore[master]: tests/conv: whitespece fix In-Reply-To: References: Message-ID: Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/1602 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I73ab4614c5c23390862d3ecaa2561a6749604a15 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 16 12:55:15 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 16 Jan 2017 12:55:15 +0000 Subject: [MERGED] libosmocore[master]: tests/conv: whitespece fix In-Reply-To: References: Message-ID: Vadim Yanitskiy has submitted this change and it was merged. Change subject: tests/conv: whitespece fix ...................................................................... tests/conv: whitespece fix Change-Id: I73ab4614c5c23390862d3ecaa2561a6749604a15 --- M tests/conv/conv_test.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Vadim Yanitskiy: Verified Harald Welte: Looks good to me, approved diff --git a/tests/conv/conv_test.c b/tests/conv/conv_test.c index ed1257e..3064f9c 100644 --- a/tests/conv/conv_test.c +++ b/tests/conv/conv_test.c @@ -256,7 +256,7 @@ .in_len = 48, .out_len = 72, .has_vec = 1, - .vec_in = { 0x4d, 0xcb, 0xfc, 0x72, 0xf4, 0x8c }, + .vec_in = { 0x4d, 0xcb, 0xfc, 0x72, 0xf4, 0x8c }, .vec_out = { 0xc0, 0x86, 0x63, 0x4b, 0x8b, 0xd4, 0x6a, 0x76, 0xb2 }, }, { -- To view, visit https://gerrit.osmocom.org/1602 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I73ab4614c5c23390862d3ecaa2561a6749604a15 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Mon Jan 16 13:10:19 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 16 Jan 2017 13:10:19 +0000 Subject: [PATCH] libosmocore[master]: utils/conv_gen.py: improve application flexibility In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1584 to look at the new patch set (#4). utils/conv_gen.py: improve application flexibility This change makes the conv_gen application more interactive and flexible, allowing to generate not only code definitions but also the test vectors and header files in the future. Moreover, it becomes possible to select exact code family, such as GSM, GMR etc. Change-Id: I0b476b00234c17f78b41d695cf3bfd13edb64c28 --- M src/gsm/Makefile.am M utils/conv_gen.py 2 files changed, 91 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/84/1584/4 diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am index 4ec441f..5c3d75c 100644 --- a/src/gsm/Makefile.am +++ b/src/gsm/Makefile.am @@ -35,6 +35,7 @@ # Convolutional codes generation gsm0503_conv.c: - $(AM_V_GEN)python2 $(top_srcdir)/utils/conv_gen.py + $(AM_V_GEN)python2 $(top_srcdir)/utils/conv_gen.py \ + --action gen_codes --code-family gsm CLEANFILES = gsm0503_conv.c diff --git a/utils/conv_gen.py b/utils/conv_gen.py index 60580ed..de1e00e 100644 --- a/utils/conv_gen.py +++ b/utils/conv_gen.py @@ -23,7 +23,7 @@ */ """ -import sys, os, math +import sys, os, math, getopt from functools import reduce import conv_codes_gsm @@ -254,12 +254,14 @@ code = ConvolutionalCode(0, polys, name = name) code.print_state_and_output(fi) -def generate_codes(codes, path, prefix): +def generate_codes(codes, path, prefix, name): # Open a new file for writing - f = open(os.path.join(path, prefix + "_conv.c"), 'w') + f = open(os.path.join(path, name), 'w') f.write(mod_license + "\n") f.write("#include \n") f.write("#include \n\n") + + sys.stderr.write("Generating convolutional codes...\n") # Print shared tables first if hasattr(codes, "shared_polys"): @@ -279,12 +281,92 @@ code.gen_tables(prefix, f, shared_tables = shared) +def print_help(error = None): + print("Usage: python %s [options]" % sys.argv[0]) + + print("\nOptions:") + print(" -h, --help show this help message") + print(" -a, --action what to generate") + print(" -f, --code-family convolutional code family") + + print("\nAdditional options:") + print(" -p, --prefix internal naming prefix") + print(" -n, --target-name convolutional code family") + print(" -P, --target-path target path for generated file(s)") + + print("\nAvailable actions:") + print(" gen_codes - generate convolutional code definitions") + + print("\nAvailable code families:") + print(" gsm - GSM/GPRS/EDGE specific codes") + + if error is not None: + print("\n%s" % error) + +def parse_argv(): + try: + opts, args = getopt.getopt(sys.argv[1:], + "a:f:p:n:P:h", + [ + "help", "action=", "code-family=", "prefix=", + "target-name=", "target-path=" + ]) + except getopt.GetoptError as err: + # Print help and exit + print_help(str(err)) + sys.exit(2) + + action = None + family = None + prefix = None + name = None + path = None + + for o, v in opts: + if o in ("-h", "--help"): + print_help() + sys.exit(2) + elif o in ("-a", "--action"): + action = v + elif o in ("-f", "--code-family"): + family = v + elif o in ("-p", "--prefix"): + prefix = v + elif o in ("-n", "--target-name"): + name = v + elif o in ("-P", "--target-path"): + path = v + + if path is None: + path = os.getcwd() + if action is None or family is None: + print_help("Error: Please specify both action and code family!") + sys.exit(2) + + return (action, family, prefix, name, path) + if __name__ == '__main__': - path = sys.argv[1] if len(sys.argv) > 1 else os.getcwd() + argv = parse_argv() + action = argv[0] + family = argv[1] + prefix = argv[2] + name = argv[3] + path = argv[4] - sys.stderr.write("Generating convolutional codes...\n") + # Determine convolutional code family + if family == "gsm": + codes = conv_codes_gsm + prefix = "gsm0503" if prefix is None else prefix + else: + print_help("Error: Unknown code family!") + sys.exit(1) - # Generate GSM specific codes - generate_codes(conv_codes_gsm, path, "gsm0503") + # What to generate? + if action == "gen_codes": + name = prefix + "_conv.c" if name is None else name + generate_codes(codes, path, prefix, name) + else: + print_help("Error: Unknown action!") + sys.exit(1) sys.stderr.write("Generation complete.\n") -- To view, visit https://gerrit.osmocom.org/1584 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0b476b00234c17f78b41d695cf3bfd13edb64c28 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt From gerrit-no-reply at lists.osmocom.org Mon Jan 16 13:10:19 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 16 Jan 2017 13:10:19 +0000 Subject: [PATCH] libosmocore[master]: utils/conv_gen.py: add test vector generation feature In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1585 to look at the new patch set (#5). utils/conv_gen.py: add test vector generation feature Change-Id: Ie10c47ee952f253b1ba77ecf6e79f2c033545bc1 --- M utils/conv_gen.py 1 file changed, 74 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/85/1585/5 diff --git a/utils/conv_gen.py b/utils/conv_gen.py index de1e00e..d05ca9b 100644 --- a/utils/conv_gen.py +++ b/utils/conv_gen.py @@ -30,13 +30,16 @@ class ConvolutionalCode(object): def __init__(self, block_len, polys, name, - description = None, puncture = [], term_type = None): + description = None, puncture = [], term_type = None, + vec_in = None, vec_out = None): # Save simple params self.block_len = block_len self.k = 1 self.puncture = puncture self.rate_inv = len(polys) self.term_type = term_type + self.vec_in = vec_in + self.vec_out = vec_out # Infos self.name = name @@ -226,6 +229,44 @@ fi.write("\t.puncture = %s_puncture,\n" % self.name) fi.write("};\n\n") + def calc_out_len(self): + out_len = self.block_len * self.rate_inv + + # By default CONV_TERM_FLUSH + if self.term_type is None: + out_len += self.rate_inv * (self.k - 1) + + if len(self.puncture): + out_len -= len(self.puncture) - 1 + + return out_len + + def gen_test_vector(self, fi, prefix): + code_name = "%s_%s" % (prefix, self.name) + + fi.write("\t{\n") + fi.write("\t\t.name = \"%s\",\n" % code_name) + fi.write("\t\t.code = &%s,\n" % code_name) + + fi.write("\t\t.in_len = %d,\n" % self.block_len) + fi.write("\t\t.out_len = %d,\n" % self.calc_out_len()) + + # Print pre computed vectors if preset + if self.vec_in is not None and self.vec_out is not None: + fi.write("\t\t.has_vec = 1,\n") + fi.write("\t\t.vec_in = {\n") + print_formatted(self.vec_in, "0x%02x, ", 8, fi, indent = "\t\t\t") + fi.write("\t\t},\n") + fi.write("\t\t.vec_out = {\n") + print_formatted(self.vec_out, "0x%02x, ", 8, fi, indent = "\t\t\t") + fi.write("\t\t},\n") + else: + fi.write("\t\t.has_vec = 0,\n") + fi.write("\t\t.vec_in = { },\n") + fi.write("\t\t.vec_out = { },\n") + + fi.write("\t},\n") + poly = lambda *args: sum([(1 << x) for x in args]) def combine(src, sel, nb): @@ -281,6 +322,28 @@ code.gen_tables(prefix, f, shared_tables = shared) +def generate_vectors(codes, path, prefix, name, inc = None): + # Open a new file for writing + f = open(os.path.join(path, name), 'w') + f.write(mod_license + "\n") + f.write("#include \n") + if inc is not None: + for item in inc: + f.write("%s\n" % item) + f.write("\n") + + sys.stderr.write("Generating test vectors...\n") + + f.write("const struct conv_test_vector %s_vectors[] = {\n" % prefix) + + # Generate the vectors one by one + for code in codes.conv_codes: + sys.stderr.write("Generate '%s' test vector\n" % code.name) + code.gen_test_vector(f, prefix) + + f.write("\t{ 0 /* Array terminator */ }\n") + f.write("};\n") + def print_help(error = None): print("Usage: python %s [options]" % sys.argv[0]) @@ -295,7 +358,8 @@ print(" -P, --target-path target path for generated file(s)") print("\nAvailable actions:") - print(" gen_codes - generate convolutional code definitions") + print(" gen_codes - generate convolutional code definitions") + print(" gen_vectors - generate test vectors") print("\nAvailable code families:") print(" gsm - GSM/GPRS/EDGE specific codes") @@ -352,11 +416,16 @@ prefix = argv[2] name = argv[3] path = argv[4] + inc = None # Determine convolutional code family if family == "gsm": codes = conv_codes_gsm prefix = "gsm0503" if prefix is None else prefix + inc = [ + "#include ", + "#include \"conv_test.h\"" + ] else: print_help("Error: Unknown code family!") sys.exit(1) @@ -365,6 +434,9 @@ if action == "gen_codes": name = prefix + "_conv.c" if name is None else name generate_codes(codes, path, prefix, name) + elif action == "gen_vectors": + name = prefix + "_test_vectors.c" if name is None else name + generate_vectors(codes, path, prefix, name, inc) else: print_help("Error: Unknown action!") sys.exit(1) -- To view, visit https://gerrit.osmocom.org/1585 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie10c47ee952f253b1ba77ecf6e79f2c033545bc1 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: tnt From gerrit-no-reply at lists.osmocom.org Mon Jan 16 13:10:19 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 16 Jan 2017 13:10:19 +0000 Subject: [PATCH] libosmocore[master]: utils/conv_gen.py: add header generation feature In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1593 to look at the new patch set (#2). utils/conv_gen.py: add header generation feature Change-Id: Iae830d716f01810972edbef14fc5383ac647d0ea --- M utils/conv_gen.py 1 file changed, 44 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/93/1593/2 diff --git a/utils/conv_gen.py b/utils/conv_gen.py index d05ca9b..196ef72 100644 --- a/utils/conv_gen.py +++ b/utils/conv_gen.py @@ -168,6 +168,20 @@ # Up to 12 numbers should be placed per line print_formatted(self.puncture, "%3d, ", 12, fi) + def print_description(self, fi, brief = False): + if brief is True: + fi.write("/*! \\brief ") + fi.write("structure describing %s\n" + % self.description[0]) + for line in self.description[1:]: + fi.write(" * %s\n" % line) + else: + fi.write("/**\n") + for line in self.description: + fi.write(" * %s\n" % line) + + fi.write(" */\n") + def print_state_and_output(self, fi): pack = lambda n: \ sum([x << (self.rate_inv - i - 1) for i, x in enumerate(n)]) @@ -205,10 +219,7 @@ # Write description as a multi-line comment if self.description is not None: - fi.write("/**\n") - for line in self.description: - fi.write(" * %s\n" % line) - fi.write(" */\n") + self.print_description(fi) # Print a final convolutional code definition fi.write("const struct osmo_conv_code %s_%s = {\n" % (pref, self.name)) @@ -344,6 +355,31 @@ f.write("\t{ 0 /* Array terminator */ }\n") f.write("};\n") +def generate_header(codes, path, prefix, name, description = None): + # Open a new file for writing + f = open(os.path.join(path, name), 'w') + + # Print license and includes + f.write(mod_license + "\n") + f.write("#pragma once\n\n") + f.write("#include \n") + f.write("#include \n\n") + + # Print general file description if preset + if description is not None: + f.write("/*! \\file %s.h\n" % prefix) + f.write(" * %s\n" % description) + f.write(" */\n\n") + + sys.stderr.write("Generating header file...\n") + + # Generate declarations one by one + for code in codes.conv_codes: + sys.stderr.write("Generate '%s' declaration\n" % code.name) + code.print_description(f, True) + f.write("extern const struct osmo_conv_code %s_%s;\n\n" + % (prefix, code.name)) + def print_help(error = None): print("Usage: python %s [options]" % sys.argv[0]) @@ -360,6 +396,7 @@ print("\nAvailable actions:") print(" gen_codes - generate convolutional code definitions") print(" gen_vectors - generate test vectors") + print(" gen_header - generate header file") print("\nAvailable code families:") print(" gsm - GSM/GPRS/EDGE specific codes") @@ -437,6 +474,9 @@ elif action == "gen_vectors": name = prefix + "_test_vectors.c" if name is None else name generate_vectors(codes, path, prefix, name, inc) + elif action == "gen_header": + name = prefix + ".h" if name is None else name + generate_header(codes, path, prefix, name) else: print_help("Error: Unknown action!") sys.exit(1) -- To view, visit https://gerrit.osmocom.org/1593 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iae830d716f01810972edbef14fc5383ac647d0ea Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: tnt From gerrit-no-reply at lists.osmocom.org Mon Jan 16 13:10:44 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 16 Jan 2017 13:10:44 +0000 Subject: osmo-bts[master]: octphy: set tx attenuation via VTY In-Reply-To: References: Message-ID: Patch Set 11: Code-Review+2 (2 comments) minor cosmetics remain ... https://gerrit.osmocom.org/#/c/905/11/src/osmo-bts-octphy/octphy_vty.c File src/osmo-bts-octphy/octphy_vty.c: Line 157: if (strcmp(argv[0],"oml") == 0) { (space after comma) (could omit these '{' '}') Line 222: } (could omit both of these '{' '}') -- To view, visit https://gerrit.osmocom.org/905 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I76bb8660eb1d8baeb6b8f69da4a6ba9ab7319981 Gerrit-PatchSet: 11 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Jan 16 13:13:47 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 16 Jan 2017 13:13:47 +0000 Subject: [PATCH] libosmocore[master]: gsm0503.h: generate header automatically In-Reply-To: References: Message-ID: Hello Max, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1594 to look at the new patch set (#4). gsm0503.h: generate header automatically Since we have automatic header generation, implemented in the utils/conv_gen.py, it's time to use this feature! Change-Id: I21caa4e433b2cc1861611e35350a9671da444c2a --- M .gitignore M include/Makefile.am D include/osmocom/gsm/gsm0503.h M utils/conv_gen.py 4 files changed, 9 insertions(+), 175 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/94/1594/4 diff --git a/.gitignore b/.gitignore index fb159c3..c1bde0f 100644 --- a/.gitignore +++ b/.gitignore @@ -116,6 +116,7 @@ src/gsm/gsm0503_conv.c include/osmocom/core/crc*gen.h include/osmocom/core/bit*gen.h +include/osmocom/gsm/gsm0503.h # vi files *.sw? diff --git a/include/Makefile.am b/include/Makefile.am index 0a300a8..e40ef04 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -143,3 +143,10 @@ osmocom/core/crc%gen.h: osmocom/core/crcXXgen.h.tpl $(AM_V_GEN)$(MKDIR_P) $(dir $@) $(AM_V_GEN)sed -e's/XX/$*/g' $< > $@ + +osmocom/gsm/gsm0503.h: + $(AM_V_GEN)python2 $(top_srcdir)/utils/conv_gen.py \ + --action gen_header --code-family gsm \ + --target-path $(top_srcdir)/include/osmocom/gsm/ + +CLEANFILES = osmocom/gsm/gsm0503.h diff --git a/include/osmocom/gsm/gsm0503.h b/include/osmocom/gsm/gsm0503.h deleted file mode 100644 index de28ad2..0000000 --- a/include/osmocom/gsm/gsm0503.h +++ /dev/null @@ -1,174 +0,0 @@ -/* - * gsm0503.h - * - * 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 2 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. - */ - -#pragma once - -#include - -#include - -/*! \file gsm0503.h - * Osmocom convolutional encoder/decoder for xCCH channels, see 3GPP TS 05.03 - */ - -/*! \brief structure describing convolutional code xCCH - * - * Non-recursive code, flushed, not punctured code. - */ -extern const struct osmo_conv_code gsm0503_xcch; - -/*! \brief structure describing convolutional code RACH - */ -extern const struct osmo_conv_code gsm0503_rach; - -/*! \brief structure describing convolutional code SCH - */ -extern const struct osmo_conv_code gsm0503_sch; - -/*! \brief structures describing convolutional codes CS2/3 - */ -extern const struct osmo_conv_code gsm0503_cs2; -extern const struct osmo_conv_code gsm0503_cs3; - -/*! \brief structure describing convolutional code TCH/FR - */ -extern const struct osmo_conv_code gsm0503_tch_fr; - -/*! \brief structure describing convolutional code TCH/HR - */ -extern const struct osmo_conv_code gsm0503_tch_hr; - -/*! \brief structure describing convolutional code TCH/AFS 12.2 - */ -extern const struct osmo_conv_code gsm0503_tch_afs_12_2; - -/*! \brief structure describing convolutional code TCH/AFS 10.2 - */ -extern const struct osmo_conv_code gsm0503_tch_afs_10_2; - -/*! \brief structure describing convolutional code TCH/AFS 7.95 - */ -extern const struct osmo_conv_code gsm0503_tch_afs_7_95; - -/*! \brief structure describing convolutional code TCH/AFS 7.4 - */ -extern const struct osmo_conv_code gsm0503_tch_afs_7_4; - -/*! \brief structure describing convolutional code TCH/AFS 6.7 - */ -extern const struct osmo_conv_code gsm0503_tch_afs_6_7; - -/*! \brief structure describing convolutional code TCH/AFS 5.9 - */ -extern const struct osmo_conv_code gsm0503_tch_afs_5_9; - -/*! \brief structure describing convolutional code TCH/AFS 5.15 - */ -extern const struct osmo_conv_code gsm0503_tch_afs_5_15; - -/*! \brief structure describing convolutional code TCH/AFS 4.75 - */ -extern const struct osmo_conv_code gsm0503_tch_afs_4_75; - -/*! \brief structure describing convolutional code TCH/AHS 7.95 - */ -extern const struct osmo_conv_code gsm0503_tch_ahs_7_95; - -/*! \brief structure describing convolutional code TCH/AHS 7.4 - */ -extern const struct osmo_conv_code gsm0503_tch_ahs_7_4; - -/*! \brief structure describing convolutional code TCH/AHS 6.7 - */ -extern const struct osmo_conv_code gsm0503_tch_ahs_6_7; - -/*! \brief structure describing convolutional code TCH/AHS 5.9 - */ -extern const struct osmo_conv_code gsm0503_tch_ahs_5_9; - -/*! \brief structure describing convolutional code TCH/AHS 5.15 - */ -extern const struct osmo_conv_code gsm0503_tch_ahs_5_15; - -/*! \brief structure describing convolutional code TCH/AHS 4.75 - */ -extern const struct osmo_conv_code gsm0503_tch_ahs_4_75; - -/*! \brief structure describing convolutional code EDGE MCS-1 DL HDR - */ -extern const struct osmo_conv_code gsm0503_mcs1_dl_hdr; - -/*! \brief structure describing convolutional code EDGE MCS-1 UL HDR - */ -extern const struct osmo_conv_code gsm0503_mcs1_ul_hdr; - -/*! \brief structure describing convolutional code EDGE MCS-1 - */ -extern const struct osmo_conv_code gsm0503_mcs1; - -/*! \brief structure describing convolutional code EDGE MCS-2 - */ -extern const struct osmo_conv_code gsm0503_mcs2; - -/*! \brief structure describing convolutional code EDGE MCS-3 - */ -extern const struct osmo_conv_code gsm0503_mcs3; - -/*! \brief structure describing convolutional code EDGE MCS-4 - */ -extern const struct osmo_conv_code gsm0503_mcs4; - -/*! \brief structure describing convolutional code EDGE MCS-5 DL HDR - */ -extern const struct osmo_conv_code gsm0503_mcs5_dl_hdr; - -/*! \brief structure describing convolutional code EDGE MCS-5 UL HDR - */ -extern const struct osmo_conv_code gsm0503_mcs5_ul_hdr; - -/*! \brief structure describing convolutional code EDGE MCS-5 - */ -extern const struct osmo_conv_code gsm0503_mcs5; - -/*! \brief structure describing convolutional code EDGE MCS-6 - */ -extern const struct osmo_conv_code gsm0503_mcs6; - -/*! \brief structure describing convolutional code EDGE MCS-7 DL HDR - */ -extern const struct osmo_conv_code gsm0503_mcs7_dl_hdr; - -/*! \brief structure describing convolutional code EDGE MCS-7 UL HDR - */ -extern const struct osmo_conv_code gsm0503_mcs7_ul_hdr; - -/*! \brief structure describing convolutional code EDGE MCS-7 - */ -extern const struct osmo_conv_code gsm0503_mcs7; - -/*! \brief structure describing convolutional code EDGE MCS-8 - */ -extern const struct osmo_conv_code gsm0503_mcs8; - -/*! \brief structure describing convolutional code EDGE MCS-9 - */ -extern const struct osmo_conv_code gsm0503_mcs9; diff --git a/utils/conv_gen.py b/utils/conv_gen.py index 196ef72..c7d1c47 100644 --- a/utils/conv_gen.py +++ b/utils/conv_gen.py @@ -396,7 +396,7 @@ print("\nAvailable actions:") print(" gen_codes - generate convolutional code definitions") print(" gen_vectors - generate test vectors") - print(" gen_header - generate header file") + print(" gen_header - generate header file") print("\nAvailable code families:") print(" gsm - GSM/GPRS/EDGE specific codes") -- To view, visit https://gerrit.osmocom.org/1594 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I21caa4e433b2cc1861611e35350a9671da444c2a Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Mon Jan 16 13:14:58 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 16 Jan 2017 13:14:58 +0000 Subject: libosmocore[master]: utils/conv_gen.py: improve application flexibility In-Reply-To: References: Message-ID: Patch Set 4: > This patch set isn't ready yet. > I'll finish soon... Now the patch set is ready :) -- To view, visit https://gerrit.osmocom.org/1584 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0b476b00234c17f78b41d695cf3bfd13edb64c28 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 16 13:20:24 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 16 Jan 2017 13:20:24 +0000 Subject: libosmocore[master]: utils/conv_gen.py: add test vector generation feature In-Reply-To: References: Message-ID: Patch Set 5: > (1 comment) Right, they will be omitted because we need both vectors to make precomputed vector check. -- To view, visit https://gerrit.osmocom.org/1585 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie10c47ee952f253b1ba77ecf6e79f2c033545bc1 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 16 13:22:56 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 16 Jan 2017 13:22:56 +0000 Subject: libosmocore[master]: gsm0503.h: generate header automatically In-Reply-To: References: Message-ID: Patch Set 4: > Out of curiosity - will it work with python3? Sure, already tested ;) -- To view, visit https://gerrit.osmocom.org/1594 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I21caa4e433b2cc1861611e35350a9671da444c2a Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 16 13:26:18 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 16 Jan 2017 13:26:18 +0000 Subject: libosmocore[master]: IPAC manufacture-defined measurement pre-processing definitions In-Reply-To: References: Message-ID: Patch Set 1: wait a minute, has this patch seen no activity for three months? It might be abandoned soon... -- To view, visit https://gerrit.osmocom.org/812 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie1853697f4cff5ff98654fa1cae6c68e28a0076b Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 16 13:27:55 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 16 Jan 2017 13:27:55 +0000 Subject: openbsc[master]: pcu_if: original pcu sock interface from osmo-bts In-Reply-To: References: Message-ID: Patch Set 6: two months later ... abandon? -- To view, visit https://gerrit.osmocom.org/1169 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I46b0a65f1633c40053d43b57b786b042f20f12bd Gerrit-PatchSet: 6 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 16 13:44:55 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 16 Jan 2017 13:44:55 +0000 Subject: openbsc[master]: Revert "Turn some warnings into errors" In-Reply-To: References: Message-ID: Patch Set 1: > What kind of system are you using? It's a Debian 8 on amd64, so should actually match the build slave. I have no idea why this fails for me, I had hoped you would know the reason :/ -- To view, visit https://gerrit.osmocom.org/1591 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2b368500b07f233882ef854eca1fa21f6df39e29 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 16 13:55:56 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 16 Jan 2017 13:55:56 +0000 Subject: [ABANDON] libosmocore[master]: utils: add osmo_strncpy(), as drop-in replacement for strncpy() In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: utils: add osmo_strncpy(), as drop-in replacement for strncpy() ...................................................................... Abandoned ok, not proliferating osmo_str?cpy() variants -- To view, visit https://gerrit.osmocom.org/1598 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: If8ba5361c1d0c90973a1447ce30c1198946a5265 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Jan 16 13:56:18 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 16 Jan 2017 13:56:18 +0000 Subject: [PATCH] libosmocore[master]: utils: add osmo_strscpy() macro to use sizeof(dst) In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1599 to look at the new patch set (#4). utils: add osmo_strscpy() macro to use sizeof(dst) Change-Id: Ie973fc51835066540eba7ed2946ddf33a268b022 --- M include/osmocom/core/utils.h 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/99/1599/4 diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index 41bbc27..a174226 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -88,4 +88,8 @@ size_t osmo_strlcpy(char *dst, const char *src, size_t siz); +/*! \brief Call osmo_strncpy() with the \a siz arg passed as sizeof(dst). */ +#define osmo_strscpy(dest, src) \ + osmo_strlcpy(dest, src, sizeof(dest)) + /*! @} */ -- To view, visit https://gerrit.osmocom.org/1599 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie973fc51835066540eba7ed2946ddf33a268b022 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Jan 16 13:57:24 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 16 Jan 2017 13:57:24 +0000 Subject: [PATCH] libosmocore[master]: utils: add osmo_strscpy() macro to use sizeof(dst) In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1599 to look at the new patch set (#5). utils: add osmo_strscpy() macro to use sizeof(dst) Change-Id: Ie973fc51835066540eba7ed2946ddf33a268b022 --- M include/osmocom/core/utils.h 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/99/1599/5 diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index 41bbc27..df93d15 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -88,4 +88,8 @@ size_t osmo_strlcpy(char *dst, const char *src, size_t siz); +/*! \brief Call osmo_strlcpy() with the \a siz arg passed as sizeof(dst). */ +#define osmo_strscpy(dest, src) \ + osmo_strlcpy(dest, src, sizeof(dest)) + /*! @} */ -- To view, visit https://gerrit.osmocom.org/1599 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie973fc51835066540eba7ed2946ddf33a268b022 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Jan 16 14:11:58 2017 From: gerrit-no-reply at lists.osmocom.org (jfdionne) Date: Mon, 16 Jan 2017 14:11:58 +0000 Subject: osmo-bts[master]: DTX: fix "unexpected burst" error In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 Verified+1 -- To view, visit https://gerrit.osmocom.org/1611 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib064952331b4f89676ee68a3d8078b1d9debe570 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jean-Francois Dionne Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: jfdionne Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 16 14:12:13 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 16 Jan 2017 14:12:13 +0000 Subject: [MERGED] libosmocore[master]: logging: remove code duplication In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: logging: remove code duplication ...................................................................... logging: remove code duplication * make DEBUGP* macro into simple wrappers around LOGP* * deprecate unused logp() function Related: OS#71 Change-Id: Ia6c92bd4824c44fc22cc733ce7a88da86e58ed93 --- M include/osmocom/core/logging.h 1 file changed, 4 insertions(+), 13 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Harald Welte: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/include/osmocom/core/logging.h b/include/osmocom/core/logging.h index fe9ae93..fcf77f0 100644 --- a/include/osmocom/core/logging.h +++ b/include/osmocom/core/logging.h @@ -10,6 +10,7 @@ #include #include #include +#include #include /*! \brief Maximum number of logging contexts */ @@ -25,18 +26,8 @@ * \param[in] fmt format string * \param[in] args variable argument list */ -#define DEBUGP(ss, fmt, args...) \ - do { \ - if (log_check_level(ss, LOGL_DEBUG)) \ - logp(ss, __BASE_FILE__, __LINE__, 0, fmt, ## args); \ - } while(0) - -#define DEBUGPC(ss, fmt, args...) \ - do { \ - if (log_check_level(ss, LOGL_DEBUG)) \ - logp(ss, __BASE_FILE__, __LINE__, 1, fmt, ## args); \ - } while(0) - +#define DEBUGP(ss, fmt, args...) LOGP(ss, LOGL_DEBUG, fmt, ##args) +#define DEBUGPC(ss, fmt, args...) LOGPC(ss, LOGL_DEBUG, fmt, ##args) #else #define DEBUGP(xss, fmt, args...) #define DEBUGPC(ss, fmt, args...) @@ -46,7 +37,7 @@ void osmo_vlogp(int subsys, int level, const char *file, int line, int cont, const char *format, va_list ap); -void logp(int subsys, const char *file, int line, int cont, const char *format, ...) __attribute__ ((format (printf, 5, 6))); +void logp(int subsys, const char *file, int line, int cont, const char *format, ...) OSMO_DEPRECATED("Use DEBUGP* macros instead"); /*! \brief Log a new message through the Osmocom logging framework * \param[in] ss logging subsystem (e.g. \ref DLGLOBAL) -- To view, visit https://gerrit.osmocom.org/1580 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia6c92bd4824c44fc22cc733ce7a88da86e58ed93 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Jan 16 14:17:42 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 16 Jan 2017 14:17:42 +0000 Subject: openbsc[master]: Revert "Turn some warnings into errors" In-Reply-To: References: Message-ID: Patch Set 1: That's odd - the error seems like autoconf-archive is not installed but that's not the case. Can you try building it via "dpkg-buildpackage -uc -us -tc"? -- To view, visit https://gerrit.osmocom.org/1591 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2b368500b07f233882ef854eca1fa21f6df39e29 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 16 14:20:02 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 16 Jan 2017 14:20:02 +0000 Subject: libosmocore[master]: utils/conv_gen.py: add test vector generation feature In-Reply-To: References: Message-ID: Patch Set 5: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1585 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie10c47ee952f253b1ba77ecf6e79f2c033545bc1 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 16 16:07:24 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 16 Jan 2017 16:07:24 +0000 Subject: [PATCH] openbsc[master]: Print subcriber when skipping auth Message-ID: Review at https://gerrit.osmocom.org/1613 Print subcriber when skipping auth Change-Id: I6ae6720afc04cc3c92ceff86e5b2a5a29494aeb1 --- M openbsc/src/libmsc/auth.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/13/1613/1 diff --git a/openbsc/src/libmsc/auth.c b/openbsc/src/libmsc/auth.c index bf62d3c..19def1e 100644 --- a/openbsc/src/libmsc/auth.c +++ b/openbsc/src/libmsc/auth.c @@ -92,7 +92,8 @@ rc = db_get_authinfo_for_subscr(&ainfo, subscr); if (rc < 0) { LOGP(DMM, LOGL_NOTICE, - "No retrievable Ki for subscriber, skipping auth\n"); + "No retrievable Ki for subscriber %s, skipping auth\n", + subscr_name(subscr)); return rc == -ENOENT ? AUTH_NOT_AVAIL : AUTH_ERROR; } -- To view, visit https://gerrit.osmocom.org/1613 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6ae6720afc04cc3c92ceff86e5b2a5a29494aeb1 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Jan 16 17:44:59 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 16 Jan 2017 17:44:59 +0000 Subject: [PATCH] osmo-bts[master]: l1sap: Fix Code maintainability issues (missing else if) Message-ID: Review at https://gerrit.osmocom.org/1614 l1sap: Fix Code maintainability issues (missing else if) In calc_exprd_rach_frames() the if-tree which selects ccch_conf is improperly set up. (if where an else if whould be required) This patch fixes that. See also coverity-scan CID 160156 and CID 160155. Change-Id: I88ed1b3e59213acdf97f88eda097b8172b952a5e --- M src/common/l1sap.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/14/1614/1 diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 0ce1e4a..9116e23 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -381,9 +381,9 @@ * See also TS 04.08, Chapter 10.5.2.11, table 10.29 */ if (ccch_conf == RSL_BCCH_CCCH_CONF_2_NC) rach_frames_expired = 2; - if (ccch_conf == RSL_BCCH_CCCH_CONF_3_NC) + else if (ccch_conf == RSL_BCCH_CCCH_CONF_3_NC) rach_frames_expired = 3; - if (ccch_conf == RSL_BCCH_CCCH_CONF_4_NC) + else if (ccch_conf == RSL_BCCH_CCCH_CONF_4_NC) rach_frames_expired = 4; else rach_frames_expired = 1; -- To view, visit https://gerrit.osmocom.org/1614 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I88ed1b3e59213acdf97f88eda097b8172b952a5e Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Mon Jan 16 23:31:41 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 16 Jan 2017 23:31:41 +0000 Subject: openbsc[master]: Print subcriber when skipping auth In-Reply-To: References: Message-ID: Patch Set 1: it's good, except that the libvlr code that's in the pipeline at the moment will completely replace this code anyway. -- To view, visit https://gerrit.osmocom.org/1613 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6ae6720afc04cc3c92ceff86e5b2a5a29494aeb1 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 16 23:38:53 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 16 Jan 2017 23:38:53 +0000 Subject: [PATCH] osmo-bts[master]: l1sap: fix missing 'else's causing wrong rach frame expiry c... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1614 to look at the new patch set (#2). l1sap: fix missing 'else's causing wrong rach frame expiry counts This bug was introduced in the recently merged commit 1e399f888e4e1c93e0e5b7fd69fce09a2587fb87 aka change-id I87f40f5f160a4f6750c4f3d06997fc4f24049303 Fixes: coverity-scan CID#160156 and CID#160155 Change-Id: I88ed1b3e59213acdf97f88eda097b8172b952a5e --- M src/common/l1sap.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/14/1614/2 diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 0ce1e4a..9116e23 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -381,9 +381,9 @@ * See also TS 04.08, Chapter 10.5.2.11, table 10.29 */ if (ccch_conf == RSL_BCCH_CCCH_CONF_2_NC) rach_frames_expired = 2; - if (ccch_conf == RSL_BCCH_CCCH_CONF_3_NC) + else if (ccch_conf == RSL_BCCH_CCCH_CONF_3_NC) rach_frames_expired = 3; - if (ccch_conf == RSL_BCCH_CCCH_CONF_4_NC) + else if (ccch_conf == RSL_BCCH_CCCH_CONF_4_NC) rach_frames_expired = 4; else rach_frames_expired = 1; -- To view, visit https://gerrit.osmocom.org/1614 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I88ed1b3e59213acdf97f88eda097b8172b952a5e Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Jan 16 23:38:57 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 16 Jan 2017 23:38:57 +0000 Subject: osmo-bts[master]: l1sap: fix missing 'else's causing wrong rach frame expiry c... In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1614 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I88ed1b3e59213acdf97f88eda097b8172b952a5e Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 16 23:38:59 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 16 Jan 2017 23:38:59 +0000 Subject: [MERGED] osmo-bts[master]: l1sap: fix missing 'else's causing wrong rach frame expiry c... In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: l1sap: fix missing 'else's causing wrong rach frame expiry counts ...................................................................... l1sap: fix missing 'else's causing wrong rach frame expiry counts This bug was introduced in the recently merged commit 1e399f888e4e1c93e0e5b7fd69fce09a2587fb87 aka change-id I87f40f5f160a4f6750c4f3d06997fc4f24049303 Fixes: coverity-scan CID#160156 and CID#160155 Change-Id: I88ed1b3e59213acdf97f88eda097b8172b952a5e --- M src/common/l1sap.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 0ce1e4a..9116e23 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -381,9 +381,9 @@ * See also TS 04.08, Chapter 10.5.2.11, table 10.29 */ if (ccch_conf == RSL_BCCH_CCCH_CONF_2_NC) rach_frames_expired = 2; - if (ccch_conf == RSL_BCCH_CCCH_CONF_3_NC) + else if (ccch_conf == RSL_BCCH_CCCH_CONF_3_NC) rach_frames_expired = 3; - if (ccch_conf == RSL_BCCH_CCCH_CONF_4_NC) + else if (ccch_conf == RSL_BCCH_CCCH_CONF_4_NC) rach_frames_expired = 4; else rach_frames_expired = 1; -- To view, visit https://gerrit.osmocom.org/1614 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I88ed1b3e59213acdf97f88eda097b8172b952a5e Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Jan 17 09:02:42 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 17 Jan 2017 09:02:42 +0000 Subject: [ABANDON] openbsc[master]: pcu_if: original pcu sock interface from osmo-bts In-Reply-To: References: Message-ID: dexter has abandoned this change. Change subject: pcu_if: original pcu sock interface from osmo-bts ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/1169 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I46b0a65f1633c40053d43b57b786b042f20f12bd Gerrit-PatchSet: 6 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Tue Jan 17 10:28:52 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 17 Jan 2017 10:28:52 +0000 Subject: libosmocore[master]: utils: add osmo_strscpy() macro to use sizeof(dst) In-Reply-To: References: Message-ID: Patch Set 5: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1599 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie973fc51835066540eba7ed2946ddf33a268b022 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 17 11:00:59 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 17 Jan 2017 11:00:59 +0000 Subject: libosmo-netif[master]: deb: fix lib version In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1612 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie9bcd71ffcaeaa78aeef74ec329a6966ce1f1ba6 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 17 11:01:01 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 17 Jan 2017 11:01:01 +0000 Subject: [MERGED] libosmo-netif[master]: deb: fix lib version In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: deb: fix lib version ...................................................................... deb: fix lib version The library version does not match LIBVERSION from Makefile.am and -dev package dependency - bump it. Change-Id: Ie9bcd71ffcaeaa78aeef74ec329a6966ce1f1ba6 Related: OS#1860 --- M debian/control R debian/libosmonetif3.install 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/control b/debian/control index f499728..f4c94bb 100644 --- a/debian/control +++ b/debian/control @@ -20,7 +20,7 @@ Vcs-Git: git://git.osmocom.org/libosmo-netif.git Homepage: https://projects.osmocom.org/projects/libosmo-netif -Package: libosmonetif2 +Package: libosmonetif3 Section: libs Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} @@ -51,7 +51,7 @@ Section: debug Architecture: any Priority: extra -Depends: libosmonetif2 (= ${binary:Version}), ${misc:Depends} +Depends: libosmonetif3 (= ${binary:Version}), ${misc:Depends} Multi-Arch: same Description: Debug symbols for Osmocom network interface library The libosmo-netif library is one of the libraries needed by the diff --git a/debian/libosmonetif2.install b/debian/libosmonetif3.install similarity index 100% rename from debian/libosmonetif2.install rename to debian/libosmonetif3.install -- To view, visit https://gerrit.osmocom.org/1612 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie9bcd71ffcaeaa78aeef74ec329a6966ce1f1ba6 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Jan 17 11:20:00 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 17 Jan 2017 11:20:00 +0000 Subject: [PATCH] osmo-bts[master]: octphy: set tx attenuation via VTY In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/905 to look at the new patch set (#12). octphy: set tx attenuation via VTY add code to configure the transmision power via VTY Change-Id: I76bb8660eb1d8baeb6b8f69da4a6ba9ab7319981 --- M include/osmo-bts/phy_link.h M src/osmo-bts-octphy/l1_oml.c M src/osmo-bts-octphy/octphy_vty.c 3 files changed, 30 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/05/905/12 diff --git a/include/osmo-bts/phy_link.h b/include/osmo-bts/phy_link.h index 6b2f21e..1f8450b 100644 --- a/include/osmo-bts/phy_link.h +++ b/include/osmo-bts/phy_link.h @@ -63,6 +63,7 @@ /* configuration */ uint32_t rf_port_index; uint32_t rx_gain_db; + bool tx_atten_flag; uint32_t tx_atten_db; #if OCTPHY_MULTI_TRX == 1 /* arfcn used by TRX with id 0 */ diff --git a/src/osmo-bts-octphy/l1_oml.c b/src/osmo-bts-octphy/l1_oml.c index 5865625..da8ff03 100644 --- a/src/osmo-bts-octphy/l1_oml.c +++ b/src/osmo-bts-octphy/l1_oml.c @@ -1373,7 +1373,13 @@ oc->Config.usTsc = trx->bts->bsic & 0x7; oc->RfConfig.ulRxGainDb = plink->u.octphy.rx_gain_db; /* FIXME: compute this based on nominal transmit power, etc. */ - oc->RfConfig.ulTxAttndB = plink->u.octphy.tx_atten_db; + if (plink->u.octphy.tx_atten_flag) { + oc->RfConfig.ulTxAttndB = plink->u.octphy.tx_atten_db; + } else { + /* Take the Tx Attn received in set radio attribures + * x4 is for the value in db */ + oc->RfConfig.ulTxAttndB = (trx->max_power_red) << 2; + } #if OCTPHY_MULTI_TRX == 1 LOGP(DL1C, LOGL_INFO, "Tx TRX-OPEN.req(trx=%u, rf_port=%u, arfcn=%u, " diff --git a/src/osmo-bts-octphy/octphy_vty.c b/src/osmo-bts-octphy/octphy_vty.c index 3ea576c..e134fc5 100644 --- a/src/osmo-bts-octphy/octphy_vty.c +++ b/src/osmo-bts-octphy/octphy_vty.c @@ -136,10 +136,16 @@ } DEFUN(cfg_phy_tx_atten_db, cfg_phy_tx_atten_db_cmd, - "octphy tx-attenuation <0-359>", - OCT_STR "Configure the Tx Attenuation in quarter-dB\n" - "Tx attenuation in quarter-dB\n") + "octphy tx-attenuation (oml|<0-359>)", + OCT_STR "Set attenuation on transmitted RF\n" + "Use tx-attenuation according to OML instructions from BSC\n" + "Fixed tx-attenuation in quarter-dB\n") { + + + + + struct phy_link *plink = vty->index; if (plink->state != PHY_LINK_SHUTDOWN) { @@ -148,7 +154,12 @@ return CMD_WARNING; } - plink->u.octphy.tx_atten_db = atoi(argv[0]); + if (strcmp(argv[0], "oml") == 0) { + plink->u.octphy.tx_atten_flag = false; + } else { + plink->u.octphy.tx_atten_db = atoi(argv[0]); + plink->u.octphy.tx_atten_flag = true; + } return CMD_SUCCESS; } @@ -202,8 +213,13 @@ VTY_NEWLINE); vty_out(vty, " rx-gain %u%s", plink->u.octphy.rx_gain_db, VTY_NEWLINE); - vty_out(vty, " tx-attenuation %u%s", plink->u.octphy.tx_atten_db, - VTY_NEWLINE); + + if (plink->u.octphy.tx_atten_flag) { + vty_out(vty, " tx-attenuation %u%s", + plink->u.octphy.tx_atten_db, VTY_NEWLINE); + } else + vty_out(vty, " tx-attenuation oml%s", VTY_NEWLINE); + vty_out(vty, " rf-port-index %u%s", plink->u.octphy.rf_port_index, VTY_NEWLINE); } -- To view, visit https://gerrit.osmocom.org/905 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I76bb8660eb1d8baeb6b8f69da4a6ba9ab7319981 Gerrit-PatchSet: 12 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Jan 17 11:20:41 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 17 Jan 2017 11:20:41 +0000 Subject: [PATCH] cellmgr-ng[master]: Add gerrit settings Message-ID: Review at https://gerrit.osmocom.org/1615 Add gerrit settings This facilitate the use of "git review" command for gerrit submissions. Change-Id: Ic2df30f053687b6d48232cf04ce22592e1e09a94 --- A .gitreview 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/cellmgr-ng refs/changes/15/1615/1 diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..b2b5d25 --- /dev/null +++ b/.gitreview @@ -0,0 +1,3 @@ +[gerrit] +host=gerrit.osmocom.org +project=cellmgr-ng -- To view, visit https://gerrit.osmocom.org/1615 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic2df30f053687b6d48232cf04ce22592e1e09a94 Gerrit-PatchSet: 1 Gerrit-Project: cellmgr-ng Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Jan 17 11:29:59 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 17 Jan 2017 11:29:59 +0000 Subject: [PATCH] cellmgr-ng[master]: Build fix attempt Message-ID: Review at https://gerrit.osmocom.org/1616 Build fix attempt Trying to fix .deb packages build failure which I was unable to reproduce locally: [ 139s] gcc -Wall -I/usr/include/ -I/usr/include/ -I/usr/include/ -I/usr/include/ -DNO_UNIPORTE -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -o cellmgr_ng main.o mtp_layer3.o thread.o ipaccess.o pcap.o bss_patch.o bssap_sccp.o bsc_sccp.o bsc_ussd.o links.o msc_conn.o link_udp.o snmp_mtp.o debug.o isup.o mtp_link.o counter.o sccp_state.o bsc.o ss7_application.o vty_interface_legacy.o vty_interface_cmds.o mgcp_patch.o mgcp_callagent.o isup_filter.o -ltalloc -losmocore -ltalloc -losmogsm -losmocore -ltalloc -losmovty -losmocore -losmosccp -losmoxua -lpthread -lnetsnmp -lcrypto [ 139s] /usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/libosmosccp.so: undefined reference to `talloc_free' [ 139s] collect2: error: ld returned 1 exit status [ 139s] Makefile:425: recipe for target 'cellmgr_ng' failed [ 139s] make[3]: *** [cellmgr_ng] Error 1 [ 139s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' Changing order of the libs to match that of osmo-bsc hoping that it's help ld to do the right thing. Change-Id: I8b989c5012818a302ec819501da1a1c67ac3bab5 --- M src/Makefile.am 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/cellmgr-ng refs/changes/16/1616/1 diff --git a/src/Makefile.am b/src/Makefile.am index 2052851..20660f8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -17,8 +17,8 @@ mtp_link.c counter.c sccp_state.c bsc.c ss7_application.c \ vty_interface_legacy.c vty_interface_cmds.c mgcp_patch.c \ mgcp_callagent.c isup_filter.c -cellmgr_ng_LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS) \ - $(LIBOSMOSCCP_LIBS) $(NEXUSWARE_C7_LIBS) \ +cellmgr_ng_LDADD = $(LIBOSMOSCCP_LIBS) $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS) \ + $(NEXUSWARE_C7_LIBS) \ -lpthread -lnetsnmp -lcrypto osmo_stp_SOURCES = main_stp.c mtp_layer3.c thread.c pcap.c link_udp.c snmp_mtp.c \ @@ -28,6 +28,6 @@ vty_interface.c vty_interface_cmds.c mgcp_patch.c \ mgcp_callagent.c isup_filter.c sctp_m3ua_client.c \ sctp_m3ua_misc.c -osmo_stp_LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS) \ - $(LIBOSMOSCCP_LIBS) $(NEXUSWARE_C7_LIBS) \ +osmo_stp_LDADD = $(LIBOSMOSCCP_LIBS) $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS) \ + $(NEXUSWARE_C7_LIBS) \ -lpthread -lnetsnmp -lcrypto -lxua -lsctp -- To view, visit https://gerrit.osmocom.org/1616 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8b989c5012818a302ec819501da1a1c67ac3bab5 Gerrit-PatchSet: 1 Gerrit-Project: cellmgr-ng Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Jan 17 13:01:10 2017 From: gerrit-no-reply at lists.osmocom.org (ikostov) Date: Tue, 17 Jan 2017 13:01:10 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: NITB: add OpenVPN diagram in shared chapter Message-ID: Review at https://gerrit.osmocom.org/1617 NITB: add OpenVPN diagram in shared chapter Change-Id: Ia9b0712fcbec373cefd7a2bd02498edeb129f90f --- A OsmoNITB/openvpn.png M OsmoNITB/osmonitb-usermanual.adoc A common/chapters/openvpn.adoc A common/images/openvpn.png 4 files changed, 26 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/17/1617/1 diff --git a/OsmoNITB/openvpn.png b/OsmoNITB/openvpn.png new file mode 100644 index 0000000..e60a603 --- /dev/null +++ b/OsmoNITB/openvpn.png Binary files differ diff --git a/OsmoNITB/osmonitb-usermanual.adoc b/OsmoNITB/osmonitb-usermanual.adoc index ec219d9..d9eabcb 100644 --- a/OsmoNITB/osmonitb-usermanual.adoc +++ b/OsmoNITB/osmonitb-usermanual.adoc @@ -7,6 +7,8 @@ include::chapters/overview.adoc[] +include::../common/chapters/openvpn.adoc[] + include::chapters/running.adoc[] include::chapters/control.adoc[] diff --git a/common/chapters/openvpn.adoc b/common/chapters/openvpn.adoc new file mode 100644 index 0000000..c90dc05 --- /dev/null +++ b/common/chapters/openvpn.adoc @@ -0,0 +1,24 @@ +[[openvpn]] +== OpenVPN + +OpenVPN or Open-Source Virtual Private Network is a software, which is +employed to establish encrypted private networks over untrusted public +networks. + +=== OpenVPN overview + +A VPN software client is running as a software component in sysmoBTS / +sysmoNITB. Normally OpenVPN software is pre-installed when sysmoNITB +starter kit is purchased. It requires a certificate file, which is +also pre-installed in case of starter kit. + +sysmoBTS / sysmoNITB customer needs just to activate the openvpn, and +it will then establish a VPN tunnel to the sysmocom VPN server. +Technical support of sysmocom can access it remotely from this server. +A bi-directional UDP flow from a random UDP port number on +the sysmocom device to UDP port 1194 on admin.sysmocom.de (144.76.43.77) +needs to be established. + +image::../common/images/openvpn.png[200] + + diff --git a/common/images/openvpn.png b/common/images/openvpn.png new file mode 100644 index 0000000..9925d70 --- /dev/null +++ b/common/images/openvpn.png Binary files differ -- To view, visit https://gerrit.osmocom.org/1617 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia9b0712fcbec373cefd7a2bd02498edeb129f90f Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: ikostov From gerrit-no-reply at lists.osmocom.org Tue Jan 17 13:11:35 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 17 Jan 2017 13:11:35 +0000 Subject: osmo-bts[master]: octphy: set tx attenuation via VTY In-Reply-To: References: Message-ID: Patch Set 12: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/905 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I76bb8660eb1d8baeb6b8f69da4a6ba9ab7319981 Gerrit-PatchSet: 12 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 17 13:11:41 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 17 Jan 2017 13:11:41 +0000 Subject: [PATCH] osmo-bts[master]: octphy: Improve OML ADM state handling In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/906 to look at the new patch set (#12). octphy: Improve OML ADM state handling Improve state handling for for lock/unlock of OC_RADIO_CARRIER obj class. in bts_model_chg_adm_state() Change-Id: I034114beca95210169429d8ac1eb8648df12fc6c --- M src/osmo-bts-octphy/l1_oml.c 1 file changed, 72 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/06/906/12 diff --git a/src/osmo-bts-octphy/l1_oml.c b/src/osmo-bts-octphy/l1_oml.c index da8ff03..c88bf11 100644 --- a/src/osmo-bts-octphy/l1_oml.c +++ b/src/osmo-bts-octphy/l1_oml.c @@ -52,6 +52,8 @@ #include #include +int trx_locked = 0; + /* Map OSMOCOM logical channel type to OctPHY Logical channel type */ static tOCTVC1_GSM_LOGICAL_CHANNEL_COMBINATION_ENUM pchan_to_logChComb[_GSM_PCHAN_MAX] = { @@ -1540,10 +1542,76 @@ int bts_model_chg_adm_state(struct gsm_bts *bts, struct gsm_abis_mo *mo, void *obj, uint8_t adm_state) { - /* TODO: implement this properly */ - /* blindly accept all state changes */ - mo->nm_state.administrative = adm_state; - return oml_mo_statechg_ack(mo); + int rc; + int granted = 0; + + struct gsm_bts_trx *trx; + struct phy_instance *pinst; + struct octphy_hdl *fl1h; + + switch (mo->obj_class) { + case NM_OC_RADIO_CARRIER: + + trx = ((struct gsm_bts_trx *)obj); + pinst = trx_phy_instance(trx); + fl1h = pinst->phy_link->u.octphy.hdl; + + if (mo->procedure_pending) { + LOGP(DL1C, LOGL_ERROR, "Discarding adm change command: " + "pending procedure on TRX %d\n", trx->nr); + return 0; + } + mo->procedure_pending = 1; + switch (adm_state) { + case NM_STATE_LOCKED: + + trx_locked = 1; + + /* Stop heartbeat check */ + osmo_timer_del(&fl1h->alive_timer); + + bts_model_trx_deact_rf(trx); + + /* Close TRX */ + rc = bts_model_trx_close(trx); + if (rc != 0) { + LOGP(DL1C, LOGL_ERROR, + "Cannot close TRX %d, it is already closed.\n", + trx->nr); + } + granted = 1; + break; + + case NM_STATE_UNLOCKED: + + if (trx_locked) { + trx_locked = 0; + l1if_activate_rf(trx, 1); + } + + granted = 1; + break; + + default: + granted = 1; + break; + } + + mo->procedure_pending = 0; + break; + + default: + /* blindly accept all state changes */ + granted = 1; + break; + } + + if (granted) { + mo->nm_state.administrative = adm_state; + return oml_mo_statechg_ack(mo); + } else + return oml_mo_statechg_nack(mo, NM_NACK_REQ_NOT_GRANT); + } int bts_model_trx_deact_rf(struct gsm_bts_trx *trx) -- To view, visit https://gerrit.osmocom.org/906 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I034114beca95210169429d8ac1eb8648df12fc6c Gerrit-PatchSet: 12 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Jan 17 13:16:34 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 17 Jan 2017 13:16:34 +0000 Subject: osmo-gsm-manuals[master]: NITB: add OpenVPN diagram in shared chapter In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-2 Looks to me like you're in the wrong place. This belongs in the *sysmoBTS* manual, not the Osmocom manuals, right?? -- To view, visit https://gerrit.osmocom.org/1617 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia9b0712fcbec373cefd7a2bd02498edeb129f90f Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: ikostov Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 17 13:27:00 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 17 Jan 2017 13:27:00 +0000 Subject: osmo-bts[master]: octphy: Improve OML ADM state handling In-Reply-To: References: Message-ID: Patch Set 12: Code-Review-1 (2 comments) 'trx_locked' and 'granted' need explaining, possibly in the commit log https://gerrit.osmocom.org/#/c/906/12/src/osmo-bts-octphy/l1_oml.c File src/osmo-bts-octphy/l1_oml.c: Line 1568: trx_locked = 1; wait, what? trx_locked is a global variable for all TRX? Shouldn't this be part of struct gsm_bts_trx instead? Line 1609: if (granted) { interesting how 'granted' will never end up being 0 here -- To view, visit https://gerrit.osmocom.org/906 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I034114beca95210169429d8ac1eb8648df12fc6c Gerrit-PatchSet: 12 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Jan 17 14:25:11 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 17 Jan 2017 14:25:11 +0000 Subject: [PATCH] osmo-pcu[master]: BTS: accept also relative frame numbers with rach requst In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1205 to look at the new patch set (#3). BTS: accept also relative frame numbers with rach requst The rach request contains a relative frame number (Fn % 42432), while BTS::rcv_rach() accepts the full frame number only. Since the BTS is always aware of the full frame number this is not a problem. But for BSC co-located PCU schemes it is a problem since the rach request only contains the relative frame number as mentioned above. The pcu continuously receives frame number updates with the GSM time indication message. It is simple to re-calculate the full frame number from that information. This patch makes BTS::rcv_rach() compatible with relative frame numbers, while not breaking the compatibility for full frame numbers Change-Id: Iaa182d8d29c6a0f5fa06064c2eb48b21b1ba2775 --- M src/bts.cpp M tests/tbf/TbfTest.cpp 2 files changed, 11 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/05/1205/3 diff --git a/src/bts.cpp b/src/bts.cpp index 4aa5c2c..8808537 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -484,6 +484,13 @@ rach_frame(); + /* Santizize frame number */ + Fn = Fn % 42432; + + /* Restore the full frame number + * (See also 3GPP TS 44.018, section 10.5.2.38) */ + Fn = Fn + m_cur_fn - m_cur_fn % 42432; + LOGP(DRLCMAC, LOGL_DEBUG, "MS requests UL TBF on RACH, so we provide " "one:\n"); diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index cc48392..aa7f9ed 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -42,6 +42,8 @@ #include +#define DUMMY_FN 2654167 + void *tall_pcu_ctx; int16_t spoof_mnc = 0, spoof_mcc = 0; @@ -166,6 +168,7 @@ trx = &bts->trx[0]; trx->pdch[ts_no].enable(); + the_bts->set_current_frame_number(DUMMY_FN); } static gprs_rlcmac_dl_tbf *create_dl_tbf(BTS *the_bts, uint8_t ms_class, @@ -1350,7 +1353,7 @@ { BTS the_bts; int ts_no = 7; - uint32_t fn = 2654167; /* 17,25,9 */ + uint32_t fn = DUMMY_FN; /* 17,25,9 */ uint32_t tlli = 0xf1223344; const char *imsi = "0011223344"; uint16_t qta = 31; -- To view, visit https://gerrit.osmocom.org/1205 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iaa182d8d29c6a0f5fa06064c2eb48b21b1ba2775 Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Jan 17 15:19:59 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 17 Jan 2017 15:19:59 +0000 Subject: [PATCH] osmo-pcu[master]: BTS: accept also relative frame numbers with rach requst In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1205 to look at the new patch set (#4). BTS: accept also relative frame numbers with rach requst The rach request contains a relative frame number (Fn % 42432), while BTS::rcv_rach() accepts the full frame number only. Since the BTS is always aware of the full frame number this is not a problem. But for BSC co-located PCU schemes it is a problem since the rach request only contains the relative frame number as mentioned above. The pcu continusly receives frame number updates with the GSM time indication message. It is simple to re-calculate the full frame number from that information. This patch makes BTS::rcv_rach() compatible with relative frame numbers, while not breaking the compatibility for full frame numbers Change-Id: Iaa182d8d29c6a0f5fa06064c2eb48b21b1ba2775 --- M src/bts.cpp M tests/tbf/TbfTest.cpp 2 files changed, 19 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/05/1205/4 diff --git a/src/bts.cpp b/src/bts.cpp index 4aa5c2c..bf25efa 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -484,6 +484,21 @@ rach_frame(); + /* Note: If a BTS is sending in a rach request it will be fully aware + * of the frame number. If the PCU is used in a BSC-co-located setup. + * The BSC will forward the incoming RACH request. The RACH request + * only contains the relative frame number (Fn % 42432) in its request + * reference. This PCU implementation has to fit both secenarious, so + * we need to assume that Fn is a relative frame number. */ + + /* Ensure that all following calculations are performed with the + * relative frame number */ + Fn = Fn % 42432; + + /* Restore the full frame number + * (See also 3GPP TS 44.018, section 10.5.2.38) */ + Fn = Fn + m_cur_fn - m_cur_fn % 42432; + LOGP(DRLCMAC, LOGL_DEBUG, "MS requests UL TBF on RACH, so we provide " "one:\n"); diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index cc48392..aa7f9ed 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -42,6 +42,8 @@ #include +#define DUMMY_FN 2654167 + void *tall_pcu_ctx; int16_t spoof_mnc = 0, spoof_mcc = 0; @@ -166,6 +168,7 @@ trx = &bts->trx[0]; trx->pdch[ts_no].enable(); + the_bts->set_current_frame_number(DUMMY_FN); } static gprs_rlcmac_dl_tbf *create_dl_tbf(BTS *the_bts, uint8_t ms_class, @@ -1350,7 +1353,7 @@ { BTS the_bts; int ts_no = 7; - uint32_t fn = 2654167; /* 17,25,9 */ + uint32_t fn = DUMMY_FN; /* 17,25,9 */ uint32_t tlli = 0xf1223344; const char *imsi = "0011223344"; uint16_t qta = 31; -- To view, visit https://gerrit.osmocom.org/1205 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iaa182d8d29c6a0f5fa06064c2eb48b21b1ba2775 Gerrit-PatchSet: 4 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Jan 17 15:30:15 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 17 Jan 2017 15:30:15 +0000 Subject: libosmocore[master]: utils.h: #include as we use fprintf() In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1609 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I911c7f4bcadde414ce0b384e13a3a9a4a953e2fb Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 17 15:32:02 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 17 Jan 2017 15:32:02 +0000 Subject: libosmocore[master]: libosmogsm.map: fix typo In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1567 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I71413fbe703e459782a235e5b1d8487265de3780 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 17 15:33:21 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 17 Jan 2017 15:33:21 +0000 Subject: libosmocore[master]: vty: remove ignored logging parameters In-Reply-To: References: Message-ID: Patch Set 2: Related but it doesn't fix anything in regard "everything"? -- To view, visit https://gerrit.osmocom.org/1582 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib51987fb2f64a70fca130f3799dc8fd71cc7085c Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 17 15:34:50 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 17 Jan 2017 15:34:50 +0000 Subject: libosmocore[master]: linuxlist.h: add llist_len() In-Reply-To: References: Message-ID: Patch Set 3: yeah size_t or unsigned would be better. -- To view, visit https://gerrit.osmocom.org/1563 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic49adc7a346f5722bf624d7d3b4a735e4220ae15 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 17 15:35:22 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 17 Jan 2017 15:35:22 +0000 Subject: libosmocore[master]: disable various code if building for bare-iron embedded In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1608 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I01a9e6d8dbe885dbeac2769b84931a4d44f7a3a5 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 17 15:35:32 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 17 Jan 2017 15:35:32 +0000 Subject: libosmocore[master]: ipa: Remove unneeded #include statement In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1610 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I69f2891a2bea6f87f079b6778aa01ee27a25001b Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 17 15:37:06 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 17 Jan 2017 15:37:06 +0000 Subject: [MERGED] libosmocore[master]: libosmogsm.map: fix typo In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: libosmogsm.map: fix typo ...................................................................... libosmogsm.map: fix typo Change-Id: I71413fbe703e459782a235e5b1d8487265de3780 Related: OS#1615 --- M src/gsm/libosmogsm.map 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 3d1413d..7398c16 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -26,7 +26,7 @@ abis_nm_test_name; abis_nm_osmo_magic; abis_nm_ipa_magic; -abis_nm_event_cause_names; +abis_mm_event_cause_names; abis_nm_pcause_type_names; osmo_sitype_strs; -- To view, visit https://gerrit.osmocom.org/1567 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I71413fbe703e459782a235e5b1d8487265de3780 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Tue Jan 17 15:37:45 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 17 Jan 2017 15:37:45 +0000 Subject: libosmocore[master]: stats: Build UDP socket code only if sys/socket.h exists In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (1 comment) Not sure how to guard this differently, move it to the .c file? https://gerrit.osmocom.org/#/c/1607/1/include/osmocom/core/stats.h File include/osmocom/core/stats.h: Line 66: #ifdef HAVE_SYS_SOCKET_H I think it is dangerous to have different struct sizes depending on config.h being included at the right time. E.g. apps using this struct need to check for udp sockets too... -- To view, visit https://gerrit.osmocom.org/1607 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6beb4fcc394ed7d3f8dd7a097b6e998245ecf401 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Jan 17 15:39:46 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 17 Jan 2017 15:39:46 +0000 Subject: libosmocore[master]: vty: remove ignored logging parameters In-Reply-To: References: Message-ID: Patch Set 2: No, it's not fix - it's just to make code reading easier. Btw, could you please comment on #71? - I'm not sure I understood the issue properly. -- To view, visit https://gerrit.osmocom.org/1582 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib51987fb2f64a70fca130f3799dc8fd71cc7085c Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 17 15:55:42 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 17 Jan 2017 15:55:42 +0000 Subject: libosmocore[master]: vty: remove ignored logging parameters In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 Churn. If you look at caller and implementor.. not sure how it becomes more "easy". a.) It seems sensible to have this data in the implementor (even if not used right now) b.) It doesn't.. but keeping the parameter and starting to pass NULL seems like a change but not progress ;) -- To view, visit https://gerrit.osmocom.org/1582 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib51987fb2f64a70fca130f3799dc8fd71cc7085c Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 17 15:58:27 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 17 Jan 2017 15:58:27 +0000 Subject: libosmocore[master]: utils: add osmo_strscpy() macro to use sizeof(dst) In-Reply-To: References: Message-ID: Patch Set 5: Code-Review-1 Linux's strscpy has different semantic/parameters. Not sure if you want to clash here. You might also implement it as a static inline instead of a macro (or add () around the parameters). -- To view, visit https://gerrit.osmocom.org/1599 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie973fc51835066540eba7ed2946ddf33a268b022 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 17 16:02:59 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 17 Jan 2017 16:02:59 +0000 Subject: libosmocore[master]: Add osmo_rand() function In-Reply-To: References: Message-ID: Patch Set 2: Are you sure you want everyone linking to libosmogsm require a full TLS library? -- To view, visit https://gerrit.osmocom.org/1526 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0241b814ea4c4ce1458f7ad76e31d390383c2048 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 17 16:47:37 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 17 Jan 2017 16:47:37 +0000 Subject: [PATCH] libosmocore[master]: Add abis_nm_fail_evt_vrep to libosmogsm.map Message-ID: Review at https://gerrit.osmocom.org/1618 Add abis_nm_fail_evt_vrep to libosmogsm.map Change-Id: If56b521429af497ddd5a47170eb2c085b1fb78ba --- M src/gsm/libosmogsm.map 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/18/1618/1 diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 7398c16..e153d72 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -5,6 +5,7 @@ abis_nm_att_settable; abis_nm_avail_name; abis_nm_fail_evt_rep; +abis_nm_fail_evt_vrep; abis_nm_chcomb4pchan; abis_nm_debugp_foh; abis_nm_event_type_name; -- To view, visit https://gerrit.osmocom.org/1618 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If56b521429af497ddd5a47170eb2c085b1fb78ba Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Jan 17 20:22:55 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 17 Jan 2017 20:22:55 +0000 Subject: openbsc[master]: Revert "Turn some warnings into errors" In-Reply-To: References: Message-ID: Patch Set 1: > That's odd - the error seems like autoconf-archive is not installed I checked again -- it seems I forgot to do 'autoreconf'. So this reverted patch *does* build for me, and I partly I reverted it out of my own mistake. But I think it would be better for the configure script to either not depend on this autoconf-archive, or if we really have to, to make the configure script print a clear error message that tells me about it, like a missing dependency. From the "syntax error" message there is no way to understand that I have to install autoconf-archive and re-run autoreconf from scratch... Can you do that, somehow? -- To view, visit https://gerrit.osmocom.org/1591 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2b368500b07f233882ef854eca1fa21f6df39e29 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 18 01:50:40 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 18 Jan 2017 01:50:40 +0000 Subject: [MERGED] libosmocore[master]: doc: fix doxygen 'utils' group closing brace In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: doc: fix doxygen 'utils' group closing brace ...................................................................... doc: fix doxygen 'utils' group closing brace osmo_strlcpy() was excluded from the group because the closing brace was above it. Change-Id: I6701261f5854342ac4cd4f2da62e49eb40362938 --- M src/utils.c 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/utils.c b/src/utils.c index df806df..34b2bca 100644 --- a/src/utils.c +++ b/src/utils.c @@ -338,7 +338,6 @@ osmo_store64be_ext(value, buf, data_len); return buf; } -/*! @} */ /*! \brief Copy a C-string into a sized buffer * \param[in] src source string @@ -361,3 +360,5 @@ } return ret; } + +/*! @} */ -- To view, visit https://gerrit.osmocom.org/1597 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6701261f5854342ac4cd4f2da62e49eb40362938 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Jan 18 08:23:56 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 18 Jan 2017 08:23:56 +0000 Subject: [PATCH] cellmgr-ng[master]: build: Link -losmocore last to please Ubuntu linker Message-ID: Review at https://gerrit.osmocom.org/1619 build: Link -losmocore last to please Ubuntu linker It seems that the Ubuntu linker is quite picky in where it is looking for symbols. Link libosmocore (and as such talloc) last of the Osmocom libraries. This could fix: gcc -Wall -I/usr/include/ -I/usr/include/ -I/usr/include/ -I/usr/include/ -DNO_UNIPORTE -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -o cellmgr_ng main.o mtp_layer3.o thread.o ipaccess.o pcap.o bss_patch.o bssap_sccp.o bsc_sccp.o bsc_ussd.o links.o msc_conn.o link_udp.o snmp_mtp.o debug.o isup.o mtp_link.o counter.o sccp_state.o bsc.o ss7_application.o vty_interface_legacy.o vty_interface_cmds.o mgcp_patch.o mgcp_callagent.o isup_filter.o -ltalloc -losmocore -ltalloc -losmogsm -losmocore -ltalloc -losmovty -losmocore -losmosccp -losmoxua -lpthread -lnetsnmp -lcrypto [ 79s] /usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/libosmosccp.so: undefined reference to `talloc_free' Change-Id: I94c87496ebffd41a6217d860b0ca4bed6ff2d24c --- M src/Makefile.am 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/cellmgr-ng refs/changes/19/1619/1 diff --git a/src/Makefile.am b/src/Makefile.am index 2052851..3a006f2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -17,8 +17,8 @@ mtp_link.c counter.c sccp_state.c bsc.c ss7_application.c \ vty_interface_legacy.c vty_interface_cmds.c mgcp_patch.c \ mgcp_callagent.c isup_filter.c -cellmgr_ng_LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS) \ - $(LIBOSMOSCCP_LIBS) $(NEXUSWARE_C7_LIBS) \ +cellmgr_ng_LDADD = $(LIBOSMOSCCP_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS) \ + $(LIBOSMOCORE_LIBS) $(NEXUSWARE_C7_LIBS) \ -lpthread -lnetsnmp -lcrypto osmo_stp_SOURCES = main_stp.c mtp_layer3.c thread.c pcap.c link_udp.c snmp_mtp.c \ @@ -28,6 +28,6 @@ vty_interface.c vty_interface_cmds.c mgcp_patch.c \ mgcp_callagent.c isup_filter.c sctp_m3ua_client.c \ sctp_m3ua_misc.c -osmo_stp_LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS) \ - $(LIBOSMOSCCP_LIBS) $(NEXUSWARE_C7_LIBS) \ +osmo_stp_LDADD = $(LIBOSMOSCCP_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS) \ + $(LIBOSMOCORE_LIBS) $(NEXUSWARE_C7_LIBS) \ -lpthread -lnetsnmp -lcrypto -lxua -lsctp -- To view, visit https://gerrit.osmocom.org/1619 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I94c87496ebffd41a6217d860b0ca4bed6ff2d24c Gerrit-PatchSet: 1 Gerrit-Project: cellmgr-ng Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Wed Jan 18 08:23:56 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 18 Jan 2017 08:23:56 +0000 Subject: [PATCH] cellmgr-ng[master]: build: Remove old left over from before libosmocore.. Message-ID: Review at https://gerrit.osmocom.org/1620 build: Remove old left over from before libosmocore.. Change-Id: Id3c41595475dac06dcdf3a104570640349c8f8bf --- M src/Makefile.am 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/cellmgr-ng refs/changes/20/1620/1 diff --git a/src/Makefile.am b/src/Makefile.am index 3a006f2..b3db2c6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -8,7 +8,7 @@ mgcp_mgw_SOURCES = mgcp_ss7.c mgcp_ss7_vty.c mgcp_hw.c thread.c debug.c \ mgcp/mgcp_protocol.c mgcp/mgcp_network.c mgcp/mgcp_vty.c \ dtmf_scheduler.c -mgcp_mgw_LDADD = $(LAFORGE_LIBS) $(NEXUSWARE_C7_LIBS) $(NEXUSWARE_UNIPORTE_LIBS) \ +mgcp_mgw_LDADD = $(NEXUSWARE_C7_LIBS) $(NEXUSWARE_UNIPORTE_LIBS) \ $(LIBOSMOVTY_LIBS) $(LIBOSMOCORE_LIBS) -lpthread -lcrypto -lrt cellmgr_ng_SOURCES = main.c mtp_layer3.c thread.c input/ipaccess.c pcap.c \ -- To view, visit https://gerrit.osmocom.org/1620 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id3c41595475dac06dcdf3a104570640349c8f8bf Gerrit-PatchSet: 1 Gerrit-Project: cellmgr-ng Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Wed Jan 18 09:28:18 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 18 Jan 2017 09:28:18 +0000 Subject: openbsc[master]: Revert "Turn some warnings into errors" In-Reply-To: References: Message-ID: Patch Set 1: There is clear error with missing package name if you build it via dpkg-buildpackage. Since this was reverted by mistake lets merge it back and than look into ways to improve error messages for manual builds. -- To view, visit https://gerrit.osmocom.org/1591 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2b368500b07f233882ef854eca1fa21f6df39e29 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 18 09:30:16 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 18 Jan 2017 09:30:16 +0000 Subject: cellmgr-ng[master]: build: Link -losmocore last to please Ubuntu linker In-Reply-To: References: Message-ID: Patch Set 1: That's pretty-much the same as #1616 -- To view, visit https://gerrit.osmocom.org/1619 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I94c87496ebffd41a6217d860b0ca4bed6ff2d24c Gerrit-PatchSet: 1 Gerrit-Project: cellmgr-ng Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 18 09:30:38 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 18 Jan 2017 09:30:38 +0000 Subject: cellmgr-ng[master]: build: Remove old left over from before libosmocore.. In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1620 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id3c41595475dac06dcdf3a104570640349c8f8bf Gerrit-PatchSet: 1 Gerrit-Project: cellmgr-ng Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 18 09:56:14 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 18 Jan 2017 09:56:14 +0000 Subject: [PATCH] openbsc[master]: deb: unbreak nightly builds Message-ID: Review at https://gerrit.osmocom.org/1621 deb: unbreak nightly builds Add openbsc-dev with source and header files necessary for osmo-bts builds. Max's note: extracted from Debian packaging work into separate commit. Change-Id: I25f8c639d2dc525ca280a7cd09de3ca6358d2568 --- M debian/control A debian/openbsc-dev.install 2 files changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/21/1621/1 diff --git a/debian/control b/debian/control index 79f18df..44262b9 100644 --- a/debian/control +++ b/debian/control @@ -98,6 +98,17 @@ . This package is part of OpenBSC and closely related to osmocom-bsc. +Package: openbsc-dev +Architecture: all +Depends: ${misc:Depends} +Description: Header file needed by tools tightly integrated + Some other programs depend on gsm_data_shared.h and gsm_data_shared.c + from OpenBSC. This package installs these files to your file system so + that the other packages can build-depend on this package. + . + The header file is installed to /usr/include/osmocom/openbsc, while + the .c file is installed to /usr/src/osmocom/openbsc. + Package: osmo-gtphub Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} diff --git a/debian/openbsc-dev.install b/debian/openbsc-dev.install new file mode 100644 index 0000000..557aea1 --- /dev/null +++ b/debian/openbsc-dev.install @@ -0,0 +1,2 @@ +openbsc/include/openbsc/gsm_data_shared.h usr/include/osmocom/openbsc/ +openbsc/src/libcommon/gsm_data_shared.c usr/src/osmocom/openbsc/libcommon/ -- To view, visit https://gerrit.osmocom.org/1621 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I25f8c639d2dc525ca280a7cd09de3ca6358d2568 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Ruben Undheim From gerrit-no-reply at lists.osmocom.org Wed Jan 18 11:42:45 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 18 Jan 2017 11:42:45 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: configuration: fixing typos Message-ID: Review at https://gerrit.osmocom.org/1622 configuration: fixing typos configuration.adoc has some minor typos in it, this commit fixes that. Change-Id: Id84238b89e5deeac99c043b79b26c7e7b8b8534b --- M OsmoPCU/chapters/configuration.adoc 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/22/1622/1 diff --git a/OsmoPCU/chapters/configuration.adoc b/OsmoPCU/chapters/configuration.adoc index bcf3ad7..6fc61c7 100644 --- a/OsmoPCU/chapters/configuration.adoc +++ b/OsmoPCU/chapters/configuration.adoc @@ -72,7 +72,7 @@ ==== Downlink TBF idle time After a down-link TBF is idle (all data in the current LLC downlink -queue for thi MS has been transmitted), we can keep the TBF established +queue for the MS has been transmitted), we can keep the TBF established for a configurable time. This avoids having to go through a new one or two phase TBF establishment once the next data for downlink arrives. @@ -94,7 +94,7 @@ ==== Forcing two-phase access -If the MS is using for a single-phase access, you can still force it to +If the MS is using a single-phase access, you can still force it to use a two-phase access using the `two-phase-access` VTY configuration command at the `pcu` VTY config node. -- To view, visit https://gerrit.osmocom.org/1622 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id84238b89e5deeac99c043b79b26c7e7b8b8534b Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Jan 18 16:10:04 2017 From: gerrit-no-reply at lists.osmocom.org (keith) Date: Wed, 18 Jan 2017 16:10:04 +0000 Subject: [PATCH] openbsc[master]: Add VTY command to immediately expire user (set expire_lu to... Message-ID: Review at https://gerrit.osmocom.org/1623 Add VTY command to immediately expire user (set expire_lu to now) Change-Id: I676c84350a7afc963bc6bb4c46c60e5ac3eee67e --- M openbsc/src/libmsc/vty_interface_layer3.c 1 file changed, 24 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/23/1623/1 diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index edece51..15909db 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -512,6 +512,29 @@ return CMD_SUCCESS; } +DEFUN(ena_subscr_expire, + ena_subscr_expire_cmd, + "subscriber " SUBSCR_TYPES " ID expire", + SUBSCR_HELP "Expire the subscriber Now\n") +{ + int rc; + struct gsm_network *gsmnet = gsmnet_from_vty(vty); + struct gsm_subscriber *subscr = + get_subscr_by_argv(gsmnet, argv[0], argv[1]); + + if (!subscr) { + vty_out(vty, "%% No subscriber found for %s %s%s", + argv[0], argv[1], VTY_NEWLINE); + return CMD_WARNING; + } + + subscr->expire_lu = time(0); + db_sync_subscriber(subscr); + subscr_put(subscr); + + return CMD_SUCCESS; +} + DEFUN(ena_subscr_authorized, ena_subscr_authorized_cmd, "subscriber " SUBSCR_TYPES " ID authorized (0|1)", @@ -1144,6 +1167,7 @@ install_element_ve(&logging_fltr_imsi_cmd); install_element(ENABLE_NODE, &ena_subscr_delete_cmd); + install_element(ENABLE_NODE, &ena_subscr_expire_cmd); install_element(ENABLE_NODE, &ena_subscr_name_cmd); install_element(ENABLE_NODE, &ena_subscr_extension_cmd); install_element(ENABLE_NODE, &ena_subscr_authorized_cmd); -- To view, visit https://gerrit.osmocom.org/1623 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I676c84350a7afc963bc6bb4c46c60e5ac3eee67e Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: keith From gerrit-no-reply at lists.osmocom.org Wed Jan 18 16:32:51 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 18 Jan 2017 16:32:51 +0000 Subject: [PATCH] libosmocore[master]: Register connecting socket for WRITE events Message-ID: Review at https://gerrit.osmocom.org/1624 Register connecting socket for WRITE events Previously osmo_sock_init_ofd() created and register sockets for READ events regardless of socket flags. Check socket flag and register for WRITE events if it's a connect socket. This makes this function usable for both bind and connect sockets. Change-Id: I938de74c28df29221071913b769e7a2df9d041fa --- M src/socket.c 1 file changed, 9 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/24/1624/1 diff --git a/src/socket.c b/src/socket.c index cdafadd..dc22219 100644 --- a/src/socket.c +++ b/src/socket.c @@ -166,11 +166,12 @@ /*! \brief fill \ref osmo_fd for a give sfd * \param[out] ofd file descriptor (will be filled in) * \param[in] sfd socket file descriptor + * \param[in] when event type (read, write...) * \returns socket fd on success; negative on error * * This function fills the \a ofd structure. */ -static inline int osmo_fd_init_ofd(struct osmo_fd *ofd, int sfd) +static inline int fd_init_reg(struct osmo_fd *ofd, int sfd, unsigned int when) { int rc; @@ -178,7 +179,7 @@ return sfd; ofd->fd = sfd; - ofd->when = BSC_FD_READ; + ofd->when = when; rc = osmo_fd_register(ofd); if (rc < 0) { @@ -205,7 +206,10 @@ int osmo_sock_init_ofd(struct osmo_fd *ofd, int family, int type, int proto, const char *host, uint16_t port, unsigned int flags) { - return osmo_fd_init_ofd(ofd, osmo_sock_init(family, type, proto, host, port, flags)); + return fd_init_reg(ofd, osmo_sock_init(family, type, proto, host, port, + flags), + (flags & OSMO_SOCK_F_CONNECT) ? BSC_FD_WRITE : + BSC_FD_READ); } /*! \brief Initialize a socket and fill \ref sockaddr @@ -390,7 +394,8 @@ int osmo_sock_unix_init_ofd(struct osmo_fd *ofd, uint16_t type, uint8_t proto, const char *socket_path, unsigned int flags) { - return osmo_fd_init_ofd(ofd, osmo_sock_unix_init(type, proto, socket_path, flags)); + return fd_init_reg(ofd, osmo_sock_unix_init(type, proto, socket_path, + flags), BSC_FD_READ); } #endif /* HAVE_SYS_SOCKET_H */ -- To view, visit https://gerrit.osmocom.org/1624 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I938de74c28df29221071913b769e7a2df9d041fa Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Jan 18 16:57:13 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 18 Jan 2017 16:57:13 +0000 Subject: [PATCH] openbsc[master]: LC15: Fix dropping of LAPDm UA message. Message-ID: Review at https://gerrit.osmocom.org/1625 LC15: Fix dropping of LAPDm UA message. In some cases, when successive mobile originated calls are made, the LAPDm UA message gets lost because the channel is relased to early. To overcome the problem we do not send relase indications immediately. Instead a flag will be set and the message stored and sent on the next TCH-RTS-IND. This commit adds the required flag and the msg-buffer to struct gsm_lchan. See also coresponding commit message in osmo-bts.git: 2060951cf49d64b7fde1f288db1cff24a7354f2d This patch is based on: https://gitlab.com/nrw_noa/osmo-bts/commit/95d1f15ad108c1c1869c1965144acd64c1395d8c Change-Id: I15fc1ef8e9e83f009bde96de9a8e95702cffbce6 --- M openbsc/include/openbsc/gsm_data_shared.h 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/25/1625/1 diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h index 9407b82..c042e2b 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -350,6 +350,11 @@ uint8_t current; uint8_t fixed; } ms_power_ctrl; + + struct { + unsigned int marker; + struct msgb *msg; + }pending_rel_ind; #endif }; -- To view, visit https://gerrit.osmocom.org/1625 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I15fc1ef8e9e83f009bde96de9a8e95702cffbce6 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Jan 18 16:57:54 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 18 Jan 2017 16:57:54 +0000 Subject: [PATCH] osmo-bts[master]: LC15: Fix dropping of LAPDm UA message. Message-ID: Review at https://gerrit.osmocom.org/1626 LC15: Fix dropping of LAPDm UA message. In some cases, when successive mobile originated calls are made, the LAPDm UA message gets lost because the channel is relased to early. To overcome the problem we do not send relase indications immediately. Instead a flag will be set and the message stored and sent on the next TCH-RTS-IND. This commit adds the functionality to store the release indication msg, to rsl.c. It also addes the mechanism to forward the release indication to l1sap.c See also coresponding commit message in openbsc.git: ee336527baf13a6e2c1040c0993a224c8191683e This patch is based on: https://gitlab.com/nrw_noa/osmo-bts/commit/95d1f15ad108c1c1869c1965144acd64c1395d8c Change-Id: Ie4f70c75f0137b4bd72d579b3a32575bac2fca38 --- M src/common/l1sap.c M src/common/rsl.c 2 files changed, 24 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/26/1626/1 diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 9116e23..ceea95b 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -714,6 +714,7 @@ uint8_t chan_nr, marker = 0; uint16_t seq; uint32_t fn, timestamp; + int rc; chan_nr = rts_ind->chan_nr; fn = rts_ind->fn; @@ -757,6 +758,16 @@ resp_l1sap = msgb_l1sap_prim(resp_msg); } + /* check for pending REL_IND */ + if (lchan->pending_rel_ind.marker) { + LOGP(DRSL, LOGL_INFO, "%s Forward REL_IND to L3\n", gsm_lchan_name(lchan)); + lchan->pending_rel_ind.marker = 0; + /* Forward it to L3 */ + rc = abis_bts_rsl_sendmsg(lchan->pending_rel_ind.msg); + if (rc < 0) + return rc; + } + memset(resp_l1sap, 0, sizeof(*resp_l1sap)); osmo_prim_init(&resp_l1sap->oph, SAP_GSM_PH, PRIM_TCH, PRIM_OP_REQUEST, resp_msg); diff --git a/src/common/rsl.c b/src/common/rsl.c index a34c455..4509567 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -2278,6 +2278,7 @@ } msg->trx = lchan->ts->trx; + msg->lchan = lchan; /* check if this is a measurement report from SACCH which needs special * processing before forwarding */ @@ -2286,6 +2287,18 @@ LOGP(DRSL, LOGL_INFO, "%s Handing RLL msg %s from LAPDm to MEAS REP\n", gsm_lchan_name(lchan), rsl_msg_name(rh->msg_type)); + + /* REL_IND handling */ + if (rh->msg_type == RSL_MT_REL_IND) { + LOGP(DRSL, LOGL_INFO, "%s Scheduling %s to L3 in next associated TCH-RTS.ind\n", + gsm_lchan_name(lchan), + rsl_msg_name(rh->msg_type)); + + lchan->pending_rel_ind.marker = 1; + lchan->pending_rel_ind.msg = msg; + return 0; + } + rc = rsl_tx_meas_res(lchan, msgb_l3(msg), msgb_l3len(msg)); msgb_free(msg); return rc; -- To view, visit https://gerrit.osmocom.org/1626 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie4f70c75f0137b4bd72d579b3a32575bac2fca38 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Jan 18 17:16:20 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 18 Jan 2017 17:16:20 +0000 Subject: cellmgr-ng[master]: build: Remove old left over from before libosmocore.. In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1620 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id3c41595475dac06dcdf3a104570640349c8f8bf Gerrit-PatchSet: 1 Gerrit-Project: cellmgr-ng Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 18 17:17:07 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 18 Jan 2017 17:17:07 +0000 Subject: cellmgr-ng[master]: build: Link -losmocore last to please Ubuntu linker In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Right and yours was earlier. But as you are out of office and I might get todays nightly.. let me commit mine. :} -- To view, visit https://gerrit.osmocom.org/1619 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I94c87496ebffd41a6217d860b0ca4bed6ff2d24c Gerrit-PatchSet: 1 Gerrit-Project: cellmgr-ng Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 18 17:17:15 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 18 Jan 2017 17:17:15 +0000 Subject: [MERGED] cellmgr-ng[master]: build: Link -losmocore last to please Ubuntu linker In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: build: Link -losmocore last to please Ubuntu linker ...................................................................... build: Link -losmocore last to please Ubuntu linker It seems that the Ubuntu linker is quite picky in where it is looking for symbols. Link libosmocore (and as such talloc) last of the Osmocom libraries. This could fix: gcc -Wall -I/usr/include/ -I/usr/include/ -I/usr/include/ -I/usr/include/ -DNO_UNIPORTE -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -o cellmgr_ng main.o mtp_layer3.o thread.o ipaccess.o pcap.o bss_patch.o bssap_sccp.o bsc_sccp.o bsc_ussd.o links.o msc_conn.o link_udp.o snmp_mtp.o debug.o isup.o mtp_link.o counter.o sccp_state.o bsc.o ss7_application.o vty_interface_legacy.o vty_interface_cmds.o mgcp_patch.o mgcp_callagent.o isup_filter.o -ltalloc -losmocore -ltalloc -losmogsm -losmocore -ltalloc -losmovty -losmocore -losmosccp -losmoxua -lpthread -lnetsnmp -lcrypto [ 79s] /usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/libosmosccp.so: undefined reference to `talloc_free' Change-Id: I94c87496ebffd41a6217d860b0ca4bed6ff2d24c --- M src/Makefile.am 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/Makefile.am b/src/Makefile.am index 2052851..3a006f2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -17,8 +17,8 @@ mtp_link.c counter.c sccp_state.c bsc.c ss7_application.c \ vty_interface_legacy.c vty_interface_cmds.c mgcp_patch.c \ mgcp_callagent.c isup_filter.c -cellmgr_ng_LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS) \ - $(LIBOSMOSCCP_LIBS) $(NEXUSWARE_C7_LIBS) \ +cellmgr_ng_LDADD = $(LIBOSMOSCCP_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS) \ + $(LIBOSMOCORE_LIBS) $(NEXUSWARE_C7_LIBS) \ -lpthread -lnetsnmp -lcrypto osmo_stp_SOURCES = main_stp.c mtp_layer3.c thread.c pcap.c link_udp.c snmp_mtp.c \ @@ -28,6 +28,6 @@ vty_interface.c vty_interface_cmds.c mgcp_patch.c \ mgcp_callagent.c isup_filter.c sctp_m3ua_client.c \ sctp_m3ua_misc.c -osmo_stp_LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS) \ - $(LIBOSMOSCCP_LIBS) $(NEXUSWARE_C7_LIBS) \ +osmo_stp_LDADD = $(LIBOSMOSCCP_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS) \ + $(LIBOSMOCORE_LIBS) $(NEXUSWARE_C7_LIBS) \ -lpthread -lnetsnmp -lcrypto -lxua -lsctp -- To view, visit https://gerrit.osmocom.org/1619 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I94c87496ebffd41a6217d860b0ca4bed6ff2d24c Gerrit-PatchSet: 1 Gerrit-Project: cellmgr-ng Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Wed Jan 18 17:17:15 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 18 Jan 2017 17:17:15 +0000 Subject: [MERGED] cellmgr-ng[master]: build: Remove old left over from before libosmocore.. In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: build: Remove old left over from before libosmocore.. ...................................................................... build: Remove old left over from before libosmocore.. Change-Id: Id3c41595475dac06dcdf3a104570640349c8f8bf --- M src/Makefile.am 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Max: Looks good to me, but someone else must approve Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/Makefile.am b/src/Makefile.am index 3a006f2..b3db2c6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -8,7 +8,7 @@ mgcp_mgw_SOURCES = mgcp_ss7.c mgcp_ss7_vty.c mgcp_hw.c thread.c debug.c \ mgcp/mgcp_protocol.c mgcp/mgcp_network.c mgcp/mgcp_vty.c \ dtmf_scheduler.c -mgcp_mgw_LDADD = $(LAFORGE_LIBS) $(NEXUSWARE_C7_LIBS) $(NEXUSWARE_UNIPORTE_LIBS) \ +mgcp_mgw_LDADD = $(NEXUSWARE_C7_LIBS) $(NEXUSWARE_UNIPORTE_LIBS) \ $(LIBOSMOVTY_LIBS) $(LIBOSMOCORE_LIBS) -lpthread -lcrypto -lrt cellmgr_ng_SOURCES = main.c mtp_layer3.c thread.c input/ipaccess.c pcap.c \ -- To view, visit https://gerrit.osmocom.org/1620 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id3c41595475dac06dcdf3a104570640349c8f8bf Gerrit-PatchSet: 1 Gerrit-Project: cellmgr-ng Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Wed Jan 18 17:19:06 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 18 Jan 2017 17:19:06 +0000 Subject: openbsc[master]: LC15: Fix dropping of LAPDm UA message. In-Reply-To: References: Message-ID: Patch Set 1: (3 comments) https://gerrit.osmocom.org/#/c/1625/1//COMMIT_MSG Commit Message: Line 10: message gets lost because the channel is relased to early. To overcome the too :) Line 19: https://gitlab.com/nrw_noa/osmo-bts/commit/95d1f15ad108c1c1869c1965144acd64c1395d8c What is your change/difference? https://gerrit.osmocom.org/#/c/1625/1/openbsc/include/openbsc/gsm_data_shared.h File openbsc/include/openbsc/gsm_data_shared.h: Line 357: }pending_rel_ind; }pending -- To view, visit https://gerrit.osmocom.org/1625 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I15fc1ef8e9e83f009bde96de9a8e95702cffbce6 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Jan 18 17:20:50 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 18 Jan 2017 17:20:50 +0000 Subject: osmo-bts[master]: LC15: Fix dropping of LAPDm UA message. In-Reply-To: References: Message-ID: Patch Set 1: (2 comments) When is the stored message deleted? When is the pointer set back to NULL? https://gerrit.osmocom.org/#/c/1626/1//COMMIT_MSG Commit Message: Line 10: message gets lost because the channel is relased to early. To overcome the too Line 20: https://gitlab.com/nrw_noa/osmo-bts/commit/95d1f15ad108c1c1869c1965144acd64c1395d8c What is the difference, why is it "better"? -- To view, visit https://gerrit.osmocom.org/1626 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie4f70c75f0137b4bd72d579b3a32575bac2fca38 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Jan 18 17:28:36 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 18 Jan 2017 17:28:36 +0000 Subject: libosmocore[master]: Register connecting socket for WRITE events In-Reply-To: References: Message-ID: Patch Set 1: Why? How does client/server relate to who is sending the first message? -- To view, visit https://gerrit.osmocom.org/1624 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I938de74c28df29221071913b769e7a2df9d041fa Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 18 17:29:18 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 18 Jan 2017 17:29:18 +0000 Subject: libosmocore[master]: Add abis_nm_fail_evt_vrep to libosmogsm.map In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1618 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If56b521429af497ddd5a47170eb2c085b1fb78ba Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 18 17:29:43 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 18 Jan 2017 17:29:43 +0000 Subject: osmo-gsm-manuals[master]: configuration: fixing typos In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1622 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id84238b89e5deeac99c043b79b26c7e7b8b8534b Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 18 17:39:57 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 18 Jan 2017 17:39:57 +0000 Subject: openbsc[master]: Add VTY command to immediately expire user (set expire_lu to... In-Reply-To: References: Message-ID: Patch Set 1: just to mention that the current effort to have a libvlr with a separate osmo-hlr will change all of this code substantially. In any case, the new VLR will also have state for active subscribers, and if we merge this patch based on the current code, I will certainly adapt it to the new libvlr ways (which would probably mean to clear the vlr_subscriber from the in-memory list). In the new libvlr way, there is no notion in osmo-hlr whether a subscriber is currently active, this information is volatile and in the VLR only (i.e. in RAM only). The HLR merely knows which VLR last saw the subscriber. More detailed review will follow. -- To view, visit https://gerrit.osmocom.org/1623 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I676c84350a7afc963bc6bb4c46c60e5ac3eee67e Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: keith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 19 09:07:34 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 19 Jan 2017 09:07:34 +0000 Subject: [MERGED] libosmocore[master]: Add abis_nm_fail_evt_vrep to libosmogsm.map In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Add abis_nm_fail_evt_vrep to libosmogsm.map ...................................................................... Add abis_nm_fail_evt_vrep to libosmogsm.map Change-Id: If56b521429af497ddd5a47170eb2c085b1fb78ba --- M src/gsm/libosmogsm.map 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 7398c16..e153d72 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -5,6 +5,7 @@ abis_nm_att_settable; abis_nm_avail_name; abis_nm_fail_evt_rep; +abis_nm_fail_evt_vrep; abis_nm_chcomb4pchan; abis_nm_debugp_foh; abis_nm_event_type_name; -- To view, visit https://gerrit.osmocom.org/1618 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If56b521429af497ddd5a47170eb2c085b1fb78ba Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Thu Jan 19 09:08:08 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 19 Jan 2017 09:08:08 +0000 Subject: [ABANDON] openbsc[master]: deb: unbreak nightly builds In-Reply-To: References: Message-ID: Max has abandoned this change. Change subject: deb: unbreak nightly builds ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/1621 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I25f8c639d2dc525ca280a7cd09de3ca6358d2568 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Ruben Undheim From gerrit-no-reply at lists.osmocom.org Thu Jan 19 09:09:15 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 19 Jan 2017 09:09:15 +0000 Subject: [ABANDON] cellmgr-ng[master]: Build fix attempt In-Reply-To: References: Message-ID: Max has abandoned this change. Change subject: Build fix attempt ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/1616 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I8b989c5012818a302ec819501da1a1c67ac3bab5 Gerrit-PatchSet: 1 Gerrit-Project: cellmgr-ng Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Jan 19 09:09:24 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 19 Jan 2017 09:09:24 +0000 Subject: openbsc[master]: deb: unbreak nightly builds In-Reply-To: References: Message-ID: Max has restored this change. Change subject: deb: unbreak nightly builds ...................................................................... Restored -- To view, visit https://gerrit.osmocom.org/1621 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: restore Gerrit-Change-Id: I25f8c639d2dc525ca280a7cd09de3ca6358d2568 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Ruben Undheim From gerrit-no-reply at lists.osmocom.org Thu Jan 19 09:26:34 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 19 Jan 2017 09:26:34 +0000 Subject: [PATCH] libosmocore[master]: utils/conv_gen.py: add test vector generation feature In-Reply-To: References: Message-ID: Hello Max, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1585 to look at the new patch set (#6). utils/conv_gen.py: add test vector generation feature Change-Id: Ie10c47ee952f253b1ba77ecf6e79f2c033545bc1 --- M utils/conv_gen.py 1 file changed, 79 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/85/1585/6 diff --git a/utils/conv_gen.py b/utils/conv_gen.py index de1e00e..76da3c6 100644 --- a/utils/conv_gen.py +++ b/utils/conv_gen.py @@ -30,13 +30,16 @@ class ConvolutionalCode(object): def __init__(self, block_len, polys, name, - description = None, puncture = [], term_type = None): + description = None, puncture = [], term_type = None, + vec_in = None, vec_out = None): # Save simple params self.block_len = block_len self.k = 1 self.puncture = puncture self.rate_inv = len(polys) self.term_type = term_type + self.vec_in = vec_in + self.vec_out = vec_out # Infos self.name = name @@ -226,6 +229,44 @@ fi.write("\t.puncture = %s_puncture,\n" % self.name) fi.write("};\n\n") + def calc_out_len(self): + out_len = self.block_len * self.rate_inv + + # By default CONV_TERM_FLUSH + if self.term_type is None: + out_len += self.rate_inv * (self.k - 1) + + if len(self.puncture): + out_len -= len(self.puncture) - 1 + + return out_len + + def gen_test_vector(self, fi, prefix): + code_name = "%s_%s" % (prefix, self.name) + + fi.write("\t{\n") + fi.write("\t\t.name = \"%s\",\n" % code_name) + fi.write("\t\t.code = &%s,\n" % code_name) + + fi.write("\t\t.in_len = %d,\n" % self.block_len) + fi.write("\t\t.out_len = %d,\n" % self.calc_out_len()) + + # Print pre computed vectors if preset + if self.vec_in is not None and self.vec_out is not None: + fi.write("\t\t.has_vec = 1,\n") + fi.write("\t\t.vec_in = {\n") + print_formatted(self.vec_in, "0x%02x, ", 8, fi, indent = "\t\t\t") + fi.write("\t\t},\n") + fi.write("\t\t.vec_out = {\n") + print_formatted(self.vec_out, "0x%02x, ", 8, fi, indent = "\t\t\t") + fi.write("\t\t},\n") + else: + fi.write("\t\t.has_vec = 0,\n") + fi.write("\t\t.vec_in = { },\n") + fi.write("\t\t.vec_out = { },\n") + + fi.write("\t},\n") + poly = lambda *args: sum([(1 << x) for x in args]) def combine(src, sel, nb): @@ -281,6 +322,34 @@ code.gen_tables(prefix, f, shared_tables = shared) +def generate_vectors(codes, path, prefix, name, inc = None): + # Open a new file for writing + f = open(os.path.join(path, name), 'w') + f.write(mod_license + "\n") + + # Print includes + if inc is not None: + for item in inc: + f.write("%s\n" % item) + f.write("#include \n") + f.write("#include \"conv.h\"\n\n") + + sys.stderr.write("Generating test vectors...\n") + + vec_count = len(codes.conv_codes) + f.write("const int %s_vectors_len = %d;\n\n" + % (prefix, vec_count)) + + f.write("const struct conv_test_vector %s_vectors[%d] = {\n" + % (prefix, vec_count)) + + # Generate the vectors one by one + for code in codes.conv_codes: + sys.stderr.write("Generate '%s' test vector\n" % code.name) + code.gen_test_vector(f, prefix) + + f.write("};\n") + def print_help(error = None): print("Usage: python %s [options]" % sys.argv[0]) @@ -295,7 +364,8 @@ print(" -P, --target-path target path for generated file(s)") print("\nAvailable actions:") - print(" gen_codes - generate convolutional code definitions") + print(" gen_codes - generate convolutional code definitions") + print(" gen_vectors - generate test vectors") print("\nAvailable code families:") print(" gsm - GSM/GPRS/EDGE specific codes") @@ -352,11 +422,15 @@ prefix = argv[2] name = argv[3] path = argv[4] + inc = None # Determine convolutional code family if family == "gsm": codes = conv_codes_gsm prefix = "gsm0503" if prefix is None else prefix + inc = [ + "#include ", + ] else: print_help("Error: Unknown code family!") sys.exit(1) @@ -365,6 +439,9 @@ if action == "gen_codes": name = prefix + "_conv.c" if name is None else name generate_codes(codes, path, prefix, name) + elif action == "gen_vectors": + name = prefix + "_test_vectors.c" if name is None else name + generate_vectors(codes, path, prefix, name, inc) else: print_help("Error: Unknown action!") sys.exit(1) -- To view, visit https://gerrit.osmocom.org/1585 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie10c47ee952f253b1ba77ecf6e79f2c033545bc1 Gerrit-PatchSet: 6 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt From gerrit-no-reply at lists.osmocom.org Thu Jan 19 09:26:35 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 19 Jan 2017 09:26:35 +0000 Subject: [PATCH] libosmocore[master]: tests/conv: separate test logic Message-ID: Review at https://gerrit.osmocom.org/1627 tests/conv: separate test logic To be able to add some more tests, related to convolutional coding, without duplication of code, the test logic was separated from the conv_test.c into conv.c and conv.h. Change-Id: Idbdc7e19cb9b9a36cd1fccd621cd858e87530d98 --- M tests/Makefile.am A tests/conv/conv.c A tests/conv/conv.h M tests/conv/conv_test.c 4 files changed, 169 insertions(+), 153 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/27/1627/1 diff --git a/tests/Makefile.am b/tests/Makefile.am index b9eb8f2..889eb8d 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -54,7 +54,7 @@ bits_bitcomp_test_SOURCES = bits/bitcomp_test.c bits_bitcomp_test_LDADD = $(top_builddir)/src/libosmocore.la -conv_conv_test_SOURCES = conv/conv_test.c +conv_conv_test_SOURCES = conv/conv_test.c conv/conv.c conv_conv_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gsm/libgsmint.la gsm0808_gsm0808_test_SOURCES = gsm0808/gsm0808_test.c @@ -179,6 +179,7 @@ write_queue/wqueue_test.ok DISTCLEANFILES = atconfig atlocal +noinst_HEADERS = conv/conv.h TESTSUITE = $(srcdir)/testsuite diff --git a/tests/conv/conv.c b/tests/conv/conv.c new file mode 100644 index 0000000..7dac155 --- /dev/null +++ b/tests/conv/conv.c @@ -0,0 +1,143 @@ +#include +#include +#include +#include + +#include +#include +#include + +#include "conv.h" + +static void fill_random(ubit_t *b, int n) +{ + int i; + + for (i = 0; i < n; i++) + b[i] = random() & 1; +} + +int do_check(const struct conv_test_vector *test) +{ + ubit_t *bu0, *bu1; + sbit_t *bs; + int len, j; + + bu0 = malloc(sizeof(ubit_t) * MAX_LEN_BITS); + bu1 = malloc(sizeof(ubit_t) * MAX_LEN_BITS); + bs = malloc(sizeof(sbit_t) * MAX_LEN_BITS); + + srandom(time(NULL)); + + /* Test name */ + printf("[+] Testing: %s\n", test->name); + + /* Check length */ + len = osmo_conv_get_input_length(test->code, 0); + printf("[.] Input length : ret = %3d exp = %3d -> %s\n", + len, test->in_len, len == test->in_len ? "OK" : "Bad !"); + + if (len != test->in_len) { + fprintf(stderr, "[!] Failure for input length computation\n"); + return -1; + } + + len = osmo_conv_get_output_length(test->code, 0); + printf("[.] Output length : ret = %3d exp = %3d -> %s\n", + len, test->out_len, len == test->out_len ? "OK" : "Bad !"); + + if (len != test->out_len) { + fprintf(stderr, "[!] Failure for output length computation\n"); + return -1; + } + + /* Check pre-computed vector */ + if (test->has_vec) { + printf("[.] Pre computed vector checks:\n"); + + printf("[..] Encoding: "); + + osmo_pbit2ubit(bu0, test->vec_in, test->in_len); + + len = osmo_conv_encode(test->code, bu0, bu1); + if (len != test->out_len) { + printf("ERROR !\n"); + fprintf(stderr, "[!] Failed encoding length check\n"); + return -1; + } + + osmo_pbit2ubit(bu0, test->vec_out, test->out_len); + + if (memcmp(bu0, bu1, test->out_len)) { + printf("ERROR !\n"); + fprintf(stderr, "[!] Failed encoding: Results don't match\n"); + return -1; + }; + + printf("OK\n"); + + + printf("[..] Decoding: "); + + osmo_ubit2sbit(bs, bu0, len); + + len = osmo_conv_decode(test->code, bs, bu1); + if (len != 0) { + printf("ERROR !\n"); + fprintf(stderr, "[!] Failed decoding: non-zero path (%d)\n", len); + return -1; + } + + osmo_pbit2ubit(bu0, test->vec_in, test->in_len); + + if (memcmp(bu0, bu1, test->in_len)) { + printf("ERROR !\n"); + fprintf(stderr, "[!] Failed decoding: Results don't match\n"); + return -1; + } + + printf("OK\n"); + } + + /* Check random vector */ + printf("[.] Random vector checks:\n"); + + for (j = 0; j < 3; j++) { + printf("[..] Encoding / Decoding cycle : "); + + fill_random(bu0, test->in_len); + + len = osmo_conv_encode(test->code, bu0, bu1); + if (len != test->out_len) { + printf("ERROR !\n"); + fprintf(stderr, "[!] Failed encoding length check\n"); + return -1; + } + + osmo_ubit2sbit(bs, bu1, len); + + len = osmo_conv_decode(test->code, bs, bu1); + if (len != 0) { + printf("ERROR !\n"); + fprintf(stderr, "[!] Failed decoding: non-zero path (%d)\n", len); + return -1; + } + + if (memcmp(bu0, bu1, test->in_len)) { + printf("ERROR !\n"); + fprintf(stderr, "[!] Failed decoding: Results don't match\n"); + return -1; + } + + printf("OK\n"); + } + + /* Spacing */ + printf("\n"); + + free(bs); + free(bu1); + free(bu0); + + return 0; +} diff --git a/tests/conv/conv.h b/tests/conv/conv.h new file mode 100644 index 0000000..676c5af --- /dev/null +++ b/tests/conv/conv.h @@ -0,0 +1,16 @@ +#pragma once + +#define MAX_LEN_BITS 512 +#define MAX_LEN_BYTES (512/8) + +struct conv_test_vector { + const char *name; + const struct osmo_conv_code *code; + int in_len; + int out_len; + int has_vec; + pbit_t vec_in[MAX_LEN_BYTES]; + pbit_t vec_out[MAX_LEN_BYTES]; +}; + +int do_check(const struct conv_test_vector *test); diff --git a/tests/conv/conv_test.c b/tests/conv/conv_test.c index 3064f9c..131b459 100644 --- a/tests/conv/conv_test.c +++ b/tests/conv/conv_test.c @@ -1,16 +1,10 @@ #include #include -#include -#include -#include #include -#include #include -#define MAX_LEN_BITS 512 -#define MAX_LEN_BYTES (512/8) - +#include "conv.h" /* ------------------------------------------------------------------------ */ /* Test codes */ @@ -172,38 +166,15 @@ }; /* ------------------------------------------------------------------------ */ -/* Test vectors */ -/* ------------------------------------------------------------------------ */ - -struct conv_test_vector { - const char *name; - const struct osmo_conv_code *code; - int in_len; - int out_len; - int has_vec; - pbit_t vec_in[MAX_LEN_BYTES]; - pbit_t vec_out[MAX_LEN_BYTES]; -}; - -/* ------------------------------------------------------------------------ */ /* Main */ /* ------------------------------------------------------------------------ */ -static void -fill_random(ubit_t *b, int n) -{ - int i; - for (i=0; i Non recursive code, direct truncation, non-punctured */ + /* Random code -> Non recursive code, direct truncation, non-punctured */ const struct osmo_conv_code conv_trunc = { .N = 2, .K = 5, @@ -300,126 +271,11 @@ { /* end */ }, }; - srandom(time(NULL)); - - bu0 = malloc(sizeof(ubit_t) * MAX_LEN_BITS); - bu1 = malloc(sizeof(ubit_t) * MAX_LEN_BITS); - bs = malloc(sizeof(sbit_t) * MAX_LEN_BITS); - - for (tst=tests; tst->name; tst++) - { - int i,l; - - /* Test name */ - printf("[+] Testing: %s\n", tst->name); - - /* Check length */ - l = osmo_conv_get_input_length(tst->code, 0); - printf("[.] Input length : ret = %3d exp = %3d -> %s\n", - l, tst->in_len, l == tst->in_len ? "OK" : "Bad !"); - - if (l != tst->in_len) { - fprintf(stderr, "[!] Failure for input length computation\n"); - return -1; - } - - l = osmo_conv_get_output_length(tst->code, 0); - printf("[.] Output length : ret = %3d exp = %3d -> %s\n", - l, tst->out_len, l == tst->out_len ? "OK" : "Bad !"); - - if (l != tst->out_len) { - fprintf(stderr, "[!] Failure for output length computation\n"); - return -1; - } - - /* Check pre-computed vector */ - if (tst->has_vec) { - printf("[.] Pre computed vector checks:\n"); - - printf("[..] Encoding: "); - - osmo_pbit2ubit(bu0, tst->vec_in, tst->in_len); - - l = osmo_conv_encode(tst->code, bu0, bu1); - if (l != tst->out_len) { - printf("ERROR !\n"); - fprintf(stderr, "[!] Failed encoding length check\n"); - return -1; - } - - osmo_pbit2ubit(bu0, tst->vec_out, tst->out_len); - - if (memcmp(bu0, bu1, tst->out_len)) { - printf("ERROR !\n"); - fprintf(stderr, "[!] Failed encoding: Results don't match\n"); - return -1; - }; - - printf("OK\n"); - - - printf("[..] Decoding: "); - - osmo_ubit2sbit(bs, bu0, l); - - l = osmo_conv_decode(tst->code, bs, bu1); - if (l != 0) { - printf("ERROR !\n"); - fprintf(stderr, "[!] Failed decoding: non-zero path (%d)\n", l); - return -1; - } - - osmo_pbit2ubit(bu0, tst->vec_in, tst->in_len); - - if (memcmp(bu0, bu1, tst->in_len)) { - printf("ERROR !\n"); - fprintf(stderr, "[!] Failed decoding: Results don't match\n"); - return -1; - } - - printf("OK\n"); - } - - /* Check random vector */ - printf("[.] Random vector checks:\n"); - - for (i=0; i<3; i++) { - printf("[..] Encoding / Decoding cycle : "); - - fill_random(bu0, tst->in_len); - - l = osmo_conv_encode(tst->code, bu0, bu1); - if (l != tst->out_len) { - printf("ERROR !\n"); - fprintf(stderr, "[!] Failed encoding length check\n"); - return -1; - } - - osmo_ubit2sbit(bs, bu1, l); - - l = osmo_conv_decode(tst->code, bs, bu1); - if (l != 0) { - printf("ERROR !\n"); - fprintf(stderr, "[!] Failed decoding: non-zero path (%d)\n", l); - return -1; - } - - if (memcmp(bu0, bu1, tst->in_len)) { - printf("ERROR !\n"); - fprintf(stderr, "[!] Failed decoding: Results don't match\n"); - return -1; - } - - printf("OK\n"); - } - - /* Spacing */ - printf("\n"); + for (test = tests; test->name; test++) { + rc = do_check(test); + if (rc) + return rc; } - - free(bs); - free(bu1); - free(bu0); return 0; } -- To view, visit https://gerrit.osmocom.org/1627 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idbdc7e19cb9b9a36cd1fccd621cd858e87530d98 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Thu Jan 19 10:15:19 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 19 Jan 2017 10:15:19 +0000 Subject: [PATCH] libosmocore[master]: tests/conv: add GSM 05.03 specific test Message-ID: Review at https://gerrit.osmocom.org/1628 tests/conv: add GSM 05.03 specific test This change extends the convolutional code test coverage, adding the GSM 05.03 specific test vectors, generated by the conv_gen.py. Inspired by Tom's patch: http://lists.osmocom.org/pipermail/openbsc/2014-April/007364.html Change-Id: I76d1cd4032d2f74c5bb93bde4fab99aa655b7f1a --- M .gitignore M tests/Makefile.am A tests/conv/conv_gsm0503_test.c A tests/conv/conv_gsm0503_test.ok M tests/testsuite.at 5 files changed, 229 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/28/1628/1 diff --git a/.gitignore b/.gitignore index c1bde0f..d5caa61 100644 --- a/.gitignore +++ b/.gitignore @@ -117,6 +117,7 @@ include/osmocom/core/crc*gen.h include/osmocom/core/bit*gen.h include/osmocom/gsm/gsm0503.h +tests/conv/gsm0503_test_vectors.c # vi files *.sw? diff --git a/tests/Makefile.am b/tests/Makefile.am index 889eb8d..f8761de 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -14,7 +14,7 @@ smscb/gsm0341_test stats/stats_test \ bitvec/bitvec_test msgb/msgb_test bits/bitcomp_test \ tlv/tlv_test gsup/gsup_test oap/oap_test fsm/fsm_test \ - write_queue/wqueue_test + write_queue/wqueue_test conv/conv_gsm0503_test if ENABLE_MSGFILE check_PROGRAMS += msgfile/msgfile_test @@ -56,6 +56,9 @@ conv_conv_test_SOURCES = conv/conv_test.c conv/conv.c conv_conv_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gsm/libgsmint.la + +conv_conv_gsm0503_test_SOURCES = conv/conv_gsm0503_test.c conv/conv.c conv/gsm0503_test_vectors.c +conv_conv_gsm0503_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gsm/libgsmint.la gsm0808_gsm0808_test_SOURCES = gsm0808/gsm0808_test.c gsm0808_gsm0808_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gsm/libosmogsm.la @@ -176,9 +179,9 @@ bitvec/bitvec_test.ok msgb/msgb_test.ok bits/bitcomp_test.ok \ sim/sim_test.ok tlv/tlv_test.ok gsup/gsup_test.ok \ oap/oap_test.ok fsm/fsm_test.ok fsm/fsm_test.err \ - write_queue/wqueue_test.ok + write_queue/wqueue_test.ok conv/conv_gsm0503_test.ok -DISTCLEANFILES = atconfig atlocal +DISTCLEANFILES = atconfig atlocal conv/gsm0503_test_vectors.c noinst_HEADERS = conv/conv.h TESTSUITE = $(srcdir)/testsuite @@ -199,3 +202,8 @@ $(TESTSUITE): $(srcdir)/testsuite.at $(srcdir)/package.m4 $(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at mv $@.tmp $@ + +conv/gsm0503_test_vectors.c: + $(AM_V_GEN)python2 $(top_srcdir)/utils/conv_gen.py \ + --action gen_vectors --code-family gsm \ + --target-path $(top_srcdir)/tests/conv/ diff --git a/tests/conv/conv_gsm0503_test.c b/tests/conv/conv_gsm0503_test.c new file mode 100644 index 0000000..6704129 --- /dev/null +++ b/tests/conv/conv_gsm0503_test.c @@ -0,0 +1,28 @@ +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "conv.h" + +/* Forward declaration of GSM 05.03 specific test vectors */ +extern const struct conv_test_vector gsm0503_vectors[]; +extern const int gsm0503_vectors_len; + +int main(int argc, char *argv[]) +{ + int rc, i; + + for (i = 0; i < gsm0503_vectors_len; i++) { + rc = do_check(&gsm0503_vectors[i]); + if (rc) + return rc; + } + + return 0; +} diff --git a/tests/conv/conv_gsm0503_test.ok b/tests/conv/conv_gsm0503_test.ok new file mode 100644 index 0000000..05761f2 --- /dev/null +++ b/tests/conv/conv_gsm0503_test.ok @@ -0,0 +1,183 @@ +[+] Testing: gsm0503_xcch +[.] Input length : ret = 224 exp = 224 -> OK +[.] Output length : ret = 456 exp = 456 -> OK +[.] Random vector checks: +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK + +[+] Testing: gsm0503_rach +[.] Input length : ret = 14 exp = 14 -> OK +[.] Output length : ret = 36 exp = 36 -> OK +[.] Random vector checks: +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK + +[+] Testing: gsm0503_sch +[.] Input length : ret = 35 exp = 35 -> OK +[.] Output length : ret = 78 exp = 78 -> OK +[.] Random vector checks: +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK + +[+] Testing: gsm0503_cs2 +[.] Input length : ret = 290 exp = 290 -> OK +[.] Output length : ret = 456 exp = 456 -> OK +[.] Random vector checks: +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK + +[+] Testing: gsm0503_cs3 +[.] Input length : ret = 334 exp = 334 -> OK +[.] Output length : ret = 456 exp = 456 -> OK +[.] Random vector checks: +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK + +[+] Testing: gsm0503_tch_afs_12_2 +[.] Input length : ret = 250 exp = 250 -> OK +[.] Output length : ret = 448 exp = 448 -> OK +[.] Random vector checks: +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK + +[+] Testing: gsm0503_tch_afs_10_2 +[.] Input length : ret = 210 exp = 210 -> OK +[.] Output length : ret = 448 exp = 448 -> OK +[.] Random vector checks: +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK + +[+] Testing: gsm0503_tch_afs_7_95 +[.] Input length : ret = 165 exp = 165 -> OK +[.] Output length : ret = 448 exp = 448 -> OK +[.] Random vector checks: +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK + +[+] Testing: gsm0503_tch_afs_7_4 +[.] Input length : ret = 154 exp = 154 -> OK +[.] Output length : ret = 448 exp = 448 -> OK +[.] Random vector checks: +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK + +[+] Testing: gsm0503_tch_afs_6_7 +[.] Input length : ret = 140 exp = 140 -> OK +[.] Output length : ret = 448 exp = 448 -> OK +[.] Random vector checks: +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK + +[+] Testing: gsm0503_tch_afs_5_9 +[.] Input length : ret = 124 exp = 124 -> OK +[.] Output length : ret = 448 exp = 448 -> OK +[.] Random vector checks: +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK + +[+] Testing: gsm0503_tch_afs_5_15 +[.] Input length : ret = 109 exp = 109 -> OK +[.] Output length : ret = 448 exp = 448 -> OK +[.] Random vector checks: +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK + +[+] Testing: gsm0503_tch_afs_4_75 +[.] Input length : ret = 101 exp = 101 -> OK +[.] Output length : ret = 448 exp = 448 -> OK +[.] Random vector checks: +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK + +[+] Testing: gsm0503_tch_fr +[.] Input length : ret = 185 exp = 185 -> OK +[.] Output length : ret = 378 exp = 378 -> OK +[.] Random vector checks: +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK + +[+] Testing: gsm0503_tch_hr +[.] Input length : ret = 98 exp = 98 -> OK +[.] Output length : ret = 211 exp = 211 -> OK +[.] Random vector checks: +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK + +[+] Testing: gsm0503_tch_ahs_7_95 +[.] Input length : ret = 129 exp = 129 -> OK +[.] Output length : ret = 188 exp = 188 -> OK +[.] Random vector checks: +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK + +[+] Testing: gsm0503_tch_ahs_7_4 +[.] Input length : ret = 126 exp = 126 -> OK +[.] Output length : ret = 196 exp = 196 -> OK +[.] Random vector checks: +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK + +[+] Testing: gsm0503_tch_ahs_6_7 +[.] Input length : ret = 116 exp = 116 -> OK +[.] Output length : ret = 200 exp = 200 -> OK +[.] Random vector checks: +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK + +[+] Testing: gsm0503_tch_ahs_5_9 +[.] Input length : ret = 108 exp = 108 -> OK +[.] Output length : ret = 208 exp = 208 -> OK +[.] Random vector checks: +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK + +[+] Testing: gsm0503_tch_ahs_5_15 +[.] Input length : ret = 97 exp = 97 -> OK +[.] Output length : ret = 212 exp = 212 -> OK +[.] Random vector checks: +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK + +[+] Testing: gsm0503_tch_ahs_4_75 +[.] Input length : ret = 89 exp = 89 -> OK +[.] Output length : ret = 212 exp = 212 -> OK +[.] Random vector checks: +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK + +[+] Testing: gsm0503_mcs1_dl_hdr +[.] Input length : ret = 36 exp = 36 -> OK +[.] Output length : ret = 108 exp = 108 -> OK +[.] Random vector checks: +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK + +[+] Testing: gsm0503_mcs1_ul_hdr +[.] Input length : ret = 39 exp = 39 -> OK +[.] Output length : ret = 117 exp = 117 -> OK +[.] Random vector checks: +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK +[..] Encoding / Decoding cycle : OK diff --git a/tests/testsuite.at b/tests/testsuite.at index 426c74c..be6f9bc 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -39,6 +39,12 @@ AT_CHECK([$abs_top_builddir/tests/conv/conv_test], [0], [expout]) AT_CLEANUP +AT_SETUP([conv_gsm0503]) +AT_KEYWORDS([conv_gsm0503]) +cat $abs_srcdir/conv/conv_gsm0503_test.ok > expout +AT_CHECK([$abs_top_builddir/tests/conv/conv_gsm0503_test], [0], [expout]) +AT_CLEANUP + AT_SETUP([msgb]) AT_KEYWORDS([msgb]) cat $abs_srcdir/msgb/msgb_test.ok > expout -- To view, visit https://gerrit.osmocom.org/1628 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I76d1cd4032d2f74c5bb93bde4fab99aa655b7f1a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Thu Jan 19 10:25:43 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 19 Jan 2017 10:25:43 +0000 Subject: libosmocore[master]: tests/conv: add GSM 05.03 specific test In-Reply-To: References: Message-ID: Patch Set 1: Verified-1 It seems interesting to me, why this test does fail. Everything is ok, excluding MCS convolutional codes. I did a simple debug and found, that it crashes at the tests/conv/conv.c:119 when the osmo_conv_decode() is called... free(): invalid next size (normal): 0x0000000000c36860 *** -- To view, visit https://gerrit.osmocom.org/1628 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I76d1cd4032d2f74c5bb93bde4fab99aa655b7f1a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No From openbsc-bounces at lists.osmocom.org Thu Jan 19 10:39:57 2017 From: openbsc-bounces at lists.osmocom.org (openbsc-bounces at lists.osmocom.org) Date: Thu, 19 Jan 2017 10:39:57 +0000 Subject: Forward of moderated message Message-ID: An embedded message was scrubbed... From: OBS Notification Subject: Build failure of network:osmocom:nightly/osmo-bts in xUbuntu_16.10/x86_64 Date: Wed, 18 Jan 2017 19:29:52 +0000 Size: 3879 URL: From openbsc-bounces at lists.osmocom.org Thu Jan 19 10:39:57 2017 From: openbsc-bounces at lists.osmocom.org (openbsc-bounces at lists.osmocom.org) Date: Thu, 19 Jan 2017 10:39:57 +0000 Subject: Forward of moderated message Message-ID: An embedded message was scrubbed... From: OBS Notification Subject: Build failure of network:osmocom:nightly/openbsc in xUbuntu_16.04/i586 Date: Wed, 18 Jan 2017 20:26:01 +0000 Size: 3705 URL: From openbsc-bounces at lists.osmocom.org Thu Jan 19 10:39:57 2017 From: openbsc-bounces at lists.osmocom.org (openbsc-bounces at lists.osmocom.org) Date: Thu, 19 Jan 2017 10:39:57 +0000 Subject: Forward of moderated message Message-ID: An embedded message was scrubbed... From: OBS Notification Subject: Build failure of network:osmocom:nightly/osmo-bts in xUbuntu_16.10/x86_64 Date: Wed, 18 Jan 2017 20:28:02 +0000 Size: 3824 URL: From openbsc-bounces at lists.osmocom.org Thu Jan 19 10:39:57 2017 From: openbsc-bounces at lists.osmocom.org (openbsc-bounces at lists.osmocom.org) Date: Thu, 19 Jan 2017 10:39:57 +0000 Subject: Forward of moderated message Message-ID: An embedded message was scrubbed... From: OBS Notification Subject: Build failure of network:osmocom:nightly/osmo-bts in xUbuntu_16.10/i586 Date: Wed, 18 Jan 2017 20:28:55 +0000 Size: 3823 URL: From gerrit-no-reply at lists.osmocom.org Thu Jan 19 12:11:16 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 19 Jan 2017 12:11:16 +0000 Subject: [PATCH] libosmocore[master]: Add osmo_sock_init_ifd() In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1624 to look at the new patch set (#2). Add osmo_sock_init_ifd() It's similar to osmo_sock_init_ofd() as it also creates and register sockets but instead of registering for READ events it uses WRITE events. Change-Id: I938de74c28df29221071913b769e7a2df9d041fa --- M include/osmocom/core/socket.h M src/socket.c 2 files changed, 32 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/24/1624/2 diff --git a/include/osmocom/core/socket.h b/include/osmocom/core/socket.h index 6ef0912..0aaf5ce 100644 --- a/include/osmocom/core/socket.h +++ b/include/osmocom/core/socket.h @@ -26,7 +26,8 @@ int osmo_sock_init_ofd(struct osmo_fd *ofd, int family, int type, int proto, const char *host, uint16_t port, unsigned int flags); - +int osmo_sock_init_ifd(struct osmo_fd *ifd, int family, int type, int proto, + const char *host, uint16_t port, unsigned int flags); int osmo_sock_init_sa(struct sockaddr *ss, uint16_t type, uint8_t proto, unsigned int flags); diff --git a/src/socket.c b/src/socket.c index cdafadd..5587c11 100644 --- a/src/socket.c +++ b/src/socket.c @@ -166,11 +166,12 @@ /*! \brief fill \ref osmo_fd for a give sfd * \param[out] ofd file descriptor (will be filled in) * \param[in] sfd socket file descriptor + * \param[in] when event type (read, write...) * \returns socket fd on success; negative on error * * This function fills the \a ofd structure. */ -static inline int osmo_fd_init_ofd(struct osmo_fd *ofd, int sfd) +static inline int fd_init_reg(struct osmo_fd *ofd, int sfd, unsigned int when) { int rc; @@ -178,7 +179,7 @@ return sfd; ofd->fd = sfd; - ofd->when = BSC_FD_READ; + ofd->when = when; rc = osmo_fd_register(ofd); if (rc < 0) { @@ -200,12 +201,35 @@ * \returns socket fd on success; negative on error * * This function creates (and optionall binds/connects) a socket using - * \ref osmo_sock_init, but also fills the \a ofd structure. + * \ref osmo_sock_init, but also fills the \a ofd structure, registering for READ + * events. */ int osmo_sock_init_ofd(struct osmo_fd *ofd, int family, int type, int proto, const char *host, uint16_t port, unsigned int flags) { - return osmo_fd_init_ofd(ofd, osmo_sock_init(family, type, proto, host, port, flags)); + return fd_init_reg(ofd, osmo_sock_init(family, type, proto, host, port, + flags), BSC_FD_READ); +} + +/*! \brief Initialize a socket and fill \ref osmo_fd + * \param[out] ofd file descriptor (will be filled in) + * \param[in] family Address Family like AF_INET, AF_INET6, AF_UNSPEC + * \param[in] type Socket type like SOCK_DGRAM, SOCK_STREAM + * \param[in] proto Protocol like IPPROTO_TCP, IPPROTO_UDP + * \param[in] host remote host name or IP address in string form + * \param[in] port remote port number in host byte order + * \param[in] flags flags like \ref OSMO_SOCK_F_CONNECT + * \returns socket fd on success; negative on error + * + * This function creates (and optionall binds/connects) a socket using + * \ref osmo_sock_init, but also fills the \a ifd structure, registering for WRITE + * events. + */ +int osmo_sock_init_ifd(struct osmo_fd *ifd, int family, int type, int proto, + const char *host, uint16_t port, unsigned int flags) +{ + return fd_init_reg(ifd, osmo_sock_init(family, type, proto, host, port, + flags), BSC_FD_WRITE); } /*! \brief Initialize a socket and fill \ref sockaddr @@ -390,7 +414,8 @@ int osmo_sock_unix_init_ofd(struct osmo_fd *ofd, uint16_t type, uint8_t proto, const char *socket_path, unsigned int flags) { - return osmo_fd_init_ofd(ofd, osmo_sock_unix_init(type, proto, socket_path, flags)); + return fd_init_reg(ofd, osmo_sock_unix_init(type, proto, socket_path, + flags), BSC_FD_READ); } #endif /* HAVE_SYS_SOCKET_H */ -- To view, visit https://gerrit.osmocom.org/1624 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I938de74c28df29221071913b769e7a2df9d041fa Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Jan 19 12:11:17 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 19 Jan 2017 12:11:17 +0000 Subject: [PATCH] libosmocore[master]: Add ctrl_interface_connect() function Message-ID: Review at https://gerrit.osmocom.org/1629 Add ctrl_interface_connect() function This is similar to existing ctrl_interface_setup() but it creates client-side connection for CTRL protocol instead of server-side. Change-Id: I522ed809cbebfd3d7dd08b4ed9137b39ff192e32 --- M include/osmocom/ctrl/control_if.h M src/ctrl/control_if.c 2 files changed, 33 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/29/1629/1 diff --git a/include/osmocom/ctrl/control_if.h b/include/osmocom/ctrl/control_if.h index 512ae10..08175a8 100644 --- a/include/osmocom/ctrl/control_if.h +++ b/include/osmocom/ctrl/control_if.h @@ -27,5 +27,7 @@ const char *bind_addr, uint16_t port, ctrl_cmd_lookup lookup); - +struct ctrl_handle *ctrl_interface_connect(void *data, const char *addr, + uint16_t port, + ctrl_cmd_lookup lookup); int ctrl_cmd_handle(struct ctrl_handle *ctrl, struct ctrl_cmd *cmd, void *data); diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index df39486..22dbb81 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -654,6 +654,36 @@ return ctrl_interface_setup_dynip(data, "127.0.0.1", port, lookup); } +struct ctrl_handle *ctrl_interface_connect(void *data, const char *addr, + uint16_t port, + ctrl_cmd_lookup lookup) +{ + int ret; + struct ctrl_handle *ctrl; + + ctrl = talloc_zero(data, struct ctrl_handle); + if (!ctrl) + return NULL; + + INIT_LLIST_HEAD(&ctrl->ccon_list); + + ctrl->data = data; + ctrl->lookup = lookup; + + ctrl->listen_fd.cb = NULL; + ctrl->listen_fd.data = ctrl; + ret = osmo_sock_init_ifd(&ctrl->listen_fd, AF_INET, SOCK_STREAM, + IPPROTO_TCP, addr, port, OSMO_SOCK_F_CONNECT); + if (ret < 0) { + LOGP(DLCTRL, LOGL_ERROR, "Cannot connect to CTRL at %s:%u\n", + addr, port); + talloc_free(ctrl); + return NULL; + } + LOGP(DLCTRL, LOGL_NOTICE, "CTRL connected to %s:%u\n", addr, port); + return ctrl; +} + struct ctrl_handle *ctrl_interface_setup_dynip(void *data, const char *bind_addr, uint16_t port, -- To view, visit https://gerrit.osmocom.org/1629 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I522ed809cbebfd3d7dd08b4ed9137b39ff192e32 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Jan 19 12:17:01 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 19 Jan 2017 12:17:01 +0000 Subject: [PATCH] osmo-bts[master]: Use oml-alert CTRL command for temp report Message-ID: Review at https://gerrit.osmocom.org/1630 Use oml-alert CTRL command for temp report Send temperature reports via OML alert facility exposed by CTRL protocol. Change-Id: If29fbd0ab01fefc76e87b90cf1fbc81b2089ba76 Related: OS#1615 --- M src/osmo-bts-sysmo/Makefile.am M src/osmo-bts-sysmo/misc/sysmobts_mgr.c M src/osmo-bts-sysmo/misc/sysmobts_mgr.h M src/osmo-bts-sysmo/misc/sysmobts_mgr_temp.c 4 files changed, 31 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/30/1630/1 diff --git a/src/osmo-bts-sysmo/Makefile.am b/src/osmo-bts-sysmo/Makefile.am index 8e39a3a..7b27e70 100644 --- a/src/osmo-bts-sysmo/Makefile.am +++ b/src/osmo-bts-sysmo/Makefile.am @@ -29,7 +29,7 @@ misc/sysmobts_mgr_temp.c \ misc/sysmobts_mgr_calib.c \ eeprom.c -sysmobts_mgr_LDADD = $(LIBGPS_LIBS) $(LIBOSMOCORE_LIBS) $(LIBOSMOVTY_LIBS) $(LIBOSMOABIS_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOCTRL_LIBS) $(top_builddir)/src/common/libbts.a $(COMMON_LDADD) +sysmobts_mgr_LDADD = $(LIBGPS_LIBS) $(top_builddir)/src/common/libbts.a $(COMMON_LDADD) sysmobts_util_SOURCES = misc/sysmobts_util.c misc/sysmobts_par.c eeprom.c sysmobts_util_LDADD = $(LIBOSMOCORE_LIBS) diff --git a/src/osmo-bts-sysmo/misc/sysmobts_mgr.c b/src/osmo-bts-sysmo/misc/sysmobts_mgr.c index f126db2..88bd9b1 100644 --- a/src/osmo-bts-sysmo/misc/sysmobts_mgr.c +++ b/src/osmo-bts-sysmo/misc/sysmobts_mgr.c @@ -36,6 +36,8 @@ #include #include #include +#include +#include #include "misc/sysmobts_misc.h" #include "misc/sysmobts_mgr.h" @@ -246,7 +248,7 @@ int main(int argc, char **argv) { int rc; - + struct ctrl_handle *ch; tall_mgr_ctx = talloc_named_const(NULL, 1, "bts manager"); msgb_talloc_ctx_init(tall_mgr_ctx, 0); @@ -294,7 +296,8 @@ exit(3); /* Initialize the temperature control */ - sysmobts_mgr_temp_init(&manager); + ch = ctrl_interface_connect(NULL, "localhost", OSMO_CTRL_PORT_BTS, NULL); + sysmobts_mgr_temp_init(&manager, ch); if (sysmobts_mgr_calib_init(&manager) != 0) exit(3); diff --git a/src/osmo-bts-sysmo/misc/sysmobts_mgr.h b/src/osmo-bts-sysmo/misc/sysmobts_mgr.h index b393c38..6b0f509 100644 --- a/src/osmo-bts-sysmo/misc/sysmobts_mgr.h +++ b/src/osmo-bts-sysmo/misc/sysmobts_mgr.h @@ -3,7 +3,7 @@ #include #include - +#include #include #include @@ -108,7 +108,8 @@ int sysmobts_mgr_vty_init(void); int sysmobts_mgr_parse_config(struct sysmobts_mgr_instance *mgr); int sysmobts_mgr_nl_init(void); -int sysmobts_mgr_temp_init(struct sysmobts_mgr_instance *mgr); +int sysmobts_mgr_temp_init(struct sysmobts_mgr_instance *mgr, + struct ctrl_handle *ch); const char *sysmobts_mgr_temp_get_state(enum sysmobts_temp_state state); diff --git a/src/osmo-bts-sysmo/misc/sysmobts_mgr_temp.c b/src/osmo-bts-sysmo/misc/sysmobts_mgr_temp.c index 34af2ab..8e9f0b8 100644 --- a/src/osmo-bts-sysmo/misc/sysmobts_mgr_temp.c +++ b/src/osmo-bts-sysmo/misc/sysmobts_mgr_temp.c @@ -185,9 +185,21 @@ } static void sysmobts_mgr_temp_handle(struct sysmobts_mgr_instance *manager, - int critical, int warning) + struct ctrl_handle *ch, int critical, + int warning) { int new_state = next_state(manager->state, critical, warning); + struct ctrl_cmd *rep = ctrl_cmd_create(tall_mgr_ctx, CTRL_TYPE_SET); + if (!rep) { + LOGP(DTEMP, LOGL_ERROR, "OML alert creation failed.\n"); + } else { + rep->id = "42"; + rep->variable = "oml-alert"; + rep->value = "MGR TEMP CRAP!"; + ctrl_cmd_send_to_all(ch, rep); + talloc_free(rep); + LOGP(DTEMP, LOGL_ERROR, "OML alert sent.\n"); + } /* Nothing changed */ if (new_state < 0) @@ -213,7 +225,7 @@ }; } -static void temp_ctrl_check() +static void temp_ctrl_check(struct ctrl_handle *ch) { int rc; int warn_thresh_passed = 0; @@ -275,20 +287,23 @@ } } - sysmobts_mgr_temp_handle(s_mgr, crit_thresh_passed, warn_thresh_passed); + sysmobts_mgr_temp_handle(s_mgr, ch, crit_thresh_passed, + warn_thresh_passed); } -static void temp_ctrl_check_cb(void *unused) +static void temp_ctrl_check_cb(void *ch) { - temp_ctrl_check(); + temp_ctrl_check(ch); /* Check every two minutes? XXX make it configurable! */ osmo_timer_schedule(&temp_ctrl_timer, 2 * 60, 0); } -int sysmobts_mgr_temp_init(struct sysmobts_mgr_instance *mgr) +int sysmobts_mgr_temp_init(struct sysmobts_mgr_instance *mgr, + struct ctrl_handle *ch) { s_mgr = mgr; temp_ctrl_timer.cb = temp_ctrl_check_cb; - temp_ctrl_check_cb(NULL); + temp_ctrl_timer.data = ch; + temp_ctrl_check_cb(ch); return 0; } -- To view, visit https://gerrit.osmocom.org/1630 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If29fbd0ab01fefc76e87b90cf1fbc81b2089ba76 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Jan 19 12:23:57 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 19 Jan 2017 12:23:57 +0000 Subject: osmo-bts[master]: Use system-installed pcuif_proto.h instead of local copy In-Reply-To: References: Message-ID: Patch Set 8: Would be great to see this moving forward as it would simplify further modifications to bts <-> pcu protocol. -- To view, visit https://gerrit.osmocom.org/1258 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4dd2537aeef60c7d154e90f279dc4e7c2392ff76 Gerrit-PatchSet: 8 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 19 12:28:52 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 19 Jan 2017 12:28:52 +0000 Subject: osmo-bts[master]: Use oml-alert CTRL command for temp report In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 Verified-1 work-in-progress, please ignore. -- To view, visit https://gerrit.osmocom.org/1630 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If29fbd0ab01fefc76e87b90cf1fbc81b2089ba76 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 19 12:47:33 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 19 Jan 2017 12:47:33 +0000 Subject: libosmocore[master]: Add ctrl_interface_connect() function In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 WIP -- To view, visit https://gerrit.osmocom.org/1629 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I522ed809cbebfd3d7dd08b4ed9137b39ff192e32 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 19 13:35:15 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 19 Jan 2017 13:35:15 +0000 Subject: openbsc[master]: deb: unbreak nightly builds In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 I would expect a "-dev" package to install all of the header files, not just one. This is fallout from our weird cross-source-tree-inclusion of gsm_data_shared.{h,c} and because we want the nightly builds to work, I'll +2 this for now and we can worry about those details later. -- To view, visit https://gerrit.osmocom.org/1621 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I25f8c639d2dc525ca280a7cd09de3ca6358d2568 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Ruben Undheim Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 19 13:35:20 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 19 Jan 2017 13:35:20 +0000 Subject: [MERGED] openbsc[master]: deb: unbreak nightly builds In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: deb: unbreak nightly builds ...................................................................... deb: unbreak nightly builds Add openbsc-dev with source and header files necessary for osmo-bts builds. Max's note: extracted from Debian packaging work into separate commit. Change-Id: I25f8c639d2dc525ca280a7cd09de3ca6358d2568 --- M debian/control A debian/openbsc-dev.install 2 files changed, 13 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/control b/debian/control index 79f18df..44262b9 100644 --- a/debian/control +++ b/debian/control @@ -98,6 +98,17 @@ . This package is part of OpenBSC and closely related to osmocom-bsc. +Package: openbsc-dev +Architecture: all +Depends: ${misc:Depends} +Description: Header file needed by tools tightly integrated + Some other programs depend on gsm_data_shared.h and gsm_data_shared.c + from OpenBSC. This package installs these files to your file system so + that the other packages can build-depend on this package. + . + The header file is installed to /usr/include/osmocom/openbsc, while + the .c file is installed to /usr/src/osmocom/openbsc. + Package: osmo-gtphub Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} diff --git a/debian/openbsc-dev.install b/debian/openbsc-dev.install new file mode 100644 index 0000000..557aea1 --- /dev/null +++ b/debian/openbsc-dev.install @@ -0,0 +1,2 @@ +openbsc/include/openbsc/gsm_data_shared.h usr/include/osmocom/openbsc/ +openbsc/src/libcommon/gsm_data_shared.c usr/src/osmocom/openbsc/libcommon/ -- To view, visit https://gerrit.osmocom.org/1621 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I25f8c639d2dc525ca280a7cd09de3ca6358d2568 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Ruben Undheim From gerrit-no-reply at lists.osmocom.org Thu Jan 19 14:43:03 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 19 Jan 2017 14:43:03 +0000 Subject: [PATCH] libosmocore[master]: Expand and expose ctrl connection allocation In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1629 to look at the new patch set (#2). Expand and expose ctrl connection allocation Add function for allocating CTRL connection to public headers and replace call to previous static function with it. Change-Id: I522ed809cbebfd3d7dd08b4ed9137b39ff192e32 --- M include/osmocom/ctrl/control_if.h M src/ctrl/control_if.c 2 files changed, 38 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/29/1629/2 diff --git a/include/osmocom/ctrl/control_if.h b/include/osmocom/ctrl/control_if.h index 512ae10..f2af1db 100644 --- a/include/osmocom/ctrl/control_if.h +++ b/include/osmocom/ctrl/control_if.h @@ -27,5 +27,5 @@ const char *bind_addr, uint16_t port, ctrl_cmd_lookup lookup); - +struct ctrl_connection *osmo_ctrl_conn_alloc(void *ctx, void *data); int ctrl_cmd_handle(struct ctrl_handle *ctrl, struct ctrl_cmd *cmd, void *data); diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index df39486..376b7d3 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -357,7 +357,7 @@ return ret; } -static int control_write_cb(struct osmo_fd *bfd, struct msgb *msg) +int control_write_cb(struct osmo_fd *bfd, struct msgb *msg) { int rc; @@ -368,7 +368,7 @@ return rc; } -static struct ctrl_connection *ctrl_connection_alloc(void *ctx) +struct ctrl_connection *osmo_ctrl_conn_alloc(void *ctx, void *data) { struct ctrl_connection *ccon = talloc_zero(ctx, struct ctrl_connection); if (!ccon) @@ -379,6 +379,9 @@ INIT_LLIST_HEAD(&ccon->cmds); INIT_LLIST_HEAD(&ccon->def_cmds); + + ccon->write_queue.bfd.data = data ? data : ccon; + ccon->write_queue.write_cb = control_write_cb; return ccon; } @@ -412,19 +415,17 @@ return ret; } #endif - ccon = ctrl_connection_alloc(listen_bfd->data); + ctrl = listen_bfd->data; + ccon = osmo_ctrl_conn_alloc(listen_bfd->data, ctrl); if (!ccon) { LOGP(DLCTRL, LOGL_ERROR, "Failed to allocate.\n"); close(fd); return -1; } - ctrl = listen_bfd->data; - ccon->write_queue.bfd.data = ctrl; ccon->write_queue.bfd.fd = fd; ccon->write_queue.bfd.when = BSC_FD_READ; ccon->write_queue.read_cb = handle_control_read; - ccon->write_queue.write_cb = control_write_cb; ret = osmo_fd_register(&ccon->write_queue.bfd); if (ret < 0) { @@ -654,6 +655,36 @@ return ctrl_interface_setup_dynip(data, "127.0.0.1", port, lookup); } +struct ctrl_handle *ctrl_interface_connect(void *data, const char *addr, + uint16_t port, + ctrl_cmd_lookup lookup) +{ + int ret; + struct ctrl_handle *ctrl; + + ctrl = talloc_zero(data, struct ctrl_handle); + if (!ctrl) + return NULL; + + INIT_LLIST_HEAD(&ctrl->ccon_list); + + ctrl->data = data; + ctrl->lookup = lookup; + + ctrl->listen_fd.cb = NULL; + ctrl->listen_fd.data = ctrl; + ret = osmo_sock_init_ifd(&ctrl->listen_fd, AF_INET, SOCK_STREAM, + IPPROTO_TCP, addr, port, OSMO_SOCK_F_CONNECT); + if (ret < 0) { + LOGP(DLCTRL, LOGL_ERROR, "Cannot connect to CTRL at %s:%u\n", + addr, port); + talloc_free(ctrl); + return NULL; + } + LOGP(DLCTRL, LOGL_NOTICE, "CTRL connected to %s:%u\n", addr, port); + return ctrl; +} + struct ctrl_handle *ctrl_interface_setup_dynip(void *data, const char *bind_addr, uint16_t port, -- To view, visit https://gerrit.osmocom.org/1629 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I522ed809cbebfd3d7dd08b4ed9137b39ff192e32 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Thu Jan 19 14:53:08 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 19 Jan 2017 14:53:08 +0000 Subject: [PATCH] osmo-bts[master]: Use oml-alert CTRL command for temp report In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1630 to look at the new patch set (#2). Use oml-alert CTRL command for temp report Send temperature reports via OML alert facility exposed by CTRL protocol. Change-Id: If29fbd0ab01fefc76e87b90cf1fbc81b2089ba76 Related: OS#1615 --- M src/osmo-bts-sysmo/Makefile.am M src/osmo-bts-sysmo/misc/sysmobts_mgr.c M src/osmo-bts-sysmo/misc/sysmobts_mgr.h M src/osmo-bts-sysmo/misc/sysmobts_mgr_temp.c 4 files changed, 63 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/30/1630/2 diff --git a/src/osmo-bts-sysmo/Makefile.am b/src/osmo-bts-sysmo/Makefile.am index 8e39a3a..7b27e70 100644 --- a/src/osmo-bts-sysmo/Makefile.am +++ b/src/osmo-bts-sysmo/Makefile.am @@ -29,7 +29,7 @@ misc/sysmobts_mgr_temp.c \ misc/sysmobts_mgr_calib.c \ eeprom.c -sysmobts_mgr_LDADD = $(LIBGPS_LIBS) $(LIBOSMOCORE_LIBS) $(LIBOSMOVTY_LIBS) $(LIBOSMOABIS_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOCTRL_LIBS) $(top_builddir)/src/common/libbts.a $(COMMON_LDADD) +sysmobts_mgr_LDADD = $(LIBGPS_LIBS) $(top_builddir)/src/common/libbts.a $(COMMON_LDADD) sysmobts_util_SOURCES = misc/sysmobts_util.c misc/sysmobts_par.c eeprom.c sysmobts_util_LDADD = $(LIBOSMOCORE_LIBS) diff --git a/src/osmo-bts-sysmo/misc/sysmobts_mgr.c b/src/osmo-bts-sysmo/misc/sysmobts_mgr.c index f126db2..4afda4a 100644 --- a/src/osmo-bts-sysmo/misc/sysmobts_mgr.c +++ b/src/osmo-bts-sysmo/misc/sysmobts_mgr.c @@ -21,6 +21,8 @@ */ #include +#include +#include #include #include #include @@ -28,14 +30,19 @@ #include #include #include +#include +#include #include #include #include +#include #include #include #include #include +#include +#include #include "misc/sysmobts_misc.h" #include "misc/sysmobts_mgr.h" @@ -246,10 +253,12 @@ int main(int argc, char **argv) { int rc; - + struct ctrl_connection *ccon; tall_mgr_ctx = talloc_named_const(NULL, 1, "bts manager"); msgb_talloc_ctx_init(tall_mgr_ctx, 0); + + srand(time(NULL)); mgr_log_init(); if (classify_bts() != 0) @@ -294,7 +303,21 @@ exit(3); /* Initialize the temperature control */ - sysmobts_mgr_temp_init(&manager); + ccon = osmo_ctrl_conn_alloc(tall_mgr_ctx, NULL); + rc = -1; + if (ccon) + rc = osmo_sock_init_ifd(&ccon->write_queue.bfd, AF_INET, + SOCK_STREAM, IPPROTO_TCP, + "localhost", OSMO_CTRL_PORT_BTS, + OSMO_SOCK_F_CONNECT); + if (rc < 0) + LOGP(DLCTRL, LOGL_ERROR, "Can't connect to CTRL @ localhost:%u\n", + OSMO_CTRL_PORT_BTS); + else + LOGP(DLCTRL, LOGL_NOTICE, "CTRL connected to locahost:%u\n", + OSMO_CTRL_PORT_BTS); + + sysmobts_mgr_temp_init(&manager, ccon); if (sysmobts_mgr_calib_init(&manager) != 0) exit(3); diff --git a/src/osmo-bts-sysmo/misc/sysmobts_mgr.h b/src/osmo-bts-sysmo/misc/sysmobts_mgr.h index b393c38..88f4e24 100644 --- a/src/osmo-bts-sysmo/misc/sysmobts_mgr.h +++ b/src/osmo-bts-sysmo/misc/sysmobts_mgr.h @@ -3,7 +3,7 @@ #include #include - +#include #include #include @@ -108,7 +108,8 @@ int sysmobts_mgr_vty_init(void); int sysmobts_mgr_parse_config(struct sysmobts_mgr_instance *mgr); int sysmobts_mgr_nl_init(void); -int sysmobts_mgr_temp_init(struct sysmobts_mgr_instance *mgr); +int sysmobts_mgr_temp_init(struct sysmobts_mgr_instance *mgr, + struct ctrl_connection *ctrl); const char *sysmobts_mgr_temp_get_state(enum sysmobts_temp_state state); diff --git a/src/osmo-bts-sysmo/misc/sysmobts_mgr_temp.c b/src/osmo-bts-sysmo/misc/sysmobts_mgr_temp.c index 34af2ab..2a15d2e 100644 --- a/src/osmo-bts-sysmo/misc/sysmobts_mgr_temp.c +++ b/src/osmo-bts-sysmo/misc/sysmobts_mgr_temp.c @@ -28,6 +28,8 @@ #include #include +#include + static struct sysmobts_mgr_instance *s_mgr; static struct osmo_timer_list temp_ctrl_timer; @@ -185,13 +187,24 @@ } static void sysmobts_mgr_temp_handle(struct sysmobts_mgr_instance *manager, - int critical, int warning) + struct ctrl_connection *ctrl, int critical, + int warning) { - int new_state = next_state(manager->state, critical, warning); + int new_state = next_state(manager->state, critical, warning), rc; + struct ctrl_cmd *rep; + bool send = false; /* Nothing changed */ if (new_state < 0) return; + + rep = ctrl_cmd_create(tall_mgr_ctx, CTRL_TYPE_SET); + if (!rep) { + LOGP(DTEMP, LOGL_ERROR, "OML alert creation failed.\n"); + } else { + rep->id = talloc_asprintf(rep, "%d", rand()); + rep->variable = "oml-alert"; + } LOGP(DTEMP, LOGL_NOTICE, "Moving from state %s to %s.\n", get_value_string(state_names, manager->state), @@ -206,14 +219,24 @@ break; case STATE_WARNING: execute_warning_act(manager); + rep->value = "Temperature Warning"; + send = true; break; case STATE_CRITICAL: execute_critical_act(manager); + rep->value = "Temperature Critical"; + send = true; break; }; + + if (send) { + rc = ctrl_cmd_send(&ctrl->write_queue, rep); + LOGP(DTEMP, LOGL_ERROR, "OML alert sent: %d\n", rc); + } + talloc_free(rep); } -static void temp_ctrl_check() +static void temp_ctrl_check(struct ctrl_connection *ctrl) { int rc; int warn_thresh_passed = 0; @@ -275,20 +298,23 @@ } } - sysmobts_mgr_temp_handle(s_mgr, crit_thresh_passed, warn_thresh_passed); + sysmobts_mgr_temp_handle(s_mgr, ctrl, crit_thresh_passed, + warn_thresh_passed); } -static void temp_ctrl_check_cb(void *unused) +static void temp_ctrl_check_cb(void *ctrl) { - temp_ctrl_check(); + temp_ctrl_check(ctrl); /* Check every two minutes? XXX make it configurable! */ osmo_timer_schedule(&temp_ctrl_timer, 2 * 60, 0); } -int sysmobts_mgr_temp_init(struct sysmobts_mgr_instance *mgr) +int sysmobts_mgr_temp_init(struct sysmobts_mgr_instance *mgr, + struct ctrl_connection *ctrl) { s_mgr = mgr; temp_ctrl_timer.cb = temp_ctrl_check_cb; - temp_ctrl_check_cb(NULL); + temp_ctrl_timer.data = ctrl; + temp_ctrl_check_cb(ctrl); return 0; } -- To view, visit https://gerrit.osmocom.org/1630 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If29fbd0ab01fefc76e87b90cf1fbc81b2089ba76 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Thu Jan 19 14:54:26 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 19 Jan 2017 14:54:26 +0000 Subject: [PATCH] osmo-hlr[master]: debug log: log computed vector kinds Message-ID: Review at https://gerrit.osmocom.org/1631 debug log: log computed vector kinds Change-Id: Iffb9b0f99e3006861599c921d037504a7bc8d976 --- M src/auc.c 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/31/1631/1 diff --git a/src/auc.c b/src/auc.c index 8ceafad..33d8eda 100644 --- a/src/auc.c +++ b/src/auc.c @@ -55,6 +55,8 @@ if (aud2g && !aud3g) { /* 2G only case: output directly to vec */ + DEBUGP(DAUC, "compute vector [%u]/%u: 2G only\n", + i, num_vec); rc = osmo_auth_gen_vec(vec+i, aud2g, rand); if (rc < 0) { LOGP(DAUC, LOGL_ERROR, "Error in 2G vector " @@ -63,6 +65,8 @@ } } else if (aud3g) { /* 3G or 3G + 2G case */ + DEBUGP(DAUC, "compute vector [%u]/%u: 3G or 3G + 2G\n", + i, num_vec); if (rand_auts && auts) rc = osmo_auth_gen_vec_auts(vec+i, aud3g, rand_auts, @@ -78,6 +82,8 @@ if (aud2g && aud3g) { /* separate 2G + 3G case: patch 2G into 3G */ struct osmo_auth_vector vtmp; + DEBUGP(DAUC, "compute vector [%u]/%u:" + " separate 2G + 3G\n", i, num_vec); rc = osmo_auth_gen_vec(&vtmp, aud2g, rand); if (rc < 0) { LOGP(DAUC, LOGL_ERROR, "Error in 2G vector " -- To view, visit https://gerrit.osmocom.org/1631 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iffb9b0f99e3006861599c921d037504a7bc8d976 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Jan 19 14:54:27 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 19 Jan 2017 14:54:27 +0000 Subject: [PATCH] osmo-hlr[master]: log: move a log from info to debug level Message-ID: Review at https://gerrit.osmocom.org/1632 log: move a log from info to debug level This basically duplicates an info log further below that says "Generated..." Change-Id: I32f22f71adc6dc2fbc7bcca5d277337baef3cd6d --- M src/db_auc.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/32/1632/1 diff --git a/src/db_auc.c b/src/db_auc.c index b37d9db..a24f27e 100644 --- a/src/db_auc.c +++ b/src/db_auc.c @@ -197,7 +197,7 @@ if (rc <= 0) return rc; - LOGAUC(imsi, LOGL_INFO, "Calling to generate %u vectors\n", num_vec); + LOGAUC(imsi, LOGL_DEBUG, "Calling to generate %u vectors\n", num_vec); rc = auc_compute_vectors(vec, num_vec, &aud2g, &aud3g, rand_auts, auts); if (rc < 0) { num_vec = 0; -- To view, visit https://gerrit.osmocom.org/1632 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I32f22f71adc6dc2fbc7bcca5d277337baef3cd6d Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Jan 19 14:54:27 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 19 Jan 2017 14:54:27 +0000 Subject: [PATCH] osmo-hlr[master]: hlr.sql: typo in comment Message-ID: Review at https://gerrit.osmocom.org/1633 hlr.sql: typo in comment Change-Id: I8f16944f966bd40540d5b5396873b873685c18e9 --- M sql/hlr.sql 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/33/1633/1 diff --git a/sql/hlr.sql b/sql/hlr.sql index 041b42b..5f0950c 100644 --- a/sql/hlr.sql +++ b/sql/hlr.sql @@ -58,7 +58,7 @@ ); CREATE TABLE auc_3g ( - subscriber_id INTEGER PRIMARY KEY, -- subscrbier.id + subscriber_id INTEGER PRIMARY KEY, -- subscriber.id algo_id_3g INTEGER NOT NULL, k INTEGER NOT NULL, op VARCHAR, -- To view, visit https://gerrit.osmocom.org/1633 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8f16944f966bd40540d5b5396873b873685c18e9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Jan 19 14:54:27 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 19 Jan 2017 14:54:27 +0000 Subject: [PATCH] osmo-hlr[master]: auc.c: typo in comment Message-ID: Review at https://gerrit.osmocom.org/1634 auc.c: typo in comment Change-Id: I4652e932f1bdb7767b5394c09e7436812488aa74 --- M src/auc.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/34/1634/1 diff --git a/src/auc.c b/src/auc.c index 33d8eda..7d8597a 100644 --- a/src/auc.c +++ b/src/auc.c @@ -26,7 +26,7 @@ #include "rand.h" /* compute given number of vectors using either aud2g or aud2g or a combination - * of both. Handles re-synchrnization if rand_auts and auts are set */ + * of both. Handles re-synchronization if rand_auts and auts are set */ int auc_compute_vectors(struct osmo_auth_vector *vec, unsigned int num_vec, struct osmo_sub_auth_data *aud2g, struct osmo_sub_auth_data *aud3g, -- To view, visit https://gerrit.osmocom.org/1634 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4652e932f1bdb7767b5394c09e7436812488aa74 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Jan 19 14:55:03 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 19 Jan 2017 14:55:03 +0000 Subject: osmo-hlr[master]: debug log: log computed vector kinds In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1631 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iffb9b0f99e3006861599c921d037504a7bc8d976 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 19 14:55:07 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 19 Jan 2017 14:55:07 +0000 Subject: osmo-hlr[master]: log: move a log from info to debug level In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1632 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I32f22f71adc6dc2fbc7bcca5d277337baef3cd6d Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 19 14:55:11 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 19 Jan 2017 14:55:11 +0000 Subject: osmo-hlr[master]: hlr.sql: typo in comment In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1633 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8f16944f966bd40540d5b5396873b873685c18e9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 19 14:55:16 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 19 Jan 2017 14:55:16 +0000 Subject: osmo-hlr[master]: auc.c: typo in comment In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1634 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4652e932f1bdb7767b5394c09e7436812488aa74 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 19 16:06:11 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 19 Jan 2017 16:06:11 +0000 Subject: [MERGED] osmo-hlr[master]: log: move a log from info to debug level In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: log: move a log from info to debug level ...................................................................... log: move a log from info to debug level This basically duplicates an info log further below that says "Generated..." Change-Id: I32f22f71adc6dc2fbc7bcca5d277337baef3cd6d --- M src/db_auc.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/db_auc.c b/src/db_auc.c index b37d9db..a24f27e 100644 --- a/src/db_auc.c +++ b/src/db_auc.c @@ -197,7 +197,7 @@ if (rc <= 0) return rc; - LOGAUC(imsi, LOGL_INFO, "Calling to generate %u vectors\n", num_vec); + LOGAUC(imsi, LOGL_DEBUG, "Calling to generate %u vectors\n", num_vec); rc = auc_compute_vectors(vec, num_vec, &aud2g, &aud3g, rand_auts, auts); if (rc < 0) { num_vec = 0; -- To view, visit https://gerrit.osmocom.org/1632 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I32f22f71adc6dc2fbc7bcca5d277337baef3cd6d Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Jan 19 16:06:11 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 19 Jan 2017 16:06:11 +0000 Subject: [MERGED] osmo-hlr[master]: auc.c: typo in comment In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: auc.c: typo in comment ...................................................................... auc.c: typo in comment Change-Id: I4652e932f1bdb7767b5394c09e7436812488aa74 --- M src/auc.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/auc.c b/src/auc.c index 33d8eda..7d8597a 100644 --- a/src/auc.c +++ b/src/auc.c @@ -26,7 +26,7 @@ #include "rand.h" /* compute given number of vectors using either aud2g or aud2g or a combination - * of both. Handles re-synchrnization if rand_auts and auts are set */ + * of both. Handles re-synchronization if rand_auts and auts are set */ int auc_compute_vectors(struct osmo_auth_vector *vec, unsigned int num_vec, struct osmo_sub_auth_data *aud2g, struct osmo_sub_auth_data *aud3g, -- To view, visit https://gerrit.osmocom.org/1634 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4652e932f1bdb7767b5394c09e7436812488aa74 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Jan 19 16:06:11 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 19 Jan 2017 16:06:11 +0000 Subject: [MERGED] osmo-hlr[master]: hlr.sql: typo in comment In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: hlr.sql: typo in comment ...................................................................... hlr.sql: typo in comment Change-Id: I8f16944f966bd40540d5b5396873b873685c18e9 --- M sql/hlr.sql 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/sql/hlr.sql b/sql/hlr.sql index 041b42b..5f0950c 100644 --- a/sql/hlr.sql +++ b/sql/hlr.sql @@ -58,7 +58,7 @@ ); CREATE TABLE auc_3g ( - subscriber_id INTEGER PRIMARY KEY, -- subscrbier.id + subscriber_id INTEGER PRIMARY KEY, -- subscriber.id algo_id_3g INTEGER NOT NULL, k INTEGER NOT NULL, op VARCHAR, -- To view, visit https://gerrit.osmocom.org/1633 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8f16944f966bd40540d5b5396873b873685c18e9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Jan 19 16:06:12 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 19 Jan 2017 16:06:12 +0000 Subject: [MERGED] osmo-hlr[master]: debug log: log computed vector kinds In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: debug log: log computed vector kinds ...................................................................... debug log: log computed vector kinds Change-Id: Iffb9b0f99e3006861599c921d037504a7bc8d976 --- M src/auc.c 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/auc.c b/src/auc.c index 8ceafad..33d8eda 100644 --- a/src/auc.c +++ b/src/auc.c @@ -55,6 +55,8 @@ if (aud2g && !aud3g) { /* 2G only case: output directly to vec */ + DEBUGP(DAUC, "compute vector [%u]/%u: 2G only\n", + i, num_vec); rc = osmo_auth_gen_vec(vec+i, aud2g, rand); if (rc < 0) { LOGP(DAUC, LOGL_ERROR, "Error in 2G vector " @@ -63,6 +65,8 @@ } } else if (aud3g) { /* 3G or 3G + 2G case */ + DEBUGP(DAUC, "compute vector [%u]/%u: 3G or 3G + 2G\n", + i, num_vec); if (rand_auts && auts) rc = osmo_auth_gen_vec_auts(vec+i, aud3g, rand_auts, @@ -78,6 +82,8 @@ if (aud2g && aud3g) { /* separate 2G + 3G case: patch 2G into 3G */ struct osmo_auth_vector vtmp; + DEBUGP(DAUC, "compute vector [%u]/%u:" + " separate 2G + 3G\n", i, num_vec); rc = osmo_auth_gen_vec(&vtmp, aud2g, rand); if (rc < 0) { LOGP(DAUC, LOGL_ERROR, "Error in 2G vector " -- To view, visit https://gerrit.osmocom.org/1631 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iffb9b0f99e3006861599c921d037504a7bc8d976 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Jan 19 16:09:43 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 19 Jan 2017 16:09:43 +0000 Subject: [PATCH] libosmocore[master]: linuxlist.h: add llist_len() In-Reply-To: References: Message-ID: Hello Max, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1563 to look at the new patch set (#4). linuxlist.h: add llist_len() After subchan_demux.c in libosmo-abis, osmo-bts/common/vty.c and openbsc's gtphub_test.c, more places would like to count the llist items (mostly unit tests). Instead of proliferating numerous local implementations, add here. NOTE: other than the previous llist_len() implementations, this one returns an *unsigned* length, which might need some adjusting of current callers. Before merging this, make sure the name llist_head() is not redefined, see: libosmo-abis Change-Id I99c627cf2a2f0dca1ec5d2ad36e3c3f7f0d8d191 openbsc Change-Id I9a7e438de4539c382de54b7337fd18e4bf19d007 Change-Id: Ic49adc7a346f5722bf624d7d3b4a735e4220ae15 --- M include/osmocom/core/linuxlist.h 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/63/1563/4 diff --git a/include/osmocom/core/linuxlist.h b/include/osmocom/core/linuxlist.h index 1c83395..6c99d64 100644 --- a/include/osmocom/core/linuxlist.h +++ b/include/osmocom/core/linuxlist.h @@ -351,6 +351,15 @@ for ((pos) = (pos)->next, prefetch((pos)->next); (pos) != (head); \ (pos) = (pos)->next, ({ smp_read_barrier_depends(); 0;}), prefetch((pos)->next)) +static inline unsigned int llist_len(struct llist_head *head) +{ + struct llist_head *entry; + unsigned int i = 0; + llist_for_each(entry, head) + i++; + return i; +} + /*! * }@ */ -- To view, visit https://gerrit.osmocom.org/1563 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic49adc7a346f5722bf624d7d3b4a735e4220ae15 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Jan 19 16:15:07 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 19 Jan 2017 16:15:07 +0000 Subject: [PATCH] openbsc[master]: gtphub_test: rename llist_len() to _llist_len(), prep for li... In-Reply-To: References: Message-ID: Hello Max, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1562 to look at the new patch set (#3). gtphub_test: rename llist_len() to _llist_len(), prep for libosmocore llist_len() Also change the return value to unsigned, like will be the case in the libosmocore implementation. Related: libosmocore Change-Id Ic49adc7a346f5722bf624d7d3b4a735e4220ae15 Change-Id: I9a7e438de4539c382de54b7337fd18e4bf19d007 --- M openbsc/tests/gtphub/gtphub_test.c 1 file changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/62/1562/3 diff --git a/openbsc/tests/gtphub/gtphub_test.c b/openbsc/tests/gtphub/gtphub_test.c index 7d7673b..3d8ec3a 100644 --- a/openbsc/tests/gtphub/gtphub_test.c +++ b/openbsc/tests/gtphub/gtphub_test.c @@ -57,10 +57,10 @@ void *osmo_gtphub_ctx; /* TODO copied from libosmo-abis/src/subchan_demux.c, remove dup */ -static int llist_len(struct llist_head *head) +static unsigned int _llist_len(struct llist_head *head) { struct llist_head *entry; - int i = 0; + unsigned int i = 0; llist_for_each(entry, head) i++; @@ -174,11 +174,11 @@ mapping = nr_map_have(map, origin1, orig, 0); m[i] = mapping->repl; OSMO_ASSERT(m[i] != 0); - OSMO_ASSERT(llist_len(&map->mappings) == (i+1)); + OSMO_ASSERT(_llist_len(&map->mappings) == (i+1)); for (check_i = 0; check_i < i; check_i++) OSMO_ASSERT(m[check_i] != m[i]); } - OSMO_ASSERT(llist_len(&map->mappings) == TEST_N_HALF); + OSMO_ASSERT(_llist_len(&map->mappings) == TEST_N_HALF); /* create another TEST_N mappings with the same original numbers, but * from a different origin */ @@ -189,11 +189,11 @@ mapping = nr_map_have(map, origin2, orig, 0); m[i2] = mapping->repl; OSMO_ASSERT(m[i2] != 0); - OSMO_ASSERT(llist_len(&map->mappings) == (i2+1)); + OSMO_ASSERT(_llist_len(&map->mappings) == (i2+1)); for (check_i = 0; check_i < i2; check_i++) OSMO_ASSERT(m[check_i] != m[i2]); } - OSMO_ASSERT(llist_len(&map->mappings) == TEST_N); + OSMO_ASSERT(_llist_len(&map->mappings) == TEST_N); /* verify mappings */ for (i = 0; i < TEST_N_HALF; i++) { @@ -213,7 +213,7 @@ /* remove all mappings */ for (i = 0; i < TEST_N_HALF; i++) { - OSMO_ASSERT(llist_len(&map->mappings) == (TEST_N - 2*i)); + OSMO_ASSERT(_llist_len(&map->mappings) == (TEST_N - 2*i)); nr_t orig = TEST_I + i; nr_mapping_del(nr_map_get(map, origin1, orig)); -- To view, visit https://gerrit.osmocom.org/1562 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9a7e438de4539c382de54b7337fd18e4bf19d007 Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Thu Jan 19 16:18:16 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 19 Jan 2017 16:18:16 +0000 Subject: [PATCH] libosmo-abis[master]: subchan_demux.c: rename llist_len() to _llist_len(), prep fo... In-Reply-To: References: Message-ID: Hello Max, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1561 to look at the new patch set (#2). subchan_demux.c: rename llist_len() to _llist_len(), prep for libosmocore llist_len() Also change the return value to unsigned, like will be the case in the libosmocore implementation; adjust the only caller. Related: libosmocore Change-Id Ic49adc7a346f5722bf624d7d3b4a735e4220ae15 Change-Id: I99c627cf2a2f0dca1ec5d2ad36e3c3f7f0d8d191 --- M src/subchan_demux.c 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/61/1561/2 diff --git a/src/subchan_demux.c b/src/subchan_demux.c index f965490..7b3cb07 100644 --- a/src/subchan_demux.c +++ b/src/subchan_demux.c @@ -289,10 +289,10 @@ return i; } -static int llist_len(struct llist_head *head) +static unsigned int _llist_len(struct llist_head *head) { struct llist_head *entry; - int i = 0; + unsigned int i = 0; llist_for_each(entry, head) i++; @@ -327,7 +327,7 @@ int len) { struct mux_subch *sch = &mx->subch[s_nr]; - int list_len = llist_len(&sch->tx_queue); + unsigned int list_len = _llist_len(&sch->tx_queue); struct subch_txq_entry *tqe = talloc_zero_size(tall_tqe_ctx, sizeof(*tqe) + len); if (!tqe) -- To view, visit https://gerrit.osmocom.org/1561 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I99c627cf2a2f0dca1ec5d2ad36e3c3f7f0d8d191 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Thu Jan 19 16:18:16 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 19 Jan 2017 16:18:16 +0000 Subject: [PATCH] libosmo-abis[master]: undup: subchan_demux.c: use libosmocore's llist_len() In-Reply-To: References: Message-ID: Hello Max, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1564 to look at the new patch set (#2). undup: subchan_demux.c: use libosmocore's llist_len() Depends on libosmocore Change-Id Ic49adc7a346f5722bf624d7d3b4a735e4220ae15 Change-Id: I47f1831f1835dc07925dabbc115677087e48fa1b --- M src/subchan_demux.c 1 file changed, 1 insertion(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/64/1564/2 diff --git a/src/subchan_demux.c b/src/subchan_demux.c index 7b3cb07..96de5fb 100644 --- a/src/subchan_demux.c +++ b/src/subchan_demux.c @@ -289,17 +289,6 @@ return i; } -static unsigned int _llist_len(struct llist_head *head) -{ - struct llist_head *entry; - unsigned int i = 0; - - llist_for_each(entry, head) - i++; - - return i; -} - /* evict the 'num_evict' number of oldest entries in the queue */ static void tx_queue_evict(struct mux_subch *sch, int num_evict) { @@ -327,7 +316,7 @@ int len) { struct mux_subch *sch = &mx->subch[s_nr]; - unsigned int list_len = _llist_len(&sch->tx_queue); + unsigned int list_len = llist_len(&sch->tx_queue); struct subch_txq_entry *tqe = talloc_zero_size(tall_tqe_ctx, sizeof(*tqe) + len); if (!tqe) -- To view, visit https://gerrit.osmocom.org/1564 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I47f1831f1835dc07925dabbc115677087e48fa1b Gerrit-PatchSet: 2 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Thu Jan 19 16:21:40 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 19 Jan 2017 16:21:40 +0000 Subject: [PATCH] openbsc[master]: undup: gtphub_test: use libosmocore's llist_len() In-Reply-To: References: Message-ID: Hello Max, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1565 to look at the new patch set (#3). undup: gtphub_test: use libosmocore's llist_len() Depends on libosmocore Change-Id Ic49adc7a346f5722bf624d7d3b4a735e4220ae15 Change-Id: I67bc1889c064596a2f3e93cc0354b11c720b0225 --- M openbsc/tests/gtphub/gtphub_test.c 1 file changed, 5 insertions(+), 17 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/65/1565/3 diff --git a/openbsc/tests/gtphub/gtphub_test.c b/openbsc/tests/gtphub/gtphub_test.c index 3d8ec3a..8eb1ba9 100644 --- a/openbsc/tests/gtphub/gtphub_test.c +++ b/openbsc/tests/gtphub/gtphub_test.c @@ -56,18 +56,6 @@ void *osmo_gtphub_ctx; -/* TODO copied from libosmo-abis/src/subchan_demux.c, remove dup */ -static unsigned int _llist_len(struct llist_head *head) -{ - struct llist_head *entry; - unsigned int i = 0; - - llist_for_each(entry, head) - i++; - - return i; -} - static void nr_mapping_free(struct expiring_item *e) { struct nr_mapping *m = container_of(e, struct nr_mapping, @@ -174,11 +162,11 @@ mapping = nr_map_have(map, origin1, orig, 0); m[i] = mapping->repl; OSMO_ASSERT(m[i] != 0); - OSMO_ASSERT(_llist_len(&map->mappings) == (i+1)); + OSMO_ASSERT(llist_len(&map->mappings) == (i+1)); for (check_i = 0; check_i < i; check_i++) OSMO_ASSERT(m[check_i] != m[i]); } - OSMO_ASSERT(_llist_len(&map->mappings) == TEST_N_HALF); + OSMO_ASSERT(llist_len(&map->mappings) == TEST_N_HALF); /* create another TEST_N mappings with the same original numbers, but * from a different origin */ @@ -189,11 +177,11 @@ mapping = nr_map_have(map, origin2, orig, 0); m[i2] = mapping->repl; OSMO_ASSERT(m[i2] != 0); - OSMO_ASSERT(_llist_len(&map->mappings) == (i2+1)); + OSMO_ASSERT(llist_len(&map->mappings) == (i2+1)); for (check_i = 0; check_i < i2; check_i++) OSMO_ASSERT(m[check_i] != m[i2]); } - OSMO_ASSERT(_llist_len(&map->mappings) == TEST_N); + OSMO_ASSERT(llist_len(&map->mappings) == TEST_N); /* verify mappings */ for (i = 0; i < TEST_N_HALF; i++) { @@ -213,7 +201,7 @@ /* remove all mappings */ for (i = 0; i < TEST_N_HALF; i++) { - OSMO_ASSERT(_llist_len(&map->mappings) == (TEST_N - 2*i)); + OSMO_ASSERT(llist_len(&map->mappings) == (TEST_N - 2*i)); nr_t orig = TEST_I + i; nr_mapping_del(nr_map_get(map, origin1, orig)); -- To view, visit https://gerrit.osmocom.org/1565 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I67bc1889c064596a2f3e93cc0354b11c720b0225 Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Thu Jan 19 16:29:18 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 19 Jan 2017 16:29:18 +0000 Subject: libosmocore[master]: utils: add osmo_strscpy() macro to use sizeof(dst) In-Reply-To: References: Message-ID: Patch Set 5: > Linux's strscpy has different semantic/parameters. Not sure if you > want to clash here. You might also implement it as a static inline > instead of a macro (or add () around the parameters). Will sizeof() work with a static inline?? Hmm wasn't aware of strscpy(). Can't find it on my man nor /usr/include, but found https://lwn.net/Articles/659214/ What to call it, osmo_strzcpy(), kind of like the "%zu" printf format char for size_t? osmo_strcpy_sizeof(), to clearly indicate use of sizeof() to prevent bugs with pointers-to-a-buf? -- To view, visit https://gerrit.osmocom.org/1599 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie973fc51835066540eba7ed2946ddf33a268b022 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 19 16:36:30 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 19 Jan 2017 16:36:30 +0000 Subject: libosmocore[master]: utils: add osmo_strscpy() macro to use sizeof(dst) In-Reply-To: References: Message-ID: Patch Set 5: > > You might also implement it as a static inline > > instead of a macro > Will sizeof() work with a static inline?? no: #include static inline size_t sz(char *dest) { return sizeof(dest); } int main(void) { char buf[123]; printf("%zu\n", sz(buf)); return 0; } prints: 8 -- To view, visit https://gerrit.osmocom.org/1599 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie973fc51835066540eba7ed2946ddf33a268b022 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 19 16:37:42 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 19 Jan 2017 16:37:42 +0000 Subject: libosmocore[master]: utils: add osmo_strscpy() macro to use sizeof(dst) In-Reply-To: References: Message-ID: Patch Set 5: > > Will sizeof() work with a static inline?? > > no: you are right but that shows why your scpy is a dangerous macro? It assumes input is char foo[4] but will work with char* too. -- To view, visit https://gerrit.osmocom.org/1599 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie973fc51835066540eba7ed2946ddf33a268b022 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 19 16:41:14 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 19 Jan 2017 16:41:14 +0000 Subject: libosmocore[master]: utils: add osmo_strscpy() macro to use sizeof(dst) In-Reply-To: References: Message-ID: Patch Set 5: yea it is kind of dangerous ... however, our entire code base uses sizeof *everywhere* except one or two exceptions (<1%). The name osmo_strcpy_sizeof(a, b) would highlight this and be slightly shorter than osmo_strlcpy(a, b, sizeof(a)) ... what do you think, rather abandon? -- To view, visit https://gerrit.osmocom.org/1599 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie973fc51835066540eba7ed2946ddf33a268b022 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 19 16:46:57 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 19 Jan 2017 16:46:57 +0000 Subject: libosmocore[master]: utils: add osmo_strscpy() macro to use sizeof(dst) In-Reply-To: References: Message-ID: Patch Set 5: make that <2% ;) -- To view, visit https://gerrit.osmocom.org/1599 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie973fc51835066540eba7ed2946ddf33a268b022 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 19 16:48:02 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 19 Jan 2017 16:48:02 +0000 Subject: libosmocore[master]: utils: add osmo_strscpy() macro to use sizeof(dst) In-Reply-To: References: Message-ID: Patch Set 5: > yea it is kind of dangerous ... however, our entire code base uses > sizeof *everywhere* except one or two exceptions (<1%). > > The name osmo_strcpy_sizeof(a, b) would highlight this and be > slightly shorter than osmo_strlcpy(a, b, sizeof(a)) ... what do you > think, rather abandon? yes but the array and sizeof are next to each other. check this http://stackoverflow.com/questions/19452971/array-size-macro-that-rejects-pointers. We could make your scpy work only with arrays... -- To view, visit https://gerrit.osmocom.org/1599 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie973fc51835066540eba7ed2946ddf33a268b022 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 19 17:06:15 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 19 Jan 2017 17:06:15 +0000 Subject: libosmocore[master]: utils: add osmo_strscpy() macro to use sizeof(dst) In-Reply-To: References: Message-ID: Patch Set 5: > yes but the array and sizeof are next to each other. which makes sense, right? '...sizeof(a...' > http://stackoverflow.com/questions/19452971/array-size-macro-that-rejects-pointers interesting :) we depend on GNU-C anyway, do we? > #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) > > with > > #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0])) > > and > > #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) With this (slightly bulky) stuff in there, are you saying that osmo_strscpy() would be a good name after all? Or maybe osmo_strbcpy() for "buffer"... others have also used strzcpy and strbcpy names, but b meaning padding with "blank" (space?) and z meaning NUL, as it seems... http://www.conetic.com/helpdoc/manpage/strzcpy.C.3.html (whoever those people are) so I guess osmo_strcpy_sizeof() is still most clear. Single letters are so ambiguous. -- To view, visit https://gerrit.osmocom.org/1599 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie973fc51835066540eba7ed2946ddf33a268b022 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 19 21:53:38 2017 From: gerrit-no-reply at lists.osmocom.org (Tom Tsou) Date: Thu, 19 Jan 2017 21:53:38 +0000 Subject: [PATCH] osmo-trx[master]: Revert "uhd: Set minimum supported version to 3.9.0" Message-ID: Review at https://gerrit.osmocom.org/1635 Revert "uhd: Set minimum supported version to 3.9.0" This reverts commit 93ca09ea61d044e5f8662b28bf084c808cac4f2c. Ettus Research recommends the use of 3.9 series of UHD releases, but requiring this version has lead to issues with broken OBS and packaged binaries by Debian, Ubuntu, and other distributions. Change-Id: Ie6b175ac6d46d091937380c79fdd0125b16ec75f Signed-off-by: Tom Tsou --- M Transceiver52M/UHDDevice.cpp M configure.ac 2 files changed, 11 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/35/1635/1 diff --git a/Transceiver52M/UHDDevice.cpp b/Transceiver52M/UHDDevice.cpp index 0a640f9..d139cdc 100644 --- a/Transceiver52M/UHDDevice.cpp +++ b/Transceiver52M/UHDDevice.cpp @@ -84,9 +84,15 @@ /* * USRP version dependent device timings */ +#ifdef USE_UHD_3_9 #define B2XX_TIMING_1SPS 1.7153e-4 #define B2XX_TIMING_4SPS 1.1696e-4 #define B2XX_TIMING_4_4SPS 6.18462e-5 +#else +#define B2XX_TIMING_1SPS 9.9692e-5 +#define B2XX_TIMING_4SPS 6.9248e-5 +#define B2XX_TIMING_4_4SPS 4.52308e-5 +#endif /* * Tx / Rx sample offset values. In a perfect world, there is no group delay diff --git a/configure.ac b/configure.ac index b41382f..7e394c2 100644 --- a/configure.ac +++ b/configure.ac @@ -97,9 +97,12 @@ ]) AS_IF([test "x$with_usrp1" != "xyes"],[ - PKG_CHECK_MODULES(UHD, uhd >= 003.009) + PKG_CHECK_MODULES(UHD, uhd >= 003.009, + [AC_DEFINE(USE_UHD_3_9, 1, UHD version 3.9.0 or higher)], + [PKG_CHECK_MODULES(UHD, uhd >= 003.005.004)] + ) + AC_DEFINE(USE_UHD, 1, All UHD versions) PKG_CHECK_MODULES(FFTWF, fftw3f) - AC_DEFINE(USE_UHD, 1, Using UHD driver) ]) AS_IF([test "x$with_singledb" = "xyes"], [ -- To view, visit https://gerrit.osmocom.org/1635 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie6b175ac6d46d091937380c79fdd0125b16ec75f Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Tom Tsou From gerrit-no-reply at lists.osmocom.org Thu Jan 19 23:56:19 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 19 Jan 2017 23:56:19 +0000 Subject: osmo-trx[master]: Revert "uhd: Set minimum supported version to 3.9.0" In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 Tom, so far only you can +2 for osmo-trx, so please go ahead and merge... I think consensus has been established on the ML. -- To view, visit https://gerrit.osmocom.org/1635 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie6b175ac6d46d091937380c79fdd0125b16ec75f Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Tom Tsou Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 20 00:04:53 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 20 Jan 2017 00:04:53 +0000 Subject: openbsc[master]: Revert "Turn some warnings into errors" In-Reply-To: References: Message-ID: Patch Set 1: Unless the ./configure step tells me to install the right dependency instead of syntax erroring, you won't get a +2 for a revert-of-the-revert from me. Pretty much everyone will stumble on that. (And I'm still ignorant on why the dep is necessary) -- To view, visit https://gerrit.osmocom.org/1591 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2b368500b07f233882ef854eca1fa21f6df39e29 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 20 09:29:43 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 20 Jan 2017 09:29:43 +0000 Subject: osmo-trx[master]: Revert "uhd: Set minimum supported version to 3.9.0" In-Reply-To: References: Message-ID: Patch Set 1: I think we should also put explicit uhd version requirements into debian/control. -- To view, visit https://gerrit.osmocom.org/1635 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie6b175ac6d46d091937380c79fdd0125b16ec75f Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Tom Tsou Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 20 11:23:16 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 20 Jan 2017 11:23:16 +0000 Subject: [PATCH] osmo-bts[master]: deb: use gsm_data_shared.* from openbsc-dev Message-ID: Review at https://gerrit.osmocom.org/1636 deb: use gsm_data_shared.* from openbsc-dev Use gsm_data-shared.* from absolute path where it's installed by openbsc-dev package instead of relative path to fix OBS package building. Change-Id: Iec6b0f0eb0b7fffaa814c9769c0ee777d641a07f Related: OS#1860 --- A debian/patches/01_location_of_gsm_data_shared.patch A debian/patches/series M debian/source/format 3 files changed, 21 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/36/1636/1 diff --git a/debian/patches/01_location_of_gsm_data_shared.patch b/debian/patches/01_location_of_gsm_data_shared.patch new file mode 100644 index 0000000..b0a1499 --- /dev/null +++ b/debian/patches/01_location_of_gsm_data_shared.patch @@ -0,0 +1,18 @@ +From: Ruben Undheim +Date: Sat, 28 May 2016 09:38:56 +0200 +Subject: In order to build osmo-bts, + some files shared with openbsc needs to be available. This replaces + the search path for these files so that they are picked from the openbsc-dev + package. + +--- + src/common/gsm_data_shared.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/common/gsm_data_shared.c b/src/common/gsm_data_shared.c +index 706892d..932d71f 100644 +--- a/src/common/gsm_data_shared.c ++++ b/src/common/gsm_data_shared.c +@@ -1 +1 @@ +-#include "../../../openbsc/openbsc/src/libcommon/gsm_data_shared.c" ++#include "/usr/src/osmocom/openbsc/libcommon/gsm_data_shared.c" diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..e753172 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,2 @@ +01_location_of_gsm_data_shared.patch + diff --git a/debian/source/format b/debian/source/format index 89ae9db..163aaf8 100644 --- a/debian/source/format +++ b/debian/source/format @@ -1 +1 @@ -3.0 (native) +3.0 (quilt) -- To view, visit https://gerrit.osmocom.org/1636 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iec6b0f0eb0b7fffaa814c9769c0ee777d641a07f Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Jan 20 11:34:33 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 20 Jan 2017 11:34:33 +0000 Subject: libosmocore[master]: utils: add osmo_strscpy() macro to use sizeof(dst) In-Reply-To: References: Message-ID: Patch Set 5: -Code-Review I think it should be clear which function is wrapped from the name - so smth like osmo_strlcpy_sz() is preferred. -- To view, visit https://gerrit.osmocom.org/1599 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie973fc51835066540eba7ed2946ddf33a268b022 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 20 11:37:18 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 20 Jan 2017 11:37:18 +0000 Subject: openbsc[master]: gtphub_test: rename llist_len() to _llist_len(), prep for li... In-Reply-To: References: Message-ID: Patch Set 3: (1 comment) This makes patch bigger for no apparent reason. https://gerrit.osmocom.org/#/c/1562/3/openbsc/tests/gtphub/gtphub_test.c File openbsc/tests/gtphub/gtphub_test.c: Line 60: static unsigned int _llist_len(struct llist_head *head) Why mixing type change with rename? -- To view, visit https://gerrit.osmocom.org/1562 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9a7e438de4539c382de54b7337fd18e4bf19d007 Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Jan 20 12:10:48 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 20 Jan 2017 12:10:48 +0000 Subject: [PATCH] openbsc[master]: Revert "Revert "Turn some warnings into errors"" Message-ID: Review at https://gerrit.osmocom.org/1637 Revert "Revert "Turn some warnings into errors"" The commit 98bc7fa50d0731864297f8fb82932d480c426ff6 reverted fd161ccce8ecaad3ddd32dd8b696902e81593ae3 by mistake. Fix this and add explicit check for m4 macro availability to prevent this mistake from reappearing. Change-Id: I631bde22e79ec0318eb9c8114db5861a1d635816 --- M debian/control M openbsc/configure.ac 2 files changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/37/1637/1 diff --git a/debian/control b/debian/control index 44262b9..93b4bd3 100644 --- a/debian/control +++ b/debian/control @@ -4,6 +4,7 @@ Priority: optional Build-Depends: debhelper (>= 9), autotools-dev, + autoconf-archive, pkg-config, libgtp0-dev, libosmocore-dev, diff --git a/openbsc/configure.ac b/openbsc/configure.ac index 0753834..ec2ef49 100644 --- a/openbsc/configure.ac +++ b/openbsc/configure.ac @@ -140,6 +140,18 @@ CFLAGS="$saved_CFLAGS" AC_SUBST(SYMBOL_VISIBILITY) +m4_ifdef([AX_CHECK_COMPILE_FLAG], [ + AX_CHECK_COMPILE_FLAG([-Werror=implicit], [CFLAGS="$CFLAGS -Werror=implicit"]) + AX_CHECK_COMPILE_FLAG([-Werror=maybe-uninitialized], [CFLAGS="$CFLAGS -Werror=maybe-uninitialized"]) + AX_CHECK_COMPILE_FLAG([-Werror=memset-transposed-args], [CFLAGS="$CFLAGS -Werror=memset-transposed-args"]) + AX_CHECK_COMPILE_FLAG([-Werror=null-dereference], [CFLAGS="$CFLAGS -Werror=null-dereference"]) + AX_CHECK_COMPILE_FLAG([-Werror=sizeof-array-argument], [CFLAGS="$CFLAGS -Werror=sizeof-array-argument"]) + AX_CHECK_COMPILE_FLAG([-Werror=sizeof-pointer-memaccess], [CFLAGS="$CFLAGS -Werror=sizeof-pointer-memaccess"]) + ], [ + AC_MSG_ERROR([You have to install autoconf-archive package.]) + ] +) + # Coverage build taken from WebKit's configure.in AC_MSG_CHECKING([whether to enable code coverage support]) AC_ARG_ENABLE(coverage, -- To view, visit https://gerrit.osmocom.org/1637 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I631bde22e79ec0318eb9c8114db5861a1d635816 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Jan 20 17:57:41 2017 From: gerrit-no-reply at lists.osmocom.org (ikostov) Date: Fri, 20 Jan 2017 17:57:41 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: NITB: add abisip-find and ipaccess-config tools Message-ID: Review at https://gerrit.osmocom.org/1638 NITB: add abisip-find and ipaccess-config tools Change-Id: Ief893a89ff9f307b2a240ec76bb48c9bcd64dedc --- M common/chapters/abis.adoc 1 file changed, 87 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/38/1638/1 diff --git a/common/chapters/abis.adoc b/common/chapters/abis.adoc index 104b156..e7dee8a 100644 --- a/common/chapters/abis.adoc +++ b/common/chapters/abis.adoc @@ -25,3 +25,90 @@ implementation of OsmoBTS and OsmoBSC extend and/or deviate from the TS 08.58 specification in several ways. Please see the _OsmoBTS Abis Protocol Specification_ <> for more information. + +=== Locate Abis/IP based BTS + +We can use a tool called abisip-find to be able to find BTS which is +connected in the network. This tool is located under: +'./openbsc/openbsc/src/ipaccess' + +==== abisip-find + +abisip-find is a small command line tool which is used to search and +find BTS devices in your network (e.g. sysmoBTS, nanoBTS). + +It uses broadcast packets of the UDP variant of the Abis-IP protocol +on port 3006, and thus will find any BTS that can be reached by the +all-network broadcast address 255.255.255.255 + +When program is started it will print one line for each BTS it can find. + +.Example: using abisip-find to find BTS in your network +---- +$ ./abisip-find +abisip-find (C) 2009 by Harald Welte +This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY + +you might need to specify the outgoing +network interface, e.g. ``abisip-find eth0`` +Trying to find ip.access BTS by broadcast UDP... + +MAC_Address='24:62:78:01:02:03' IP_Address='192.168.0.171' Serial_Number='123' +Unit_ID='sysmoBTS 1002' + +MAC_Address='24:62:78:04:05:06' IP_Address='192.168.0.182' Serial_Number='456' +Unit_ID='sysmoBTS 1002' + +MAC Address='00:01:02:03:04:05' IP Address='192.168.100.123' Unit ID='65535/0/0' +Location_1='' Location 2='BTS_NBT131G' Equipment Version='165a029_55' +Software Version='168a302_v142b13d0' Unit Name='nbts-00-02-95-00-4E-B3' +Serial Number='00123456' + + +^C +---- + +You may have to start the program as a root: +---- +$ sudo ./abisip-find eth0 +---- + +=== Deploying a new nanoBTS + +A tool called ipaccess-config can be used to configure a new ip.access nanoBTS. + +==== ipaccess-config + +This program is very helpful tool which is used to configure Unit ID and +Primarly OML IP. You can find this tool under: +'./openbsc/openbsc/src/ipaccess' + + +.Example: using ipaccess-config to configure Unit ID and Primarly OML IP of +nanoBTS +---- +$ ./ipaccess-config -u 1801/0/0<1> 10.9.1.195<2> -o 10.9.1.154<3> + +ipaccess-config (C) 2009-2010 by Harald Welte and others +This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY + +Trying to connect to ip.access BTS ... +abis_nm.c:316 OC=SITE-MANAGER(00) INST=(ff,ff,ff) STATE CHG: +OP_STATE=Disabled AVAIL=Not installed(07) +abis_nm.c:316 OC=BTS(01) INST=(00,ff,ff) STATE CHG: +OP_STATE=Disabled AVAIL=Not installed(07) ADM=Locked +abis_nm.c:316 OC=BASEBAND-TRANSCEIVER(04) INST=(00,00,ff) STATE CHG: +OP_STATE=Disabled AVAIL=Not installed(07) ADM=Locked +OML link established using TRX 0 +setting Unit ID to '1801/0/0' +setting primary OML link IP to '10.9.1.154' +abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,00) STATE CHG: +OP_STATE=Disabled AVAIL=Not installed(07) ADM=Locked +... +abis_nm.c:2433 OC=BASEBAND-TRANSCEIVER(04) INST=(00,00,ff) IPACCESS(0xf0): +SET NVATTR ACK +Set the NV Attributes. +---- +<1> Unit ID +<2> IP address of the NITB +<3> IP address of the nanoBTS -- To view, visit https://gerrit.osmocom.org/1638 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ief893a89ff9f307b2a240ec76bb48c9bcd64dedc Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: ikostov From gerrit-no-reply at lists.osmocom.org Fri Jan 20 18:39:13 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 20 Jan 2017 18:39:13 +0000 Subject: [PATCH] libosmo-netif[master]: Fix potential NULL dereference Message-ID: Review at https://gerrit.osmocom.org/1639 Fix potential NULL dereference Fix potential NULL pointer dereference in osmux_xfrm_input_deliver() and tighten compiler options to prevent this from reappearing. Change-Id: I5baf369dbf3948565614476980a32be59abaf42a --- M configure.ac M debian/control M src/osmux.c 3 files changed, 15 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/39/1639/1 diff --git a/configure.ac b/configure.ac index 3994aff..7ee7d2b 100644 --- a/configure.ac +++ b/configure.ac @@ -50,6 +50,18 @@ dnl FIXME: We depend on libosmoabis by now until we can move LAPD code here PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 0.0.7) +m4_ifdef([AX_CHECK_COMPILE_FLAG], [ + AX_CHECK_COMPILE_FLAG([-Werror=implicit], [CFLAGS="$CFLAGS -Werror=implicit"]) + AX_CHECK_COMPILE_FLAG([-Werror=maybe-uninitialized], [CFLAGS="$CFLAGS -Werror=maybe-uninitialized"]) + AX_CHECK_COMPILE_FLAG([-Werror=memset-transposed-args], [CFLAGS="$CFLAGS -Werror=memset-transposed-args"]) + AX_CHECK_COMPILE_FLAG([-Werror=null-dereference], [CFLAGS="$CFLAGS -Werror=null-dereference"]) + AX_CHECK_COMPILE_FLAG([-Werror=sizeof-array-argument], [CFLAGS="$CFLAGS -Werror=sizeof-array-argument"]) + AX_CHECK_COMPILE_FLAG([-Werror=sizeof-pointer-memaccess], [CFLAGS="$CFLAGS -Werror=sizeof-pointer-memaccess"]) + ], [ + AC_MSG_ERROR([You have to install autoconf-archive package.]) + ] +) + old_LIBS=$LIBS AC_SEARCH_LIBS([sctp_send], [sctp], [ AC_DEFINE(HAVE_LIBSCTP, 1, [Define 1 to enable SCTP support]) diff --git a/debian/control b/debian/control index f4c94bb..88edb2c 100644 --- a/debian/control +++ b/debian/control @@ -5,6 +5,7 @@ Build-Depends: debhelper (>= 9), autotools-dev, autoconf, + autoconf-archive, automake, libtool, dh-autoreconf, diff --git a/src/osmux.c b/src/osmux.c index 0bee9cc..913d68f 100644 --- a/src/osmux.c +++ b/src/osmux.c @@ -394,7 +394,8 @@ LOGP(DLMIB, LOGL_DEBUG, "invoking delivery function\n"); #endif batch_msg = osmux_build_batch(batch, h->batch_size, h->batch_factor); - + if (!batch_msg) + return; h->stats.output_osmux_msgs++; h->stats.output_osmux_bytes += batch_msg->len; -- To view, visit https://gerrit.osmocom.org/1639 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5baf369dbf3948565614476980a32be59abaf42a Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Jan 20 22:39:03 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 20 Jan 2017 22:39:03 +0000 Subject: openbsc[master]: gtphub_test: rename llist_len() to _llist_len(), prep for li... In-Reply-To: References: Message-ID: Patch Set 3: > (1 comment) > > This makes patch bigger for no apparent reason. The commit log mentions twice that this is prep for libosmocore llist_len()? Firstly avoid the name collision (obvious), secondly apply the unsigned return value holger and you requested (obvious). right? The patch shows all callers of this llist_len and what adjustments for unsigned are necessary (close to none). -- To view, visit https://gerrit.osmocom.org/1562 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9a7e438de4539c382de54b7337fd18e4bf19d007 Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 20 23:08:45 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 20 Jan 2017 23:08:45 +0000 Subject: libosmo-netif[master]: Fix potential NULL dereference In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/1639/1/src/osmux.c File src/osmux.c: Line 398: return; this change should be on its own, without the mostly unrelated addition of the autoconf-archive dependency and configure changes. (at least because this one needs to be merged now, and the autoconf-archive change still needs discussion before we can merge it.) -- To view, visit https://gerrit.osmocom.org/1639 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5baf369dbf3948565614476980a32be59abaf42a Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Jan 20 23:13:35 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 20 Jan 2017 23:13:35 +0000 Subject: [ABANDON] libosmocore[master]: utils: add osmo_strscpy() macro to use sizeof(dst) In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: utils: add osmo_strscpy() macro to use sizeof(dst) ...................................................................... Abandoned By now I think this cosmetic detail is not worth adding safety bloat nor spending our time discussing. We'll just have osmo_strlcpy(a, b, sizeof(a)) everywhere. -- To view, visit https://gerrit.osmocom.org/1599 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Ie973fc51835066540eba7ed2946ddf33a268b022 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Jan 21 00:10:22 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 21 Jan 2017 00:10:22 +0000 Subject: [PATCH] openbsc[master]: fix strncpy() invocation in vty_interface_layer3.c and 3 tests In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1589 to look at the new patch set (#5). fix strncpy() invocation in vty_interface_layer3.c and 3 tests Use osmo_strlcpy() to fix unsafe invocation of strncpy(), which potentially left the result unterminated. Change-Id: I1a119b1760a3e3262538b4b012d476fdce505482 --- M openbsc/src/libcommon/gsup_test_client.c M openbsc/src/libmsc/vty_interface_layer3.c M openbsc/tests/mgcp/mgcp_test.c M openbsc/tests/sgsn/sgsn_test.c 4 files changed, 9 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/89/1589/5 diff --git a/openbsc/src/libcommon/gsup_test_client.c b/openbsc/src/libcommon/gsup_test_client.c index 1889c6f..861212a 100644 --- a/openbsc/src/libcommon/gsup_test_client.c +++ b/openbsc/src/libcommon/gsup_test_client.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -108,7 +109,7 @@ struct osmo_gsup_message gsup = {0}; struct msgb *msg = msgb_alloc_headroom(1200, 200, __func__); - strncpy(gsup.imsi, io->imsi, sizeof(gsup.imsi)); + osmo_strlcpy(gsup.imsi, io->imsi, sizeof(gsup.imsi)); gsup.message_type = OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST; osmo_gsup_encode(msg, &gsup); @@ -123,7 +124,7 @@ struct osmo_gsup_message gsup = {0}; struct msgb *msg = msgb_alloc_headroom(1200, 200, __func__); - strncpy(gsup.imsi, io->imsi, sizeof(gsup.imsi)); + osmo_strlcpy(gsup.imsi, io->imsi, sizeof(gsup.imsi)); gsup.message_type = OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST; osmo_gsup_encode(msg, &gsup); @@ -136,7 +137,7 @@ struct osmo_gsup_message gsup = {0}; struct msgb *msg = msgb_alloc_headroom(1200, 200, __func__); - strncpy(gsup.imsi, io->imsi, sizeof(gsup.imsi)); + osmo_strlcpy(gsup.imsi, io->imsi, sizeof(gsup.imsi)); gsup.message_type = OSMO_GSUP_MSGT_INSERT_DATA_RESULT; osmo_gsup_encode(msg, &gsup); diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index edece51..4f412b1 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -601,7 +601,7 @@ return CMD_WARNING; } - strncpy(subscr->extension, ext, sizeof(subscr->extension)); + osmo_strlcpy(subscr->extension, ext, sizeof(subscr->extension)); db_sync_subscriber(subscr); subscr_put(subscr); diff --git a/openbsc/tests/mgcp/mgcp_test.c b/openbsc/tests/mgcp/mgcp_test.c index e2dc8fa..b2d237e 100644 --- a/openbsc/tests/mgcp/mgcp_test.c +++ b/openbsc/tests/mgcp/mgcp_test.c @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -54,7 +55,7 @@ char buf[2048]; int counter = 0; - strncpy(buf, strline_test_data, sizeof(buf)); + osmo_strlcpy(buf, strline_test_data, sizeof(buf)); for (line = strline_r(buf, &save); line; line = strline_r(NULL, &save)) { diff --git a/openbsc/tests/sgsn/sgsn_test.c b/openbsc/tests/sgsn/sgsn_test.c index b4bcaf6..fea635e 100644 --- a/openbsc/tests/sgsn/sgsn_test.c +++ b/openbsc/tests/sgsn/sgsn_test.c @@ -36,6 +36,7 @@ #include #include #include +#include #include @@ -1292,7 +1293,7 @@ rc = osmo_gsup_decode(msgb_data(msg), msgb_length(msg), &to_peer); OSMO_ASSERT(rc >= 0); OSMO_ASSERT(to_peer.imsi[0] != 0); - strncpy(from_peer.imsi, to_peer.imsi, sizeof(from_peer.imsi)); + osmo_strlcpy(from_peer.imsi, to_peer.imsi, sizeof(from_peer.imsi)); /* This invalidates the pointers in to_peer */ msgb_free(msg); -- To view, visit https://gerrit.osmocom.org/1589 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I1a119b1760a3e3262538b4b012d476fdce505482 Gerrit-PatchSet: 5 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Jan 21 00:10:22 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 21 Jan 2017 00:10:22 +0000 Subject: [PATCH] openbsc[master]: cosmetic: use osmo_strlcpy() everywhere In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1592 to look at the new patch set (#4). cosmetic: use osmo_strlcpy() everywhere Shorten some code and make obvious to the reader that the string copy is done in a safe way. Change-Id: I900726cf06d34128db22a3d3d911ee0d1423b1bd --- M openbsc/src/gprs/gprs_gmm.c M openbsc/src/gprs/gprs_subscriber.c M openbsc/src/gprs/gtphub.c M openbsc/src/gprs/gtphub_ares.c M openbsc/src/gprs/sgsn_auth.c M openbsc/src/libbsc/abis_nm.c M openbsc/src/libbsc/bsc_rf_ctrl.c M openbsc/src/libcommon/gsm_subscriber_base.c M openbsc/src/libcommon/gsup_test_client.c M openbsc/src/libmsc/ctrl_commands.c M openbsc/src/libmsc/db.c M openbsc/src/libmsc/gsm_04_08.c M openbsc/src/libmsc/gsm_04_11.c M openbsc/src/libmsc/meas_feed.c M openbsc/src/libmsc/smpp_openbsc.c M openbsc/src/libmsc/vty_interface_layer3.c M openbsc/src/libtrau/rtp_proxy.c M openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c M openbsc/src/utils/meas_vis.c M openbsc/tests/gtphub/gtphub_test.c M openbsc/tests/sgsn/sgsn_test.c 21 files changed, 97 insertions(+), 117 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/92/1592/4 diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c index e3d5c7d..88be512 100644 --- a/openbsc/src/gprs/gprs_gmm.c +++ b/openbsc/src/gprs/gprs_gmm.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -683,11 +684,10 @@ /* Prepend a '+' for international numbers */ if (called.plan == 1 && called.type == 1) { ctx->msisdn[0] = '+'; - strncpy(&ctx->msisdn[1], called.number, - sizeof(ctx->msisdn) - 1); + osmo_strlcpy(&ctx->msisdn[1], called.number, + sizeof(ctx->msisdn)); } else { - strncpy(&ctx->msisdn[0], called.number, - sizeof(ctx->msisdn) - 1); + osmo_strlcpy(ctx->msisdn, called.number, sizeof(ctx->msisdn)); } } @@ -725,7 +725,7 @@ return; } - strncpy(&ctx->hlr[0], called.number, sizeof(ctx->hlr) - 1); + osmo_strlcpy(ctx->hlr, called.number, sizeof(ctx->hlr)); } #ifdef BUILD_IU @@ -1034,10 +1034,10 @@ mm_ctx_cleanup_free(ictx, "GPRS IMSI re-use"); } } - strncpy(ctx->imsi, mi_string, sizeof(ctx->imsi) - 1); + osmo_strlcpy(ctx->imsi, mi_string, sizeof(ctx->imsi)); break; case GSM_MI_TYPE_IMEI: - strncpy(ctx->imei, mi_string, sizeof(ctx->imei) - 1); + osmo_strlcpy(ctx->imei, mi_string, sizeof(ctx->imei)); break; case GSM_MI_TYPE_IMEISV: break; @@ -1138,7 +1138,7 @@ reject_cause = GMM_CAUSE_NET_FAIL; goto rejected; } - strncpy(ctx->imsi, mi_string, sizeof(ctx->imsi) - 1); + osmo_strlcpy(ctx->imsi, mi_string, sizeof(ctx->imsi)); #endif } if (ctx->ran_type == MM_CTX_T_GERAN_Gb) { diff --git a/openbsc/src/gprs/gprs_subscriber.c b/openbsc/src/gprs/gprs_subscriber.c index 29e21ce..d3e2ea7 100644 --- a/openbsc/src/gprs/gprs_subscriber.c +++ b/openbsc/src/gprs/gprs_subscriber.c @@ -22,6 +22,7 @@ #include #include +#include #include #include @@ -164,7 +165,8 @@ struct msgb *msg = gsup_client_msgb_alloc(); if (strlen(gsup_msg->imsi) == 0 && subscr) - strncpy(gsup_msg->imsi, subscr->imsi, sizeof(gsup_msg->imsi) - 1); + osmo_strlcpy(gsup_msg->imsi, subscr->imsi, + sizeof(gsup_msg->imsi)); gsup_msg->cn_domain = OSMO_GSUP_CN_DOMAIN_PS; osmo_gsup_encode(msg, gsup_msg); @@ -185,7 +187,8 @@ { struct osmo_gsup_message gsup_reply = {0}; - strncpy(gsup_reply.imsi, gsup_orig->imsi, sizeof(gsup_reply.imsi) - 1); + osmo_strlcpy(gsup_reply.imsi, gsup_orig->imsi, + sizeof(gsup_reply.imsi)); gsup_reply.cause = cause; gsup_reply.message_type = OSMO_GSUP_TO_MSGT_ERROR(gsup_orig->message_type); @@ -778,9 +781,8 @@ subscr->flags &= ~GPRS_SUBSCRIBER_ENABLE_PURGE; } - strncpy(subscr->equipment.imei, mmctx->imei, - sizeof(subscr->equipment.imei)-1); - subscr->equipment.imei[sizeof(subscr->equipment.imei)-1] = 0; + osmo_strlcpy(subscr->equipment.imei, mmctx->imei, + sizeof(subscr->equipment.imei)); if (subscr->lac != mmctx->ra.lac) subscr->lac = mmctx->ra.lac; diff --git a/openbsc/src/gprs/gtphub.c b/openbsc/src/gprs/gtphub.c index a0af42b..83e17db 100644 --- a/openbsc/src/gprs/gtphub.c +++ b/openbsc/src/gprs/gtphub.c @@ -2360,8 +2360,7 @@ ggsn->peer = pp; gtphub_port_ref_count_inc(pp); - strncpy(ggsn->apn_oi_str, apn_oi_str, sizeof(ggsn->apn_oi_str)); - ggsn->apn_oi_str[sizeof(ggsn->apn_oi_str) - 1] = '\0'; + osmo_strlcpy(ggsn->apn_oi_str, apn_oi_str, sizeof(ggsn->apn_oi_str)); ggsn->expiry_entry.del_cb = resolved_gssn_del_cb; expiry_add(&hub->expire_slowly, &ggsn->expiry_entry, now); diff --git a/openbsc/src/gprs/gtphub_ares.c b/openbsc/src/gprs/gtphub_ares.c index 667013b..afeeda6 100644 --- a/openbsc/src/gprs/gtphub_ares.c +++ b/openbsc/src/gprs/gtphub_ares.c @@ -121,8 +121,8 @@ apn_oi_str = osmo_apn_qualify_from_imsi(lookup->imsi_str, lookup->apn_ni_str, lookup->have_3dig_mnc); - strncpy(lookup->apn_oi_str, apn_oi_str, sizeof(lookup->apn_oi_str)); - lookup->apn_oi_str[sizeof(lookup->apn_oi_str)-1] = '\0'; + osmo_strlcpy(lookup->apn_oi_str, apn_oi_str, + sizeof(lookup->apn_oi_str)); } static int start_ares_query(struct ggsn_lookup *lookup) @@ -170,11 +170,9 @@ expiring_item_init(&lookup->expiry_entry); lookup->hub = hub; - strncpy(lookup->imsi_str, imsi_str, sizeof(lookup->imsi_str)); - lookup->imsi_str[sizeof(lookup->imsi_str)-1] = '\0'; - - strncpy(lookup->apn_ni_str, apn_ni_str, sizeof(lookup->apn_ni_str)); - lookup->apn_ni_str[sizeof(lookup->apn_ni_str)-1] = '\0'; + osmo_strlcpy(lookup->imsi_str, imsi_str, sizeof(lookup->imsi_str)); + osmo_strlcpy(lookup->apn_ni_str, apn_ni_str, + sizeof(lookup->apn_ni_str)); make_addr_str(lookup); diff --git a/openbsc/src/gprs/sgsn_auth.c b/openbsc/src/gprs/sgsn_auth.c index 4b69a0d..1fa7fc4 100644 --- a/openbsc/src/gprs/sgsn_auth.c +++ b/openbsc/src/gprs/sgsn_auth.c @@ -20,6 +20,7 @@ */ #include +#include #include #include #include @@ -62,7 +63,7 @@ acl = talloc_zero(NULL, struct imsi_acl_entry); if (!acl) return -ENOMEM; - strncpy(acl->imsi, imsi, sizeof(acl->imsi) - 1); + osmo_strlcpy(acl->imsi, imsi, sizeof(acl->imsi)); llist_add(&acl->list, &cfg->imsi_acl); diff --git a/openbsc/src/libbsc/abis_nm.c b/openbsc/src/libbsc/abis_nm.c index 0c723e8..2698225 100644 --- a/openbsc/src/libbsc/abis_nm.c +++ b/openbsc/src/libbsc/abis_nm.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -2235,8 +2236,7 @@ } /* construct new filename */ - strncpy(dir, bs11_sw->swl_fname, sizeof(dir)); - dir[sizeof(dir)-1] = '\0'; + osmo_strlcpy(dir, bs11_sw->swl_fname, sizeof(dir)); strncat(fle->fname, dirname(dir), sizeof(fle->fname) - 1); strcat(fle->fname, "/"); strncat(fle->fname, file_id, sizeof(fle->fname) - 1 -strlen(fle->fname)); @@ -2307,8 +2307,7 @@ bs11_sw->user_cb = cbfn; bs11_sw->forced = forced; - strncpy(bs11_sw->swl_fname, fname, sizeof(bs11_sw->swl_fname)); - bs11_sw->swl_fname[sizeof(bs11_sw->swl_fname)-1] = '\0'; + osmo_strlcpy(bs11_sw->swl_fname, fname, sizeof(bs11_sw->swl_fname)); rc = bs11_read_swl_file(bs11_sw); if (rc < 0) return rc; diff --git a/openbsc/src/libbsc/bsc_rf_ctrl.c b/openbsc/src/libbsc/bsc_rf_ctrl.c index 0538482..59fac35 100644 --- a/openbsc/src/libbsc/bsc_rf_ctrl.c +++ b/openbsc/src/libbsc/bsc_rf_ctrl.c @@ -451,8 +451,7 @@ } local.sun_family = AF_UNIX; - strncpy(local.sun_path, path, sizeof(local.sun_path)); - local.sun_path[sizeof(local.sun_path) - 1] = '\0'; + osmo_strlcpy(local.sun_path, path, sizeof(local.sun_path)); unlink(local.sun_path); /* we use the same magic that X11 uses in Xtranssock.c for diff --git a/openbsc/src/libcommon/gsm_subscriber_base.c b/openbsc/src/libcommon/gsm_subscriber_base.c index 1f98cc6..1ecdee5 100644 --- a/openbsc/src/libcommon/gsm_subscriber_base.c +++ b/openbsc/src/libcommon/gsm_subscriber_base.c @@ -28,6 +28,7 @@ #include #include +#include #include #include @@ -115,7 +116,7 @@ if (!subscr) return NULL; - strncpy(subscr->imsi, imsi, sizeof(subscr->imsi)-1); + osmo_strlcpy(subscr->imsi, imsi, sizeof(subscr->imsi)); subscr->group = sgrp; return subscr; } diff --git a/openbsc/src/libcommon/gsup_test_client.c b/openbsc/src/libcommon/gsup_test_client.c index 861212a..8be4e7a 100644 --- a/openbsc/src/libcommon/gsup_test_client.c +++ b/openbsc/src/libcommon/gsup_test_client.c @@ -75,8 +75,7 @@ return NULL; io = talloc_zero(ctx, struct imsi_op); - strncpy(io->imsi, imsi, sizeof(io->imsi)); - io->imsi[sizeof(io->imsi)-1] = '\0'; + osmo_strlcpy(io->imsi, imsi, sizeof(io->imsi)); io->type = type; io->timer.cb = imsi_op_timer_cb; io->timer.data = io; diff --git a/openbsc/src/libmsc/ctrl_commands.c b/openbsc/src/libmsc/ctrl_commands.c index 79e136d..d153247 100644 --- a/openbsc/src/libmsc/ctrl_commands.c +++ b/openbsc/src/libmsc/ctrl_commands.c @@ -20,6 +20,7 @@ */ #include +#include #include #include #include @@ -103,8 +104,7 @@ goto fail; subscr->authorized = 1; - strncpy(subscr->extension, msisdn, GSM_EXTENSION_LENGTH - 1); - subscr->extension[GSM_EXTENSION_LENGTH-1] = '\0'; + osmo_strlcpy(subscr->extension, msisdn, sizeof(subscr->extension)); /* put it back to the db */ rc = db_sync_subscriber(subscr); diff --git a/openbsc/src/libmsc/db.c b/openbsc/src/libmsc/db.c index 5cccb32..68dac76 100644 --- a/openbsc/src/libmsc/db.c +++ b/openbsc/src/libmsc/db.c @@ -39,6 +39,7 @@ #include #include #include +#include #include @@ -240,7 +241,7 @@ snprintf(buf, sizeof(buf), "%llu", sender_id); sender = db_get_subscriber(GSM_SUBSCRIBER_ID, buf); OSMO_ASSERT(sender); - strncpy(sms->src.addr, sender->extension, sizeof(sms->src.addr)-1); + osmo_strlcpy(sms->src.addr, sender->extension, sizeof(sms->src.addr)); subscr_direct_free(sender); sender = NULL; @@ -252,10 +253,8 @@ "data_coding_scheme"); daddr = dbi_result_get_string(result, "dest_addr"); - if (daddr) { - strncpy(sms->dst.addr, daddr, sizeof(sms->dst.addr)); - sms->dst.addr[sizeof(sms->dst.addr)-1] = '\0'; - } + if (daddr) + osmo_strlcpy(sms->dst.addr, daddr, sizeof(sms->dst.addr)); sms->user_data_len = dbi_result_get_field_length(result, "user_data"); user_data = dbi_result_get_binary(result, "user_data"); @@ -264,10 +263,8 @@ memcpy(sms->user_data, user_data, sms->user_data_len); text = dbi_result_get_string(result, "text"); - if (text) { - strncpy(sms->text, text, sizeof(sms->text)); - sms->text[sizeof(sms->text)-1] = '\0'; - } + if (text) + osmo_strlcpy(sms->text, text, sizeof(sms->text)); return sms; } @@ -549,7 +546,7 @@ return NULL; } subscr->id = dbi_conn_sequence_last(conn, NULL); - strncpy(subscr->imsi, imsi, sizeof(subscr->imsi)-1); + osmo_strlcpy(subscr->imsi, imsi, sizeof(subscr->imsi)); dbi_result_free(result); LOGP(DDB, LOGL_INFO, "New Subscriber: ID %llu, IMSI %s\n", subscr->id, subscr->imsi); if (alloc_exten) @@ -585,7 +582,7 @@ string = dbi_result_get_string(result, "imei"); if (string) - strncpy(equip->imei, string, sizeof(equip->imei)-1); + osmo_strlcpy(equip->imei, string, sizeof(equip->imei)); string = dbi_result_get_string(result, "classmark1"); if (string) { @@ -824,21 +821,19 @@ const char *string; string = dbi_result_get_string(result, "imsi"); if (string) - strncpy(subscr->imsi, string, sizeof(subscr->imsi)-1); + osmo_strlcpy(subscr->imsi, string, sizeof(subscr->imsi)); string = dbi_result_get_string(result, "tmsi"); if (string) subscr->tmsi = tmsi_from_string(string); string = dbi_result_get_string(result, "name"); - if (string) { - strncpy(subscr->name, string, GSM_NAME_LENGTH); - subscr->name[sizeof(subscr->name)-1] = '\0'; - } + if (string) + osmo_strlcpy(subscr->name, string, sizeof(subscr->name)); string = dbi_result_get_string(result, "extension"); if (string) - strncpy(subscr->extension, string, GSM_EXTENSION_LENGTH); + osmo_strlcpy(subscr->extension, string, sizeof(subscr->extension)); subscr->lac = dbi_result_get_ulonglong(result, "lac"); @@ -1351,8 +1346,7 @@ unsigned long long equipment_id, watch_id; dbi_result result; - strncpy(subscriber->equipment.imei, imei, - sizeof(subscriber->equipment.imei)-1); + osmo_strlcpy(subscriber->equipment.imei, imei, sizeof(subscriber->equipment.imei)); result = dbi_conn_queryf(conn, "INSERT OR IGNORE INTO Equipment " @@ -1502,19 +1496,15 @@ sms->dst.npi = dbi_result_get_ulonglong(result, "dest_npi"); sms->dst.ton = dbi_result_get_ulonglong(result, "dest_ton"); daddr = dbi_result_get_string(result, "dest_addr"); - if (daddr) { - strncpy(sms->dst.addr, daddr, sizeof(sms->dst.addr)); - sms->dst.addr[sizeof(sms->dst.addr)-1] = '\0'; - } + if (daddr) + osmo_strlcpy(sms->dst.addr, daddr, sizeof(sms->dst.addr)); sms->receiver = subscr_get_by_extension(net->subscr_group, sms->dst.addr); sms->src.npi = dbi_result_get_ulonglong(result, "src_npi"); sms->src.ton = dbi_result_get_ulonglong(result, "src_ton"); saddr = dbi_result_get_string(result, "src_addr"); - if (saddr) { - strncpy(sms->src.addr, saddr, sizeof(sms->src.addr)); - sms->src.addr[sizeof(sms->src.addr)-1] = '\0'; - } + if (saddr) + osmo_strlcpy(sms->src.addr, saddr, sizeof(sms->src.addr)); sms->user_data_len = dbi_result_get_field_length(result, "user_data"); user_data = dbi_result_get_binary(result, "user_data"); @@ -1523,10 +1513,8 @@ memcpy(sms->user_data, user_data, sms->user_data_len); text = dbi_result_get_string(result, "text"); - if (text) { - strncpy(sms->text, text, sizeof(sms->text)); - sms->text[sizeof(sms->text)-1] = '\0'; - } + if (text) + osmo_strlcpy(sms->text, text, sizeof(sms->text)); return sms; } diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index 34492bb..742f803 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -65,6 +65,7 @@ #include #include #include +#include #include #include @@ -1973,10 +1974,9 @@ /* use subscriber as calling party number */ setup.fields |= MNCC_F_CALLING; - strncpy(setup.calling.number, trans->subscr->extension, - sizeof(setup.calling.number)-1); - strncpy(setup.imsi, trans->subscr->imsi, - sizeof(setup.imsi)-1); + osmo_strlcpy(setup.calling.number, trans->subscr->extension, + sizeof(setup.calling.number)); + osmo_strlcpy(setup.imsi, trans->subscr->imsi, sizeof(setup.imsi)); /* bearer capability */ if (TLVP_PRESENT(&tp, GSM48_IE_BEARER_CAP)) { @@ -2153,8 +2153,8 @@ } /* IMSI of called subscriber */ - strncpy(call_conf.imsi, trans->subscr->imsi, - sizeof(call_conf.imsi)-1); + osmo_strlcpy(call_conf.imsi, trans->subscr->imsi, + sizeof(call_conf.imsi)); new_cc_state(trans, GSM_CSTATE_MO_TERM_CALL_CONF); @@ -2307,10 +2307,9 @@ tlv_parse(&tp, &gsm48_att_tlvdef, gh->data, payload_len, 0, 0); /* use subscriber as connected party number */ connect.fields |= MNCC_F_CONNECTED; - strncpy(connect.connected.number, trans->subscr->extension, - sizeof(connect.connected.number)-1); - strncpy(connect.imsi, trans->subscr->imsi, - sizeof(connect.imsi)-1); + osmo_strlcpy(connect.connected.number, trans->subscr->extension, + sizeof(connect.connected.number)); + osmo_strlcpy(connect.imsi, trans->subscr->imsi, sizeof(connect.imsi)); /* facility */ if (TLVP_PRESENT(&tp, GSM48_IE_FACILITY)) { diff --git a/openbsc/src/libmsc/gsm_04_11.c b/openbsc/src/libmsc/gsm_04_11.c index 48a87e0..6164a08 100644 --- a/openbsc/src/libmsc/gsm_04_11.c +++ b/openbsc/src/libmsc/gsm_04_11.c @@ -37,6 +37,7 @@ #include #include +#include #include #include @@ -92,15 +93,15 @@ return NULL; sms->receiver = subscr_get(receiver); - strncpy(sms->text, text, sizeof(sms->text)-1); + osmo_strlcpy(sms->text, text, sizeof(sms->text)); - strncpy(sms->src.addr, sender->extension, sizeof(sms->src.addr)-1); + osmo_strlcpy(sms->src.addr, sender->extension, sizeof(sms->src.addr)); sms->reply_path_req = 0; sms->status_rep_req = 0; sms->ud_hdr_ind = 0; sms->protocol_id = 0; /* implicit */ sms->data_coding_scheme = dcs; - strncpy(sms->dst.addr, receiver->extension, sizeof(sms->dst.addr)-1); + osmo_strlcpy(sms->dst.addr, receiver->extension, sizeof(sms->dst.addr)); /* Generate user_data */ sms->user_data_len = gsm_7bit_encode_n(sms->user_data, sizeof(sms->user_data), sms->text, NULL); @@ -464,7 +465,8 @@ } } - strncpy(gsms->src.addr, conn->subscr->extension, sizeof(gsms->src.addr)-1); + osmo_strlcpy(gsms->src.addr, conn->subscr->extension, + sizeof(gsms->src.addr)); LOGP(DLSMS, LOGL_INFO, "RX SMS: Sender: %s, MTI: 0x%02x, VPF: 0x%02x, " "MR: 0x%02x PID: 0x%02x, DCS: 0x%02x, DA: %s, " diff --git a/openbsc/src/libmsc/meas_feed.c b/openbsc/src/libmsc/meas_feed.c index cd2b648..3ddcdc3 100644 --- a/openbsc/src/libmsc/meas_feed.c +++ b/openbsc/src/libmsc/meas_feed.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -52,12 +53,9 @@ mfm->hdr.version = MEAS_FEED_VERSION; /* fill in MEAS_FEED_MEAS specific header */ - strncpy(mfm->imsi, subscr->imsi, sizeof(mfm->imsi)-1); - mfm->imsi[sizeof(mfm->imsi)-1] = '\0'; - strncpy(mfm->name, subscr->name, sizeof(mfm->name)-1); - mfm->name[sizeof(mfm->name)-1] = '\0'; - strncpy(mfm->scenario, g_mfs.scenario, sizeof(mfm->scenario)); - mfm->scenario[sizeof(mfm->scenario)-1] = '\0'; + osmo_strlcpy(mfm->imsi, subscr->imsi, sizeof(mfm->imsi)); + osmo_strlcpy(mfm->name, subscr->name, sizeof(mfm->name)); + osmo_strlcpy(mfm->scenario, g_mfs.scenario, sizeof(mfm->scenario)); /* copy the entire measurement report */ memcpy(&mfm->mr, mr, sizeof(mfm->mr)); @@ -160,8 +158,7 @@ void meas_feed_scenario_set(const char *name) { - strncpy(g_mfs.scenario, name, sizeof(g_mfs.scenario)-1); - g_mfs.scenario[sizeof(g_mfs.scenario)-1] = '\0'; + osmo_strlcpy(g_mfs.scenario, name, sizeof(g_mfs.scenario)); } const char *meas_feed_scenario_get(void) diff --git a/openbsc/src/libmsc/smpp_openbsc.c b/openbsc/src/libmsc/smpp_openbsc.c index 228e61d..657272e 100644 --- a/openbsc/src/libmsc/smpp_openbsc.c +++ b/openbsc/src/libmsc/smpp_openbsc.c @@ -133,12 +133,13 @@ sms->receiver = dest; sms->dst.ton = submit->dest_addr_ton; sms->dst.npi = submit->dest_addr_npi; - strncpy(sms->dst.addr, dest->extension, sizeof(sms->dst.addr)-1); + osmo_strlcpy(sms->dst.addr, dest->extension, sizeof(sms->dst.addr)); /* fill in the source address */ sms->src.ton = submit->source_addr_ton; sms->src.npi = submit->source_addr_npi; - strncpy(sms->src.addr, (char *)submit->source_addr, sizeof(sms->src.addr)-1); + osmo_strlcpy(sms->src.addr, (char *)submit->source_addr, + sizeof(sms->src.addr)); if (submit->esm_class & 0x40) sms->ud_hdr_ind = 1; diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index 4f412b1..490d794 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -567,8 +567,7 @@ return CMD_WARNING; } - strncpy(subscr->name, name, sizeof(subscr->name)); - subscr->name[sizeof(subscr->name)-1] = '\0'; + osmo_strlcpy(subscr->name, name, sizeof(subscr->name)); talloc_free(name); db_sync_subscriber(subscr); diff --git a/openbsc/src/libtrau/rtp_proxy.c b/openbsc/src/libtrau/rtp_proxy.c index ed19175..6b38ee5 100644 --- a/openbsc/src/libtrau/rtp_proxy.c +++ b/openbsc/src/libtrau/rtp_proxy.c @@ -29,6 +29,7 @@ #include /* uname() */ #include +#include #include #include #include @@ -368,9 +369,9 @@ } if (rtph->type == RTCP_TYPE_SDES) { char new_cname[255]; - strncpy(new_cname, inet_ntoa(rss->sin_local.sin_addr), - sizeof(new_cname)); - new_cname[sizeof(new_cname)-1] = '\0'; + osmo_strlcpy(new_cname, + inet_ntoa(rss->sin_local.sin_addr), + sizeof(new_cname)); rc = rtcp_sdes_cname_mangle(msg, rtph, &old_len, new_cname); if (rc < 0) diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c b/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c index 58667fe..e7c387c 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c @@ -31,6 +31,7 @@ #include #include +#include #include #include @@ -129,15 +130,15 @@ { if (strncmp(chosen_number, "00", 2) == 0) { called->type = 1; - strncpy(called->number, chosen_number + 2, sizeof(called->number)); + osmo_strlcpy(called->number, chosen_number + 2, + sizeof(called->number)); } else { /* rewrite international to unknown */ if (called->type == 1) called->type = 0; - strncpy(called->number, chosen_number, sizeof(called->number)); + osmo_strlcpy(called->number, chosen_number, + sizeof(called->number)); } - - called->number[sizeof(called->number) - 1] = '\0'; } /** diff --git a/openbsc/src/utils/meas_vis.c b/openbsc/src/utils/meas_vis.c index 061a7a4..316d203 100644 --- a/openbsc/src/utils/meas_vis.c +++ b/openbsc/src/utils/meas_vis.c @@ -73,7 +73,7 @@ ms = find_ms(imsi); if (!ms) { ms = talloc_zero(NULL, struct ms_state); - strncpy(ms->imsi, imsi, sizeof(ms->imsi)-1); + osmo_strlcpy(ms->imsi, imsi, sizeof(ms->imsi)); ms->ul._lbl[0] = ms->ul.label; ms->dl._lbl[0] = ms->dl.label; llist_add_tail(&ms->list, &g_st.ms_list); @@ -88,7 +88,7 @@ struct ms_state *ms = find_alloc_ms(mfm->imsi); time_t now = time(NULL); - strncpy(ms->name, mfm->name, sizeof(ms->imsi)-1); + osmo_strlcpy(ms->name, mfm->name, sizeof(ms->name)); memcpy(&ms->mr, &mfm->mr, sizeof(ms->mr)); ms->ul.last_update = now; if (ms->mr.flags & MEAS_REP_F_DL_VALID) diff --git a/openbsc/tests/gtphub/gtphub_test.c b/openbsc/tests/gtphub/gtphub_test.c index 7d7673b..a8e4ae2 100644 --- a/openbsc/tests/gtphub/gtphub_test.c +++ b/openbsc/tests/gtphub/gtphub_test.c @@ -449,21 +449,15 @@ " returning GGSN addr from imsi %s ni %s: %s\n", imsi_str, apn_ni_str, gtphub_port_str(pp)); - if (imsi_str) { - strncpy(resolve_ggsn_got_imsi, imsi_str, - sizeof(resolve_ggsn_got_imsi)); - resolve_ggsn_got_imsi[sizeof(resolve_ggsn_got_imsi) - 1] = '\0'; - } - else - strcpy(resolve_ggsn_got_imsi, "(null)"); + if (!imsi_str) + imsi_str = "(null)"; + osmo_strlcpy(resolve_ggsn_got_imsi, imsi_str, + sizeof(resolve_ggsn_got_imsi)); - if (apn_ni_str) { - strncpy(resolve_ggsn_got_ni, apn_ni_str, - sizeof(resolve_ggsn_got_ni)); - resolve_ggsn_got_ni[sizeof(resolve_ggsn_got_ni) - 1] = '\0'; - } - else - strcpy(resolve_ggsn_got_ni, "(null)"); + if (!apn_ni_str) + apn_ni_str = "(null)"; + osmo_strlcpy(resolve_ggsn_got_ni, apn_ni_str, + sizeof(resolve_ggsn_got_ni)); return pp; } diff --git a/openbsc/tests/sgsn/sgsn_test.c b/openbsc/tests/sgsn/sgsn_test.c index fea635e..e1fd2e7 100644 --- a/openbsc/tests/sgsn/sgsn_test.c +++ b/openbsc/tests/sgsn/sgsn_test.c @@ -2248,7 +2248,7 @@ /* Create a context */ OSMO_ASSERT(count(gprs_llme_list()) == 0); ctx = alloc_mm_ctx(local_tlli, &raid); - strncpy(ctx->imsi, imsi1, sizeof(ctx->imsi) - 1); + osmo_strlcpy(ctx->imsi, imsi1, sizeof(ctx->imsi)); /* Allocate and attach a subscriber */ s1 = gprs_subscr_get_or_create_by_mmctx(ctx); @@ -2273,7 +2273,7 @@ pdp_data = sgsn_subscriber_pdp_data_alloc(s1->sgsn_data); pdp_data->context_id = 1; pdp_data->pdp_type = 0x0121; - strncpy(pdp_data->apn_str, "*", sizeof(pdp_data->apn_str)-1); + osmo_strlcpy(pdp_data->apn_str, "*", sizeof(pdp_data->apn_str)); /* Resolve GGSNs */ @@ -2326,7 +2326,7 @@ /* Add PDP data entry to subscriber */ - strncpy(pdp_data->apn_str, "Test.Apn", sizeof(pdp_data->apn_str)-1); + osmo_strlcpy(pdp_data->apn_str, "Test.Apn", sizeof(pdp_data->apn_str)); tp.lv[GSM48_IE_GSM_APN].len = gprs_str_to_apn(apn_enc, sizeof(apn_enc), "Test.Apn"); -- To view, visit https://gerrit.osmocom.org/1592 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I900726cf06d34128db22a3d3d911ee0d1423b1bd Gerrit-PatchSet: 4 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Jan 21 00:14:53 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 21 Jan 2017 00:14:53 +0000 Subject: [PATCH] libosmocore[master]: linuxlist.h: add llist_count() In-Reply-To: References: Message-ID: Hello Max, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1563 to look at the new patch set (#5). linuxlist.h: add llist_count() After subchan_demux.c in libosmo-abis, osmo-bts/common/vty.c and openbsc's gtphub_test.c, more places would like to count the llist items (mostly unit tests). Instead of proliferating numerous local implementations, add here. NOTE: other than the previous llist_len() implementations, this one returns an *unsigned* length, which might need some adjusting of current callers. Call this llist_count() rather than llist_len() to highlight the fact that this is actively iterating. This also avoids a potential naming conflict when library versions mismatch. Change-Id: Ic49adc7a346f5722bf624d7d3b4a735e4220ae15 --- M include/osmocom/core/linuxlist.h 1 file changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/63/1563/5 diff --git a/include/osmocom/core/linuxlist.h b/include/osmocom/core/linuxlist.h index 1c83395..affa827 100644 --- a/include/osmocom/core/linuxlist.h +++ b/include/osmocom/core/linuxlist.h @@ -351,6 +351,22 @@ for ((pos) = (pos)->next, prefetch((pos)->next); (pos) != (head); \ (pos) = (pos)->next, ({ smp_read_barrier_depends(); 0;}), prefetch((pos)->next)) +/*! \brief count nr of llist items by iterating. + * \param head The llist head to count items of. + * \returns Number of items. + * + * This function is not efficient, mostly useful for small lists and non time + * critical cases like unit tests. + */ +static inline unsigned int llist_count(struct llist_head *head) +{ + struct llist_head *entry; + unsigned int i = 0; + llist_for_each(entry, head) + i++; + return i; +} + /*! * }@ */ -- To view, visit https://gerrit.osmocom.org/1563 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic49adc7a346f5722bf624d7d3b4a735e4220ae15 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Jan 21 00:15:39 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 21 Jan 2017 00:15:39 +0000 Subject: [ABANDON] openbsc[master]: gtphub_test: rename llist_len() to _llist_len(), prep for li... In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: gtphub_test: rename llist_len() to _llist_len(), prep for libosmocore llist_len() ...................................................................... Abandoned I decided to call it llist_count instead to highlight the active iteration; in effect, no naming conflict will arise -- To view, visit https://gerrit.osmocom.org/1562 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I9a7e438de4539c382de54b7337fd18e4bf19d007 Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Jan 21 00:16:14 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 21 Jan 2017 00:16:14 +0000 Subject: [ABANDON] libosmo-abis[master]: subchan_demux.c: rename llist_len() to _llist_len(), prep fo... In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: subchan_demux.c: rename llist_len() to _llist_len(), prep for libosmocore llist_len() ...................................................................... Abandoned I decided to call it llist_count instead to highlight the active iteration; in effect, no naming conflict will arise -- To view, visit https://gerrit.osmocom.org/1561 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I99c627cf2a2f0dca1ec5d2ad36e3c3f7f0d8d191 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Sat Jan 21 00:18:51 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 21 Jan 2017 00:18:51 +0000 Subject: [PATCH] libosmo-abis[master]: undup: subchan_demux.c: use libosmocore's llist_count() In-Reply-To: References: Message-ID: Hello Max, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1564 to look at the new patch set (#3). undup: subchan_demux.c: use libosmocore's llist_count() Depends on libosmocore Change-Id Ic49adc7a346f5722bf624d7d3b4a735e4220ae15 Change-Id: I47f1831f1835dc07925dabbc115677087e48fa1b --- M src/subchan_demux.c 1 file changed, 1 insertion(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/64/1564/3 diff --git a/src/subchan_demux.c b/src/subchan_demux.c index f965490..238056c 100644 --- a/src/subchan_demux.c +++ b/src/subchan_demux.c @@ -289,17 +289,6 @@ return i; } -static int llist_len(struct llist_head *head) -{ - struct llist_head *entry; - int i = 0; - - llist_for_each(entry, head) - i++; - - return i; -} - /* evict the 'num_evict' number of oldest entries in the queue */ static void tx_queue_evict(struct mux_subch *sch, int num_evict) { @@ -327,7 +316,7 @@ int len) { struct mux_subch *sch = &mx->subch[s_nr]; - int list_len = llist_len(&sch->tx_queue); + unsigned int list_len = llist_count(&sch->tx_queue); struct subch_txq_entry *tqe = talloc_zero_size(tall_tqe_ctx, sizeof(*tqe) + len); if (!tqe) -- To view, visit https://gerrit.osmocom.org/1564 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I47f1831f1835dc07925dabbc115677087e48fa1b Gerrit-PatchSet: 3 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Sat Jan 21 00:22:11 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 21 Jan 2017 00:22:11 +0000 Subject: [PATCH] openbsc[master]: undup: gtphub_test: use libosmocore's llist_count() In-Reply-To: References: Message-ID: Hello Max, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1565 to look at the new patch set (#4). undup: gtphub_test: use libosmocore's llist_count() Depends on libosmocore Change-Id Ic49adc7a346f5722bf624d7d3b4a735e4220ae15 Change-Id: I67bc1889c064596a2f3e93cc0354b11c720b0225 --- M openbsc/tests/gtphub/gtphub_test.c 1 file changed, 5 insertions(+), 17 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/65/1565/4 diff --git a/openbsc/tests/gtphub/gtphub_test.c b/openbsc/tests/gtphub/gtphub_test.c index 7d7673b..2b542dd 100644 --- a/openbsc/tests/gtphub/gtphub_test.c +++ b/openbsc/tests/gtphub/gtphub_test.c @@ -56,18 +56,6 @@ void *osmo_gtphub_ctx; -/* TODO copied from libosmo-abis/src/subchan_demux.c, remove dup */ -static int llist_len(struct llist_head *head) -{ - struct llist_head *entry; - int i = 0; - - llist_for_each(entry, head) - i++; - - return i; -} - static void nr_mapping_free(struct expiring_item *e) { struct nr_mapping *m = container_of(e, struct nr_mapping, @@ -174,11 +162,11 @@ mapping = nr_map_have(map, origin1, orig, 0); m[i] = mapping->repl; OSMO_ASSERT(m[i] != 0); - OSMO_ASSERT(llist_len(&map->mappings) == (i+1)); + OSMO_ASSERT(llist_count(&map->mappings) == (i+1)); for (check_i = 0; check_i < i; check_i++) OSMO_ASSERT(m[check_i] != m[i]); } - OSMO_ASSERT(llist_len(&map->mappings) == TEST_N_HALF); + OSMO_ASSERT(llist_count(&map->mappings) == TEST_N_HALF); /* create another TEST_N mappings with the same original numbers, but * from a different origin */ @@ -189,11 +177,11 @@ mapping = nr_map_have(map, origin2, orig, 0); m[i2] = mapping->repl; OSMO_ASSERT(m[i2] != 0); - OSMO_ASSERT(llist_len(&map->mappings) == (i2+1)); + OSMO_ASSERT(llist_count(&map->mappings) == (i2+1)); for (check_i = 0; check_i < i2; check_i++) OSMO_ASSERT(m[check_i] != m[i2]); } - OSMO_ASSERT(llist_len(&map->mappings) == TEST_N); + OSMO_ASSERT(llist_count(&map->mappings) == TEST_N); /* verify mappings */ for (i = 0; i < TEST_N_HALF; i++) { @@ -213,7 +201,7 @@ /* remove all mappings */ for (i = 0; i < TEST_N_HALF; i++) { - OSMO_ASSERT(llist_len(&map->mappings) == (TEST_N - 2*i)); + OSMO_ASSERT(llist_count(&map->mappings) == (TEST_N - 2*i)); nr_t orig = TEST_I + i; nr_mapping_del(nr_map_get(map, origin1, orig)); -- To view, visit https://gerrit.osmocom.org/1565 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I67bc1889c064596a2f3e93cc0354b11c720b0225 Gerrit-PatchSet: 4 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Sat Jan 21 00:28:34 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 21 Jan 2017 00:28:34 +0000 Subject: osmo-bts[master]: deb: use gsm_data_shared.* from openbsc-dev In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1636 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iec6b0f0eb0b7fffaa814c9769c0ee777d641a07f Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Jan 21 00:28:36 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 21 Jan 2017 00:28:36 +0000 Subject: [MERGED] osmo-bts[master]: deb: use gsm_data_shared.* from openbsc-dev In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: deb: use gsm_data_shared.* from openbsc-dev ...................................................................... deb: use gsm_data_shared.* from openbsc-dev Use gsm_data-shared.* from absolute path where it's installed by openbsc-dev package instead of relative path to fix OBS package building. Change-Id: Iec6b0f0eb0b7fffaa814c9769c0ee777d641a07f Related: OS#1860 --- A debian/patches/01_location_of_gsm_data_shared.patch A debian/patches/series M debian/source/format 3 files changed, 21 insertions(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/patches/01_location_of_gsm_data_shared.patch b/debian/patches/01_location_of_gsm_data_shared.patch new file mode 100644 index 0000000..b0a1499 --- /dev/null +++ b/debian/patches/01_location_of_gsm_data_shared.patch @@ -0,0 +1,18 @@ +From: Ruben Undheim +Date: Sat, 28 May 2016 09:38:56 +0200 +Subject: In order to build osmo-bts, + some files shared with openbsc needs to be available. This replaces + the search path for these files so that they are picked from the openbsc-dev + package. + +--- + src/common/gsm_data_shared.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/common/gsm_data_shared.c b/src/common/gsm_data_shared.c +index 706892d..932d71f 100644 +--- a/src/common/gsm_data_shared.c ++++ b/src/common/gsm_data_shared.c +@@ -1 +1 @@ +-#include "../../../openbsc/openbsc/src/libcommon/gsm_data_shared.c" ++#include "/usr/src/osmocom/openbsc/libcommon/gsm_data_shared.c" diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..e753172 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,2 @@ +01_location_of_gsm_data_shared.patch + diff --git a/debian/source/format b/debian/source/format index 89ae9db..163aaf8 100644 --- a/debian/source/format +++ b/debian/source/format @@ -1 +1 @@ -3.0 (native) +3.0 (quilt) -- To view, visit https://gerrit.osmocom.org/1636 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iec6b0f0eb0b7fffaa814c9769c0ee777d641a07f Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Jan 21 00:46:55 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 21 Jan 2017 00:46:55 +0000 Subject: [PATCH] openbsc[master]: Turn some compiler warnings into errors In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1637 to look at the new patch set (#2). Turn some compiler warnings into errors Re-apply the reverted commit 98bc7fa50d0731864297f8fb82932d480c426ff6, this time with a clear error message in case autoconf-archive is not installed. Change-Id: I631bde22e79ec0318eb9c8114db5861a1d635816 Tweaked-by: Neels Hofmeyr --- M debian/control M openbsc/configure.ac 2 files changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/37/1637/2 diff --git a/debian/control b/debian/control index 44262b9..93b4bd3 100644 --- a/debian/control +++ b/debian/control @@ -4,6 +4,7 @@ Priority: optional Build-Depends: debhelper (>= 9), autotools-dev, + autoconf-archive, pkg-config, libgtp0-dev, libosmocore-dev, diff --git a/openbsc/configure.ac b/openbsc/configure.ac index 0753834..7e244bc 100644 --- a/openbsc/configure.ac +++ b/openbsc/configure.ac @@ -25,6 +25,11 @@ fi PKG_PROG_PKG_CONFIG([0.20]) +dnl check for AX_CHECK_COMPILE_FLAG +m4_ifdef([AX_CHECK_COMPILE_FLAG], [], [ + AC_MSG_ERROR([Please install autoconf-archive; re-run 'autoreconf -fi' for it to take effect.]) + ]) + dnl checks for libraries AC_SEARCH_LIBS([dlopen], [dl dld], [LIBRARY_DL="$LIBS";LIBS=""]) AC_SUBST(LIBRARY_DL) @@ -140,6 +145,13 @@ CFLAGS="$saved_CFLAGS" AC_SUBST(SYMBOL_VISIBILITY) +AX_CHECK_COMPILE_FLAG([-Werror=implicit], [CFLAGS="$CFLAGS -Werror=implicit"]) +AX_CHECK_COMPILE_FLAG([-Werror=maybe-uninitialized], [CFLAGS="$CFLAGS -Werror=maybe-uninitialized"]) +AX_CHECK_COMPILE_FLAG([-Werror=memset-transposed-args], [CFLAGS="$CFLAGS -Werror=memset-transposed-args"]) +AX_CHECK_COMPILE_FLAG([-Werror=null-dereference], [CFLAGS="$CFLAGS -Werror=null-dereference"]) +AX_CHECK_COMPILE_FLAG([-Werror=sizeof-array-argument], [CFLAGS="$CFLAGS -Werror=sizeof-array-argument"]) +AX_CHECK_COMPILE_FLAG([-Werror=sizeof-pointer-memaccess], [CFLAGS="$CFLAGS -Werror=sizeof-pointer-memaccess"]) + # Coverage build taken from WebKit's configure.in AC_MSG_CHECKING([whether to enable code coverage support]) AC_ARG_ENABLE(coverage, -- To view, visit https://gerrit.osmocom.org/1637 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I631bde22e79ec0318eb9c8114db5861a1d635816 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Jan 21 00:47:21 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 21 Jan 2017 00:47:21 +0000 Subject: openbsc[master]: Turn some compiler warnings into errors In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1637 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I631bde22e79ec0318eb9c8114db5861a1d635816 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Jan 21 01:01:02 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 21 Jan 2017 01:01:02 +0000 Subject: osmo-gsm-manuals[master]: NITB: add abisip-find and ipaccess-config tools In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (1 comment) marking to indicate that I'd like to apply some changes later https://gerrit.osmocom.org/#/c/1638/1//COMMIT_MSG Commit Message: Line 7: NITB: add abisip-find and ipaccess-config tools should probably say "Abis" or "common/abis", not "NITB" -- To view, visit https://gerrit.osmocom.org/1638 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ief893a89ff9f307b2a240ec76bb48c9bcd64dedc Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: ikostov Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sat Jan 21 09:50:57 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 21 Jan 2017 09:50:57 +0000 Subject: osmo-gsm-manuals[master]: NITB: add abisip-find and ipaccess-config tools In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 Also, please fix whitespace at the end of lines. -- To view, visit https://gerrit.osmocom.org/1638 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ief893a89ff9f307b2a240ec76bb48c9bcd64dedc Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: ikostov Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Jan 22 23:51:08 2017 From: gerrit-no-reply at lists.osmocom.org (Tom Tsou) Date: Sun, 22 Jan 2017 23:51:08 +0000 Subject: osmo-trx[master]: uhd: Add X300 sample timing for 4 SPS In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1577 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9153171fe3af95e1cb0d9d35a9287dfde155d184 Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Tom Tsou Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Tom Tsou Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Jan 22 23:51:10 2017 From: gerrit-no-reply at lists.osmocom.org (Tom Tsou) Date: Sun, 22 Jan 2017 23:51:10 +0000 Subject: osmo-trx[master]: Revert "uhd: Set minimum supported version to 3.9.0" In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1635 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie6b175ac6d46d091937380c79fdd0125b16ec75f Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Tom Tsou Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Tom Tsou Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 00:29:44 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 23 Jan 2017 00:29:44 +0000 Subject: libosmo-netif[master]: Fix potential NULL dereference In-Reply-To: References: Message-ID: Patch Set 1: Did it crash on you? Which warning is triggered by the new compiler flags? -- To view, visit https://gerrit.osmocom.org/1639 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5baf369dbf3948565614476980a32be59abaf42a Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 00:30:25 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 23 Jan 2017 00:30:25 +0000 Subject: libosmocore[master]: linuxlist.h: add llist_count() In-Reply-To: References: Message-ID: Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1563 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic49adc7a346f5722bf624d7d3b4a735e4220ae15 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 00:32:24 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 23 Jan 2017 00:32:24 +0000 Subject: openbsc[master]: undup: gtphub_test: use libosmocore's llist_count() In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 Okay, we need to re-trigger the build once the libosmocore change is submitted. -- To view, visit https://gerrit.osmocom.org/1565 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I67bc1889c064596a2f3e93cc0354b11c720b0225 Gerrit-PatchSet: 4 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 00:34:01 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 23 Jan 2017 00:34:01 +0000 Subject: libosmo-abis[master]: undup: subchan_demux.c: use libosmocore's llist_count() In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1564 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I47f1831f1835dc07925dabbc115677087e48fa1b Gerrit-PatchSet: 3 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 00:38:55 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 23 Jan 2017 00:38:55 +0000 Subject: openbsc[master]: vty: remove ignored logging parameters In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 I am not a supporter for churn for the sake of churn. It might have been a bad decision to put that parameter in there but your commit message should tell the story of why removing it makes it better and why the library will not need this information in the (near) future. -- To view, visit https://gerrit.osmocom.org/1583 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I62f752fd88f1d8fefa563648f9864c7c31f87991 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 00:44:26 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 23 Jan 2017 00:44:26 +0000 Subject: osmo-bts[master]: Use system-installed pcuif_proto.h instead of local copy In-Reply-To: References: Message-ID: Patch Set 8: Dependency as in minimum version to require? Or when to rebuild? -- To view, visit https://gerrit.osmocom.org/1258 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4dd2537aeef60c7d154e90f279dc4e7c2392ff76 Gerrit-PatchSet: 8 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 00:45:17 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 23 Jan 2017 00:45:17 +0000 Subject: openbsc[master]: CTRL: remove boilerplate In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1576 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5bcea0b4f4b8f535bef2b423f2013b8b4a218b5b Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 00:46:22 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 23 Jan 2017 00:46:22 +0000 Subject: openbsc[master]: CTRL: remove boilerplate In-Reply-To: References: Message-ID: Patch Set 2: Please update the test result. -- To view, visit https://gerrit.osmocom.org/1576 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5bcea0b4f4b8f535bef2b423f2013b8b4a218b5b Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 00:48:01 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 23 Jan 2017 00:48:01 +0000 Subject: libosmocore[master]: Expand and expose ctrl connection allocation In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 the new connect routine is not meant to be here? -- To view, visit https://gerrit.osmocom.org/1629 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I522ed809cbebfd3d7dd08b4ed9137b39ff192e32 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 00:49:24 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 23 Jan 2017 00:49:24 +0000 Subject: libosmocore[master]: Expand and expose ctrl connection allocation In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/1629/2/src/ctrl/control_if.c File src/ctrl/control_if.c: Line 383: ccon->write_queue.bfd.data = data ? data : ccon; I think this is a bad decision. Let's plat the game of least surprise. I wake you up at 4:30 am.. give you a ctrl_connection pointer and I ask what bfd.data points to. What do you answer and why? -- To view, visit https://gerrit.osmocom.org/1629 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I522ed809cbebfd3d7dd08b4ed9137b39ff192e32 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Jan 23 08:38:07 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 23 Jan 2017 08:38:07 +0000 Subject: [MERGED] openbsc[master]: Turn some compiler warnings into errors In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Turn some compiler warnings into errors ...................................................................... Turn some compiler warnings into errors Re-apply the reverted commit 98bc7fa50d0731864297f8fb82932d480c426ff6, this time with a clear error message in case autoconf-archive is not installed. Change-Id: I631bde22e79ec0318eb9c8114db5861a1d635816 Tweaked-by: Neels Hofmeyr --- M debian/control M openbsc/configure.ac 2 files changed, 13 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/control b/debian/control index 44262b9..93b4bd3 100644 --- a/debian/control +++ b/debian/control @@ -4,6 +4,7 @@ Priority: optional Build-Depends: debhelper (>= 9), autotools-dev, + autoconf-archive, pkg-config, libgtp0-dev, libosmocore-dev, diff --git a/openbsc/configure.ac b/openbsc/configure.ac index 0753834..7e244bc 100644 --- a/openbsc/configure.ac +++ b/openbsc/configure.ac @@ -25,6 +25,11 @@ fi PKG_PROG_PKG_CONFIG([0.20]) +dnl check for AX_CHECK_COMPILE_FLAG +m4_ifdef([AX_CHECK_COMPILE_FLAG], [], [ + AC_MSG_ERROR([Please install autoconf-archive; re-run 'autoreconf -fi' for it to take effect.]) + ]) + dnl checks for libraries AC_SEARCH_LIBS([dlopen], [dl dld], [LIBRARY_DL="$LIBS";LIBS=""]) AC_SUBST(LIBRARY_DL) @@ -140,6 +145,13 @@ CFLAGS="$saved_CFLAGS" AC_SUBST(SYMBOL_VISIBILITY) +AX_CHECK_COMPILE_FLAG([-Werror=implicit], [CFLAGS="$CFLAGS -Werror=implicit"]) +AX_CHECK_COMPILE_FLAG([-Werror=maybe-uninitialized], [CFLAGS="$CFLAGS -Werror=maybe-uninitialized"]) +AX_CHECK_COMPILE_FLAG([-Werror=memset-transposed-args], [CFLAGS="$CFLAGS -Werror=memset-transposed-args"]) +AX_CHECK_COMPILE_FLAG([-Werror=null-dereference], [CFLAGS="$CFLAGS -Werror=null-dereference"]) +AX_CHECK_COMPILE_FLAG([-Werror=sizeof-array-argument], [CFLAGS="$CFLAGS -Werror=sizeof-array-argument"]) +AX_CHECK_COMPILE_FLAG([-Werror=sizeof-pointer-memaccess], [CFLAGS="$CFLAGS -Werror=sizeof-pointer-memaccess"]) + # Coverage build taken from WebKit's configure.in AC_MSG_CHECKING([whether to enable code coverage support]) AC_ARG_ENABLE(coverage, -- To view, visit https://gerrit.osmocom.org/1637 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I631bde22e79ec0318eb9c8114db5861a1d635816 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Jan 23 09:28:59 2017 From: gerrit-no-reply at lists.osmocom.org (ikostov) Date: Mon, 23 Jan 2017 09:28:59 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: Abis: add abisip-find and ipaccess-config tools In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1638 to look at the new patch set (#2). Abis: add abisip-find and ipaccess-config tools Change-Id: Ief893a89ff9f307b2a240ec76bb48c9bcd64dedc --- M common/chapters/abis.adoc 1 file changed, 86 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/38/1638/2 diff --git a/common/chapters/abis.adoc b/common/chapters/abis.adoc index 104b156..a53d6f3 100644 --- a/common/chapters/abis.adoc +++ b/common/chapters/abis.adoc @@ -25,3 +25,89 @@ implementation of OsmoBTS and OsmoBSC extend and/or deviate from the TS 08.58 specification in several ways. Please see the _OsmoBTS Abis Protocol Specification_ <> for more information. + +=== Locate Abis/IP based BTS + +We can use a tool called abisip-find to be able to find BTS which is +connected in the network. This tool is located under: +'./openbsc/openbsc/src/ipaccess' + +==== abisip-find + +abisip-find is a small command line tool which is used to search and +find BTS devices in your network (e.g. sysmoBTS, nanoBTS). + +It uses broadcast packets of the UDP variant of the Abis-IP protocol +on port 3006, and thus will find any BTS that can be reached by the +all-network broadcast address 255.255.255.255 + +When program is started it will print one line for each BTS it can find. + +.Example: using abisip-find to find BTS in your network +---- +$ ./abisip-find +abisip-find (C) 2009 by Harald Welte +This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY + +you might need to specify the outgoing +network interface, e.g. ``abisip-find eth0`` +Trying to find ip.access BTS by broadcast UDP... + +MAC_Address='24:62:78:01:02:03' IP_Address='192.168.0.171' Serial_Number='123' +Unit_ID='sysmoBTS 1002' + +MAC_Address='24:62:78:04:05:06' IP_Address='192.168.0.182' Serial_Number='456' +Unit_ID='sysmoBTS 1002' + +MAC Address='00:01:02:03:04:05' IP Address='192.168.100.123' Unit ID='65535/0/0' +Location_1='' Location 2='BTS_NBT131G' Equipment Version='165a029_55' +Software Version='168a302_v142b13d0' Unit Name='nbts-00-02-95-00-4E-B3' +Serial Number='00123456' + +^C +---- + +You may have to start the program as a root: +---- +$ sudo ./abisip-find eth0 +---- + +=== Deploying a new nanoBTS + +A tool called ipaccess-config can be used to configure a new ip.access nanoBTS. + +==== ipaccess-config + +This program is very helpful tool which is used to configure Unit ID and +Primarly OML IP. You can find this tool under: +'./openbsc/openbsc/src/ipaccess' + + +.Example: using ipaccess-config to configure Unit ID and Primarly OML IP of +nanoBTS +---- +$ ./ipaccess-config -u 1801/0/0<1> 10.9.1.195<2> -o 10.9.1.154<3> + +ipaccess-config (C) 2009-2010 by Harald Welte and others +This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY + +Trying to connect to ip.access BTS ... +abis_nm.c:316 OC=SITE-MANAGER(00) INST=(ff,ff,ff) STATE CHG: +OP_STATE=Disabled AVAIL=Not installed(07) +abis_nm.c:316 OC=BTS(01) INST=(00,ff,ff) STATE CHG: +OP_STATE=Disabled AVAIL=Not installed(07) ADM=Locked +abis_nm.c:316 OC=BASEBAND-TRANSCEIVER(04) INST=(00,00,ff) STATE CHG: +OP_STATE=Disabled AVAIL=Not installed(07) ADM=Locked +OML link established using TRX 0 +setting Unit ID to '1801/0/0' +setting primary OML link IP to '10.9.1.154' +abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,00) STATE CHG: +OP_STATE=Disabled AVAIL=Not installed(07) ADM=Locked +... +abis_nm.c:2433 OC=BASEBAND-TRANSCEIVER(04) INST=(00,00,ff) IPACCESS(0xf0): +SET NVATTR ACK +Set the NV Attributes. +---- +<1> Unit ID +<2> IP address of the NITB +<3> IP address of the nanoBTS -- To view, visit https://gerrit.osmocom.org/1638 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ief893a89ff9f307b2a240ec76bb48c9bcd64dedc Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: ikostov Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Mon Jan 23 11:28:18 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 23 Jan 2017 11:28:18 +0000 Subject: [MERGED] libosmocore[master]: linuxlist.h: add llist_count() In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: linuxlist.h: add llist_count() ...................................................................... linuxlist.h: add llist_count() After subchan_demux.c in libosmo-abis, osmo-bts/common/vty.c and openbsc's gtphub_test.c, more places would like to count the llist items (mostly unit tests). Instead of proliferating numerous local implementations, add here. NOTE: other than the previous llist_len() implementations, this one returns an *unsigned* length, which might need some adjusting of current callers. Call this llist_count() rather than llist_len() to highlight the fact that this is actively iterating. This also avoids a potential naming conflict when library versions mismatch. Change-Id: Ic49adc7a346f5722bf624d7d3b4a735e4220ae15 --- M include/osmocom/core/linuxlist.h 1 file changed, 16 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/include/osmocom/core/linuxlist.h b/include/osmocom/core/linuxlist.h index 1c83395..affa827 100644 --- a/include/osmocom/core/linuxlist.h +++ b/include/osmocom/core/linuxlist.h @@ -351,6 +351,22 @@ for ((pos) = (pos)->next, prefetch((pos)->next); (pos) != (head); \ (pos) = (pos)->next, ({ smp_read_barrier_depends(); 0;}), prefetch((pos)->next)) +/*! \brief count nr of llist items by iterating. + * \param head The llist head to count items of. + * \returns Number of items. + * + * This function is not efficient, mostly useful for small lists and non time + * critical cases like unit tests. + */ +static inline unsigned int llist_count(struct llist_head *head) +{ + struct llist_head *entry; + unsigned int i = 0; + llist_for_each(entry, head) + i++; + return i; +} + /*! * }@ */ -- To view, visit https://gerrit.osmocom.org/1563 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic49adc7a346f5722bf624d7d3b4a735e4220ae15 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Jan 23 11:53:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 11:53:28 +0000 Subject: [MERGED] openbsc[master]: undup: gtphub_test: use libosmocore's llist_count() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: undup: gtphub_test: use libosmocore's llist_count() ...................................................................... undup: gtphub_test: use libosmocore's llist_count() Depends on libosmocore Change-Id Ic49adc7a346f5722bf624d7d3b4a735e4220ae15 Change-Id: I67bc1889c064596a2f3e93cc0354b11c720b0225 --- M openbsc/tests/gtphub/gtphub_test.c 1 file changed, 5 insertions(+), 17 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/openbsc/tests/gtphub/gtphub_test.c b/openbsc/tests/gtphub/gtphub_test.c index 7d7673b..2b542dd 100644 --- a/openbsc/tests/gtphub/gtphub_test.c +++ b/openbsc/tests/gtphub/gtphub_test.c @@ -56,18 +56,6 @@ void *osmo_gtphub_ctx; -/* TODO copied from libosmo-abis/src/subchan_demux.c, remove dup */ -static int llist_len(struct llist_head *head) -{ - struct llist_head *entry; - int i = 0; - - llist_for_each(entry, head) - i++; - - return i; -} - static void nr_mapping_free(struct expiring_item *e) { struct nr_mapping *m = container_of(e, struct nr_mapping, @@ -174,11 +162,11 @@ mapping = nr_map_have(map, origin1, orig, 0); m[i] = mapping->repl; OSMO_ASSERT(m[i] != 0); - OSMO_ASSERT(llist_len(&map->mappings) == (i+1)); + OSMO_ASSERT(llist_count(&map->mappings) == (i+1)); for (check_i = 0; check_i < i; check_i++) OSMO_ASSERT(m[check_i] != m[i]); } - OSMO_ASSERT(llist_len(&map->mappings) == TEST_N_HALF); + OSMO_ASSERT(llist_count(&map->mappings) == TEST_N_HALF); /* create another TEST_N mappings with the same original numbers, but * from a different origin */ @@ -189,11 +177,11 @@ mapping = nr_map_have(map, origin2, orig, 0); m[i2] = mapping->repl; OSMO_ASSERT(m[i2] != 0); - OSMO_ASSERT(llist_len(&map->mappings) == (i2+1)); + OSMO_ASSERT(llist_count(&map->mappings) == (i2+1)); for (check_i = 0; check_i < i2; check_i++) OSMO_ASSERT(m[check_i] != m[i2]); } - OSMO_ASSERT(llist_len(&map->mappings) == TEST_N); + OSMO_ASSERT(llist_count(&map->mappings) == TEST_N); /* verify mappings */ for (i = 0; i < TEST_N_HALF; i++) { @@ -213,7 +201,7 @@ /* remove all mappings */ for (i = 0; i < TEST_N_HALF; i++) { - OSMO_ASSERT(llist_len(&map->mappings) == (TEST_N - 2*i)); + OSMO_ASSERT(llist_count(&map->mappings) == (TEST_N - 2*i)); nr_t orig = TEST_I + i; nr_mapping_del(nr_map_get(map, origin1, orig)); -- To view, visit https://gerrit.osmocom.org/1565 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I67bc1889c064596a2f3e93cc0354b11c720b0225 Gerrit-PatchSet: 5 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Mon Jan 23 11:53:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 11:53:36 +0000 Subject: [MERGED] libosmo-abis[master]: undup: subchan_demux.c: use libosmocore's llist_count() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: undup: subchan_demux.c: use libosmocore's llist_count() ...................................................................... undup: subchan_demux.c: use libosmocore's llist_count() Depends on libosmocore Change-Id Ic49adc7a346f5722bf624d7d3b4a735e4220ae15 Change-Id: I47f1831f1835dc07925dabbc115677087e48fa1b --- M src/subchan_demux.c 1 file changed, 1 insertion(+), 12 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/subchan_demux.c b/src/subchan_demux.c index f965490..238056c 100644 --- a/src/subchan_demux.c +++ b/src/subchan_demux.c @@ -289,17 +289,6 @@ return i; } -static int llist_len(struct llist_head *head) -{ - struct llist_head *entry; - int i = 0; - - llist_for_each(entry, head) - i++; - - return i; -} - /* evict the 'num_evict' number of oldest entries in the queue */ static void tx_queue_evict(struct mux_subch *sch, int num_evict) { @@ -327,7 +316,7 @@ int len) { struct mux_subch *sch = &mx->subch[s_nr]; - int list_len = llist_len(&sch->tx_queue); + unsigned int list_len = llist_count(&sch->tx_queue); struct subch_txq_entry *tqe = talloc_zero_size(tall_tqe_ctx, sizeof(*tqe) + len); if (!tqe) -- To view, visit https://gerrit.osmocom.org/1564 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I47f1831f1835dc07925dabbc115677087e48fa1b Gerrit-PatchSet: 3 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Mon Jan 23 11:55:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 11:55:31 +0000 Subject: osmo-gsm-manuals[master]: Abis: add abisip-find and ipaccess-config tools In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1638 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ief893a89ff9f307b2a240ec76bb48c9bcd64dedc Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: ikostov Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 11:56:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 11:56:20 +0000 Subject: osmo-pcu[master]: Log additional info for radio errors In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1578 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I936a07ce87f05d9c3dc351dc3bdc4f00d78265e0 Gerrit-PatchSet: 4 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 11:56:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 11:56:22 +0000 Subject: [MERGED] osmo-pcu[master]: Log additional info for radio errors In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Log additional info for radio errors ...................................................................... Log additional info for radio errors Change-Id: I936a07ce87f05d9c3dc351dc3bdc4f00d78265e0 Related: OS#1553 --- M src/bts.cpp M src/sba.cpp 2 files changed, 14 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/bts.cpp b/src/bts.cpp index a47d7d8..b4e18e3 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -909,9 +909,9 @@ void gprs_rlcmac_pdch::rcv_control_ack(Packet_Control_Acknowledgement_t *packet, uint32_t fn) { struct gprs_rlcmac_tbf *tbf, *new_tbf; - uint32_t tlli = 0; + uint32_t tlli = packet->TLLI; + GprsMs *ms = bts()->ms_by_tlli(tlli); - tlli = packet->TLLI; tbf = bts()->ul_tbf_by_poll_fn(fn, trx_no(), ts_no); if (!tbf) tbf = bts()->dl_tbf_by_poll_fn(fn, trx_no(), ts_no); @@ -920,6 +920,15 @@ LOGP(DRLCMAC, LOGL_NOTICE, "PACKET CONTROL ACK with " "unknown FN=%u TLLI=0x%08x (TRX %d TS %d)\n", fn, tlli, trx_no(), ts_no); + if (ms) + LOGP(DRLCMAC, LOGL_NOTICE, "PACKET CONTROL ACK with " + "unknown TBF corresponds to MS with IMSI %s, TA %d, " + "uTBF (TFI=%d, state=%s), uTBF (TFI=%d, state=%s)\n", + ms->imsi(), ms->ta(), + ms->ul_tbf() ? ms->ul_tbf()->tfi() : 0, + ms->ul_tbf() ? ms->ul_tbf()->state_name() : "None", + ms->dl_tbf() ? ms->dl_tbf()->tfi() : 0, + ms->dl_tbf() ? ms->dl_tbf()->state_name() : "None"); return; } tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF); diff --git a/src/sba.cpp b/src/sba.cpp index 46c1431..5d75b17 100644 --- a/src/sba.cpp +++ b/src/sba.cpp @@ -127,7 +127,9 @@ int SBAController::timeout(struct gprs_rlcmac_sba *sba) { - LOGP(DRLCMAC, LOGL_NOTICE, "Poll timeout for SBA\n"); + LOGP(DRLCMAC, LOGL_NOTICE, + "Poll timeout for SBA (TRX=%u, TS=%u, FN=%u, TA=%u)\n", sba->trx_no, + sba->ts_no, sba->fn, sba->ta); m_bts.sba_timedout(); free_sba(sba); return 0; -- To view, visit https://gerrit.osmocom.org/1578 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I936a07ce87f05d9c3dc351dc3bdc4f00d78265e0 Gerrit-PatchSet: 4 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Jan 23 11:56:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 11:56:32 +0000 Subject: cellmgr-ng[master]: Add gerrit settings In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1615 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic2df30f053687b6d48232cf04ce22592e1e09a94 Gerrit-PatchSet: 1 Gerrit-Project: cellmgr-ng Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 11:56:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 11:56:34 +0000 Subject: [MERGED] cellmgr-ng[master]: Add gerrit settings In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add gerrit settings ...................................................................... Add gerrit settings This facilitate the use of "git review" command for gerrit submissions. Change-Id: Ic2df30f053687b6d48232cf04ce22592e1e09a94 --- A .gitreview 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..b2b5d25 --- /dev/null +++ b/.gitreview @@ -0,0 +1,3 @@ +[gerrit] +host=gerrit.osmocom.org +project=cellmgr-ng -- To view, visit https://gerrit.osmocom.org/1615 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic2df30f053687b6d48232cf04ce22592e1e09a94 Gerrit-PatchSet: 2 Gerrit-Project: cellmgr-ng Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Jan 23 11:56:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 11:56:42 +0000 Subject: openbsc[master]: Print subcriber when skipping auth In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1613 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6ae6720afc04cc3c92ceff86e5b2a5a29494aeb1 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 11:56:46 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 11:56:46 +0000 Subject: [MERGED] openbsc[master]: Print subcriber when skipping auth In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Print subcriber when skipping auth ...................................................................... Print subcriber when skipping auth Change-Id: I6ae6720afc04cc3c92ceff86e5b2a5a29494aeb1 --- M openbsc/src/libmsc/auth.c 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/src/libmsc/auth.c b/openbsc/src/libmsc/auth.c index bf62d3c..19def1e 100644 --- a/openbsc/src/libmsc/auth.c +++ b/openbsc/src/libmsc/auth.c @@ -92,7 +92,8 @@ rc = db_get_authinfo_for_subscr(&ainfo, subscr); if (rc < 0) { LOGP(DMM, LOGL_NOTICE, - "No retrievable Ki for subscriber, skipping auth\n"); + "No retrievable Ki for subscriber %s, skipping auth\n", + subscr_name(subscr)); return rc == -ENOENT ? AUTH_NOT_AVAIL : AUTH_ERROR; } -- To view, visit https://gerrit.osmocom.org/1613 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6ae6720afc04cc3c92ceff86e5b2a5a29494aeb1 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Jan 23 11:57:55 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 11:57:55 +0000 Subject: [MERGED] osmo-trx[master]: Revert "uhd: Set minimum supported version to 3.9.0" In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Revert "uhd: Set minimum supported version to 3.9.0" ...................................................................... Revert "uhd: Set minimum supported version to 3.9.0" This reverts commit 93ca09ea61d044e5f8662b28bf084c808cac4f2c. Ettus Research recommends the use of 3.9 series of UHD releases, but requiring this version has lead to issues with broken OBS and packaged binaries by Debian, Ubuntu, and other distributions. Change-Id: Ie6b175ac6d46d091937380c79fdd0125b16ec75f Signed-off-by: Tom Tsou --- M Transceiver52M/UHDDevice.cpp M configure.ac 2 files changed, 11 insertions(+), 2 deletions(-) Approvals: Tom Tsou: Looks good to me, approved Neels Hofmeyr: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/Transceiver52M/UHDDevice.cpp b/Transceiver52M/UHDDevice.cpp index 0a640f9..d139cdc 100644 --- a/Transceiver52M/UHDDevice.cpp +++ b/Transceiver52M/UHDDevice.cpp @@ -84,9 +84,15 @@ /* * USRP version dependent device timings */ +#ifdef USE_UHD_3_9 #define B2XX_TIMING_1SPS 1.7153e-4 #define B2XX_TIMING_4SPS 1.1696e-4 #define B2XX_TIMING_4_4SPS 6.18462e-5 +#else +#define B2XX_TIMING_1SPS 9.9692e-5 +#define B2XX_TIMING_4SPS 6.9248e-5 +#define B2XX_TIMING_4_4SPS 4.52308e-5 +#endif /* * Tx / Rx sample offset values. In a perfect world, there is no group delay diff --git a/configure.ac b/configure.ac index b41382f..7e394c2 100644 --- a/configure.ac +++ b/configure.ac @@ -97,9 +97,12 @@ ]) AS_IF([test "x$with_usrp1" != "xyes"],[ - PKG_CHECK_MODULES(UHD, uhd >= 003.009) + PKG_CHECK_MODULES(UHD, uhd >= 003.009, + [AC_DEFINE(USE_UHD_3_9, 1, UHD version 3.9.0 or higher)], + [PKG_CHECK_MODULES(UHD, uhd >= 003.005.004)] + ) + AC_DEFINE(USE_UHD, 1, All UHD versions) PKG_CHECK_MODULES(FFTWF, fftw3f) - AC_DEFINE(USE_UHD, 1, Using UHD driver) ]) AS_IF([test "x$with_singledb" = "xyes"], [ -- To view, visit https://gerrit.osmocom.org/1635 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie6b175ac6d46d091937380c79fdd0125b16ec75f Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Tom Tsou Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Tom Tsou From gerrit-no-reply at lists.osmocom.org Mon Jan 23 11:57:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 11:57:56 +0000 Subject: [MERGED] osmo-trx[master]: uhd: Add X300 sample timing for 4 SPS In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: uhd: Add X300 sample timing for 4 SPS ...................................................................... uhd: Add X300 sample timing for 4 SPS Previously only 4/1 and 1/1 configurations Tx/Tx samples-per-symbol were supported. Change-Id: I9153171fe3af95e1cb0d9d35a9287dfde155d184 --- M Transceiver52M/UHDDevice.cpp 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Tom Tsou: Looks good to me, approved Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/Transceiver52M/UHDDevice.cpp b/Transceiver52M/UHDDevice.cpp index a84fe4b..0a640f9 100644 --- a/Transceiver52M/UHDDevice.cpp +++ b/Transceiver52M/UHDDevice.cpp @@ -121,6 +121,7 @@ { USRP2, 4, 4, 4.6080e-5, "N2XX 4 SPS" }, { B200, 4, 4, B2XX_TIMING_4_4SPS, "B200 4 SPS" }, { B210, 4, 4, B2XX_TIMING_4_4SPS, "B210 4 SPS" }, + { X3XX, 4, 4, 5.6567e-5, "X3XX 4 SPS"}, { UMTRX, 4, 4, 5.1503e-5, "UmTRX 4 SPS" }, { LIMESDR, 4, 4, 16.5/GSMRATE, "STREAM/LimeSDR (4 SPS TX/RX)" }, }; -- To view, visit https://gerrit.osmocom.org/1577 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9153171fe3af95e1cb0d9d35a9287dfde155d184 Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Tom Tsou Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Tom Tsou From gerrit-no-reply at lists.osmocom.org Mon Jan 23 11:58:41 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 11:58:41 +0000 Subject: openbsc[master]: cosmetic: use osmo_strlcpy() everywhere In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1592 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I900726cf06d34128db22a3d3d911ee0d1423b1bd Gerrit-PatchSet: 4 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 11:58:58 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 11:58:58 +0000 Subject: openbsc[master]: fix strncpy() invocation in vty_interface_layer3.c and 3 tests In-Reply-To: References: Message-ID: Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1589 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1a119b1760a3e3262538b4b012d476fdce505482 Gerrit-PatchSet: 5 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 11:59:02 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 11:59:02 +0000 Subject: [MERGED] openbsc[master]: fix strncpy() invocation in vty_interface_layer3.c and 3 tests In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: fix strncpy() invocation in vty_interface_layer3.c and 3 tests ...................................................................... fix strncpy() invocation in vty_interface_layer3.c and 3 tests Use osmo_strlcpy() to fix unsafe invocation of strncpy(), which potentially left the result unterminated. Change-Id: I1a119b1760a3e3262538b4b012d476fdce505482 --- M openbsc/src/libcommon/gsup_test_client.c M openbsc/src/libmsc/vty_interface_layer3.c M openbsc/tests/mgcp/mgcp_test.c M openbsc/tests/sgsn/sgsn_test.c 4 files changed, 9 insertions(+), 6 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/src/libcommon/gsup_test_client.c b/openbsc/src/libcommon/gsup_test_client.c index 1889c6f..861212a 100644 --- a/openbsc/src/libcommon/gsup_test_client.c +++ b/openbsc/src/libcommon/gsup_test_client.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -108,7 +109,7 @@ struct osmo_gsup_message gsup = {0}; struct msgb *msg = msgb_alloc_headroom(1200, 200, __func__); - strncpy(gsup.imsi, io->imsi, sizeof(gsup.imsi)); + osmo_strlcpy(gsup.imsi, io->imsi, sizeof(gsup.imsi)); gsup.message_type = OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST; osmo_gsup_encode(msg, &gsup); @@ -123,7 +124,7 @@ struct osmo_gsup_message gsup = {0}; struct msgb *msg = msgb_alloc_headroom(1200, 200, __func__); - strncpy(gsup.imsi, io->imsi, sizeof(gsup.imsi)); + osmo_strlcpy(gsup.imsi, io->imsi, sizeof(gsup.imsi)); gsup.message_type = OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST; osmo_gsup_encode(msg, &gsup); @@ -136,7 +137,7 @@ struct osmo_gsup_message gsup = {0}; struct msgb *msg = msgb_alloc_headroom(1200, 200, __func__); - strncpy(gsup.imsi, io->imsi, sizeof(gsup.imsi)); + osmo_strlcpy(gsup.imsi, io->imsi, sizeof(gsup.imsi)); gsup.message_type = OSMO_GSUP_MSGT_INSERT_DATA_RESULT; osmo_gsup_encode(msg, &gsup); diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index edece51..4f412b1 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -601,7 +601,7 @@ return CMD_WARNING; } - strncpy(subscr->extension, ext, sizeof(subscr->extension)); + osmo_strlcpy(subscr->extension, ext, sizeof(subscr->extension)); db_sync_subscriber(subscr); subscr_put(subscr); diff --git a/openbsc/tests/mgcp/mgcp_test.c b/openbsc/tests/mgcp/mgcp_test.c index e2dc8fa..b2d237e 100644 --- a/openbsc/tests/mgcp/mgcp_test.c +++ b/openbsc/tests/mgcp/mgcp_test.c @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -54,7 +55,7 @@ char buf[2048]; int counter = 0; - strncpy(buf, strline_test_data, sizeof(buf)); + osmo_strlcpy(buf, strline_test_data, sizeof(buf)); for (line = strline_r(buf, &save); line; line = strline_r(NULL, &save)) { diff --git a/openbsc/tests/sgsn/sgsn_test.c b/openbsc/tests/sgsn/sgsn_test.c index b4bcaf6..fea635e 100644 --- a/openbsc/tests/sgsn/sgsn_test.c +++ b/openbsc/tests/sgsn/sgsn_test.c @@ -36,6 +36,7 @@ #include #include #include +#include #include @@ -1292,7 +1293,7 @@ rc = osmo_gsup_decode(msgb_data(msg), msgb_length(msg), &to_peer); OSMO_ASSERT(rc >= 0); OSMO_ASSERT(to_peer.imsi[0] != 0); - strncpy(from_peer.imsi, to_peer.imsi, sizeof(from_peer.imsi)); + osmo_strlcpy(from_peer.imsi, to_peer.imsi, sizeof(from_peer.imsi)); /* This invalidates the pointers in to_peer */ msgb_free(msg); -- To view, visit https://gerrit.osmocom.org/1589 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1a119b1760a3e3262538b4b012d476fdce505482 Gerrit-PatchSet: 6 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Jan 23 11:59:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 11:59:03 +0000 Subject: [MERGED] openbsc[master]: cosmetic: use osmo_strlcpy() everywhere In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: use osmo_strlcpy() everywhere ...................................................................... cosmetic: use osmo_strlcpy() everywhere Shorten some code and make obvious to the reader that the string copy is done in a safe way. Change-Id: I900726cf06d34128db22a3d3d911ee0d1423b1bd --- M openbsc/src/gprs/gprs_gmm.c M openbsc/src/gprs/gprs_subscriber.c M openbsc/src/gprs/gtphub.c M openbsc/src/gprs/gtphub_ares.c M openbsc/src/gprs/sgsn_auth.c M openbsc/src/libbsc/abis_nm.c M openbsc/src/libbsc/bsc_rf_ctrl.c M openbsc/src/libcommon/gsm_subscriber_base.c M openbsc/src/libcommon/gsup_test_client.c M openbsc/src/libmsc/ctrl_commands.c M openbsc/src/libmsc/db.c M openbsc/src/libmsc/gsm_04_08.c M openbsc/src/libmsc/gsm_04_11.c M openbsc/src/libmsc/meas_feed.c M openbsc/src/libmsc/smpp_openbsc.c M openbsc/src/libmsc/vty_interface_layer3.c M openbsc/src/libtrau/rtp_proxy.c M openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c M openbsc/src/utils/meas_vis.c M openbsc/tests/gtphub/gtphub_test.c M openbsc/tests/sgsn/sgsn_test.c 21 files changed, 97 insertions(+), 117 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c index e3d5c7d..88be512 100644 --- a/openbsc/src/gprs/gprs_gmm.c +++ b/openbsc/src/gprs/gprs_gmm.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -683,11 +684,10 @@ /* Prepend a '+' for international numbers */ if (called.plan == 1 && called.type == 1) { ctx->msisdn[0] = '+'; - strncpy(&ctx->msisdn[1], called.number, - sizeof(ctx->msisdn) - 1); + osmo_strlcpy(&ctx->msisdn[1], called.number, + sizeof(ctx->msisdn)); } else { - strncpy(&ctx->msisdn[0], called.number, - sizeof(ctx->msisdn) - 1); + osmo_strlcpy(ctx->msisdn, called.number, sizeof(ctx->msisdn)); } } @@ -725,7 +725,7 @@ return; } - strncpy(&ctx->hlr[0], called.number, sizeof(ctx->hlr) - 1); + osmo_strlcpy(ctx->hlr, called.number, sizeof(ctx->hlr)); } #ifdef BUILD_IU @@ -1034,10 +1034,10 @@ mm_ctx_cleanup_free(ictx, "GPRS IMSI re-use"); } } - strncpy(ctx->imsi, mi_string, sizeof(ctx->imsi) - 1); + osmo_strlcpy(ctx->imsi, mi_string, sizeof(ctx->imsi)); break; case GSM_MI_TYPE_IMEI: - strncpy(ctx->imei, mi_string, sizeof(ctx->imei) - 1); + osmo_strlcpy(ctx->imei, mi_string, sizeof(ctx->imei)); break; case GSM_MI_TYPE_IMEISV: break; @@ -1138,7 +1138,7 @@ reject_cause = GMM_CAUSE_NET_FAIL; goto rejected; } - strncpy(ctx->imsi, mi_string, sizeof(ctx->imsi) - 1); + osmo_strlcpy(ctx->imsi, mi_string, sizeof(ctx->imsi)); #endif } if (ctx->ran_type == MM_CTX_T_GERAN_Gb) { diff --git a/openbsc/src/gprs/gprs_subscriber.c b/openbsc/src/gprs/gprs_subscriber.c index 29e21ce..d3e2ea7 100644 --- a/openbsc/src/gprs/gprs_subscriber.c +++ b/openbsc/src/gprs/gprs_subscriber.c @@ -22,6 +22,7 @@ #include #include +#include #include #include @@ -164,7 +165,8 @@ struct msgb *msg = gsup_client_msgb_alloc(); if (strlen(gsup_msg->imsi) == 0 && subscr) - strncpy(gsup_msg->imsi, subscr->imsi, sizeof(gsup_msg->imsi) - 1); + osmo_strlcpy(gsup_msg->imsi, subscr->imsi, + sizeof(gsup_msg->imsi)); gsup_msg->cn_domain = OSMO_GSUP_CN_DOMAIN_PS; osmo_gsup_encode(msg, gsup_msg); @@ -185,7 +187,8 @@ { struct osmo_gsup_message gsup_reply = {0}; - strncpy(gsup_reply.imsi, gsup_orig->imsi, sizeof(gsup_reply.imsi) - 1); + osmo_strlcpy(gsup_reply.imsi, gsup_orig->imsi, + sizeof(gsup_reply.imsi)); gsup_reply.cause = cause; gsup_reply.message_type = OSMO_GSUP_TO_MSGT_ERROR(gsup_orig->message_type); @@ -778,9 +781,8 @@ subscr->flags &= ~GPRS_SUBSCRIBER_ENABLE_PURGE; } - strncpy(subscr->equipment.imei, mmctx->imei, - sizeof(subscr->equipment.imei)-1); - subscr->equipment.imei[sizeof(subscr->equipment.imei)-1] = 0; + osmo_strlcpy(subscr->equipment.imei, mmctx->imei, + sizeof(subscr->equipment.imei)); if (subscr->lac != mmctx->ra.lac) subscr->lac = mmctx->ra.lac; diff --git a/openbsc/src/gprs/gtphub.c b/openbsc/src/gprs/gtphub.c index a0af42b..83e17db 100644 --- a/openbsc/src/gprs/gtphub.c +++ b/openbsc/src/gprs/gtphub.c @@ -2360,8 +2360,7 @@ ggsn->peer = pp; gtphub_port_ref_count_inc(pp); - strncpy(ggsn->apn_oi_str, apn_oi_str, sizeof(ggsn->apn_oi_str)); - ggsn->apn_oi_str[sizeof(ggsn->apn_oi_str) - 1] = '\0'; + osmo_strlcpy(ggsn->apn_oi_str, apn_oi_str, sizeof(ggsn->apn_oi_str)); ggsn->expiry_entry.del_cb = resolved_gssn_del_cb; expiry_add(&hub->expire_slowly, &ggsn->expiry_entry, now); diff --git a/openbsc/src/gprs/gtphub_ares.c b/openbsc/src/gprs/gtphub_ares.c index 667013b..afeeda6 100644 --- a/openbsc/src/gprs/gtphub_ares.c +++ b/openbsc/src/gprs/gtphub_ares.c @@ -121,8 +121,8 @@ apn_oi_str = osmo_apn_qualify_from_imsi(lookup->imsi_str, lookup->apn_ni_str, lookup->have_3dig_mnc); - strncpy(lookup->apn_oi_str, apn_oi_str, sizeof(lookup->apn_oi_str)); - lookup->apn_oi_str[sizeof(lookup->apn_oi_str)-1] = '\0'; + osmo_strlcpy(lookup->apn_oi_str, apn_oi_str, + sizeof(lookup->apn_oi_str)); } static int start_ares_query(struct ggsn_lookup *lookup) @@ -170,11 +170,9 @@ expiring_item_init(&lookup->expiry_entry); lookup->hub = hub; - strncpy(lookup->imsi_str, imsi_str, sizeof(lookup->imsi_str)); - lookup->imsi_str[sizeof(lookup->imsi_str)-1] = '\0'; - - strncpy(lookup->apn_ni_str, apn_ni_str, sizeof(lookup->apn_ni_str)); - lookup->apn_ni_str[sizeof(lookup->apn_ni_str)-1] = '\0'; + osmo_strlcpy(lookup->imsi_str, imsi_str, sizeof(lookup->imsi_str)); + osmo_strlcpy(lookup->apn_ni_str, apn_ni_str, + sizeof(lookup->apn_ni_str)); make_addr_str(lookup); diff --git a/openbsc/src/gprs/sgsn_auth.c b/openbsc/src/gprs/sgsn_auth.c index 4b69a0d..1fa7fc4 100644 --- a/openbsc/src/gprs/sgsn_auth.c +++ b/openbsc/src/gprs/sgsn_auth.c @@ -20,6 +20,7 @@ */ #include +#include #include #include #include @@ -62,7 +63,7 @@ acl = talloc_zero(NULL, struct imsi_acl_entry); if (!acl) return -ENOMEM; - strncpy(acl->imsi, imsi, sizeof(acl->imsi) - 1); + osmo_strlcpy(acl->imsi, imsi, sizeof(acl->imsi)); llist_add(&acl->list, &cfg->imsi_acl); diff --git a/openbsc/src/libbsc/abis_nm.c b/openbsc/src/libbsc/abis_nm.c index 0c723e8..2698225 100644 --- a/openbsc/src/libbsc/abis_nm.c +++ b/openbsc/src/libbsc/abis_nm.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -2235,8 +2236,7 @@ } /* construct new filename */ - strncpy(dir, bs11_sw->swl_fname, sizeof(dir)); - dir[sizeof(dir)-1] = '\0'; + osmo_strlcpy(dir, bs11_sw->swl_fname, sizeof(dir)); strncat(fle->fname, dirname(dir), sizeof(fle->fname) - 1); strcat(fle->fname, "/"); strncat(fle->fname, file_id, sizeof(fle->fname) - 1 -strlen(fle->fname)); @@ -2307,8 +2307,7 @@ bs11_sw->user_cb = cbfn; bs11_sw->forced = forced; - strncpy(bs11_sw->swl_fname, fname, sizeof(bs11_sw->swl_fname)); - bs11_sw->swl_fname[sizeof(bs11_sw->swl_fname)-1] = '\0'; + osmo_strlcpy(bs11_sw->swl_fname, fname, sizeof(bs11_sw->swl_fname)); rc = bs11_read_swl_file(bs11_sw); if (rc < 0) return rc; diff --git a/openbsc/src/libbsc/bsc_rf_ctrl.c b/openbsc/src/libbsc/bsc_rf_ctrl.c index 0538482..59fac35 100644 --- a/openbsc/src/libbsc/bsc_rf_ctrl.c +++ b/openbsc/src/libbsc/bsc_rf_ctrl.c @@ -451,8 +451,7 @@ } local.sun_family = AF_UNIX; - strncpy(local.sun_path, path, sizeof(local.sun_path)); - local.sun_path[sizeof(local.sun_path) - 1] = '\0'; + osmo_strlcpy(local.sun_path, path, sizeof(local.sun_path)); unlink(local.sun_path); /* we use the same magic that X11 uses in Xtranssock.c for diff --git a/openbsc/src/libcommon/gsm_subscriber_base.c b/openbsc/src/libcommon/gsm_subscriber_base.c index 1f98cc6..1ecdee5 100644 --- a/openbsc/src/libcommon/gsm_subscriber_base.c +++ b/openbsc/src/libcommon/gsm_subscriber_base.c @@ -28,6 +28,7 @@ #include #include +#include #include #include @@ -115,7 +116,7 @@ if (!subscr) return NULL; - strncpy(subscr->imsi, imsi, sizeof(subscr->imsi)-1); + osmo_strlcpy(subscr->imsi, imsi, sizeof(subscr->imsi)); subscr->group = sgrp; return subscr; } diff --git a/openbsc/src/libcommon/gsup_test_client.c b/openbsc/src/libcommon/gsup_test_client.c index 861212a..8be4e7a 100644 --- a/openbsc/src/libcommon/gsup_test_client.c +++ b/openbsc/src/libcommon/gsup_test_client.c @@ -75,8 +75,7 @@ return NULL; io = talloc_zero(ctx, struct imsi_op); - strncpy(io->imsi, imsi, sizeof(io->imsi)); - io->imsi[sizeof(io->imsi)-1] = '\0'; + osmo_strlcpy(io->imsi, imsi, sizeof(io->imsi)); io->type = type; io->timer.cb = imsi_op_timer_cb; io->timer.data = io; diff --git a/openbsc/src/libmsc/ctrl_commands.c b/openbsc/src/libmsc/ctrl_commands.c index 79e136d..d153247 100644 --- a/openbsc/src/libmsc/ctrl_commands.c +++ b/openbsc/src/libmsc/ctrl_commands.c @@ -20,6 +20,7 @@ */ #include +#include #include #include #include @@ -103,8 +104,7 @@ goto fail; subscr->authorized = 1; - strncpy(subscr->extension, msisdn, GSM_EXTENSION_LENGTH - 1); - subscr->extension[GSM_EXTENSION_LENGTH-1] = '\0'; + osmo_strlcpy(subscr->extension, msisdn, sizeof(subscr->extension)); /* put it back to the db */ rc = db_sync_subscriber(subscr); diff --git a/openbsc/src/libmsc/db.c b/openbsc/src/libmsc/db.c index 5cccb32..68dac76 100644 --- a/openbsc/src/libmsc/db.c +++ b/openbsc/src/libmsc/db.c @@ -39,6 +39,7 @@ #include #include #include +#include #include @@ -240,7 +241,7 @@ snprintf(buf, sizeof(buf), "%llu", sender_id); sender = db_get_subscriber(GSM_SUBSCRIBER_ID, buf); OSMO_ASSERT(sender); - strncpy(sms->src.addr, sender->extension, sizeof(sms->src.addr)-1); + osmo_strlcpy(sms->src.addr, sender->extension, sizeof(sms->src.addr)); subscr_direct_free(sender); sender = NULL; @@ -252,10 +253,8 @@ "data_coding_scheme"); daddr = dbi_result_get_string(result, "dest_addr"); - if (daddr) { - strncpy(sms->dst.addr, daddr, sizeof(sms->dst.addr)); - sms->dst.addr[sizeof(sms->dst.addr)-1] = '\0'; - } + if (daddr) + osmo_strlcpy(sms->dst.addr, daddr, sizeof(sms->dst.addr)); sms->user_data_len = dbi_result_get_field_length(result, "user_data"); user_data = dbi_result_get_binary(result, "user_data"); @@ -264,10 +263,8 @@ memcpy(sms->user_data, user_data, sms->user_data_len); text = dbi_result_get_string(result, "text"); - if (text) { - strncpy(sms->text, text, sizeof(sms->text)); - sms->text[sizeof(sms->text)-1] = '\0'; - } + if (text) + osmo_strlcpy(sms->text, text, sizeof(sms->text)); return sms; } @@ -549,7 +546,7 @@ return NULL; } subscr->id = dbi_conn_sequence_last(conn, NULL); - strncpy(subscr->imsi, imsi, sizeof(subscr->imsi)-1); + osmo_strlcpy(subscr->imsi, imsi, sizeof(subscr->imsi)); dbi_result_free(result); LOGP(DDB, LOGL_INFO, "New Subscriber: ID %llu, IMSI %s\n", subscr->id, subscr->imsi); if (alloc_exten) @@ -585,7 +582,7 @@ string = dbi_result_get_string(result, "imei"); if (string) - strncpy(equip->imei, string, sizeof(equip->imei)-1); + osmo_strlcpy(equip->imei, string, sizeof(equip->imei)); string = dbi_result_get_string(result, "classmark1"); if (string) { @@ -824,21 +821,19 @@ const char *string; string = dbi_result_get_string(result, "imsi"); if (string) - strncpy(subscr->imsi, string, sizeof(subscr->imsi)-1); + osmo_strlcpy(subscr->imsi, string, sizeof(subscr->imsi)); string = dbi_result_get_string(result, "tmsi"); if (string) subscr->tmsi = tmsi_from_string(string); string = dbi_result_get_string(result, "name"); - if (string) { - strncpy(subscr->name, string, GSM_NAME_LENGTH); - subscr->name[sizeof(subscr->name)-1] = '\0'; - } + if (string) + osmo_strlcpy(subscr->name, string, sizeof(subscr->name)); string = dbi_result_get_string(result, "extension"); if (string) - strncpy(subscr->extension, string, GSM_EXTENSION_LENGTH); + osmo_strlcpy(subscr->extension, string, sizeof(subscr->extension)); subscr->lac = dbi_result_get_ulonglong(result, "lac"); @@ -1351,8 +1346,7 @@ unsigned long long equipment_id, watch_id; dbi_result result; - strncpy(subscriber->equipment.imei, imei, - sizeof(subscriber->equipment.imei)-1); + osmo_strlcpy(subscriber->equipment.imei, imei, sizeof(subscriber->equipment.imei)); result = dbi_conn_queryf(conn, "INSERT OR IGNORE INTO Equipment " @@ -1502,19 +1496,15 @@ sms->dst.npi = dbi_result_get_ulonglong(result, "dest_npi"); sms->dst.ton = dbi_result_get_ulonglong(result, "dest_ton"); daddr = dbi_result_get_string(result, "dest_addr"); - if (daddr) { - strncpy(sms->dst.addr, daddr, sizeof(sms->dst.addr)); - sms->dst.addr[sizeof(sms->dst.addr)-1] = '\0'; - } + if (daddr) + osmo_strlcpy(sms->dst.addr, daddr, sizeof(sms->dst.addr)); sms->receiver = subscr_get_by_extension(net->subscr_group, sms->dst.addr); sms->src.npi = dbi_result_get_ulonglong(result, "src_npi"); sms->src.ton = dbi_result_get_ulonglong(result, "src_ton"); saddr = dbi_result_get_string(result, "src_addr"); - if (saddr) { - strncpy(sms->src.addr, saddr, sizeof(sms->src.addr)); - sms->src.addr[sizeof(sms->src.addr)-1] = '\0'; - } + if (saddr) + osmo_strlcpy(sms->src.addr, saddr, sizeof(sms->src.addr)); sms->user_data_len = dbi_result_get_field_length(result, "user_data"); user_data = dbi_result_get_binary(result, "user_data"); @@ -1523,10 +1513,8 @@ memcpy(sms->user_data, user_data, sms->user_data_len); text = dbi_result_get_string(result, "text"); - if (text) { - strncpy(sms->text, text, sizeof(sms->text)); - sms->text[sizeof(sms->text)-1] = '\0'; - } + if (text) + osmo_strlcpy(sms->text, text, sizeof(sms->text)); return sms; } diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index 34492bb..742f803 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -65,6 +65,7 @@ #include #include #include +#include #include #include @@ -1973,10 +1974,9 @@ /* use subscriber as calling party number */ setup.fields |= MNCC_F_CALLING; - strncpy(setup.calling.number, trans->subscr->extension, - sizeof(setup.calling.number)-1); - strncpy(setup.imsi, trans->subscr->imsi, - sizeof(setup.imsi)-1); + osmo_strlcpy(setup.calling.number, trans->subscr->extension, + sizeof(setup.calling.number)); + osmo_strlcpy(setup.imsi, trans->subscr->imsi, sizeof(setup.imsi)); /* bearer capability */ if (TLVP_PRESENT(&tp, GSM48_IE_BEARER_CAP)) { @@ -2153,8 +2153,8 @@ } /* IMSI of called subscriber */ - strncpy(call_conf.imsi, trans->subscr->imsi, - sizeof(call_conf.imsi)-1); + osmo_strlcpy(call_conf.imsi, trans->subscr->imsi, + sizeof(call_conf.imsi)); new_cc_state(trans, GSM_CSTATE_MO_TERM_CALL_CONF); @@ -2307,10 +2307,9 @@ tlv_parse(&tp, &gsm48_att_tlvdef, gh->data, payload_len, 0, 0); /* use subscriber as connected party number */ connect.fields |= MNCC_F_CONNECTED; - strncpy(connect.connected.number, trans->subscr->extension, - sizeof(connect.connected.number)-1); - strncpy(connect.imsi, trans->subscr->imsi, - sizeof(connect.imsi)-1); + osmo_strlcpy(connect.connected.number, trans->subscr->extension, + sizeof(connect.connected.number)); + osmo_strlcpy(connect.imsi, trans->subscr->imsi, sizeof(connect.imsi)); /* facility */ if (TLVP_PRESENT(&tp, GSM48_IE_FACILITY)) { diff --git a/openbsc/src/libmsc/gsm_04_11.c b/openbsc/src/libmsc/gsm_04_11.c index 48a87e0..6164a08 100644 --- a/openbsc/src/libmsc/gsm_04_11.c +++ b/openbsc/src/libmsc/gsm_04_11.c @@ -37,6 +37,7 @@ #include #include +#include #include #include @@ -92,15 +93,15 @@ return NULL; sms->receiver = subscr_get(receiver); - strncpy(sms->text, text, sizeof(sms->text)-1); + osmo_strlcpy(sms->text, text, sizeof(sms->text)); - strncpy(sms->src.addr, sender->extension, sizeof(sms->src.addr)-1); + osmo_strlcpy(sms->src.addr, sender->extension, sizeof(sms->src.addr)); sms->reply_path_req = 0; sms->status_rep_req = 0; sms->ud_hdr_ind = 0; sms->protocol_id = 0; /* implicit */ sms->data_coding_scheme = dcs; - strncpy(sms->dst.addr, receiver->extension, sizeof(sms->dst.addr)-1); + osmo_strlcpy(sms->dst.addr, receiver->extension, sizeof(sms->dst.addr)); /* Generate user_data */ sms->user_data_len = gsm_7bit_encode_n(sms->user_data, sizeof(sms->user_data), sms->text, NULL); @@ -464,7 +465,8 @@ } } - strncpy(gsms->src.addr, conn->subscr->extension, sizeof(gsms->src.addr)-1); + osmo_strlcpy(gsms->src.addr, conn->subscr->extension, + sizeof(gsms->src.addr)); LOGP(DLSMS, LOGL_INFO, "RX SMS: Sender: %s, MTI: 0x%02x, VPF: 0x%02x, " "MR: 0x%02x PID: 0x%02x, DCS: 0x%02x, DA: %s, " diff --git a/openbsc/src/libmsc/meas_feed.c b/openbsc/src/libmsc/meas_feed.c index cd2b648..3ddcdc3 100644 --- a/openbsc/src/libmsc/meas_feed.c +++ b/openbsc/src/libmsc/meas_feed.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -52,12 +53,9 @@ mfm->hdr.version = MEAS_FEED_VERSION; /* fill in MEAS_FEED_MEAS specific header */ - strncpy(mfm->imsi, subscr->imsi, sizeof(mfm->imsi)-1); - mfm->imsi[sizeof(mfm->imsi)-1] = '\0'; - strncpy(mfm->name, subscr->name, sizeof(mfm->name)-1); - mfm->name[sizeof(mfm->name)-1] = '\0'; - strncpy(mfm->scenario, g_mfs.scenario, sizeof(mfm->scenario)); - mfm->scenario[sizeof(mfm->scenario)-1] = '\0'; + osmo_strlcpy(mfm->imsi, subscr->imsi, sizeof(mfm->imsi)); + osmo_strlcpy(mfm->name, subscr->name, sizeof(mfm->name)); + osmo_strlcpy(mfm->scenario, g_mfs.scenario, sizeof(mfm->scenario)); /* copy the entire measurement report */ memcpy(&mfm->mr, mr, sizeof(mfm->mr)); @@ -160,8 +158,7 @@ void meas_feed_scenario_set(const char *name) { - strncpy(g_mfs.scenario, name, sizeof(g_mfs.scenario)-1); - g_mfs.scenario[sizeof(g_mfs.scenario)-1] = '\0'; + osmo_strlcpy(g_mfs.scenario, name, sizeof(g_mfs.scenario)); } const char *meas_feed_scenario_get(void) diff --git a/openbsc/src/libmsc/smpp_openbsc.c b/openbsc/src/libmsc/smpp_openbsc.c index 228e61d..657272e 100644 --- a/openbsc/src/libmsc/smpp_openbsc.c +++ b/openbsc/src/libmsc/smpp_openbsc.c @@ -133,12 +133,13 @@ sms->receiver = dest; sms->dst.ton = submit->dest_addr_ton; sms->dst.npi = submit->dest_addr_npi; - strncpy(sms->dst.addr, dest->extension, sizeof(sms->dst.addr)-1); + osmo_strlcpy(sms->dst.addr, dest->extension, sizeof(sms->dst.addr)); /* fill in the source address */ sms->src.ton = submit->source_addr_ton; sms->src.npi = submit->source_addr_npi; - strncpy(sms->src.addr, (char *)submit->source_addr, sizeof(sms->src.addr)-1); + osmo_strlcpy(sms->src.addr, (char *)submit->source_addr, + sizeof(sms->src.addr)); if (submit->esm_class & 0x40) sms->ud_hdr_ind = 1; diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index 4f412b1..490d794 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -567,8 +567,7 @@ return CMD_WARNING; } - strncpy(subscr->name, name, sizeof(subscr->name)); - subscr->name[sizeof(subscr->name)-1] = '\0'; + osmo_strlcpy(subscr->name, name, sizeof(subscr->name)); talloc_free(name); db_sync_subscriber(subscr); diff --git a/openbsc/src/libtrau/rtp_proxy.c b/openbsc/src/libtrau/rtp_proxy.c index ed19175..6b38ee5 100644 --- a/openbsc/src/libtrau/rtp_proxy.c +++ b/openbsc/src/libtrau/rtp_proxy.c @@ -29,6 +29,7 @@ #include /* uname() */ #include +#include #include #include #include @@ -368,9 +369,9 @@ } if (rtph->type == RTCP_TYPE_SDES) { char new_cname[255]; - strncpy(new_cname, inet_ntoa(rss->sin_local.sin_addr), - sizeof(new_cname)); - new_cname[sizeof(new_cname)-1] = '\0'; + osmo_strlcpy(new_cname, + inet_ntoa(rss->sin_local.sin_addr), + sizeof(new_cname)); rc = rtcp_sdes_cname_mangle(msg, rtph, &old_len, new_cname); if (rc < 0) diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c b/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c index 58667fe..e7c387c 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c @@ -31,6 +31,7 @@ #include #include +#include #include #include @@ -129,15 +130,15 @@ { if (strncmp(chosen_number, "00", 2) == 0) { called->type = 1; - strncpy(called->number, chosen_number + 2, sizeof(called->number)); + osmo_strlcpy(called->number, chosen_number + 2, + sizeof(called->number)); } else { /* rewrite international to unknown */ if (called->type == 1) called->type = 0; - strncpy(called->number, chosen_number, sizeof(called->number)); + osmo_strlcpy(called->number, chosen_number, + sizeof(called->number)); } - - called->number[sizeof(called->number) - 1] = '\0'; } /** diff --git a/openbsc/src/utils/meas_vis.c b/openbsc/src/utils/meas_vis.c index 061a7a4..316d203 100644 --- a/openbsc/src/utils/meas_vis.c +++ b/openbsc/src/utils/meas_vis.c @@ -73,7 +73,7 @@ ms = find_ms(imsi); if (!ms) { ms = talloc_zero(NULL, struct ms_state); - strncpy(ms->imsi, imsi, sizeof(ms->imsi)-1); + osmo_strlcpy(ms->imsi, imsi, sizeof(ms->imsi)); ms->ul._lbl[0] = ms->ul.label; ms->dl._lbl[0] = ms->dl.label; llist_add_tail(&ms->list, &g_st.ms_list); @@ -88,7 +88,7 @@ struct ms_state *ms = find_alloc_ms(mfm->imsi); time_t now = time(NULL); - strncpy(ms->name, mfm->name, sizeof(ms->imsi)-1); + osmo_strlcpy(ms->name, mfm->name, sizeof(ms->name)); memcpy(&ms->mr, &mfm->mr, sizeof(ms->mr)); ms->ul.last_update = now; if (ms->mr.flags & MEAS_REP_F_DL_VALID) diff --git a/openbsc/tests/gtphub/gtphub_test.c b/openbsc/tests/gtphub/gtphub_test.c index 2b542dd..e7c27d2 100644 --- a/openbsc/tests/gtphub/gtphub_test.c +++ b/openbsc/tests/gtphub/gtphub_test.c @@ -437,21 +437,15 @@ " returning GGSN addr from imsi %s ni %s: %s\n", imsi_str, apn_ni_str, gtphub_port_str(pp)); - if (imsi_str) { - strncpy(resolve_ggsn_got_imsi, imsi_str, - sizeof(resolve_ggsn_got_imsi)); - resolve_ggsn_got_imsi[sizeof(resolve_ggsn_got_imsi) - 1] = '\0'; - } - else - strcpy(resolve_ggsn_got_imsi, "(null)"); + if (!imsi_str) + imsi_str = "(null)"; + osmo_strlcpy(resolve_ggsn_got_imsi, imsi_str, + sizeof(resolve_ggsn_got_imsi)); - if (apn_ni_str) { - strncpy(resolve_ggsn_got_ni, apn_ni_str, - sizeof(resolve_ggsn_got_ni)); - resolve_ggsn_got_ni[sizeof(resolve_ggsn_got_ni) - 1] = '\0'; - } - else - strcpy(resolve_ggsn_got_ni, "(null)"); + if (!apn_ni_str) + apn_ni_str = "(null)"; + osmo_strlcpy(resolve_ggsn_got_ni, apn_ni_str, + sizeof(resolve_ggsn_got_ni)); return pp; } diff --git a/openbsc/tests/sgsn/sgsn_test.c b/openbsc/tests/sgsn/sgsn_test.c index fea635e..e1fd2e7 100644 --- a/openbsc/tests/sgsn/sgsn_test.c +++ b/openbsc/tests/sgsn/sgsn_test.c @@ -2248,7 +2248,7 @@ /* Create a context */ OSMO_ASSERT(count(gprs_llme_list()) == 0); ctx = alloc_mm_ctx(local_tlli, &raid); - strncpy(ctx->imsi, imsi1, sizeof(ctx->imsi) - 1); + osmo_strlcpy(ctx->imsi, imsi1, sizeof(ctx->imsi)); /* Allocate and attach a subscriber */ s1 = gprs_subscr_get_or_create_by_mmctx(ctx); @@ -2273,7 +2273,7 @@ pdp_data = sgsn_subscriber_pdp_data_alloc(s1->sgsn_data); pdp_data->context_id = 1; pdp_data->pdp_type = 0x0121; - strncpy(pdp_data->apn_str, "*", sizeof(pdp_data->apn_str)-1); + osmo_strlcpy(pdp_data->apn_str, "*", sizeof(pdp_data->apn_str)); /* Resolve GGSNs */ @@ -2326,7 +2326,7 @@ /* Add PDP data entry to subscriber */ - strncpy(pdp_data->apn_str, "Test.Apn", sizeof(pdp_data->apn_str)-1); + osmo_strlcpy(pdp_data->apn_str, "Test.Apn", sizeof(pdp_data->apn_str)); tp.lv[GSM48_IE_GSM_APN].len = gprs_str_to_apn(apn_enc, sizeof(apn_enc), "Test.Apn"); -- To view, visit https://gerrit.osmocom.org/1592 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I900726cf06d34128db22a3d3d911ee0d1423b1bd Gerrit-PatchSet: 5 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Jan 23 12:01:11 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 12:01:11 +0000 Subject: osmo-bts[master]: OML: internalize failure reporting In-Reply-To: References: Message-ID: Patch Set 4: Code-Review-1 I don't like the explicit talloc_asprintf() on all the caller sites. Why can't this be hidden behind the API? Maybe I'm missing something? -- To view, visit https://gerrit.osmocom.org/1570 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I738555c547926e97b325ab53763c0076c42309bc Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 12:05:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 12:05:50 +0000 Subject: libosmocore[master]: Add osmo_sock_init_ifd() In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-2 the 'o' in init_ofd() refers to the fact that it applies to an osmo_fd, and not an 'int fd'. I believe we once had code that applied to a raw fd, not ofd. The rationale behind registering for BSC_FD_READ is that we assume the code always cares about receiving data from a socket. BSC_FD_WRITE should only be set *exactly* before writing something, i.e. when you have a pending buffer to be written to the socket. so the BSC_FD_WRITE is set when you want to write, e.g. from the write_queue code or whatever is writing. -- To view, visit https://gerrit.osmocom.org/1624 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I938de74c28df29221071913b769e7a2df9d041fa Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 12:07:47 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 12:07:47 +0000 Subject: libosmocore[master]: utils/conv_gen.py: improve application flexibility In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1584 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0b476b00234c17f78b41d695cf3bfd13edb64c28 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 12:08:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 12:08:14 +0000 Subject: libosmocore[master]: utils/conv_gen.py: add test vector generation feature In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+1 we need sylvains approval for all patches in this series -- To view, visit https://gerrit.osmocom.org/1585 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie10c47ee952f253b1ba77ecf6e79f2c033545bc1 Gerrit-PatchSet: 6 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 12:08:26 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 12:08:26 +0000 Subject: libosmocore[master]: utils/conv_gen.py: add header generation feature In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1593 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iae830d716f01810972edbef14fc5383ac647d0ea Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 12:08:47 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 12:08:47 +0000 Subject: libosmocore[master]: gsm0503.h: generate header automatically In-Reply-To: References: Message-ID: Patch Set 5: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1594 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I21caa4e433b2cc1861611e35350a9671da444c2a Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 12:09:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 12:09:05 +0000 Subject: libosmocore[master]: tests/conv: separate test logic In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1627 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idbdc7e19cb9b9a36cd1fccd621cd858e87530d98 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 12:09:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 12:09:18 +0000 Subject: libosmocore[master]: tests/conv: add GSM 05.03 specific test In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1628 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I76d1cd4032d2f74c5bb93bde4fab99aa655b7f1a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Tom Tsou Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 12:11:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 12:11:20 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: configuration: fixing typos In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: configuration: fixing typos ...................................................................... configuration: fixing typos configuration.adoc has some minor typos in it, this commit fixes that. Change-Id: Id84238b89e5deeac99c043b79b26c7e7b8b8534b --- M OsmoPCU/chapters/configuration.adoc 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/OsmoPCU/chapters/configuration.adoc b/OsmoPCU/chapters/configuration.adoc index bcf3ad7..6fc61c7 100644 --- a/OsmoPCU/chapters/configuration.adoc +++ b/OsmoPCU/chapters/configuration.adoc @@ -72,7 +72,7 @@ ==== Downlink TBF idle time After a down-link TBF is idle (all data in the current LLC downlink -queue for thi MS has been transmitted), we can keep the TBF established +queue for the MS has been transmitted), we can keep the TBF established for a configurable time. This avoids having to go through a new one or two phase TBF establishment once the next data for downlink arrives. @@ -94,7 +94,7 @@ ==== Forcing two-phase access -If the MS is using for a single-phase access, you can still force it to +If the MS is using a single-phase access, you can still force it to use a two-phase access using the `two-phase-access` VTY configuration command at the `pcu` VTY config node. -- To view, visit https://gerrit.osmocom.org/1622 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id84238b89e5deeac99c043b79b26c7e7b8b8534b Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Jan 23 12:11:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 12:11:51 +0000 Subject: openbsc[master]: Add VTY command to immediately expire user (set expire_lu to... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1623 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I676c84350a7afc963bc6bb4c46c60e5ac3eee67e Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: keith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 12:14:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 12:14:15 +0000 Subject: osmo-bts[master]: LC15: Fix dropping of LAPDm UA message. In-Reply-To: References: Message-ID: Patch Set 1: let's also remove the 'LC15' from the topic if it is not a patch in the LC15 specific code. Furthermore, *if* the patch is substantially based on work from another author (up to you to decide), then the git AUTHOR field should point to that author and not to you as the committer. -- To view, visit https://gerrit.osmocom.org/1626 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie4f70c75f0137b4bd72d579b3a32575bac2fca38 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 12:16:01 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 12:16:01 +0000 Subject: openbsc[master]: Improve OML failure report In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1568 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7a98a77011463021d0edd6ecfab1680e211f7e16 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 12:16:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 12:16:05 +0000 Subject: [MERGED] openbsc[master]: Improve OML failure report In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Improve OML failure report ...................................................................... Improve OML failure report * clearly separate report parts * use textual representation for failure cause if possible Change-Id: I7a98a77011463021d0edd6ecfab1680e211f7e16 Related: OS#1615 --- M openbsc/src/libbsc/abis_nm.c 1 file changed, 14 insertions(+), 6 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/src/libbsc/abis_nm.c b/openbsc/src/libbsc/abis_nm.c index 2698225..8b0eec2 100644 --- a/openbsc/src/libbsc/abis_nm.c +++ b/openbsc/src/libbsc/abis_nm.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -281,25 +282,32 @@ const uint8_t *p_val; char *p_text; - LOGPC(DNM, LOGL_ERROR, "Failure Event Report "); - + LOGPC(DNM, LOGL_ERROR, "Failure Event Report: "); + abis_nm_tlv_parse(&tp, sign_link->trx->bts, foh->data, oh->length-sizeof(*foh)); if (TLVP_PRESENT(&tp, NM_ATT_EVENT_TYPE)) - LOGPC(DNM, LOGL_ERROR, "Type=%s ", + LOGPC(DNM, LOGL_ERROR, "Type=%s, ", abis_nm_event_type_name(*TLVP_VAL(&tp, NM_ATT_EVENT_TYPE))); if (TLVP_PRESENT(&tp, NM_ATT_SEVERITY)) - LOGPC(DNM, LOGL_ERROR, "Severity=%s ", + LOGPC(DNM, LOGL_ERROR, "Severity=%s, ", abis_nm_severity_name(*TLVP_VAL(&tp, NM_ATT_SEVERITY))); if (TLVP_PRESENT(&tp, NM_ATT_PROB_CAUSE)) { p_val = TLVP_VAL(&tp, NM_ATT_PROB_CAUSE); - LOGPC(DNM, LOGL_ERROR, "Probable cause= %02X %02X %02X ", p_val[0], p_val[1], p_val[2]); + LOGPC(DNM, LOGL_ERROR, "Probable cause=%s: ", + get_value_string(abis_nm_pcause_type_names, p_val[0])); + if (p_val[0] == NM_PCAUSE_T_MANUF) + LOGPC(DNM, LOGL_ERROR, "%s, ", + get_value_string(abis_mm_event_cause_names, + osmo_load16be(p_val + 1))); + else + LOGPC(DNM, LOGL_ERROR, "%02X %02X ", p_val[1], p_val[2]); } if (TLVP_PRESENT(&tp, NM_ATT_ADD_TEXT)) { p_val = TLVP_VAL(&tp, NM_ATT_ADD_TEXT); p_text = talloc_strndup(tall_bsc_ctx, (const char *) p_val, TLVP_LEN(&tp, NM_ATT_ADD_TEXT)); if (p_text) { - LOGPC(DNM, LOGL_ERROR, "Additional Text=%s ", p_text); + LOGPC(DNM, LOGL_ERROR, "Additional Text=%s. ", p_text); talloc_free(p_text); } } -- To view, visit https://gerrit.osmocom.org/1568 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7a98a77011463021d0edd6ecfab1680e211f7e16 Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Jan 23 12:19:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 12:19:14 +0000 Subject: libosmocore[master]: Add osmo_rand() function In-Reply-To: References: Message-ID: Patch Set 2: > Are you sure you want everyone linking to libosmogsm require a full > TLS library? I'm also not very happy with introducing that dependency. But then, we need proper random numbers in various places, right? For TMSI/P-TMSI generation in NITB + SGSN, for auth challenge generation in the gsup-hlr. So yes, TMSI/P-TMSI could do with numbers of a less random quality. But then, what kind of code do we use for that? I'm undecided. -- To view, visit https://gerrit.osmocom.org/1526 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0241b814ea4c4ce1458f7ad76e31d390383c2048 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 12:20:01 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 12:20:01 +0000 Subject: osmo-trx[master]: Add gerrit settings In-Reply-To: References: Message-ID: Patch Set 1: would love to see this patch (and other osmo-trx patches regarding sqlite/debian) merged. However, I'm not a maintainer of osmo-trx and thus I cannot set +2. Tom? -- To view, visit https://gerrit.osmocom.org/1482 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6bbe65cc09e086685995f084a07a646a7d60b93c Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Tom Tsou Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 12:20:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 12:20:34 +0000 Subject: [MERGED] libosmocore[master]: ipa: Remove unneeded #include statement In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: ipa: Remove unneeded #include statement ...................................................................... ipa: Remove unneeded #include statement Change-Id: I69f2891a2bea6f87f079b6778aa01ee27a25001b --- M src/gsm/ipa.c 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Max: Looks good to me, but someone else must approve Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/gsm/ipa.c b/src/gsm/ipa.c index f44c328..6dc3ab6 100644 --- a/src/gsm/ipa.c +++ b/src/gsm/ipa.c @@ -28,7 +28,6 @@ #include #include -#include #include #include -- To view, visit https://gerrit.osmocom.org/1610 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I69f2891a2bea6f87f079b6778aa01ee27a25001b Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Mon Jan 23 12:20:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 12:20:34 +0000 Subject: [MERGED] libosmocore[master]: disable various code if building for bare-iron embedded In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: disable various code if building for bare-iron embedded ...................................................................... disable various code if building for bare-iron embedded We don't have file-based I/O nor ethernet devices with mac addresses when building for OsmocomBB. Change-Id: I01a9e6d8dbe885dbeac2769b84931a4d44f7a3a5 --- M src/logging.c M src/macaddr.c 2 files changed, 12 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/logging.c b/src/logging.c index b0bca54..9b7d6f4 100644 --- a/src/logging.c +++ b/src/logging.c @@ -584,12 +584,14 @@ target->categories[category].loglevel = level; } +#if (!EMBEDDED) static void _file_output(struct log_target *target, unsigned int level, const char *log) { fprintf(target->tgt_file.out, "%s", log); fflush(target->tgt_file.out); } +#endif /*! \brief Create a new log target skeleton * \returns dynamically-allocated log target @@ -654,6 +656,7 @@ #endif /* stderr */ } +#if (!EMBEDDED) /*! \brief Create a new file-based log target * \param[in] fname File name of the new log file * \returns Log target in case of success, NULL otherwise @@ -677,6 +680,7 @@ return target; } +#endif /*! \brief Find a registered log target * \param[in] type Log target type @@ -707,6 +711,7 @@ /* just in case, to make sure we don't have any references */ log_del_target(target); +#if (!EMBEDDED) if (target->output == &_file_output) { /* since C89/C99 says stderr is a macro, we can safely do this! */ #ifdef stderr @@ -718,6 +723,7 @@ target->tgt_file.out = NULL; } } +#endif talloc_free(target); } diff --git a/src/macaddr.c b/src/macaddr.c index f83e054..ceb1e0a 100644 --- a/src/macaddr.c +++ b/src/macaddr.c @@ -26,6 +26,8 @@ /*! \file loggingrb.c */ +#include "config.h" + #include #include #include @@ -103,6 +105,8 @@ #else +#if (!EMBEDDED) + #include #include #include @@ -134,6 +138,8 @@ return 0; } +#endif /* !EMBEDDED */ + #endif /*! @} */ -- To view, visit https://gerrit.osmocom.org/1608 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I01a9e6d8dbe885dbeac2769b84931a4d44f7a3a5 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Mon Jan 23 12:20:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 12:20:34 +0000 Subject: [MERGED] libosmocore[master]: utils.h: #include as we use fprintf() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: utils.h: #include as we use fprintf() ...................................................................... utils.h: #include as we use fprintf() Change-Id: I911c7f4bcadde414ce0b384e13a3a9a4a953e2fb --- M include/osmocom/core/utils.h 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index 41bbc27..d9c3097 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -21,6 +21,7 @@ #define OSMO_VALUE_STRING(x) { x, OSMO_STRINGIFY(x) } #include +#include /*! \brief A mapping between human-readable string and numeric value */ struct value_string { -- To view, visit https://gerrit.osmocom.org/1609 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I911c7f4bcadde414ce0b384e13a3a9a4a953e2fb Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Mon Jan 23 12:21:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 12:21:12 +0000 Subject: osmo-pcu[master]: BTS: accept also relative frame numbers with rach requst In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1205 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iaa182d8d29c6a0f5fa06064c2eb48b21b1ba2775 Gerrit-PatchSet: 4 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 12:23:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 12:23:18 +0000 Subject: [MERGED] osmo-bts[master]: octphy: set tx attenuation via VTY In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: octphy: set tx attenuation via VTY ...................................................................... octphy: set tx attenuation via VTY add code to configure the transmision power via VTY Change-Id: I76bb8660eb1d8baeb6b8f69da4a6ba9ab7319981 --- M include/osmo-bts/phy_link.h M src/osmo-bts-octphy/l1_oml.c M src/osmo-bts-octphy/octphy_vty.c 3 files changed, 30 insertions(+), 7 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmo-bts/phy_link.h b/include/osmo-bts/phy_link.h index 6b2f21e..1f8450b 100644 --- a/include/osmo-bts/phy_link.h +++ b/include/osmo-bts/phy_link.h @@ -63,6 +63,7 @@ /* configuration */ uint32_t rf_port_index; uint32_t rx_gain_db; + bool tx_atten_flag; uint32_t tx_atten_db; #if OCTPHY_MULTI_TRX == 1 /* arfcn used by TRX with id 0 */ diff --git a/src/osmo-bts-octphy/l1_oml.c b/src/osmo-bts-octphy/l1_oml.c index 5865625..da8ff03 100644 --- a/src/osmo-bts-octphy/l1_oml.c +++ b/src/osmo-bts-octphy/l1_oml.c @@ -1373,7 +1373,13 @@ oc->Config.usTsc = trx->bts->bsic & 0x7; oc->RfConfig.ulRxGainDb = plink->u.octphy.rx_gain_db; /* FIXME: compute this based on nominal transmit power, etc. */ - oc->RfConfig.ulTxAttndB = plink->u.octphy.tx_atten_db; + if (plink->u.octphy.tx_atten_flag) { + oc->RfConfig.ulTxAttndB = plink->u.octphy.tx_atten_db; + } else { + /* Take the Tx Attn received in set radio attribures + * x4 is for the value in db */ + oc->RfConfig.ulTxAttndB = (trx->max_power_red) << 2; + } #if OCTPHY_MULTI_TRX == 1 LOGP(DL1C, LOGL_INFO, "Tx TRX-OPEN.req(trx=%u, rf_port=%u, arfcn=%u, " diff --git a/src/osmo-bts-octphy/octphy_vty.c b/src/osmo-bts-octphy/octphy_vty.c index 3ea576c..e134fc5 100644 --- a/src/osmo-bts-octphy/octphy_vty.c +++ b/src/osmo-bts-octphy/octphy_vty.c @@ -136,10 +136,16 @@ } DEFUN(cfg_phy_tx_atten_db, cfg_phy_tx_atten_db_cmd, - "octphy tx-attenuation <0-359>", - OCT_STR "Configure the Tx Attenuation in quarter-dB\n" - "Tx attenuation in quarter-dB\n") + "octphy tx-attenuation (oml|<0-359>)", + OCT_STR "Set attenuation on transmitted RF\n" + "Use tx-attenuation according to OML instructions from BSC\n" + "Fixed tx-attenuation in quarter-dB\n") { + + + + + struct phy_link *plink = vty->index; if (plink->state != PHY_LINK_SHUTDOWN) { @@ -148,7 +154,12 @@ return CMD_WARNING; } - plink->u.octphy.tx_atten_db = atoi(argv[0]); + if (strcmp(argv[0], "oml") == 0) { + plink->u.octphy.tx_atten_flag = false; + } else { + plink->u.octphy.tx_atten_db = atoi(argv[0]); + plink->u.octphy.tx_atten_flag = true; + } return CMD_SUCCESS; } @@ -202,8 +213,13 @@ VTY_NEWLINE); vty_out(vty, " rx-gain %u%s", plink->u.octphy.rx_gain_db, VTY_NEWLINE); - vty_out(vty, " tx-attenuation %u%s", plink->u.octphy.tx_atten_db, - VTY_NEWLINE); + + if (plink->u.octphy.tx_atten_flag) { + vty_out(vty, " tx-attenuation %u%s", + plink->u.octphy.tx_atten_db, VTY_NEWLINE); + } else + vty_out(vty, " tx-attenuation oml%s", VTY_NEWLINE); + vty_out(vty, " rf-port-index %u%s", plink->u.octphy.rf_port_index, VTY_NEWLINE); } -- To view, visit https://gerrit.osmocom.org/905 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I76bb8660eb1d8baeb6b8f69da4a6ba9ab7319981 Gerrit-PatchSet: 13 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Jan 23 12:23:45 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 12:23:45 +0000 Subject: [ABANDON] osmo-gsm-manuals[master]: NITB: add OpenVPN diagram in shared chapter In-Reply-To: References: Message-ID: Harald Welte has abandoned this change. Change subject: NITB: add OpenVPN diagram in shared chapter ...................................................................... Abandoned this is clearly the wrong place. -- To view, visit https://gerrit.osmocom.org/1617 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Ia9b0712fcbec373cefd7a2bd02498edeb129f90f Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: ikostov Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Jan 23 12:25:07 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 12:25:07 +0000 Subject: osmo-bts[master]: octphy: Improve OML ADM state handling In-Reply-To: References: Message-ID: Patch Set 12: Code-Review-1 -- To view, visit https://gerrit.osmocom.org/906 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I034114beca95210169429d8ac1eb8648df12fc6c Gerrit-PatchSet: 12 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 12:26:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 12:26:08 +0000 Subject: osmo-pcu[master]: Add compression support in EGPRS PUAN In-Reply-To: References: Message-ID: Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/413 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id2eec4b5eb6da0ebd24054b541b09b700b9b40ba Gerrit-PatchSet: 5 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: prasadkg Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: prasadkg Gerrit-Reviewer: pravin Gerrit-Reviewer: sivasankari Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 12:26:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 12:26:09 +0000 Subject: [MERGED] osmo-pcu[master]: Add compression support in EGPRS PUAN In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add compression support in EGPRS PUAN ...................................................................... Add compression support in EGPRS PUAN This adds compression of bitmap in PUAN. The compressed bitmap is used only if the number of bits in the bitmap does not fit in the message and there is a gain after compression. The algorithm is part of libosmocore and so there is dependency on the libosmocore for compilation. The algorithm is tested on integration setup by forcing compression. Change-Id: Id2eec4b5eb6da0ebd24054b541b09b700b9b40ba --- M src/egprs_rlc_compression.cpp M src/egprs_rlc_compression.h M src/encoding.cpp M src/rlc.cpp M src/rlc.h M src/tbf.cpp M src/tbf.h M src/tbf_ul.cpp M tests/tbf/TbfTest.err 9 files changed, 537 insertions(+), 27 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/egprs_rlc_compression.cpp b/src/egprs_rlc_compression.cpp index f4e6bde..82605ff 100644 --- a/src/egprs_rlc_compression.cpp +++ b/src/egprs_rlc_compression.cpp @@ -84,8 +84,203 @@ } } -/* The code words for one run length and zero run length are described in - * table 9.1.10.1 of 3gpp 44.060 +/* + * Terminating codes for uninterrupted sequences of 0 and 1 up to 64 bit length + * according to TS 44.060 9.1.10 + */ +static const unsigned t4_term[2][64] = { + { + 0b0000110111, + 0b10, + 0b11, + 0b010, + 0b011, + 0b0011, + 0b0010, + 0b00011, + 0b000101, + 0b000100, + 0b0000100, + 0b0000101, + 0b0000111, + 0b00000100, + 0b00000111, + 0b000011000, + 0b0000010111, + 0b0000011000, + 0b0000001000, + 0b00001100111, + 0b00001101000, + 0b00001101100, + 0b00000110111, + 0b00000101000, + 0b00000010111, + 0b00000011000, + 0b000011001010, + 0b000011001011, + 0b000011001100, + 0b000011001101, + 0b000001101000, + 0b000001101001, + 0b000001101010, + 0b000001101011, + 0b000011010010, + 0b000011010011, + 0b000011010100, + 0b000011010101, + 0b000011010110, + 0b000011010111, + 0b000001101100, + 0b000001101101, + 0b000011011010, + 0b000011011011, + 0b000001010100, + 0b000001010101, + 0b000001010110, + 0b000001010111, + 0b000001100100, + 0b000001100101, + 0b000001010010, + 0b000001010011, + 0b000000100100, + 0b000000110111, + 0b000000111000, + 0b000000100111, + 0b000000101000, + 0b000001011000, + 0b000001011001, + 0b000000101011, + 0b000000101100, + 0b000001011010, + 0b000001100110, + 0b000001100111 + + }, + { + 0b00110101, + 0b000111, + 0b0111, + 0b1000, + 0b1011, + 0b1100, + 0b1110, + 0b1111, + 0b10011, + 0b10100, + 0b00111, + 0b01000, + 0b001000, + 0b000011, + 0b110100, + 0b110101, + 0b101010, + 0b101011, + 0b0100111, + 0b0001100, + 0b0001000, + 0b0010111, + 0b0000011, + 0b0000100, + 0b0101000, + 0b0101011, + 0b0010011, + 0b0100100, + 0b0011000, + 0b00000010, + 0b00000011, + 0b00011010, + 0b00011011, + 0b00010010, + 0b00010011, + 0b00010100, + 0b00010101, + 0b00010110, + 0b00010111, + 0b00101000, + 0b00101001, + 0b00101010, + 0b00101011, + 0b00101100, + 0b00101101, + 0b00000100, + 0b00000101, + 0b00001010, + 0b00001011, + 0b01010010, + 0b01010011, + 0b01010100, + 0b01010101, + 0b00100100, + 0b00100101, + 0b01011000, + 0b01011001, + 0b01011010, + 0b01011011, + 0b01001010, + 0b01001011, + 0b00110010, + 0b00110011, + 0b00110100 + } +}; +static const unsigned t4_term_length[2][64] = { + {10, 2, 2, 3, 3, 4, 4, 5, 6, 6, 7, 7, 7, 8, 8, 9, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12}, + {8, 6, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8} +}; + +static const unsigned t4_min_term_length[] = {2, 4}; +static const unsigned t4_min_make_up_length[] = {10, 5}; + +static const unsigned t4_max_term_length[] = {12, 8}; +static const unsigned t4_max_make_up_length[] = {13, 9}; + +static const unsigned t4_make_up_length[2][15] = { + {10, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13}, + {5, 5, 6, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9} +}; + +static const unsigned t4_make_up_ind[15] = {64, 128, 192, 256, 320, 384, 448, 512, 576, 640, 704, 768, 832, 896, 960}; + +static const unsigned t4_make_up[2][15] = { + { + 0b0000001111, + 0b000011001000, + 0b000011001001, + 0b000001011011, + 0b000000110011, + 0b000000110100, + 0b000000110101, + 0b0000001101100, + 0b0000001101101, + 0b0000001001010, + 0b0000001001011, + 0b0000001001100, + 0b0000001001101, + 0b0000001110010, + 0b0000001110011 + }, + { + 0b11011, + 0b10010, + 0b010111, + 0b0110111, + 0b00110110, + 0b00110111, + 0b01100100, + 0b01100101, + 0b01101000, + 0b01100111, + 0b011001100, + 0b011001101, + 0b011010010, + 0b011010011, + 0b011010100 + } +}; + +/* The code words for one run length and zero + * run length are described in table 9.1.10.1 + * of 3gpp 44.060 */ const char *one_run_len_code_list[EGPRS_CODEWORDS] = { "00110101", @@ -359,3 +554,138 @@ decode_tree_init(); } +/* Compress received block bitmap + * \param run_len_cnt[in] Count of number of 1's and 0's + * \param codewrd_bitmap[in] Code word for coresponding run length. + * \param crbb_vec[out] compressed bitvector. + */ +static void compress_bitmap( + uint16_t *run_len_cnt, /* cnt: run length count */ + uint16_t *codewrd_bitmap, /* code word */ + int16_t *codewrd_len, /* number of bits in the code word */ + bitvec *crbb_vec, /* bitmap buffer to put code word in */ + bool start) +{ + int i = 0; + unsigned writeIndex = crbb_vec->cur_bit; + *codewrd_bitmap = 0; + *codewrd_len = 0; + if (*run_len_cnt >= 64) { + for (i = 0; i < 15; i++) { + if (t4_make_up_ind[i] == *run_len_cnt) { + *codewrd_bitmap = t4_make_up[start][i]; + *codewrd_len = t4_make_up_length[start][i]; + } + } + } else { + *codewrd_bitmap = t4_term[start][*run_len_cnt]; + *codewrd_len = t4_term_length[start][*run_len_cnt]; + } + bitvec_write_field(crbb_vec, writeIndex, *codewrd_bitmap, *codewrd_len); +} + +/* Compress received block bitmap */ +int egprs_compress::osmo_t4_compress(struct bitvec *bv) +{ + uint8_t crbb_len = 0; + uint8_t uclen_crbb = 0; + uint8_t crbb_bitmap[127] = {'\0'}; + bool start = (bv->data[0] & 0x80)>>7; + struct bitvec crbb_vec; + + crbb_vec.data = crbb_bitmap; + crbb_vec.cur_bit = 0; + crbb_vec.data_len = 127; + bv->data_len = bv->cur_bit; + bv->cur_bit = 0; + if (egprs_compress::compress_rbb(bv, &crbb_vec, &uclen_crbb, 23*8)) { + memcpy(bv->data, crbb_bitmap, (crbb_len+7)/8); + bv->cur_bit = crbb_len; + bv->data_len = (crbb_len+7)/8; + return start; + } + else + printf("Encode failed\n"); + return -1; +} + +/*! \brief compression algorithm using T4 encoding + * the compressed bitmap's are copied in crbb_bitmap + * \param[in] rbb_vec bit vector to be encoded + * \return 1 if compression is success or 0 for failure + */ +int egprs_compress::compress_rbb( + struct bitvec *urbb_vec, + struct bitvec *crbb_vec, + uint8_t *uclen_crbb, /* Uncompressed bitmap len in CRBB */ + uint8_t max_bits) /* max remaining bits */ +{ + bool run_len_bit; + int buflen = urbb_vec->cur_bit; + int total_bits = urbb_vec->cur_bit; + uint16_t rlen; + uint16_t temprl = 0; + uint16_t cbmap = 0; /* Compressed code word */ + int16_t nbits; /* Length of code word */ + uint16_t uclen = 0; + int16_t clen = 0; + bool start; /* Starting color code see 9.1.10, 3GPP 44.060 */ + urbb_vec->cur_bit = 0; + run_len_bit = (urbb_vec->data[0] & 0x80)>>7; + while (buflen > 0) { + temprl = 0; + /* Find Run length */ + if (run_len_bit == 1) + rlen = bitvec_rl_curbit(urbb_vec, true, total_bits); + else + rlen = bitvec_rl_curbit(urbb_vec, false, total_bits); + buflen = buflen - rlen; + /* if rlen > 64 need Makeup code word */ + /*Compress the bits */ + if (run_len_bit == 0) { + start = 0; + if (rlen >= 64) { + temprl = (rlen/64)*64; + compress_bitmap(&temprl, &cbmap, &nbits, + crbb_vec, start); + clen = clen + nbits; + } + temprl = MOD64(rlen); + compress_bitmap(&temprl, &cbmap, &nbits, + crbb_vec, start); + /* next time the run length will be Ones */ + run_len_bit = 1; + } else { + start = 1; + if (rlen >= 64) { + temprl = (rlen/64)*64; + compress_bitmap(&temprl, &cbmap, &nbits, + crbb_vec, start); + clen = clen + nbits; + } + temprl = MOD64(rlen); + compress_bitmap(&temprl, &cbmap, &nbits, + crbb_vec, start); + + /* next time the run length will be Zeros */ + run_len_bit = 0; + } + uclen = uclen + rlen; + clen = clen + nbits; + /*compressed bitmap exceeds the buffer space */ + if (clen > max_bits) { + uclen = uclen - rlen; + clen = clen - nbits; + break; + } + } + crbb_vec->cur_bit = clen; + *uclen_crbb = uclen; + if (clen >= uclen) + /* No Gain is observed, So no need to compress */ + return 0; + else + LOGP(DRLCMACUL, LOGL_DEBUG, "CRBB bitmap = %s\n", osmo_hexdump(crbb_vec->data, (crbb_vec->cur_bit+7)/8)); + /* Add compressed bitmap to final buffer */ + return 1; +} diff --git a/src/egprs_rlc_compression.h b/src/egprs_rlc_compression.h index c5f0f1a..4d2501b 100644 --- a/src/egprs_rlc_compression.h +++ b/src/egprs_rlc_compression.h @@ -5,6 +5,7 @@ #pragma once struct egprs_compress_node; +#define MOD64(X) (((X) + 64) & 0x3F) /* Singleton to manage the EGPRS compression algorithm. */ class egprs_compress @@ -14,6 +15,9 @@ bool start, const uint8_t *orig_buf, bitvec *dest); egprs_compress(); + int osmo_t4_compress(struct bitvec *bv); + static int compress_rbb(struct bitvec *urbb_vec, struct bitvec *crbb_vec, + uint8_t *uclen_crbb, uint8_t max_bits); private: egprs_compress_node *ones_list; diff --git a/src/encoding.cpp b/src/encoding.cpp index 8fa4bf6..ea38b77 100644 --- a/src/encoding.cpp +++ b/src/encoding.cpp @@ -24,6 +24,7 @@ #include #include #include +#include extern "C" { #include @@ -699,20 +700,44 @@ static void write_packet_ack_nack_desc_egprs( struct gprs_rlcmac_bts *bts, bitvec * dest, unsigned& wp, - gprs_rlc_ul_window *window, bool is_final) + gprs_rlc_ul_window *window, bool is_final, unsigned& rest_bits) { - int urbb_len = 0; - int len; + unsigned int urbb_len = 0; + uint8_t crbb_len = 0; + uint8_t len; bool bow = true; bool eow = true; int ssn = window->mod_sns(window->v_q() + 1); - int num_blocks = window->mod_sns(window->v_r() - window->v_q()); + unsigned int num_blocks = window->mod_sns(window->v_r() - window->v_q()); int esn_crbb = window->mod_sns(ssn - 1); - /* Bit 0 at the end is mandatory Table 11.2.28.1 in 44.060 */ - int rest_bits = dest->data_len * 8 - wp - 1; + static uint8_t rbb[RLC_EGPRS_MAX_WS] = {'\0'}; + uint8_t iter = 0; int is_compressed = 0; + bool try_compression = false; + uint8_t ucmp_bmplen; + uint8_t crbb_bitmap[23] = {'\0'}; + bitvec ucmp_vec; + bitvec crbb_vec; + uint8_t uclen_crbb = 0; bool len_coded = true; + uint8_t crbb_start_clr_code; uint8_t i; +#if 0 + /* static size of 16 bits*/ + ..0. .... = ACKNACK: (Union) + Desc + + ...0 .... = FINAL_ACK_INDICATION: False + + .... 1... = BEGINNING_OF_WINDOW: 1 + + .... .1.. = END_OF_WINDOW: 1 + + .... ..10 0101 0001 1... .... = STARTING_SEQUENCE_NUMBER: 1187 + + .0.. .... = CRBB Exist: 0 +#endif + rest_bits -= 16; if (num_blocks > 0) /* V(Q) is NACK and omitted -> SSN = V(Q) + 1 */ @@ -720,27 +745,67 @@ if (num_blocks > window->ws()) num_blocks = window->ws(); - /* TODO Compression support */ - if (is_compressed == 0) { - /* Union bit takes 1 bit */ - /* Other fields in descr for uncompresed bitmap takes 15 bits*/ + /* Try Compression as number of blocks does not fit */ + if (num_blocks > rest_bits) { + try_compression = true; + } + if (try_compression == true) { + ucmp_bmplen = window->update_egprs_rbb(rbb); + ucmp_vec.data = rbb; + ucmp_vec.cur_bit = ucmp_bmplen; + ucmp_vec.data_len = 127; + crbb_vec.data = crbb_bitmap; + crbb_vec.cur_bit = 0; + crbb_vec.data_len = 127; + LOGP(DRLCMACUL, LOGL_DEBUG, + "rest_bits=%d uncompressed len %d and uncompressed bitmap = %s\n", + rest_bits, ucmp_bmplen, + osmo_hexdump(ucmp_vec.data, (ucmp_bmplen+7)/8)); - if (num_blocks > rest_bits - 15 - 1) { + is_compressed = egprs_compress::compress_rbb(&ucmp_vec, /* Uncompressed bitmap*/ + &crbb_vec, /*Compressed bitmap vector */ + &uclen_crbb, + (rest_bits - 16));/* CRBBlength:7 colourcode:1 dissector length:8*/ + LOGP(DRLCMACUL, LOGL_DEBUG, + "the ucmp len=%d uclen_crbb=%d num_blocks=%d crbb length %d, " + "and the CRBB bitmap = %s\n", + ucmp_bmplen, uclen_crbb, num_blocks, crbb_vec.cur_bit, + osmo_hexdump(crbb_bitmap, (crbb_vec.cur_bit+7)/8)); + crbb_len = crbb_vec.cur_bit; + } + + if (is_compressed == 0) { + /* length field takes 8 bits*/ + if (num_blocks > rest_bits - 8) { eow = false; - urbb_len = rest_bits - 15 - 1; + urbb_len = rest_bits; len_coded = false; - } else if (num_blocks == rest_bits - 15 - 1) { - urbb_len = rest_bits - 15 - 1; + } else if (num_blocks == rest_bits) { + urbb_len = rest_bits; len_coded = false; - /* Union bit takes 1 bit length field takes 8 bits*/ - } else if (num_blocks > rest_bits - 15 - 9) { - eow = false; - urbb_len = rest_bits - 15 - 9; } else urbb_len = num_blocks; + len = urbb_len + 15; } else { - /* TODO Compressed bitmap */ + if (num_blocks > uclen_crbb) { + eow = false; + urbb_len = num_blocks - uclen_crbb; + } + /* Union bit takes 1 bit */ + /* Other fields in descr of compresed bitmap takes 23 bits + * -8 = CRBB_STARTING_COLOR_CODE + CRBB_LENGTH */ + if (urbb_len > (rest_bits - crbb_len - 8)) { + eow = false; + len_coded = false; + urbb_len = rest_bits - crbb_len - 8; + /* -16 = ACKNACK Dissector length + CRBB_STARTING_COLOR_CODE + CRBB_LENGTH */ + } else if (urbb_len > (rest_bits - crbb_len - 16)) { + eow = false; + len_coded = false; + urbb_len = rest_bits - crbb_len - 16; + } + len = urbb_len + crbb_len + 23; } /* EGPRS Ack/Nack Description IE */ @@ -756,14 +821,32 @@ bitvec_write_field(dest, wp, eow, 1); // END_OF_WINDOW bitvec_write_field(dest, wp, ssn, 11); // STARTING_SEQUENCE_NUMBER if (is_compressed) { - /* TODO Add CRBB support */ - } else + bitvec_write_field(dest, wp, 1, 1); // CRBB_Exist + bitvec_write_field(dest, wp, crbb_len, 7); // CRBB_LENGTH + crbb_start_clr_code = (0x80 & ucmp_vec.data[0])>>7; + bitvec_write_field(dest, wp, crbb_start_clr_code, 1); // CRBB_clr_code + LOGP(DRLCMACUL, LOGL_DEBUG, + "EGPRS CRBB, crbb_len = %d, crbb_start_clr_code = %d\n", + crbb_len, crbb_start_clr_code); + while (crbb_len != 0) { + if (crbb_len > 8) { + bitvec_write_field(dest, wp, crbb_bitmap[iter], 8); + crbb_len = crbb_len - 8; + iter++; + } else { + bitvec_write_field(dest, wp, crbb_bitmap[iter], crbb_len); + crbb_len = 0; + } + } + esn_crbb = window->mod_sns(esn_crbb + uclen_crbb); + } else { bitvec_write_field(dest, wp, 0, 1); // CRBB_Exist + } LOGP(DRLCMACUL, LOGL_DEBUG, "EGPRS URBB, urbb len = %d, SSN = %d, ESN_CRBB = %d, " "len present = %s,desc len = %d, " "SNS = %d, WS = %d, V(Q) = %d, V(R) = %d%s%s\n", - urbb_len, ssn, esn_crbb, len_coded ? "yes" : "No", len, + urbb_len, ssn, esn_crbb, len_coded ? "yes" : "No" , len, window->sns(), window->ws(), window->v_q(), window->v_r(), bow ? ", BOW" : "", eow ? ", EOW" : ""); @@ -795,7 +878,9 @@ bitvec_write_field(dest, wp, 0, 1); // 0: don't have Power Control Parameters bitvec_write_field(dest, wp, 0, 1); // 0: don't have Extension Bits - write_packet_ack_nack_desc_egprs(bts, dest, wp, &tbf->m_window, is_final); + /* -2 for last bit 0 mandatory and REL5 not supported */ + unsigned bits_ack_nack = dest->data_len * 8 - wp - 2; + write_packet_ack_nack_desc_egprs(bts, dest, wp, &tbf->m_window, is_final, bits_ack_nack); bitvec_write_field(dest, wp, 0, 1); // fixed 0 bitvec_write_field(dest, wp, 0, 1); // 0: don't have REL 5 diff --git a/src/rlc.cpp b/src/rlc.cpp index 2bffccb..d13045e 100644 --- a/src/rlc.cpp +++ b/src/rlc.cpp @@ -83,6 +83,32 @@ return resend; } +/* Update the receive block bitmap */ +uint16_t gprs_rlc_ul_window::update_egprs_rbb(uint8_t *rbb) +{ + int i; + uint16_t bsn; + uint16_t bitmask = 0x80; + int8_t pos = 0; + int8_t bit_pos = 0; + for (i = 0, bsn = (v_q()+1); ((bsn < (v_r())) && (i < ws())); i++, + bsn = this->mod_sns(bsn + 1)) { + if (m_v_n.is_received(bsn)) { + rbb[pos] = rbb[pos] | bitmask; + } else { + rbb[pos] = rbb[pos] & (~bitmask); + } + bitmask = bitmask >> 1; + bit_pos++; + bit_pos = bit_pos % 8; + if (bit_pos == 0) { + pos++; + bitmask = 0x80; + } + } + return i; +} + int gprs_rlc_dl_window::count_unacked() { uint16_t unacked = 0; @@ -219,6 +245,8 @@ void gprs_rlc_window::set_ws(uint16_t ws) { + LOGP(DRLCMAC, LOGL_INFO, "ws(%d)\n", + ws); OSMO_ASSERT(ws >= RLC_GPRS_SNS/2); OSMO_ASSERT(ws <= RLC_MAX_SNS/2); m_ws = ws; diff --git a/src/rlc.h b/src/rlc.h index b2fcd95..7db205d 100644 --- a/src/rlc.h +++ b/src/rlc.h @@ -347,6 +347,7 @@ bool is_received(uint16_t bsn) const; void update_rbb(char *rbb); + uint16_t update_egprs_rbb(uint8_t *rbb); void raise_v_r_to(int moves); void raise_v_r(const uint16_t bsn); uint16_t raise_v_q(); diff --git a/src/tbf.cpp b/src/tbf.cpp index 657255d..33d94a8 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -827,14 +827,16 @@ if (egprs_ms_class > 0 && bts->egprs_enabled) { tbf->enable_egprs(); tbf->m_window.set_sns(RLC_EGPRS_SNS); - /* TODO: Allow bigger UL windows when CRBB encoding is supported */ - tbf->m_window.set_ws(RLC_EGPRS_MIN_WS); setup_egprs_mode(bts, ms); LOGP(DRLCMAC, LOGL_INFO, "Enabled EGPRS for %s, mode %s\n", tbf->name(), GprsCodingScheme::modeName(ms->mode())); } rc = setup_tbf(tbf, ms, use_trx, ms_class, egprs_ms_class, single_slot); + + if (tbf->is_egprs_enabled()) + tbf->egprs_calc_ulwindow_size(); + /* if no resource */ if (rc < 0) { talloc_free(tbf); diff --git a/src/tbf.h b/src/tbf.h index adb7dcc..0389595 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -523,6 +523,8 @@ struct gprs_rlc_data *block, uint8_t *data, const uint8_t block_idx); + void egprs_calc_ulwindow_size(); + void update_coding_scheme_counter_ul(const GprsCodingScheme cs); /* Please note that all variables here will be reset when changing diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 0de0127..2598174 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -29,6 +29,8 @@ #include #include +#include "pcu_utils.h" + extern "C" { #include #include @@ -587,3 +589,22 @@ } } } + +void gprs_rlcmac_ul_tbf::egprs_calc_ulwindow_size() +{ + struct gprs_rlcmac_bts *bts_data = bts->bts_data(); + unsigned int num_pdch = pcu_bitcount(ul_slots()); + unsigned int ws = bts_data->ws_base + num_pdch * bts_data->ws_pdch; + ws = (ws / 32) * 32; + ws = OSMO_MAX(64, ws); + + if (num_pdch == 1) + ws = OSMO_MIN(192, ws); + else + ws = OSMO_MIN(128 * num_pdch, ws); + + LOGP(DRLCMAC, LOGL_INFO, "%s: Setting EGPRS window size to %d, base(%d) slots(%d) ws_pdch(%d)\n", + name(), ws, bts_data->ws_base, num_pdch, bts_data->ws_pdch); + + m_window.set_ws(ws); +} diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index 38d85d9..5f5456b 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -3342,6 +3342,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 3c TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 384 +ws(384) DL TBF slots: 0x3c, N: 4, WS: 384 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to RELEASING TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=RELEASING EGPRS) free @@ -3386,6 +3387,8 @@ - Setting Control TS 7 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 00 +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): Setting EGPRS window size to 64, base(0) slots(1) ws_pdch(0) +ws(64) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer 3169. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed @@ -3438,6 +3441,7 @@ Attaching TBF to MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 80 TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI: 0xf1223344 confirmed TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) [DOWNLINK] START Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' @@ -3479,6 +3483,8 @@ - Setting Control TS 7 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 00 +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): Setting EGPRS window size to 64, base(0) slots(1) ws_pdch(0) +ws(64) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer 3169. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed @@ -3694,6 +3700,7 @@ Attaching TBF to MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 80 TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI: 0xf1223344 confirmed TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) [DOWNLINK] START Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' @@ -3723,6 +3730,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -4057,6 +4065,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -4336,6 +4345,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -4574,6 +4584,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -4776,6 +4787,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -4956,6 +4968,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -5117,6 +5130,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -5274,6 +5288,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -5418,6 +5433,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -5563,6 +5579,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -5614,6 +5631,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -5665,6 +5683,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -5716,6 +5735,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -5786,6 +5806,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -5856,6 +5877,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -5926,6 +5948,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -5996,6 +6019,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -6053,6 +6077,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -6110,6 +6135,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -6167,6 +6193,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed @@ -6242,6 +6269,8 @@ - Setting Control TS 7 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 00 +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): Setting EGPRS window size to 64, base(0) slots(1) ws_pdch(0) +ws(64) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer 3169. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed @@ -6324,6 +6353,7 @@ Attaching TBF to MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 80 TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI: 0xf1223344 confirmed TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) [DOWNLINK] START Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' @@ -6355,6 +6385,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 192 +ws(192) DL TBF slots: 0x10, N: 1, WS: 192 ********** TBF update ********** PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. @@ -6371,6 +6402,7 @@ - Assigning DL TS 5 PDCH(TS 5, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS), 1 TBFs, USFs = 00, TFIs = 00000001. TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 384 +ws(384) DL TBF slots: 0x3c, N: 4, WS: 384 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to RELEASING TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=RELEASING EGPRS) free @@ -6415,6 +6447,8 @@ - Setting Control TS 7 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 00 +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): Setting EGPRS window size to 64, base(0) slots(1) ws_pdch(0) +ws(64) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer 3169. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed @@ -6485,6 +6519,7 @@ Attaching TBF to MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 80 TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI: 0xf1223344 confirmed TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) [DOWNLINK] START Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' @@ -6514,9 +6549,11 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed +ws(480) TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - ack: (BSN=1176)"RRRRRRRRRRIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIRRRIRRRRRRRRRRRRRRRRRRRRRRRRRRI"(BSN=1287) R=ACK I=NACK TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) DL analysis, range=1176:1288, lost=73, recv=39, skipped=0, bsn=1944, info='RRRRRRRRRRRRRRRRRRRRRRRRRRLRRRLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLRRRRRRRRRR................................................................................................................................................................................................................................................................................................................................................................................' -- To view, visit https://gerrit.osmocom.org/413 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id2eec4b5eb6da0ebd24054b541b09b700b9b40ba Gerrit-PatchSet: 6 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: prasadkg Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: prasadkg Gerrit-Reviewer: pravin Gerrit-Reviewer: sivasankari From gerrit-no-reply at lists.osmocom.org Mon Jan 23 12:27:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 12:27:08 +0000 Subject: osmo-pcu[master]: Add test case for testing PUAN In-Reply-To: References: Message-ID: Patch Set 5: please manually rebase this, the libosmocore change has been merged for some time. -- To view, visit https://gerrit.osmocom.org/414 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I18e6d4a9e90fd6453fe14187beab27dfeae8dbe9 Gerrit-PatchSet: 5 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: prasadkg Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: prasadkg Gerrit-Reviewer: pravin Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 12:28:42 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 23 Jan 2017 12:28:42 +0000 Subject: openbsc[master]: Add VTY command to immediately expire user (set expire_lu to... In-Reply-To: References: Message-ID: Patch Set 1: (Keith, in case you're not familiar with gerrit: you got a +2 now, so when you hit the "Submit" button the change will be merged to master. Sometimes the reviewer hits the "Submit" button right away.) -- To view, visit https://gerrit.osmocom.org/1623 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I676c84350a7afc963bc6bb4c46c60e5ac3eee67e Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: keith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 12:29:30 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 12:29:30 +0000 Subject: osmo-pcu[master]: Enable padding support for retransmission in EGPRS DL TBF In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 we cannot merge a generic change without knowing that all BTS models will continue tow ork. osmo-bts-trx and osmo-bts-lc15 have been tested, but osmo-bts-sysmo not. The submitter needs to test that, or help Max so he can test it before merging. -- To view, visit https://gerrit.osmocom.org/1513 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idaf956244aa029c4bef70ecf94163044a3c85f59 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 12:31:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 12:31:24 +0000 Subject: libosmocore[master]: core/conv: implement optimized Viterbi decoder In-Reply-To: References: Message-ID: Patch Set 5: Code-Review+1 fine for me, but I'd appreciate indication from Sylvain if all his comments have been addressed. -- To view, visit https://gerrit.osmocom.org/1337 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I74d355274b4176a7d924f91ef3c96912ce338fb2 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Alexander Chemeris Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Tom Tsou Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 12:31:43 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 12:31:43 +0000 Subject: openbsc[master]: bsc_control.py: fix blocking In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1572 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I706d54a4a7ceef62683bf9a2fe63fc9ab331c24e Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 12:31:45 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 12:31:45 +0000 Subject: [MERGED] openbsc[master]: bsc_control.py: fix blocking In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: bsc_control.py: fix blocking ...................................................................... bsc_control.py: fix blocking Previously reading from socket would block if no data were sent by the server. Use non-blocking read for set and get operations. Change-Id: I706d54a4a7ceef62683bf9a2fe63fc9ab331c24e --- M openbsc/contrib/bsc_control.py 1 file changed, 11 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/contrib/bsc_control.py b/openbsc/contrib/bsc_control.py index 66a41eb..3a7964d 100755 --- a/openbsc/contrib/bsc_control.py +++ b/openbsc/contrib/bsc_control.py @@ -30,8 +30,14 @@ (_, _, v) = do_set_get(sck, var) return v -def _leftovers(sck): - data = sck.recv(1024) +def _leftovers(sck, fl): + """ + Read outstanding data if any according to flags + """ + try: + data = sck.recv(1024, fl) + except socket.error as (s_errno, strerror): + return False if len(data) != 0: tail = data while True: @@ -75,19 +81,19 @@ if options.cmd_set: if len(args) < 2: parser.error("Set requires var and value arguments") - _leftovers(sock) + _leftovers(sock, socket.MSG_DONTWAIT) print "Got message:", set_var(sock, args[0], ' '.join(args[1:])) if options.cmd_get: if len(args) != 1: parser.error("Get requires the var argument") - _leftovers(sock) + _leftovers(sock, socket.MSG_DONTWAIT) (a, _, _) = do_set_get(sock, args[0]) print "Got message:", a if options.monitor: while True: - if not _leftovers(sock): + if not _leftovers(sock, 0): print "Connection is gone." break sock.close() -- To view, visit https://gerrit.osmocom.org/1572 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I706d54a4a7ceef62683bf9a2fe63fc9ab331c24e Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Jan 23 12:32:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 12:32:00 +0000 Subject: [MERGED] openbsc[master]: Prevent segfault in range encoding In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Prevent segfault in range encoding ...................................................................... Prevent segfault in range encoding * Explicitly check when ARFCN array split is impossible and return gracefully instead of using negative index. * Separate range encoding into generic function and use it for all SI-related things. * Propagate the error into that function and to its callers. * Add separate test-case for the segfault previously triggered by this bug. Change-Id: I3e049ab2d7c1c4d6c791b148f37e10636a8e43e0 Related: RT#7379 --- M openbsc/include/openbsc/system_information.h M openbsc/src/libbsc/arfcn_range_encode.c M openbsc/src/libbsc/rest_octets.c M openbsc/src/libbsc/system_information.c M openbsc/tests/gsm0408/gsm0408_test.c M openbsc/tests/gsm0408/gsm0408_test.ok 6 files changed, 78 insertions(+), 37 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/include/openbsc/system_information.h b/openbsc/include/openbsc/system_information.h index ebc3afd..1b19c8b 100644 --- a/openbsc/include/openbsc/system_information.h +++ b/openbsc/include/openbsc/system_information.h @@ -3,6 +3,8 @@ #include +#include + struct gsm_bts; int gsm_generate_si(struct gsm_bts *bts, enum osmo_sysinfo_type type); @@ -10,6 +12,8 @@ unsigned earfcn_size(const struct osmo_earfcn_si2q *e); unsigned range1024_p(unsigned n); unsigned range512_q(unsigned m); +int range_encode(enum gsm48_range r, int *arfcns, int arfcns_used, int *w, + int f0, uint8_t *chan_list); bool si2q_size_check(const struct gsm_bts *bts); int bts_uarfcn_del(struct gsm_bts *bts, uint16_t arfcn, uint16_t scramble); int bts_uarfcn_add(struct gsm_bts *bts, uint16_t arfcn, uint16_t scramble, diff --git a/openbsc/src/libbsc/arfcn_range_encode.c b/openbsc/src/libbsc/arfcn_range_encode.c index 9918838..9ca4840 100644 --- a/openbsc/src/libbsc/arfcn_range_encode.c +++ b/openbsc/src/libbsc/arfcn_range_encode.c @@ -27,6 +27,8 @@ #include +#include + static inline int greatest_power_of_2_lesser_or_equal_to(int index) { int power_of_2 = 1; @@ -109,6 +111,8 @@ /* Now do the processing */ split_at = range_enc_find_index(range, arfcns, size); + if (split_at < 0) + return -EINVAL; /* we now know where to split */ out[index] = 1 + arfcns[split_at]; diff --git a/openbsc/src/libbsc/rest_octets.c b/openbsc/src/libbsc/rest_octets.c index 1a5e435..fc0282e 100644 --- a/openbsc/src/libbsc/rest_octets.c +++ b/openbsc/src/libbsc/rest_octets.c @@ -180,10 +180,10 @@ bitvec_set_bit(bv, L); } -static inline void append_uarfcn(struct bitvec *bv, const uint16_t *u, +static inline int append_uarfcn(struct bitvec *bv, const uint16_t *u, const uint16_t *sc, size_t length) { - int f0_inc, i, arfcns_used, w[RANGE_ENC_MAX_ARFCNS], a[length]; + int f0_inc, i, w[RANGE_ENC_MAX_ARFCNS] = { 0 }, a[length]; uint8_t chan_list[16] = {0}; /* 3G Neighbour Cell Description */ @@ -211,9 +211,9 @@ /* Note: we do not support multiple UARFCN values ATM: */ bitvec_set_uint(bv, u[0], 14); - arfcns_used = range_enc_filter_arfcns(a, length, 0, &f0_inc); - range_enc_arfcns(ARFCN_RANGE_1024, a, arfcns_used, w, 0); - range_enc_range1024(chan_list, 0, f0_inc, w); + f0_inc = range_encode(ARFCN_RANGE_1024, a, length, w, 0, chan_list); + if (f0_inc < 0) + return f0_inc; /* FDD_Indic0: parameter value '0000000000' is not a member of the set */ bitvec_set_bit(bv, f0_inc); @@ -229,12 +229,15 @@ /* UTRAN TDD Description */ bitvec_set_bit(bv, 0); + + return 0; } /* generate SI2quater rest octets: 3GPP TS 44.018 ? 10.5.2.33b */ int rest_octets_si2quater(uint8_t *data, const struct osmo_earfcn_si2q *e, const uint16_t *u, const uint16_t *sc, size_t u_len) { + int rc; unsigned sz; struct bitvec bv; bv.data = data; @@ -279,7 +282,13 @@ SI2Q_MAX_LEN); return -ENOMEM; } - append_uarfcn(&bv, u, sc, u_len); + rc = append_uarfcn(&bv, u, sc, u_len); + if (rc < 0) { + LOGP(DRR, LOGL_ERROR, "SI2quater: failed to append %zu " + "UARFCNs due to range encoding failure: %s\n", + u_len, strerror(-rc)); + return rc; + } } else { /* No 3G Neighbour Cell Description */ bitvec_set_bit(&bv, 0); } diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c index 3d55d1a..20c3915 100644 --- a/openbsc/src/libbsc/system_information.c +++ b/openbsc/src/libbsc/system_information.c @@ -316,6 +316,38 @@ return 0; } +int range_encode(enum gsm48_range r, int *arfcns, int arfcns_used, int *w, + int f0, uint8_t *chan_list) +{ + /* + * Manipulate the ARFCN list according to the rules in J4 depending + * on the selected range. + */ + int rc, f0_included; + + range_enc_filter_arfcns(arfcns, arfcns_used, f0, &f0_included); + + rc = range_enc_arfcns(r, arfcns, arfcns_used, w, 0); + if (rc < 0) + return rc; + + /* Select the range and the amount of bits needed */ + switch (r) { + case ARFCN_RANGE_128: + return range_enc_range128(chan_list, f0, w); + case ARFCN_RANGE_256: + return range_enc_range256(chan_list, f0, w); + case ARFCN_RANGE_512: + return range_enc_range512(chan_list, f0, w); + case ARFCN_RANGE_1024: + return range_enc_range1024(chan_list, f0, f0_included, w); + default: + return -ERANGE; + }; + + return f0_included; +} + /* generate a frequency list with the range 512 format */ static inline int enc_freq_lst_range(uint8_t *chan_list, struct bitvec *bv, const struct gsm_bts *bts, @@ -323,9 +355,8 @@ { int arfcns[RANGE_ENC_MAX_ARFCNS]; int w[RANGE_ENC_MAX_ARFCNS]; - int f0_included = 0; int arfcns_used = 0; - int i, rc, range, f0; + int i, range, f0; /* * Select ARFCNs according to the rules in bitvec2freq_list @@ -346,35 +377,8 @@ if (range == ARFCN_RANGE_INVALID) return -2; - /* - * Manipulate the ARFCN list according to the rules in J4 depending - * on the selected range. - */ - arfcns_used = range_enc_filter_arfcns(arfcns, arfcns_used, - f0, &f0_included); - memset(w, 0, sizeof(w)); - rc = range_enc_arfcns(range, arfcns, arfcns_used, w, 0); - if (rc != 0) - return -3; - - /* Select the range and the amount of bits needed */ - switch (range) { - case ARFCN_RANGE_128: - return range_enc_range128(chan_list, f0, w); - break; - case ARFCN_RANGE_256: - return range_enc_range256(chan_list, f0, w); - break; - case ARFCN_RANGE_512: - return range_enc_range512(chan_list, f0, w); - break; - case ARFCN_RANGE_1024: - return range_enc_range1024(chan_list, f0, f0_included, w); - break; - default: - return -4; - }; + return range_encode(range, arfcns, arfcns_used, w, f0, chan_list); } /* generate a cell channel list as per Section 10.5.2.1b of 04.08 */ @@ -447,7 +451,7 @@ /* Attempt to do the range encoding */ rc = enc_freq_lst_range(chan_list, bv, bts, bis, ter, pgsm); - if (rc == 0) + if (rc >= 0) return 0; LOGP(DRR, LOGL_ERROR, "min_arfcn=%u, max_arfcn=%u, arfcns=%d " diff --git a/openbsc/tests/gsm0408/gsm0408_test.c b/openbsc/tests/gsm0408/gsm0408_test.c index ae8cbdd..472c2ae 100644 --- a/openbsc/tests/gsm0408/gsm0408_test.c +++ b/openbsc/tests/gsm0408/gsm0408_test.c @@ -120,6 +120,21 @@ gen(bts); } +static inline void test_si2q_segfault(void) +{ + struct gsm_bts *bts; + struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + printf("Test SI2quater UARFCN (same scrambling code and diversity):\n"); + + if (!network) + exit(1); + bts = gsm_bts_alloc(network); + + _bts_uarfcn_add(bts, 10564, 319, 0); + _bts_uarfcn_add(bts, 10612, 319, 0); + gen(bts); +} + static inline void test_si2q_u(void) { struct gsm_bts *bts; @@ -590,6 +605,7 @@ test_range_encoding(); test_gsm411_rp_ref_wrap(); + test_si2q_segfault(); test_si2q_e(); test_si2q_u(); printf("Done.\n"); diff --git a/openbsc/tests/gsm0408/gsm0408_test.ok b/openbsc/tests/gsm0408/gsm0408_test.ok index ebe9476..1118dd9 100644 --- a/openbsc/tests/gsm0408/gsm0408_test.ok +++ b/openbsc/tests/gsm0408/gsm0408_test.ok @@ -62,6 +62,10 @@ Allocated reference: 255 Allocated reference: 0 Allocated reference: 1 +Test SI2quater UARFCN (same scrambling code and diversity): +generated valid SI2quater: [23] 59 06 07 c0 00 25 52 88 0a 7e 10 99 64 00 0b 2b 2b 2b 2b 2b 2b 2b 2b +failed to generate SI2quater: Invalid argument +failed to generate SI2quater: Invalid argument Testing SYSINFO_TYPE_2quater EARFCN generation: generated invalid SI2quater: [23] 59 06 07 c0 00 04 86 59 0a 03 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b added EARFCN 1917 - generated valid SI2quater: [23] 59 06 07 c0 00 04 86 59 83 be c8 50 0b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b -- To view, visit https://gerrit.osmocom.org/1429 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3e049ab2d7c1c4d6c791b148f37e10636a8e43e0 Gerrit-PatchSet: 7 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Mon Jan 23 12:32:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 12:32:17 +0000 Subject: openbsc[master]: SI2q: add support for multiple UARFCNs In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1516 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If1c32e8b547a28325180faaaddd21f80c37f7337 Gerrit-PatchSet: 4 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 12:35:40 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 12:35:40 +0000 Subject: osmo-pcu[master]: Handle packet access reject during packet resource request In-Reply-To: References: Message-ID: Patch Set 9: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1216 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I05ff25124b58905586caa0c0c37023d69724f121 Gerrit-PatchSet: 9 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: pravin Gerrit-Reviewer: sivasankari Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 13:09:03 2017 From: gerrit-no-reply at lists.osmocom.org (tnt) Date: Mon, 23 Jan 2017 13:09:03 +0000 Subject: libosmocore[master]: utils/conv_gen.py: improve application flexibility In-Reply-To: References: Message-ID: Patch Set 4: (1 comment) https://gerrit.osmocom.org/#/c/1584/4/utils/conv_gen.py File utils/conv_gen.py: Line 26: import sys, os, math, getopt Why use getopt and not argparse as max suggested ? It's way more "pythonic". -- To view, visit https://gerrit.osmocom.org/1584 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0b476b00234c17f78b41d695cf3bfd13edb64c28 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Jan 23 13:31:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 23 Jan 2017 13:31:31 +0000 Subject: [MERGED] openbsc[master]: SI2q: add support for multiple UARFCNs In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: SI2q: add support for multiple UARFCNs ...................................................................... SI2q: add support for multiple UARFCNs Support multiple UARFCNs with the same Scrambler Code. Fixes: RT#7379 Change-Id: If1c32e8b547a28325180faaaddd21f80c37f7337 --- M openbsc/src/libbsc/rest_octets.c M openbsc/src/libbsc/system_information.c M openbsc/tests/gsm0408/gsm0408_test.c M openbsc/tests/gsm0408/gsm0408_test.ok 4 files changed, 107 insertions(+), 34 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/src/libbsc/rest_octets.c b/openbsc/src/libbsc/rest_octets.c index fc0282e..6fae9cd 100644 --- a/openbsc/src/libbsc/rest_octets.c +++ b/openbsc/src/libbsc/rest_octets.c @@ -180,11 +180,40 @@ bitvec_set_bit(bv, L); } -static inline int append_uarfcn(struct bitvec *bv, const uint16_t *u, +/* Append single FDD UARFCN */ +static inline int append_utran_fdd(struct bitvec *bv, uint16_t u, int *sc, + size_t length) +{ + int f0, w[RANGE_ENC_MAX_ARFCNS] = { 0 }; + uint8_t chan_list[16] = {0}; + /* Repeated UTRAN FDD Neighbour Cells */ + bitvec_set_bit(bv, 1); + + /* FDD-ARFCN */ + bitvec_set_bit(bv, 0); + bitvec_set_uint(bv, u, 14); + + f0 = range_encode(ARFCN_RANGE_1024, sc, length, w, 0, chan_list); + if (f0 < 0) + return f0; + + /* FDD_Indic0: parameter value '0000000000' is a member of the set? */ + bitvec_set_bit(bv, f0); + /* NR_OF_FDD_CELLS */ + bitvec_set_uint(bv, length, 5); + + f0 = bv->cur_bit; + bitvec_add_range1024(bv, (struct gsm48_range_1024 *)chan_list); + bv->cur_bit = f0 + range1024_p(length); + return 0; +} + +/* Append multiple FDD UARFCNs */ +static inline int append_uarfcns(struct bitvec *bv, const uint16_t *u, const uint16_t *sc, size_t length) { - int f0_inc, i, w[RANGE_ENC_MAX_ARFCNS] = { 0 }, a[length]; - uint8_t chan_list[16] = {0}; + int i, j, k, rc, st = 0, a[length]; + uint16_t cu = u[0]; /* caller ensures that length is positive */ /* 3G Neighbour Cell Description */ bitvec_set_bit(bv, 1); @@ -198,31 +227,24 @@ /* No Bandwidth_FDD */ bitvec_set_bit(bv, 0); - memset(w, 0, sizeof(w)); - for (i = 0; i < length; i++) - a[i] = sc[i]; + for (i = 0; i < length; i++) { + for (j = st, k = 0; j < i; j++) + a[k++] = sc[j]; /* copy corresponding SCs */ + if (u[i] != cu) { /* we've reached new UARFCN */ + rc = append_utran_fdd(bv, cu, a, k); + if (rc < 0) + return rc; + cu = u[i]; + st = i; /* update start position */ + } + } - /* Note: we do not support repeating Neighbour Cells ATM */ - /* Repeated UTRAN FDD Neighbour Cells */ - bitvec_set_bit(bv, 1); - - /* FDD-ARFCN */ - bitvec_set_bit(bv, 0); - /* Note: we do not support multiple UARFCN values ATM: */ - bitvec_set_uint(bv, u[0], 14); - - f0_inc = range_encode(ARFCN_RANGE_1024, a, length, w, 0, chan_list); - if (f0_inc < 0) - return f0_inc; - - /* FDD_Indic0: parameter value '0000000000' is not a member of the set */ - bitvec_set_bit(bv, f0_inc); - /* NR_OF_FDD_CELLS */ - bitvec_set_uint(bv, length, 5); - - i = bv->cur_bit; - bitvec_add_range1024(bv, (struct gsm48_range_1024 *)chan_list); - bv->cur_bit = i + range1024_p(length); + /* add last UARFCN not covered by previous cycle */ + for (i = st, k = 0; i < length; i++) + a[k++] = sc[i]; + rc = append_utran_fdd(bv, cu, a, k); + if (rc < 0) + return rc; /* stop bit - end of Repeated UTRAN FDD Neighbour Cells */ bitvec_set_bit(bv, 0); @@ -282,7 +304,8 @@ SI2Q_MAX_LEN); return -ENOMEM; } - rc = append_uarfcn(&bv, u, sc, u_len); + + rc = append_uarfcns(&bv, u, sc, u_len); if (rc < 0) { LOGP(DRR, LOGL_ERROR, "SI2quater: failed to append %zu " "UARFCNs due to range encoding failure: %s\n", diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c index 20c3915..e71490e 100644 --- a/openbsc/src/libbsc/system_information.c +++ b/openbsc/src/libbsc/system_information.c @@ -130,8 +130,23 @@ unsigned uarfcn_size(const uint16_t *u, const uint16_t *sc, size_t u_len) { - /*account for all the constant bits in append_uarfcn() */ - return 29 + range1024_p(u_len); + /*account for all the constant bits in append_uarfcns() */ + unsigned s = 7, append = 22, r = 0, i, st = 0, j, k; + uint16_t cu = u[0]; + + for (i = 0; i < u_len; i++) { + for (j = st, k = 0; j < i; j++, k++); + if (u[i] != cu) { /* we've reached new UARFCN */ + r += (append + range1024_p(k)); + cu = u[i]; + st = i; /* update start position */ + } + } + + /* add last UARFCN not covered by previous cycle */ + for (i = st, k = 0; i < u_len; i++, k++); + + return s + r + append + range1024_p(k); } bool si2q_size_check(const struct gsm_bts *bts) @@ -184,7 +199,7 @@ int bts_uarfcn_add(struct gsm_bts *bts, uint16_t arfcn, uint16_t scramble, bool diversity) { - size_t len = bts->si_common.uarfcn_length, i, k; + size_t len = bts->si_common.uarfcn_length, i, k = 0; uint16_t scr, chk, *ual = bts->si_common.data.uarfcn_list, *scl = bts->si_common.data.scramble_list, @@ -197,7 +212,11 @@ if (len == MAX_EARFCN_LIST) return -ENOMEM; - for (i = 0, k = 0; i < len; i++) { + for (i = 0; i < len; i++) /* find the position of arfcn if any */ + if (arfcn == ual[i]) + break; + + for (k = 0; i < len; i++) { if (arfcn == ual[i] && (scr == scl[i] || chk == scl[i])) return -EADDRINUSE; if (scr > scl[i]) @@ -209,6 +228,7 @@ memmove(ual + k + 1, ual + k, (len - k) * 2); memmove(scl + k + 1, scl + k, (len - k) * 2); } + ual[k] = arfcn; scl[k] = scr; bts->si_common.uarfcn_length++; diff --git a/openbsc/tests/gsm0408/gsm0408_test.c b/openbsc/tests/gsm0408/gsm0408_test.c index 472c2ae..08cf43f 100644 --- a/openbsc/tests/gsm0408/gsm0408_test.c +++ b/openbsc/tests/gsm0408/gsm0408_test.c @@ -135,6 +135,26 @@ gen(bts); } +static inline void test_si2q_mu(void) +{ + struct gsm_bts *bts; + struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + printf("Test SI2quater multiple UARFCNs:\n"); + + if (!network) + exit(1); + bts = gsm_bts_alloc(network); + + _bts_uarfcn_add(bts, 10564, 318, 0); + _bts_uarfcn_add(bts, 10612, 319, 0); + _bts_uarfcn_add(bts, 10612, 31, 0); + _bts_uarfcn_add(bts, 10612, 19, 0); + _bts_uarfcn_add(bts, 10613, 64, 0); + _bts_uarfcn_add(bts, 10613, 164, 0); + _bts_uarfcn_add(bts, 10613, 14, 0); + gen(bts); +} + static inline void test_si2q_u(void) { struct gsm_bts *bts; @@ -608,6 +628,7 @@ test_si2q_segfault(); test_si2q_e(); test_si2q_u(); + test_si2q_mu(); printf("Done.\n"); return EXIT_SUCCESS; } diff --git a/openbsc/tests/gsm0408/gsm0408_test.ok b/openbsc/tests/gsm0408/gsm0408_test.ok index 1118dd9..1c02dfd 100644 --- a/openbsc/tests/gsm0408/gsm0408_test.ok +++ b/openbsc/tests/gsm0408/gsm0408_test.ok @@ -64,8 +64,8 @@ Allocated reference: 1 Test SI2quater UARFCN (same scrambling code and diversity): generated valid SI2quater: [23] 59 06 07 c0 00 25 52 88 0a 7e 10 99 64 00 0b 2b 2b 2b 2b 2b 2b 2b 2b -failed to generate SI2quater: Invalid argument -failed to generate SI2quater: Invalid argument +generated valid SI2quater: [23] 59 06 07 c0 00 25 52 e8 0a 7f 52 88 0a 7e 10 99 64 00 0b 2b 2b 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 52 e8 0a 7f 52 88 0a 7e 10 99 64 00 0b 2b 2b 2b 2b Testing SYSINFO_TYPE_2quater EARFCN generation: generated invalid SI2quater: [23] 59 06 07 c0 00 04 86 59 0a 03 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b added EARFCN 1917 - generated valid SI2quater: [23] 59 06 07 c0 00 04 86 59 83 be c8 50 0b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b @@ -89,4 +89,13 @@ failed to add UARFCN to SI2quater: No space left on device failed to add UARFCN to SI2quater: No space left on device generated valid SI2quater: [23] 59 06 07 c0 00 25 0f 7c 4c 7a 34 0e 64 77 85 43 55 c8 10 99 64 00 0b +Test SI2quater multiple UARFCNs: +generated valid SI2quater: [23] 59 06 07 c0 00 25 52 88 0a 7c 10 99 64 00 0b 2b 2b 2b 2b 2b 2b 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 52 e8 0a 7f 52 88 0a 7c 10 99 64 00 0b 2b 2b 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 52 e8 12 7e e0 a9 44 05 3e 00 44 b2 00 03 2b 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 52 e8 18 3f f4 90 54 a2 02 9f 04 86 59 00 03 2b 2b +failed to add UARFCN to SI2quater: No space left on device +failed to add UARFCN to SI2quater: No space left on device +failed to add UARFCN to SI2quater: No space left on device +generated valid SI2quater: [23] 59 06 07 c0 00 25 52 e8 18 3f f4 90 54 a2 02 9f 04 86 59 00 03 2b 2b Done. -- To view, visit https://gerrit.osmocom.org/1516 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If1c32e8b547a28325180faaaddd21f80c37f7337 Gerrit-PatchSet: 4 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Jan 23 13:31:35 2017 From: gerrit-no-reply at lists.osmocom.org (ikostov) Date: Mon, 23 Jan 2017 13:31:35 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: Abis: add abisip-find and ipaccess-config tools In-Reply-To: References: Message-ID: ikostov has submitted this change and it was merged. Change subject: Abis: add abisip-find and ipaccess-config tools ...................................................................... Abis: add abisip-find and ipaccess-config tools Change-Id: Ief893a89ff9f307b2a240ec76bb48c9bcd64dedc --- M common/chapters/abis.adoc 1 file changed, 86 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/common/chapters/abis.adoc b/common/chapters/abis.adoc index 104b156..a53d6f3 100644 --- a/common/chapters/abis.adoc +++ b/common/chapters/abis.adoc @@ -25,3 +25,89 @@ implementation of OsmoBTS and OsmoBSC extend and/or deviate from the TS 08.58 specification in several ways. Please see the _OsmoBTS Abis Protocol Specification_ <> for more information. + +=== Locate Abis/IP based BTS + +We can use a tool called abisip-find to be able to find BTS which is +connected in the network. This tool is located under: +'./openbsc/openbsc/src/ipaccess' + +==== abisip-find + +abisip-find is a small command line tool which is used to search and +find BTS devices in your network (e.g. sysmoBTS, nanoBTS). + +It uses broadcast packets of the UDP variant of the Abis-IP protocol +on port 3006, and thus will find any BTS that can be reached by the +all-network broadcast address 255.255.255.255 + +When program is started it will print one line for each BTS it can find. + +.Example: using abisip-find to find BTS in your network +---- +$ ./abisip-find +abisip-find (C) 2009 by Harald Welte +This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY + +you might need to specify the outgoing +network interface, e.g. ``abisip-find eth0`` +Trying to find ip.access BTS by broadcast UDP... + +MAC_Address='24:62:78:01:02:03' IP_Address='192.168.0.171' Serial_Number='123' +Unit_ID='sysmoBTS 1002' + +MAC_Address='24:62:78:04:05:06' IP_Address='192.168.0.182' Serial_Number='456' +Unit_ID='sysmoBTS 1002' + +MAC Address='00:01:02:03:04:05' IP Address='192.168.100.123' Unit ID='65535/0/0' +Location_1='' Location 2='BTS_NBT131G' Equipment Version='165a029_55' +Software Version='168a302_v142b13d0' Unit Name='nbts-00-02-95-00-4E-B3' +Serial Number='00123456' + +^C +---- + +You may have to start the program as a root: +---- +$ sudo ./abisip-find eth0 +---- + +=== Deploying a new nanoBTS + +A tool called ipaccess-config can be used to configure a new ip.access nanoBTS. + +==== ipaccess-config + +This program is very helpful tool which is used to configure Unit ID and +Primarly OML IP. You can find this tool under: +'./openbsc/openbsc/src/ipaccess' + + +.Example: using ipaccess-config to configure Unit ID and Primarly OML IP of +nanoBTS +---- +$ ./ipaccess-config -u 1801/0/0<1> 10.9.1.195<2> -o 10.9.1.154<3> + +ipaccess-config (C) 2009-2010 by Harald Welte and others +This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY + +Trying to connect to ip.access BTS ... +abis_nm.c:316 OC=SITE-MANAGER(00) INST=(ff,ff,ff) STATE CHG: +OP_STATE=Disabled AVAIL=Not installed(07) +abis_nm.c:316 OC=BTS(01) INST=(00,ff,ff) STATE CHG: +OP_STATE=Disabled AVAIL=Not installed(07) ADM=Locked +abis_nm.c:316 OC=BASEBAND-TRANSCEIVER(04) INST=(00,00,ff) STATE CHG: +OP_STATE=Disabled AVAIL=Not installed(07) ADM=Locked +OML link established using TRX 0 +setting Unit ID to '1801/0/0' +setting primary OML link IP to '10.9.1.154' +abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,00) STATE CHG: +OP_STATE=Disabled AVAIL=Not installed(07) ADM=Locked +... +abis_nm.c:2433 OC=BASEBAND-TRANSCEIVER(04) INST=(00,00,ff) IPACCESS(0xf0): +SET NVATTR ACK +Set the NV Attributes. +---- +<1> Unit ID +<2> IP address of the NITB +<3> IP address of the nanoBTS -- To view, visit https://gerrit.osmocom.org/1638 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ief893a89ff9f307b2a240ec76bb48c9bcd64dedc Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: ikostov Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: ikostov From gerrit-no-reply at lists.osmocom.org Mon Jan 23 14:34:14 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 23 Jan 2017 14:34:14 +0000 Subject: osmo-bts[master]: OML: internalize failure reporting In-Reply-To: References: Message-ID: Patch Set 4: Hmm, sure, why not. How should API look like? -- To view, visit https://gerrit.osmocom.org/1570 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I738555c547926e97b325ab53763c0076c42309bc Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 14:36:56 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 23 Jan 2017 14:36:56 +0000 Subject: libosmocore[master]: utils/conv_gen.py: improve application flexibility In-Reply-To: References: Message-ID: Patch Set 4: Just a side note: personally I'm perfectly fine with getopt - I've used argparse before but it's more of an accident than conscious choice :) -- To view, visit https://gerrit.osmocom.org/1584 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0b476b00234c17f78b41d695cf3bfd13edb64c28 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 14:41:38 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 23 Jan 2017 14:41:38 +0000 Subject: [PATCH] openbsc[master]: compression: Fix nullpointer deref Message-ID: Review at https://gerrit.osmocom.org/1640 compression: Fix nullpointer deref When the creation of a new compression entity fails, an error message is created, this error message contains printf with a dereferentiation of the compression entity, that is clearly NULL at that point. This commit corrects that. Change-Id: I87371ade0ccd6a93b446f2013c1747f486739518 --- M openbsc/src/gprs/gprs_sndcp_comp.c 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/40/1640/1 diff --git a/openbsc/src/gprs/gprs_sndcp_comp.c b/openbsc/src/gprs/gprs_sndcp_comp.c index 1591f80..a12c39a 100644 --- a/openbsc/src/gprs/gprs_sndcp_comp.c +++ b/openbsc/src/gprs/gprs_sndcp_comp.c @@ -107,13 +107,14 @@ } } - /* Display info message */ + /* Bail on failure */ if (comp_entity == NULL) { LOGP(DSNDCP, LOGL_ERROR, - "Compression entity (%d) creation failed!\n", - comp_entity->entity); + "Compression entity creation failed!\n"); return NULL; } + + /* Display info message */ if (comp_entity->compclass == SNDCP_XID_PROTOCOL_COMPRESSION) { LOGP(DSNDCP, LOGL_INFO, "New header compression entity (%d) created.\n", -- To view, visit https://gerrit.osmocom.org/1640 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I87371ade0ccd6a93b446f2013c1747f486739518 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Mon Jan 23 14:44:06 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 23 Jan 2017 14:44:06 +0000 Subject: openbsc[master]: compression: Fix nullpointer deref In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1640 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I87371ade0ccd6a93b446f2013c1747f486739518 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 16:27:50 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 23 Jan 2017 16:27:50 +0000 Subject: libosmocore[master]: Add osmo_rand() function In-Reply-To: References: Message-ID: Patch Set 2: -Code-Review -Verified Perhaps we can split crypto-related things into separate library (libosmo-crypto?) and make it dependent on gnutls and link openbsc and osmo-hlr against it? This way stuff linked to libosmogsm will not require it. -- To view, visit https://gerrit.osmocom.org/1526 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0241b814ea4c4ce1458f7ad76e31d390383c2048 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 16:30:07 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 23 Jan 2017 16:30:07 +0000 Subject: libosmocore[master]: Expand and expose ctrl connection allocation In-Reply-To: References: Message-ID: Patch Set 2: How better decision should look like? -- To view, visit https://gerrit.osmocom.org/1629 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I522ed809cbebfd3d7dd08b4ed9137b39ff192e32 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 17:07:46 2017 From: gerrit-no-reply at lists.osmocom.org (keith) Date: Mon, 23 Jan 2017 17:07:46 +0000 Subject: openbsc[master]: Add VTY command to immediately expire user (set expire_lu to... In-Reply-To: References: Message-ID: Patch Set 1: Neels, I don't seem to see a Submit Button, or I am missing something. Do I need to rebase? -- To view, visit https://gerrit.osmocom.org/1623 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I676c84350a7afc963bc6bb4c46c60e5ac3eee67e Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: keith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: keith Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 18:50:38 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 23 Jan 2017 18:50:38 +0000 Subject: [PATCH] libosmo-abis[master]: misc: Fix build failure/warning when building on alpine linux Message-ID: Review at https://gerrit.osmocom.org/1641 misc: Fix build failure/warning when building on alpine linux alpine linux is using the musl libc and this triggered some minor compilation issues. Remove unused mISDN include and defines from the general E1 input handling and address the other warnings and errors. /usr/include/sys/fcntl.h:1:2: warning: #warning redirecting incorrect #include to [-Wcpp] #warning redirecting incorrect #include to ^~~~~~~ In file included from input/misdn.c:48:0: ../include/mISDNif.h:286:2: error: unknown type name 'u_int' u_int id; ^~~~~ Change-Id: I997e45a456faedb5f370fd02ded300c1e36b791b --- M src/e1_input.c M src/input/ipaccess.c M src/input/misdn.c 3 files changed, 3 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/41/1641/1 diff --git a/src/e1_input.c b/src/e1_input.c index 2c8a541..09fea59 100644 --- a/src/e1_input.c +++ b/src/e1_input.c @@ -28,20 +28,12 @@ #include #include #include -#include +#include #include #include #include -#include #include - -//#define AF_COMPATIBILITY_FUNC -//#include -#ifndef AF_ISDN -#define AF_ISDN 34 -#define PF_ISDN AF_ISDN -#endif #include #include diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c index 9e64471..ac84ffc 100644 --- a/src/input/ipaccess.c +++ b/src/input/ipaccess.c @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/input/misdn.c b/src/input/misdn.c index 9315e23..98a836f 100644 --- a/src/input/misdn.c +++ b/src/input/misdn.c @@ -41,8 +41,8 @@ #include #include #include -#include #include +#include #include #include #include -- To view, visit https://gerrit.osmocom.org/1641 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I997e45a456faedb5f370fd02ded300c1e36b791b Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Mon Jan 23 20:31:48 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 23 Jan 2017 20:31:48 +0000 Subject: openbsc[master]: Add VTY command to immediately expire user (set expire_lu to... In-Reply-To: References: Message-ID: Patch Set 1: Ah, apparently you were not in the group of "known users" yet. Not sure whether that is a reason to not see the Submit button, but... Please try again, it should appear when you're logged in. -- To view, visit https://gerrit.osmocom.org/1623 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I676c84350a7afc963bc6bb4c46c60e5ac3eee67e Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: keith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: keith Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 20:34:42 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 23 Jan 2017 20:34:42 +0000 Subject: openbsc[master]: compression: Fix nullpointer deref In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/1640/1//COMMIT_MSG Commit Message: Line 7: compression: Fix nullpointer deref nice! no "ing" anywhere! :) -- To view, visit https://gerrit.osmocom.org/1640 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I87371ade0ccd6a93b446f2013c1747f486739518 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Jan 23 20:34:59 2017 From: gerrit-no-reply at lists.osmocom.org (Keith Whyte) Date: Mon, 23 Jan 2017 20:34:59 +0000 Subject: [MERGED] openbsc[master]: Add VTY command to immediately expire user (set expire_lu to... In-Reply-To: References: Message-ID: Keith Whyte has submitted this change and it was merged. Change subject: Add VTY command to immediately expire user (set expire_lu to now) ...................................................................... Add VTY command to immediately expire user (set expire_lu to now) Change-Id: I676c84350a7afc963bc6bb4c46c60e5ac3eee67e --- M openbsc/src/libmsc/vty_interface_layer3.c 1 file changed, 24 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index 490d794..11d9022 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -512,6 +512,29 @@ return CMD_SUCCESS; } +DEFUN(ena_subscr_expire, + ena_subscr_expire_cmd, + "subscriber " SUBSCR_TYPES " ID expire", + SUBSCR_HELP "Expire the subscriber Now\n") +{ + int rc; + struct gsm_network *gsmnet = gsmnet_from_vty(vty); + struct gsm_subscriber *subscr = + get_subscr_by_argv(gsmnet, argv[0], argv[1]); + + if (!subscr) { + vty_out(vty, "%% No subscriber found for %s %s%s", + argv[0], argv[1], VTY_NEWLINE); + return CMD_WARNING; + } + + subscr->expire_lu = time(0); + db_sync_subscriber(subscr); + subscr_put(subscr); + + return CMD_SUCCESS; +} + DEFUN(ena_subscr_authorized, ena_subscr_authorized_cmd, "subscriber " SUBSCR_TYPES " ID authorized (0|1)", @@ -1143,6 +1166,7 @@ install_element_ve(&logging_fltr_imsi_cmd); install_element(ENABLE_NODE, &ena_subscr_delete_cmd); + install_element(ENABLE_NODE, &ena_subscr_expire_cmd); install_element(ENABLE_NODE, &ena_subscr_name_cmd); install_element(ENABLE_NODE, &ena_subscr_extension_cmd); install_element(ENABLE_NODE, &ena_subscr_authorized_cmd); -- To view, visit https://gerrit.osmocom.org/1623 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I676c84350a7afc963bc6bb4c46c60e5ac3eee67e Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Keith Whyte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Keith Whyte Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Jan 23 20:35:30 2017 From: gerrit-no-reply at lists.osmocom.org (Keith Whyte) Date: Mon, 23 Jan 2017 20:35:30 +0000 Subject: openbsc[master]: Add VTY command to immediately expire user (set expire_lu to... In-Reply-To: References: Message-ID: Patch Set 2: OK! Great Thanks! -- To view, visit https://gerrit.osmocom.org/1623 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I676c84350a7afc963bc6bb4c46c60e5ac3eee67e Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Keith Whyte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Keith Whyte Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 20:37:18 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 23 Jan 2017 20:37:18 +0000 Subject: openbsc[master]: LC15: Fix dropping of LAPDm UA message. In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) ...and address holgers comments https://gerrit.osmocom.org/#/c/1625/2//COMMIT_MSG Commit Message: Line 11: problem we do not send relase indications immediately. Instead a flag will be "release" -- To view, visit https://gerrit.osmocom.org/1625 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I15fc1ef8e9e83f009bde96de9a8e95702cffbce6 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Jan 23 20:39:56 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 23 Jan 2017 20:39:56 +0000 Subject: libosmo-abis[master]: misc: Fix build failure/warning when building on alpine linux In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 can't see anything wrong. I'm wondering whether the ISDN macro removal is related. -- To view, visit https://gerrit.osmocom.org/1641 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I997e45a456faedb5f370fd02ded300c1e36b791b Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 20:43:50 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 23 Jan 2017 20:43:50 +0000 Subject: libosmo-abis[master]: misc: Fix build failure/warning when building on alpine linux In-Reply-To: References: Message-ID: Patch Set 1: > can't see anything wrong. I'm wondering whether the ISDN macro > removal is related. Related in the way that including the misdn header file causes an issue... and that I can just remove the include here... and then the #ifndef would always trigger.. but there doesn't seem to be a *ISDN* in the e1_input.c. -- To view, visit https://gerrit.osmocom.org/1641 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I997e45a456faedb5f370fd02ded300c1e36b791b Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 23 23:30:29 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 23 Jan 2017 23:30:29 +0000 Subject: [PATCH] osmo-iuh[master]: cs RAB: add nAS_SynchronisationIndicator Message-ID: Review at https://gerrit.osmocom.org/1642 cs RAB: add nAS_SynchronisationIndicator Change-Id: I14c22b0befb308bac2eded662fe13a58c8478743 --- M src/ranap_msg_factory.c M src/tests/test-ranap.ok 2 files changed, 19 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/42/1642/1 diff --git a/src/ranap_msg_factory.c b/src/ranap_msg_factory.c index 16a9d03..cd2ddfc 100644 --- a/src/ranap_msg_factory.c +++ b/src/ranap_msg_factory.c @@ -588,6 +588,14 @@ return rab; } +static RANAP_NAS_SynchronisationIndicator_t *new_rab_nas_sync_ind(int val) +{ + uint8_t val_buf = (val / 10) << 4; + RANAP_NAS_SynchronisationIndicator_t *nsi = CALLOC(1, sizeof(*nsi)); + BIT_STRING_fromBuf(nsi, &val_buf, 4); + return nsi; +} + static RANAP_RAB_Parameters_t *new_rab_par_data(uint32_t dl_max_bitrate, uint32_t ul_max_bitrate) { RANAP_RAB_Parameters_t *rab = CALLOC(1, sizeof(*rab)); @@ -729,7 +737,7 @@ RANAP_RAB_SetupOrModifyItemFirst_t first; memset(&first, 0, sizeof(first)); assign_new_ra_id(&first.rAB_ID, rab_id); - //first.nAS_SynchronisationIndicator = FIXME; + first.nAS_SynchronisationIndicator = new_rab_nas_sync_ind(60); first.rAB_Parameters = new_rab_par_voice(); first.userPlaneInformation = new_upi(RANAP_UserPlaneMode_support_mode_for_predefined_SDU_sizes, 1); /* 2? */ first.transportLayerInformation = new_transp_info_rtp(rtp_ip, rtp_port, diff --git a/src/tests/test-ranap.ok b/src/tests/test-ranap.ok index bda3c8e..dc959eb 100644 --- a/src/tests/test-ranap.ok +++ b/src/tests/test-ranap.ok @@ -88,10 +88,10 @@ 53 - 38 02 D8 01 2F A7 20 2F A8 00 00 F4 4C 08 0A 02 - 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 - 14 00 3C 40 00 00 00 50 3D 02 00 02 0D C0 35 00 - 01 0A 0B 0C 0D 40 09 26 00 00 + 78 02 CD 80 10 2F A7 20 2F A8 00 00 F4 4C 08 0A + 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 + 28 14 00 3C 40 00 00 00 50 3D 02 00 02 0D C0 35 + 00 01 0A 0B 0C 0D 40 09 26 00 00 00 @@ -100,14 +100,14 @@ 54 - 00 00 01 00 35 00 3A 38 02 D8 01 2F A7 20 2F A8 - 00 00 F4 4C 08 0A 02 80 00 51 40 00 27 20 28 14 - 00 67 40 00 00 22 28 14 00 3C 40 00 00 00 50 3D - 02 00 02 0D C0 35 00 01 0A 0B 0C 0D 40 09 26 00 - 00 40 01 00 + 00 00 01 00 35 00 3B 78 02 CD 80 10 2F A7 20 2F + A8 00 00 F4 4C 08 0A 02 80 00 51 40 00 27 20 28 + 14 00 67 40 00 00 22 28 14 00 3C 40 00 00 00 50 + 3D 02 00 02 0D C0 35 00 01 0A 0B 0C 0D 40 09 26 + 00 00 40 01 00 -00 00 00 4b 00 00 01 00 36 40 44 00 00 01 00 35 00 3a 38 02 d8 01 2f a7 20 2f a8 00 00 f4 4c 08 0a 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3c 40 00 00 00 50 3d 02 00 02 0d c0 35 00 01 0a 0b 0c 0d 40 09 26 00 00 40 01 00 +00 00 00 4c 00 00 01 00 36 40 45 00 00 01 00 35 00 3b 78 02 cd 80 10 2f a7 20 2f a8 00 00 f4 4c 08 0a 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3c 40 00 00 00 50 3d 02 00 02 0d c0 35 00 01 0a 0b 0c 0d 40 09 26 00 00 40 01 00 ==> RAB ASSIGNMENT COMMAND (DATA) -- To view, visit https://gerrit.osmocom.org/1642 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I14c22b0befb308bac2eded662fe13a58c8478743 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Jan 23 23:30:29 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 23 Jan 2017 23:30:29 +0000 Subject: [PATCH] osmo-iuh[master]: cs RAB: lower guaranteedBitrate Message-ID: Review at https://gerrit.osmocom.org/1643 cs RAB: lower guaranteedBitrate Change-Id: Ia7eecca43d62a6a020466e9b8dc8b566ca988f9f --- M src/ranap_msg_factory.c M src/tests/test-ranap.ok 2 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/43/1643/1 diff --git a/src/ranap_msg_factory.c b/src/ranap_msg_factory.c index cd2ddfc..36a39c2 100644 --- a/src/ranap_msg_factory.c +++ b/src/ranap_msg_factory.c @@ -569,7 +569,7 @@ ASN_SEQUENCE_ADD(&rab->maxBitrate.list, new_long(12200)); rab->guaranteedBitRate = CALLOC(1, sizeof(*rab->guaranteedBitRate)); - ASN_SEQUENCE_ADD(rab->guaranteedBitRate, new_long(12200)); + ASN_SEQUENCE_ADD(rab->guaranteedBitRate, new_long(6700)); rab->deliveryOrder = RANAP_DeliveryOrder_delivery_order_requested; rab->maxSDU_Size = 244; diff --git a/src/tests/test-ranap.ok b/src/tests/test-ranap.ok index dc959eb..fdff38f 100644 --- a/src/tests/test-ranap.ok +++ b/src/tests/test-ranap.ok @@ -88,7 +88,7 @@ 53 - 78 02 CD 80 10 2F A7 20 2F A8 00 00 F4 4C 08 0A + 78 02 CD 80 10 2F A7 20 1A 2C 00 00 F4 4C 08 0A 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3C 40 00 00 00 50 3D 02 00 02 0D C0 35 00 01 0A 0B 0C 0D 40 09 26 00 00 @@ -100,14 +100,14 @@ 54 - 00 00 01 00 35 00 3B 78 02 CD 80 10 2F A7 20 2F - A8 00 00 F4 4C 08 0A 02 80 00 51 40 00 27 20 28 + 00 00 01 00 35 00 3B 78 02 CD 80 10 2F A7 20 1A + 2C 00 00 F4 4C 08 0A 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3C 40 00 00 00 50 3D 02 00 02 0D C0 35 00 01 0A 0B 0C 0D 40 09 26 00 00 40 01 00 -00 00 00 4c 00 00 01 00 36 40 45 00 00 01 00 35 00 3b 78 02 cd 80 10 2f a7 20 2f a8 00 00 f4 4c 08 0a 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3c 40 00 00 00 50 3d 02 00 02 0d c0 35 00 01 0a 0b 0c 0d 40 09 26 00 00 40 01 00 +00 00 00 4c 00 00 01 00 36 40 45 00 00 01 00 35 00 3b 78 02 cd 80 10 2f a7 20 1a 2c 00 00 f4 4c 08 0a 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3c 40 00 00 00 50 3d 02 00 02 0d c0 35 00 01 0a 0b 0c 0d 40 09 26 00 00 40 01 00 ==> RAB ASSIGNMENT COMMAND (DATA) -- To view, visit https://gerrit.osmocom.org/1643 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia7eecca43d62a6a020466e9b8dc8b566ca988f9f Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Jan 23 23:30:29 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 23 Jan 2017 23:30:29 +0000 Subject: [PATCH] osmo-iuh[master]: cs RAB: tweak sDU_ErrorRatio Message-ID: Review at https://gerrit.osmocom.org/1644 cs RAB: tweak sDU_ErrorRatio Change-Id: I3169376bb182aba5926b7c974108bdc5fba04fa4 --- M src/ranap_msg_factory.c M src/tests/test-ranap.ok 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/44/1644/1 diff --git a/src/ranap_msg_factory.c b/src/ranap_msg_factory.c index 36a39c2..89ffffb 100644 --- a/src/ranap_msg_factory.c +++ b/src/ranap_msg_factory.c @@ -487,7 +487,7 @@ switch (profile) { case SDUPAR_P_VOICE0: - sdui->sDU_ErrorRatio = new_sdu_error_ratio(1, 5); + sdui->sDU_ErrorRatio = new_sdu_error_ratio(7, 3); sdui->residualBitErrorRatio.mantissa = 1; sdui->residualBitErrorRatio.exponent = 6; sdui->deliveryOfErroneousSDU = RANAP_DeliveryOfErroneousSDU_yes; diff --git a/src/tests/test-ranap.ok b/src/tests/test-ranap.ok index fdff38f..0ab99b0 100644 --- a/src/tests/test-ranap.ok +++ b/src/tests/test-ranap.ok @@ -88,7 +88,7 @@ 53 - 78 02 CD 80 10 2F A7 20 1A 2C 00 00 F4 4C 08 0A + 78 02 CD 80 10 2F A7 20 1A 2C 00 00 F4 4C 64 0A 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3C 40 00 00 00 50 3D 02 00 02 0D C0 35 00 01 0A 0B 0C 0D 40 09 26 00 00 @@ -101,13 +101,13 @@ 00 00 01 00 35 00 3B 78 02 CD 80 10 2F A7 20 1A - 2C 00 00 F4 4C 08 0A 02 80 00 51 40 00 27 20 28 + 2C 00 00 F4 4C 64 0A 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3C 40 00 00 00 50 3D 02 00 02 0D C0 35 00 01 0A 0B 0C 0D 40 09 26 00 00 40 01 00 -00 00 00 4c 00 00 01 00 36 40 45 00 00 01 00 35 00 3b 78 02 cd 80 10 2f a7 20 1a 2c 00 00 f4 4c 08 0a 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3c 40 00 00 00 50 3d 02 00 02 0d c0 35 00 01 0a 0b 0c 0d 40 09 26 00 00 40 01 00 +00 00 00 4c 00 00 01 00 36 40 45 00 00 01 00 35 00 3b 78 02 cd 80 10 2f a7 20 1a 2c 00 00 f4 4c 64 0a 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3c 40 00 00 00 50 3d 02 00 02 0d c0 35 00 01 0a 0b 0c 0d 40 09 26 00 00 40 01 00 ==> RAB ASSIGNMENT COMMAND (DATA) -- To view, visit https://gerrit.osmocom.org/1644 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3169376bb182aba5926b7c974108bdc5fba04fa4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Jan 23 23:30:29 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 23 Jan 2017 23:30:29 +0000 Subject: [PATCH] osmo-iuh[master]: cs RAB: set allocationOrRetentionPriority=lowest Message-ID: Review at https://gerrit.osmocom.org/1645 cs RAB: set allocationOrRetentionPriority=lowest Change-Id: I0d7dc32bc93fa0a4d316f8378b3735dc11e87071 --- M src/ranap_msg_factory.c M src/tests/test-ranap.ok 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/45/1645/1 diff --git a/src/ranap_msg_factory.c b/src/ranap_msg_factory.c index 89ffffb..65c1dab 100644 --- a/src/ranap_msg_factory.c +++ b/src/ranap_msg_factory.c @@ -581,7 +581,7 @@ ASN_SEQUENCE_ADD(&rab->sDU_Parameters, sdui); rab->transferDelay = new_long(80); - rab->allocationOrRetentionPriority = new_alloc_ret_prio(RANAP_PriorityLevel_no_priority, 0, 1, 0); + rab->allocationOrRetentionPriority = new_alloc_ret_prio(RANAP_PriorityLevel_lowest, 0, 1, 0); rab->sourceStatisticsDescriptor = new_long(RANAP_SourceStatisticsDescriptor_speech); diff --git a/src/tests/test-ranap.ok b/src/tests/test-ranap.ok index 0ab99b0..e10a718 100644 --- a/src/tests/test-ranap.ok +++ b/src/tests/test-ranap.ok @@ -90,7 +90,7 @@ 78 02 CD 80 10 2F A7 20 1A 2C 00 00 F4 4C 64 0A 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 - 28 14 00 3C 40 00 00 00 50 3D 02 00 02 0D C0 35 + 28 14 00 3C 40 00 00 00 50 39 02 00 02 0D C0 35 00 01 0A 0B 0C 0D 40 09 26 00 00 @@ -103,11 +103,11 @@ 00 00 01 00 35 00 3B 78 02 CD 80 10 2F A7 20 1A 2C 00 00 F4 4C 64 0A 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3C 40 00 00 00 50 - 3D 02 00 02 0D C0 35 00 01 0A 0B 0C 0D 40 09 26 + 39 02 00 02 0D C0 35 00 01 0A 0B 0C 0D 40 09 26 00 00 40 01 00 -00 00 00 4c 00 00 01 00 36 40 45 00 00 01 00 35 00 3b 78 02 cd 80 10 2f a7 20 1a 2c 00 00 f4 4c 64 0a 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3c 40 00 00 00 50 3d 02 00 02 0d c0 35 00 01 0a 0b 0c 0d 40 09 26 00 00 40 01 00 +00 00 00 4c 00 00 01 00 36 40 45 00 00 01 00 35 00 3b 78 02 cd 80 10 2f a7 20 1a 2c 00 00 f4 4c 64 0a 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3c 40 00 00 00 50 39 02 00 02 0d c0 35 00 01 0a 0b 0c 0d 40 09 26 00 00 40 01 00 ==> RAB ASSIGNMENT COMMAND (DATA) -- To view, visit https://gerrit.osmocom.org/1645 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0d7dc32bc93fa0a4d316f8378b3735dc11e87071 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Jan 23 23:30:29 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 23 Jan 2017 23:30:29 +0000 Subject: [PATCH] osmo-iuh[master]: cs RAB: toggle Pre_emptionVulnerability Message-ID: Review at https://gerrit.osmocom.org/1646 cs RAB: toggle Pre_emptionVulnerability Change-Id: I0f4d5a5e56bb6a3a3dfd6db8292d30f55fccdbc1 --- M src/ranap_msg_factory.c M src/tests/test-ranap.ok 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/46/1646/1 diff --git a/src/ranap_msg_factory.c b/src/ranap_msg_factory.c index 65c1dab..d7acf6c 100644 --- a/src/ranap_msg_factory.c +++ b/src/ranap_msg_factory.c @@ -581,7 +581,7 @@ ASN_SEQUENCE_ADD(&rab->sDU_Parameters, sdui); rab->transferDelay = new_long(80); - rab->allocationOrRetentionPriority = new_alloc_ret_prio(RANAP_PriorityLevel_lowest, 0, 1, 0); + rab->allocationOrRetentionPriority = new_alloc_ret_prio(RANAP_PriorityLevel_lowest, 0, 0, 0); rab->sourceStatisticsDescriptor = new_long(RANAP_SourceStatisticsDescriptor_speech); diff --git a/src/tests/test-ranap.ok b/src/tests/test-ranap.ok index e10a718..8920d47 100644 --- a/src/tests/test-ranap.ok +++ b/src/tests/test-ranap.ok @@ -90,7 +90,7 @@ 78 02 CD 80 10 2F A7 20 1A 2C 00 00 F4 4C 64 0A 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 - 28 14 00 3C 40 00 00 00 50 39 02 00 02 0D C0 35 + 28 14 00 3C 40 00 00 00 50 38 02 00 02 0D C0 35 00 01 0A 0B 0C 0D 40 09 26 00 00 @@ -103,11 +103,11 @@ 00 00 01 00 35 00 3B 78 02 CD 80 10 2F A7 20 1A 2C 00 00 F4 4C 64 0A 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3C 40 00 00 00 50 - 39 02 00 02 0D C0 35 00 01 0A 0B 0C 0D 40 09 26 + 38 02 00 02 0D C0 35 00 01 0A 0B 0C 0D 40 09 26 00 00 40 01 00 -00 00 00 4c 00 00 01 00 36 40 45 00 00 01 00 35 00 3b 78 02 cd 80 10 2f a7 20 1a 2c 00 00 f4 4c 64 0a 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3c 40 00 00 00 50 39 02 00 02 0d c0 35 00 01 0a 0b 0c 0d 40 09 26 00 00 40 01 00 +00 00 00 4c 00 00 01 00 36 40 45 00 00 01 00 35 00 3b 78 02 cd 80 10 2f a7 20 1a 2c 00 00 f4 4c 64 0a 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3c 40 00 00 00 50 38 02 00 02 0d c0 35 00 01 0a 0b 0c 0d 40 09 26 00 00 40 01 00 ==> RAB ASSIGNMENT COMMAND (DATA) -- To view, visit https://gerrit.osmocom.org/1646 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0f4d5a5e56bb6a3a3dfd6db8292d30f55fccdbc1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Jan 23 23:30:29 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 23 Jan 2017 23:30:29 +0000 Subject: [PATCH] osmo-iuh[master]: cs RAB: toggle QueuingAllowed Message-ID: Review at https://gerrit.osmocom.org/1647 cs RAB: toggle QueuingAllowed Change-Id: I39a541c193eed9c15b2ce8fda306bb226c70647f --- M src/ranap_msg_factory.c M src/tests/test-ranap.ok 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/47/1647/1 diff --git a/src/ranap_msg_factory.c b/src/ranap_msg_factory.c index d7acf6c..02bbece 100644 --- a/src/ranap_msg_factory.c +++ b/src/ranap_msg_factory.c @@ -581,7 +581,7 @@ ASN_SEQUENCE_ADD(&rab->sDU_Parameters, sdui); rab->transferDelay = new_long(80); - rab->allocationOrRetentionPriority = new_alloc_ret_prio(RANAP_PriorityLevel_lowest, 0, 0, 0); + rab->allocationOrRetentionPriority = new_alloc_ret_prio(RANAP_PriorityLevel_lowest, 0, 0, 1); rab->sourceStatisticsDescriptor = new_long(RANAP_SourceStatisticsDescriptor_speech); diff --git a/src/tests/test-ranap.ok b/src/tests/test-ranap.ok index 8920d47..3acafa8 100644 --- a/src/tests/test-ranap.ok +++ b/src/tests/test-ranap.ok @@ -90,7 +90,7 @@ 78 02 CD 80 10 2F A7 20 1A 2C 00 00 F4 4C 64 0A 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 - 28 14 00 3C 40 00 00 00 50 38 02 00 02 0D C0 35 + 28 14 00 3C 40 00 00 00 50 38 82 00 02 0D C0 35 00 01 0A 0B 0C 0D 40 09 26 00 00 @@ -103,11 +103,11 @@ 00 00 01 00 35 00 3B 78 02 CD 80 10 2F A7 20 1A 2C 00 00 F4 4C 64 0A 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3C 40 00 00 00 50 - 38 02 00 02 0D C0 35 00 01 0A 0B 0C 0D 40 09 26 + 38 82 00 02 0D C0 35 00 01 0A 0B 0C 0D 40 09 26 00 00 40 01 00 -00 00 00 4c 00 00 01 00 36 40 45 00 00 01 00 35 00 3b 78 02 cd 80 10 2f a7 20 1a 2c 00 00 f4 4c 64 0a 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3c 40 00 00 00 50 38 02 00 02 0d c0 35 00 01 0a 0b 0c 0d 40 09 26 00 00 40 01 00 +00 00 00 4c 00 00 01 00 36 40 45 00 00 01 00 35 00 3b 78 02 cd 80 10 2f a7 20 1a 2c 00 00 f4 4c 64 0a 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3c 40 00 00 00 50 38 82 00 02 0d c0 35 00 01 0a 0b 0c 0d 40 09 26 00 00 40 01 00 ==> RAB ASSIGNMENT COMMAND (DATA) -- To view, visit https://gerrit.osmocom.org/1647 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I39a541c193eed9c15b2ce8fda306bb226c70647f Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Jan 23 23:30:29 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 23 Jan 2017 23:30:29 +0000 Subject: [PATCH] osmo-iuh[master]: ranap: make X.213 NSAP 160 bits long, zero padded Message-ID: Review at https://gerrit.osmocom.org/1648 ranap: make X.213 NSAP 160 bits long, zero padded Change-Id: I070bbfe887ab93d08322df30571050a381d082d5 --- M src/ranap_msg_factory.c M src/tests/test-ranap.ok 2 files changed, 16 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/48/1648/1 diff --git a/src/ranap_msg_factory.c b/src/ranap_msg_factory.c index 02bbece..dc5ba08 100644 --- a/src/ranap_msg_factory.c +++ b/src/ranap_msg_factory.c @@ -639,7 +639,7 @@ unsigned int len; if (use_x213_nsap) { - len = 7; + len = 160/8; buf = CALLOC(len, sizeof(uint8_t)); buf[0] = 0x35; /* AFI For IANA ICP */ buf[1] = 0x00; /* See A.5.2.1.2.7 of X.213 */ diff --git a/src/tests/test-ranap.ok b/src/tests/test-ranap.ok index 3acafa8..8771113 100644 --- a/src/tests/test-ranap.ok +++ b/src/tests/test-ranap.ok @@ -90,8 +90,9 @@ 78 02 CD 80 10 2F A7 20 1A 2C 00 00 F4 4C 64 0A 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 - 28 14 00 3C 40 00 00 00 50 38 82 00 02 0D C0 35 - 00 01 0A 0B 0C 0D 40 09 26 00 00 + 28 14 00 3C 40 00 00 00 50 38 82 00 02 27 C0 35 + 00 01 0A 0B 0C 0D 00 00 00 00 00 00 00 00 00 00 + 00 00 00 40 09 26 00 00 00 @@ -100,14 +101,15 @@ 54 - 00 00 01 00 35 00 3B 78 02 CD 80 10 2F A7 20 1A + 00 00 01 00 35 00 48 78 02 CD 80 10 2F A7 20 1A 2C 00 00 F4 4C 64 0A 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3C 40 00 00 00 50 - 38 82 00 02 0D C0 35 00 01 0A 0B 0C 0D 40 09 26 - 00 00 40 01 00 + 38 82 00 02 27 C0 35 00 01 0A 0B 0C 0D 00 00 00 + 00 00 00 00 00 00 00 00 00 00 40 09 26 00 00 40 + 01 00 -00 00 00 4c 00 00 01 00 36 40 45 00 00 01 00 35 00 3b 78 02 cd 80 10 2f a7 20 1a 2c 00 00 f4 4c 64 0a 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3c 40 00 00 00 50 38 82 00 02 0d c0 35 00 01 0a 0b 0c 0d 40 09 26 00 00 40 01 00 +00 00 00 59 00 00 01 00 36 40 52 00 00 01 00 35 00 48 78 02 cd 80 10 2f a7 20 1a 2c 00 00 f4 4c 64 0a 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3c 40 00 00 00 50 38 82 00 02 27 c0 35 00 01 0a 0b 0c 0d 00 00 00 00 00 00 00 00 00 00 00 00 00 40 09 26 00 00 40 01 00 ==> RAB ASSIGNMENT COMMAND (DATA) @@ -116,7 +118,8 @@ 38 04 12 DE 18 69 FF 80 0C 34 FF 00 1F 40 08 06 08 9E 00 00 00 00 B1 40 05 60 01 8C BA 7F 00 00 - 10 6E 35 00 01 1A 1B 1C 1D 00 11 22 33 44 + 11 3E 35 00 01 1A 1B 1C 1D 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 11 22 33 44 78 1C 00 00 00 00 @@ -125,13 +128,14 @@ 54 - 00 00 01 00 35 00 2E 38 04 12 DE 18 69 FF 80 0C + 00 00 01 00 35 00 3B 38 04 12 DE 18 69 FF 80 0C 34 FF 00 1F 40 08 06 08 9E 00 00 00 00 B1 40 05 - 60 01 8C BA 7F 00 00 10 6E 35 00 01 1A 1B 1C 1D - 00 11 22 33 44 40 06 78 1C 00 00 00 00 + 60 01 8C BA 7F 00 00 11 3E 35 00 01 1A 1B 1C 1D + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 11 22 + 33 44 40 06 78 1C 00 00 00 00 -00 00 00 44 00 00 01 00 36 40 3d 00 00 01 00 35 00 2e 38 04 12 de 18 69 ff 80 0c 34 ff 00 1f 40 08 06 08 9e 00 00 00 00 b1 40 05 60 01 8c ba 7f 00 00 10 6e 35 00 01 1a 1b 1c 1d 00 11 22 33 44 40 06 78 1c 00 00 00 00 +00 00 00 51 00 00 01 00 36 40 4a 00 00 01 00 35 00 3b 38 04 12 de 18 69 ff 80 0c 34 ff 00 1f 40 08 06 08 9e 00 00 00 00 b1 40 05 60 01 8c ba 7f 00 00 11 3e 35 00 01 1a 1b 1c 1d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 11 22 33 44 40 06 78 1c 00 00 00 00 ==> RESET CMD -- To view, visit https://gerrit.osmocom.org/1648 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I070bbfe887ab93d08322df30571050a381d082d5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Jan 23 23:30:30 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 23 Jan 2017 23:30:30 +0000 Subject: [PATCH] osmo-iuh[master]: cs RAB: add more SDU_FormatInformationParameter items Message-ID: Review at https://gerrit.osmocom.org/1649 cs RAB: add more SDU_FormatInformationParameter items Change-Id: I97e5c0b1e9ab9de00449b50a86d79a967af0d3f3 --- M src/ranap_msg_factory.c M src/tests/test-ranap.ok 2 files changed, 39 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/49/1649/1 diff --git a/src/ranap_msg_factory.c b/src/ranap_msg_factory.c index dc5ba08..87d646b 100644 --- a/src/ranap_msg_factory.c +++ b/src/ranap_msg_factory.c @@ -494,6 +494,14 @@ sdui->sDU_FormatInformationParameters = fmtip; fmti = new_format_info_pars(81); ASN_SEQUENCE_ADD(fmtip, fmti); + fmti = new_format_info_pars(65); + ASN_SEQUENCE_ADD(fmtip, fmti); + fmti = new_format_info_pars(75); + ASN_SEQUENCE_ADD(fmtip, fmti); + fmti = new_format_info_pars(61); + ASN_SEQUENCE_ADD(fmtip, fmti); + fmti = new_format_info_pars(57); + ASN_SEQUENCE_ADD(fmtip, fmti); fmti = new_format_info_pars(39); ASN_SEQUENCE_ADD(fmtip, fmti); /* FIXME: could be 10 SDU descriptors for AMR! */ @@ -505,6 +513,14 @@ sdui->sDU_FormatInformationParameters = fmtip; fmti = new_format_info_pars(103); ASN_SEQUENCE_ADD(fmtip, fmti); + fmti = new_format_info_pars(99); + ASN_SEQUENCE_ADD(fmtip, fmti); + fmti = new_format_info_pars(84); + ASN_SEQUENCE_ADD(fmtip, fmti); + fmti = new_format_info_pars(87); + ASN_SEQUENCE_ADD(fmtip, fmti); + fmti = new_format_info_pars(76); + ASN_SEQUENCE_ADD(fmtip, fmti); fmti = new_format_info_pars(0); ASN_SEQUENCE_ADD(fmtip, fmti); /* FIXME: could be 10 SDU descriptors for AMR! */ @@ -516,6 +532,14 @@ sdui->sDU_FormatInformationParameters = fmtip; fmti = new_format_info_pars(60); ASN_SEQUENCE_ADD(fmtip, fmti); + fmti = new_format_info_pars(40); + ASN_SEQUENCE_ADD(fmtip, fmti); + fmti = new_format_info_pars(0); + ASN_SEQUENCE_ADD(fmtip, fmti); + fmti = new_format_info_pars(0); + ASN_SEQUENCE_ADD(fmtip, fmti); + fmti = new_format_info_pars(0); + ASN_SEQUENCE_ADD(fmtip, fmti); fmti = new_format_info_pars(0); ASN_SEQUENCE_ADD(fmtip, fmti); /* FIXME: could be 10 SDU descriptors for AMR! */ diff --git a/src/tests/test-ranap.ok b/src/tests/test-ranap.ok index 8771113..99d34ee 100644 --- a/src/tests/test-ranap.ok +++ b/src/tests/test-ranap.ok @@ -89,10 +89,12 @@ 78 02 CD 80 10 2F A7 20 1A 2C 00 00 F4 4C 64 0A - 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 - 28 14 00 3C 40 00 00 00 50 38 82 00 02 27 C0 35 - 00 01 0A 0B 0C 0D 00 00 00 00 00 00 00 00 00 00 - 00 00 00 40 09 26 00 00 + 0A 80 00 51 40 00 41 40 00 4B 40 00 3D 40 00 39 + 40 00 27 20 28 54 00 67 40 00 63 40 00 54 40 00 + 57 40 00 4C 40 00 00 22 28 54 00 3C 40 00 28 40 + 00 00 40 00 00 40 00 00 40 00 00 00 50 38 82 00 + 02 27 C0 35 00 01 0A 0B 0C 0D 00 00 00 00 00 00 + 00 00 00 00 00 00 00 40 09 26 00 00 00 @@ -101,15 +103,17 @@ 54 - 00 00 01 00 35 00 48 78 02 CD 80 10 2F A7 20 1A - 2C 00 00 F4 4C 64 0A 02 80 00 51 40 00 27 20 28 - 14 00 67 40 00 00 22 28 14 00 3C 40 00 00 00 50 - 38 82 00 02 27 C0 35 00 01 0A 0B 0C 0D 00 00 00 - 00 00 00 00 00 00 00 00 00 00 40 09 26 00 00 40 - 01 00 + 00 00 01 00 35 00 6C 78 02 CD 80 10 2F A7 20 1A + 2C 00 00 F4 4C 64 0A 0A 80 00 51 40 00 41 40 00 + 4B 40 00 3D 40 00 39 40 00 27 20 28 54 00 67 40 + 00 63 40 00 54 40 00 57 40 00 4C 40 00 00 22 28 + 54 00 3C 40 00 28 40 00 00 40 00 00 40 00 00 40 + 00 00 00 50 38 82 00 02 27 C0 35 00 01 0A 0B 0C + 0D 00 00 00 00 00 00 00 00 00 00 00 00 00 40 09 + 26 00 00 40 01 00 -00 00 00 59 00 00 01 00 36 40 52 00 00 01 00 35 00 48 78 02 cd 80 10 2f a7 20 1a 2c 00 00 f4 4c 64 0a 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3c 40 00 00 00 50 38 82 00 02 27 c0 35 00 01 0a 0b 0c 0d 00 00 00 00 00 00 00 00 00 00 00 00 00 40 09 26 00 00 40 01 00 +00 00 00 7d 00 00 01 00 36 40 76 00 00 01 00 35 00 6c 78 02 cd 80 10 2f a7 20 1a 2c 00 00 f4 4c 64 0a 0a 80 00 51 40 00 41 40 00 4b 40 00 3d 40 00 39 40 00 27 20 28 54 00 67 40 00 63 40 00 54 40 00 57 40 00 4c 40 00 00 22 28 54 00 3c 40 00 28 40 00 00 40 00 00 40 00 00 40 00 00 00 50 38 82 00 02 27 c0 35 00 01 0a 0b 0c 0d 00 00 00 00 00 00 00 00 00 00 00 00 00 40 09 26 00 00 40 01 00 ==> RAB ASSIGNMENT COMMAND (DATA) -- To view, visit https://gerrit.osmocom.org/1649 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I97e5c0b1e9ab9de00449b50a86d79a967af0d3f3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Jan 24 07:00:51 2017 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Tue, 24 Jan 2017 07:00:51 +0000 Subject: [PATCH] osmo-pcu[master]: PDCH allocation across two TRX In-Reply-To: References: Message-ID: Hello Max, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1512 to look at the new patch set (#3). PDCH allocation across two TRX Implementation: PCU keeps track of number PDCH across all the TRXs at BTS context and also keeps number of active PDCHs in each TRX context. This ratio gives the CAPACITY of each TRX. 1st Phase: While selection of TRX, functions get_possible_trxs(for multiple TS) and get_possible_trxs_sba(Single block allocation, Ex: during RACH) gets possible TRXs based on TFIs availability. 2nd Phase: outcome of TRXs(from get_possible_trxs, get_possible_trxs_sba) will be fed to get_suitable_trx function. Which does actual load balancing on each TRX. And selects the best fit TRX, based on below equation PROBABILITY = MAX_PROBABILITY ? ((LOAD * 100)/CAPACITY); If same PROBABILITY Select the one with higher capacity Else Find the TRX with higher PROBABILITY MAX_PROBABILITY = 65535; LOAD: Initialized to 0, Later gets incremented with number of TS allocated. and decremented while TBF deletion, based on number of TS allocated Below are the test executed on Unit test environment 1) 2 TRXs, with same Capacity 2) 2 TRX with ? capacity 3) 2 TRXs with ? capacity 4) 2 TRX with UL and DL allocation to ensure Tbfs on both direction is hosted on same TRX 5) 2 TRX with same Capacity and DL TBF creation and deletion scenarios to ensure proper load balancing criteria for actual Load. Below are the Test executed on Integration setup with Ettus B200 setup with 2 TRXs with same CAPACITY. 1) TRX allocation during RACH procedure(SBA allocation) 2) TRX allocation during DL TBF creation with multi time slots(4 time slots) 3) TRX allocation while Ping Test 4) TRX allocation while UDP test 5) TRX allocation for web browsing. 6) 2 MS test with each TRX sharing 1 MS. Received aggregate throughput of 446 kbps(223 Kbps each) Limitation: 1) BSSGP flow control needs to be tuned since test with 2 MS with each MS on different TRX runs for 20 mins 2) USF resource availibility is not checked while selecting the TRX as existing implementation Change-Id: I222c3340872ffa1dd6e8fabe5276d793e660f67d Related: OS# 1775 --- M src/bts.cpp M src/bts.h M src/gprs_rlcmac_ts_alloc.cpp M src/sba.cpp M src/tbf.cpp M tests/tbf/TbfTest.cpp M tests/tbf/TbfTest.err M tests/tbf/TbfTest.ok 8 files changed, 1,980 insertions(+), 44 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/12/1512/3 diff --git a/src/bts.cpp b/src/bts.cpp index b4e18e3..b83f5f9 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -188,11 +188,13 @@ { memset(&m_bts, 0, sizeof(m_bts)); m_bts.bts = this; - + m_total_pdch = 0; /* initialize back pointers */ for (size_t trx_no = 0; trx_no < ARRAY_SIZE(m_bts.trx); ++trx_no) { struct gprs_rlcmac_trx *trx = &m_bts.trx[trx_no]; trx->trx_no = trx_no; + trx->num_pdch = 0; + trx->current_load = 0; trx->bts = this; for (size_t ts_no = 0; ts_no < ARRAY_SIZE(trx->pdch); ++ts_no) { @@ -407,19 +409,97 @@ return m_bts.trx[trx].pdch[ts].ul_tbf_by_tfi(tfi); } -/* - * Search for free TFI and return TFI, TRX. - * This method returns the first TFI that is currently not used in any PDCH of - * a TRX. The first TRX that contains such an TFI is returned. Negative values - * indicate errors. +/*! \brief: Return TRX number if available, else returns -EBUSY + * \param[in] dir The TBF direction(DL or UL) + * \param[in] _trx The uint8_t * + * \param[in] use_trx, if new MS receives -1, else receives current TRX of MS + * \returns -EBUSY if no TRX is available else returns valid trx in *_trx */ int BTS::tfi_find_free(enum gprs_rlcmac_tbf_direction dir, uint8_t *_trx, int8_t use_trx) { struct gprs_rlcmac_pdch *pdch; - uint32_t free_tfis; + uint32_t free_tfis = 0xffffffff; + uint8_t ts, tfi; + bool possible_trx[8]; + int ret; + + /* This function will get list of possible TRXs */ + ret = get_possible_trxs(dir, possible_trx, use_trx); + if (ret < 0) + return -EBUSY; + + + if (use_trx >= 0) + *_trx = use_trx; + else + *_trx = get_suitable_trx(possible_trx); + + LOGP(DRLCMAC, LOGL_DEBUG, + "Searching for first unallocated TFI: TRX=%d\n", *_trx); + + for (ts = 0; ts < 8; ts++) { + pdch = &m_bts.trx[*_trx].pdch[ts]; + free_tfis &= ~pdch->assigned_tfi(dir); + } + /* find the first */ + for (tfi = 0; tfi < 32; tfi++) { + if (free_tfis & 1 << tfi) + break; + } + + OSMO_ASSERT(tfi < 32); + + LOGP(DRLCMAC, LOGL_DEBUG, " Found TFI=%d.\n", tfi); + + return tfi; +} + +/*! \brief: Prepares all the TRXs which can be used to host a perticulat TBF + * for single block allocation + * \param[in] *_trx The bool + * \param[in] _trx The bool *. Array of TRXs. initialized to false at caller + * array of size 8 + * \returns -EINVAL if no PDCH available else returns list of valid TRXs + */ +int BTS::get_possible_trxs_sba( + bool *_trx) +{ + uint8_t trx; bool has_pdch = false; - uint8_t trx_from, trx_to, trx, ts, tfi; + + for (trx = 0; trx < 8; trx++) { + if (bts_data()->trx[trx].num_pdch) { + _trx[trx] = true; + has_pdch = true; + LOGP(DRLCMAC, LOGL_DEBUG, " Valid TRX=%d.\n", trx); + } else { + _trx[trx] = false; + LOGP(DRLCMAC, LOGL_DEBUG, " Not valid TRX=%d.\n", trx); + } + } + if (has_pdch) + return 0; + + return -EINVAL; +} + +/*! \brief: Prepares all the TRXs which can be used to host a perticulat TBF + * for multi slots allocation + * \param[in] dir The gprs_rlcmac_tbf_direction + * \param[in] _trx The bool *. Array of TRXs. initialized to false at caller + * array of size 8 + * \returns -EINVAL if no PDCH available or -EBUSY if no TFIs available + * else returns list of valid TRXs + */ +int BTS::get_possible_trxs(enum gprs_rlcmac_tbf_direction dir, + bool *_trx, int8_t use_trx) +{ + struct gprs_rlcmac_pdch *pdch; + uint32_t free_tfis; + uint32_t is_tfis_available = false; + bool has_pdch = false; + uint8_t trx_from, trx_to, trx, ts; if (use_trx >= 0 && use_trx < 8) trx_from = trx_to = use_trx; @@ -442,8 +522,12 @@ trx_has_pdch = true; has_pdch = true; } - if (trx_has_pdch && free_tfis) - break; + if (trx_has_pdch && free_tfis) { + _trx[trx] = true; + is_tfis_available = true; + } else { + _trx[trx] = false; + } free_tfis = 0; } @@ -452,26 +536,68 @@ return -EINVAL; } - if (!free_tfis) { + if (!is_tfis_available) { LOGP(DRLCMAC, LOGL_NOTICE, "No TFI available.\n"); return -EBUSY; } + return 0; +} + +/*! \brief: selects the best TRX which can be used to host a perticulat TBF + * for multi/single slots allocation + * \param[in] avail_trx The bool *. Array of TRXs. initialized to false + * or true at caller. array of size 8 + * \returns selected_trx to host the TBF else returns -1 + */ +int BTS::get_suitable_trx(bool *avail_trx) +{ + uint8_t trx; + uint32_t select_probability = 0; + uint32_t temp_probability = 0; + int selected_trx = -1; + bool is_better_trx = false; - LOGP(DRLCMAC, LOGL_DEBUG, - "Searching for first unallocated TFI: TRX=%d\n", trx); + for (trx = 0; trx <= 7; trx++) { + /* Check if this TRX is in possible list */ + if (!avail_trx[trx]) + continue; - /* find the first */ - for (tfi = 0; tfi < 32; tfi++) { - if (free_tfis & 1 << tfi) - break; + is_better_trx = false; + + temp_probability = MAX_LOAD_PROBABILITY - + (get_num_pdch() * 100 * + m_bts.trx[trx].current_load) + / m_bts.trx[trx].num_pdch; + + LOGP(DRLCMAC, LOGL_DEBUG, "trx(%d) cur load(%d)" + " numpdch(%d) prob1(%u) seleprob(%u)" + " btsnumpdch(%d)\n", trx, + m_bts.trx[trx].current_load, + m_bts.trx[trx].num_pdch, + temp_probability, select_probability, + get_num_pdch()); + + if (temp_probability >= select_probability) { + if (temp_probability > select_probability) + is_better_trx = true; + else if (temp_probability == select_probability) + if (selected_trx >= 0 || selected_trx < 8) + if (m_bts.trx[selected_trx].num_pdch + < m_bts.trx[trx].num_pdch) + is_better_trx = true; + } + if (is_better_trx) { + selected_trx = trx; + select_probability = + temp_probability; + LOGP(DRLCMAC, LOGL_DEBUG, "selected pro(%u)" + "selected_trx(%d)\n", + select_probability, selected_trx); + } } - OSMO_ASSERT(tfi < 32); - - LOGP(DRLCMAC, LOGL_DEBUG, " Found TFI=%d.\n", tfi); - *_trx = trx; - return tfi; + return selected_trx; } int BTS::rcv_imm_ass_cnf(const uint8_t *data, uint32_t fn) @@ -783,13 +909,17 @@ { /* TODO: Check if there are still allocated resources.. */ INIT_LLIST_HEAD(&paging_list); + trx->num_pdch++; m_is_enabled = 1; + bts()->increment_num_pdch(); } void gprs_rlcmac_pdch::disable() { /* TODO.. kick free_resources once we know the TRX/TS we are on */ m_is_enabled = 0; + trx->num_pdch--; + bts()->decrement_num_pdch(); } void gprs_rlcmac_pdch::free_resources() diff --git a/src/bts.h b/src/bts.h index 2932154..f022e5b 100644 --- a/src/bts.h +++ b/src/bts.h @@ -44,6 +44,7 @@ #define LLC_CODEL_USE_DEFAULT (-1) #define MAX_GPRS_CS 9 +#define MAX_LOAD_PROBABILITY 0xffffffff struct BTS; struct GprsMs; @@ -136,7 +137,8 @@ /* back pointers */ struct BTS *bts; uint8_t trx_no; - + uint8_t current_load; + uint8_t num_pdch; #ifdef __cplusplus void reserve_slots(enum gprs_rlcmac_tbf_direction dir, uint8_t slots); void unreserve_slots(enum gprs_rlcmac_tbf_direction dir, uint8_t slots); @@ -345,6 +347,9 @@ gprs_rlcmac_ul_tbf *ul_tbf_by_tfi(uint8_t tfi, uint8_t trx, uint8_t ts); int tfi_find_free(enum gprs_rlcmac_tbf_direction dir, uint8_t *_trx, int8_t use_trx); + int get_possible_trxs(enum gprs_rlcmac_tbf_direction dir, + bool *_trx, int8_t use_trx); + int get_suitable_trx(bool *suitable_trx); int rcv_imm_ass_cnf(const uint8_t *data, uint32_t fn); uint8_t is_single_block(uint16_t ra, enum ph_burst_type burst_type, @@ -451,6 +456,10 @@ void ms_present(int32_t n); int32_t ms_present_get(); + void increment_num_pdch(); + void decrement_num_pdch(); + uint8_t get_num_pdch() const; + int get_possible_trxs_sba(bool *_trx); /* * Below for C interface for the VTY @@ -476,6 +485,8 @@ /* list of downlink TBFs */ LListHead m_dl_tbfs; + /* The summation of all the PDCH across all TRX for this BTS*/ + uint8_t m_total_pdch; private: /* disable copying to avoid slicing */ BTS(const BTS&); @@ -487,6 +498,21 @@ return m_cur_fn; } +inline void BTS::increment_num_pdch() +{ + m_total_pdch++; +} + +inline void BTS::decrement_num_pdch() +{ + m_total_pdch--; +} + +inline uint8_t BTS::get_num_pdch() const +{ + return m_total_pdch; +} + inline SBAController *BTS::sba() { return &m_sba; diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp index 57197b2..7ede192 100644 --- a/src/gprs_rlcmac_ts_alloc.cpp +++ b/src/gprs_rlcmac_ts_alloc.cpp @@ -383,8 +383,12 @@ int tfi; uint8_t trx_no; - if (use_trx == -1 && ms->current_trx()) + LOGP(DRLCMAC, LOGL_DEBUG, "use_trx = %d\n", use_trx); + + if (use_trx == -1 && ms->current_trx()) { use_trx = ms->current_trx()->trx_no; + LOGP(DRLCMAC, LOGL_DEBUG, "MS alive = %d\n", use_trx); + } tfi = bts->tfi_find_free(dir, &trx_no, use_trx); if (tfi < 0) @@ -392,6 +396,8 @@ if (trx_no_) *trx_no_ = trx_no; + + LOGP(DRLCMAC, LOGL_DEBUG, "FREE trx = %d TFI = %d\n", *trx_no_, tfi); return tfi; } @@ -479,6 +485,7 @@ } tbf_->trx = trx; + trx->current_load++; /* the only one TS is the common TS */ tbf_->first_ts = tbf_->first_common_ts = ts; ms_->set_reserved_slots(trx, 1 << ts, 1 << ts); @@ -1000,6 +1007,7 @@ if (!(dl_slots & (1 << ts))) continue; + trx->current_load++; LOGP(DRLCMAC, LOGL_DEBUG, "- Assigning DL TS " "%d\n", ts); assign_dlink_tbf(&trx->pdch[ts], dl_tbf, tfi); @@ -1012,6 +1020,7 @@ continue; OSMO_ASSERT(usf[ts] >= 0); + trx->current_load++; LOGP(DRLCMAC, LOGL_DEBUG, "- Assigning UL TS " "%d\n", ts); diff --git a/src/sba.cpp b/src/sba.cpp index 5d75b17..abe75e2 100644 --- a/src/sba.cpp +++ b/src/sba.cpp @@ -49,8 +49,27 @@ struct gprs_rlcmac_pdch *pdch; struct gprs_rlcmac_sba *sba; - int8_t trx, ts; + int8_t ts; uint32_t fn; + bool trxs[8]; + int selected_trx; + int ret; + + ret = m_bts.get_possible_trxs_sba(trxs); + + if (ret == -EINVAL) + return -EINVAL; + + selected_trx = m_bts.get_suitable_trx(trxs); + + for (ts = 7; ts >= 0; ts--) { + pdch = &m_bts.bts_data()->trx[selected_trx].pdch[ts]; + if (!pdch->is_enabled()) + continue; + break; + } + if (ts < 0) + return -EINVAL; sba = talloc_zero(tall_pcu_ctx, struct gprs_rlcmac_sba); if (!sba) @@ -59,25 +78,10 @@ if (!gsm48_ta_is_valid(ta)) return -EINVAL; - for (trx = 0; trx < 8; trx++) { - for (ts = 7; ts >= 0; ts--) { - pdch = &m_bts.bts_data()->trx[trx].pdch[ts]; - if (!pdch->is_enabled()) - continue; - break; - } - if (ts >= 0) - break; - } - if (trx == 8) { - LOGP(DRLCMAC, LOGL_NOTICE, "No PDCH available.\n"); - talloc_free(sba); - return -EINVAL; - } fn = (pdch->last_rts_fn + AGCH_START_OFFSET) % 2715648; - sba->trx_no = trx; + sba->trx_no = selected_trx; sba->ts_no = ts; sba->fn = fn; sba->ta = ta; @@ -85,9 +89,12 @@ llist_add(&sba->list, &m_sbas); m_bts.sba_allocated(); - *_trx = trx; + *_trx = selected_trx; *_ts = ts; *_fn = fn; + LOGP(DRLCMAC, LOGL_DEBUG, " sba fn=%d ts = %d trx = %d\n", + fn, ts, selected_trx); + return 0; } diff --git a/src/tbf.cpp b/src/tbf.cpp index 33d94a8..27a7e97 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -410,7 +410,7 @@ for (ts = 0; ts < 8; ts++) { if (!tbf->pdch[ts]) continue; - + tbf->trx->current_load--; tbf->pdch[ts]->detach_tbf(tbf); tbf->pdch[ts] = NULL; } diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index bebb6ef..7d48a5c 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -45,6 +45,12 @@ void *tall_pcu_ctx; int16_t spoof_mnc = 0, spoof_mcc = 0; +#define ASSERT_TBF_ALLOC_ON_TRX(_dl_tbf, _bts, \ + _ms_class, _egprs_ms_class, _trx_num) \ + _dl_tbf = tbf_alloc_dl_tbf(_bts, NULL, -1, \ + _ms_class, _egprs_ms_class, 1); \ + OSMO_ASSERT(_dl_tbf->trx->trx_no == _trx_num); \ + static void check_tbf(gprs_rlcmac_tbf *tbf) { OSMO_ASSERT(tbf); @@ -2833,6 +2839,231 @@ ARRAY_SIZE(default_categories), }; +void test_multi_trx_test_same_capacity() +{ + BTS the_bts; + gprs_rlcmac_dl_tbf *dl_tbf; + struct gprs_rlcmac_bts *bts; + uint8_t ms_class = 1; + uint8_t egprs_ms_class = 1; + + printf("=== start %s ===\n", __func__); + + setup_bts(&the_bts, 4); + + bts = the_bts.bts_data(); + + bts->trx[0].pdch[5].enable(); + bts->alloc_algorithm = alloc_algorithm_b; + bts->trx[1].pdch[4].enable(); + bts->trx[1].pdch[5].enable(); + + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 0); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 1); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 0); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 1); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 0); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 1); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 0); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 1); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 0); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 1); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 0); + + printf("=== end %s ===\n", __func__); + +} + +void test_multi_trx_test_1_2_capacity() +{ + BTS the_bts; + gprs_rlcmac_dl_tbf *dl_tbf; + struct gprs_rlcmac_bts *bts; + uint8_t ms_class = 1; + uint8_t egprs_ms_class = 1; + + printf("=== start %s ===\n", __func__); + + setup_bts(&the_bts, 4); + + bts = the_bts.bts_data(); + bts->alloc_algorithm = alloc_algorithm_b; + bts->trx[0].pdch[5].enable(); + bts->trx[1].pdch[4].enable(); + + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 0); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 1); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 0); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 0); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 1); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 0); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 0); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 1); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 0); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 0); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 1); + + printf("=== end %s ===\n", __func__); + +} + +void test_multi_trx_test_1_4_capacity() +{ + BTS the_bts; + gprs_rlcmac_dl_tbf *dl_tbf; + struct gprs_rlcmac_bts *bts; + uint8_t ms_class = 1; + uint8_t egprs_ms_class = 1; + + printf("=== start %s ===\n", __func__); + + setup_bts(&the_bts, 4); + bts = the_bts.bts_data(); + + bts->alloc_algorithm = alloc_algorithm_b; + + bts->trx[0].pdch[5].enable(); + bts->trx[0].pdch[6].enable(); + bts->trx[0].pdch[7].enable(); + bts->trx[1].pdch[0].enable(); + + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 0); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 1); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 0); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 0); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 0); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 0); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 1); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 0); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 0); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 0); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 0); + + printf("=== end %s ===\n", __func__); +} + +void test_multi_trx_test_release_alloc() +{ + BTS the_bts; + gprs_rlcmac_dl_tbf *dl_tbf; + struct gprs_rlcmac_bts *bts; + uint8_t ms_class = 1; + uint8_t egprs_ms_class = 1; + + printf("=== start %s ===\n", __func__); + + setup_bts(&the_bts, 4); + bts = the_bts.bts_data(); + bts->alloc_algorithm = alloc_algorithm_b; + + bts->trx[0].pdch[5].enable(); + bts->trx[1].pdch[0].enable(); + + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 0); + tbf_free(dl_tbf); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 0); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 1); + tbf_free(dl_tbf); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 1); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 0); + tbf_free(dl_tbf); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 0); + + printf("=== end %s ===\n", __func__); +} + +void test_multi_trx_test_same_capacity_dl_ul_combined() +{ + BTS the_bts; + gprs_rlcmac_dl_tbf *dl_tbf; + static gprs_rlcmac_ul_tbf *ul_tbf; + struct gprs_rlcmac_bts *bts; + uint8_t ms_class = 1; + uint8_t egprs_ms_class = 1; + + printf("=== start %s ===\n", __func__); + + setup_bts(&the_bts, 4); + bts = the_bts.bts_data(); + + bts->alloc_algorithm = alloc_algorithm_b; + bts->trx[1].pdch[4].enable(); + + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 0); + ul_tbf = tbf_alloc_ul(bts, + dl_tbf->trx->trx_no, + dl_tbf->ms_class(), dl_tbf->ms()->egprs_ms_class(), + dl_tbf->tlli(), dl_tbf->ta(), dl_tbf->ms()); + OSMO_ASSERT(ul_tbf->trx->trx_no == 0); + + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 1); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 1); + ASSERT_TBF_ALLOC_ON_TRX(dl_tbf, bts, ms_class, + egprs_ms_class, 0); + + ul_tbf = tbf_alloc_ul(bts, + dl_tbf->trx->trx_no, + dl_tbf->ms_class(), dl_tbf->ms()->egprs_ms_class(), + dl_tbf->tlli(), dl_tbf->ta(), dl_tbf->ms()); + OSMO_ASSERT(ul_tbf->trx->trx_no == 0); + + printf("=== end %s ===\n", __func__); + +} + +void test_multi_trx_test() +{ + printf("=== start %s ===\n", __func__); + test_multi_trx_test_same_capacity(); + test_multi_trx_test_1_2_capacity(); + test_multi_trx_test_1_4_capacity(); + test_multi_trx_test_release_alloc(); + test_multi_trx_test_same_capacity_dl_ul_combined(); + printf("=== end %s ===\n", __func__); + +} void test_packet_access_rej_epdan() { BTS the_bts; @@ -2900,6 +3131,7 @@ test_tbf_epdan_out_of_rx_window(); test_immediate_assign_rej(); test_packet_access_rej_epdan(); + test_multi_trx_test(); if (getenv("TALLOC_REPORT_FULL")) talloc_report_full(tall_pcu_ctx, stderr); diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index 5f5456b..4d41f2a 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -35,6 +35,8 @@ The MS object cannot fully confirm an unexpected TLLI: 0x00004232, partly confirmed Modifying MS object, TLLI: 0x00002342 -> 0x00004232, already confirmed partly Modifying MS object, TLLI = 0x00004232, TA 4 -> 6 +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. ********** TBF starts here ********** @@ -123,6 +125,8 @@ Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) ********** TBF ends here ********** Destroying MS object, TLLI = 0xffeeddcc +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. ********** TBF starts here ********** @@ -211,6 +215,8 @@ Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) ********** TBF ends here ********** Destroying MS object, TLLI = 0xffeeddcc +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. ********** TBF starts here ********** @@ -514,6 +520,8 @@ Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) Destroying MS object, TLLI = 0xffeeddcc ********** TBF ends here ********** +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. ********** TBF starts here ********** @@ -535,6 +543,8 @@ Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 0, ul_slots = 10, dl_slots = 10 Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL) changes state from NULL to FLOW +trx(0) cur load(1) numpdch(1) prob1(4294967195) seleprob(0) btsnumpdch(1) +selected pro(4294967195)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=1. ********** TBF starts here ********** @@ -1508,6 +1518,8 @@ Polling cannot be scheduled in this TS 7 (first control TS 4) msg block (BSN 2, CS-1): 07 01 04 4d 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 MSG = 07 01 04 4d 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. MS requests UL TBF on RACH, so we provide one @@ -1588,10 +1600,23 @@ MS requests UL TBF on RACH, so we provide one ra=0x73 Fn=2654167 qta=31 is_11bit=0: MS requests single block allocation + Valid TRX=0. + Not valid TRX=1. + Not valid TRX=2. + Not valid TRX=3. + Not valid TRX=4. + Not valid TRX=5. + Not valid TRX=6. + Not valid TRX=7. +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) + sba fn=2654270 ts = 7 trx = 0 RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x73, Fn=2654167 (17,25,9), SBFn=2654270 TX: Immediate Assignment Uplink (AGCH) - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=-1 USF=7 Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 73 8b 29 07 00 c0 0c 5a 43 2b 2b 2b 2b 2b 2b 2b +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. Got RLC block, coding scheme: CS-1, length: 23 (23)) @@ -1674,10 +1699,23 @@ MS requests UL TBF on RACH, so we provide one ra=0x73 Fn=2654167 qta=31 is_11bit=0: MS requests single block allocation + Valid TRX=0. + Not valid TRX=1. + Not valid TRX=2. + Not valid TRX=3. + Not valid TRX=4. + Not valid TRX=5. + Not valid TRX=6. + Not valid TRX=7. +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) + sba fn=2654270 ts = 7 trx = 0 RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x73, Fn=2654167 (17,25,9), SBFn=2654270 TX: Immediate Assignment Uplink (AGCH) - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=-1 USF=7 Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 73 8b 29 07 00 c0 0c 5a 43 2b 2b 2b 2b 2b 2b 2b +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. Got RLC block, coding scheme: CS-1, length: 23 (23)) @@ -1809,10 +1847,23 @@ MS requests UL TBF on RACH, so we provide one ra=0x73 Fn=2654232 qta=31 is_11bit=0: MS requests single block allocation + Valid TRX=0. + Not valid TRX=1. + Not valid TRX=2. + Not valid TRX=3. + Not valid TRX=4. + Not valid TRX=5. + Not valid TRX=6. + Not valid TRX=7. +trx(0) cur load(2) numpdch(1) prob1(4294967095) seleprob(0) btsnumpdch(1) +selected pro(4294967095)selected_trx(0) + sba fn=2654335 ts = 7 trx = 0 RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x73, Fn=2654232 (17,39,22), SBFn=2654335 TX: Immediate Assignment Uplink (AGCH) - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=-1 USF=7 Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 73 8c f6 07 00 c0 0c 68 ab 2b 2b 2b 2b 2b 2b 2b +trx(0) cur load(2) numpdch(1) prob1(4294967095) seleprob(0) btsnumpdch(1) +selected pro(4294967095)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=1. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) poll timeout for FN=2654292, TS=7 (curr FN 2654335) @@ -1886,10 +1937,23 @@ MS requests UL TBF on RACH, so we provide one ra=0x73 Fn=2654167 qta=31 is_11bit=0: MS requests single block allocation + Valid TRX=0. + Not valid TRX=1. + Not valid TRX=2. + Not valid TRX=3. + Not valid TRX=4. + Not valid TRX=5. + Not valid TRX=6. + Not valid TRX=7. +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) + sba fn=2654270 ts = 7 trx = 0 RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x73, Fn=2654167 (17,25,9), SBFn=2654270 TX: Immediate Assignment Uplink (AGCH) - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=-1 USF=7 Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 73 8b 29 07 00 c0 0c 5a 43 2b 2b 2b 2b 2b 2b 2b +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. Got RLC block, coding scheme: CS-1, length: 23 (23)) @@ -1980,10 +2044,23 @@ MS requests UL TBF on RACH, so we provide one ra=0x73 Fn=2654224 qta=31 is_11bit=0: MS requests single block allocation + Valid TRX=0. + Not valid TRX=1. + Not valid TRX=2. + Not valid TRX=3. + Not valid TRX=4. + Not valid TRX=5. + Not valid TRX=6. + Not valid TRX=7. +trx(0) cur load(1) numpdch(1) prob1(4294967195) seleprob(0) btsnumpdch(1) +selected pro(4294967195)selected_trx(0) + sba fn=2654327 ts = 7 trx = 0 RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x73, Fn=2654224 (17,31,14), SBFn=2654327 TX: Immediate Assignment Uplink (AGCH) - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=-1 USF=7 Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 73 8b ee 07 00 c0 0c 60 6b 2b 2b 2b 2b 2b 2b 2b +trx(0) cur load(1) numpdch(1) prob1(4294967195) seleprob(0) btsnumpdch(1) +selected pro(4294967195)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. Got RLC block, coding scheme: CS-1, length: 23 (23)) @@ -2065,10 +2142,23 @@ MS requests UL TBF on RACH, so we provide one ra=0x73 Fn=2654167 qta=31 is_11bit=0: MS requests single block allocation + Valid TRX=0. + Not valid TRX=1. + Not valid TRX=2. + Not valid TRX=3. + Not valid TRX=4. + Not valid TRX=5. + Not valid TRX=6. + Not valid TRX=7. +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) + sba fn=2654270 ts = 7 trx = 0 RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x73, Fn=2654167 (17,25,9), SBFn=2654270 TX: Immediate Assignment Uplink (AGCH) - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=-1 USF=7 Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 73 8b 29 07 00 c0 0c 5a 43 2b 2b 2b 2b 2b 2b 2b +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. Got RLC block, coding scheme: CS-1, length: 23 (23)) @@ -2155,6 +2245,8 @@ PDCH(TS 7, TRX 0): Detaching TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) ********** TBF ends here ********** +trx(0) cur load(1) numpdch(1) prob1(4294967195) seleprob(0) btsnumpdch(1) +selected pro(4294967195)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. MS requests UL TBF on RACH, so we provide one @@ -2221,10 +2313,23 @@ MS requests UL TBF on RACH, so we provide one ra=0x73 Fn=2654167 qta=31 is_11bit=0: MS requests single block allocation + Valid TRX=0. + Not valid TRX=1. + Not valid TRX=2. + Not valid TRX=3. + Not valid TRX=4. + Not valid TRX=5. + Not valid TRX=6. + Not valid TRX=7. +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) + sba fn=2654270 ts = 7 trx = 0 RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x73, Fn=2654167 (17,25,9), SBFn=2654270 TX: Immediate Assignment Uplink (AGCH) - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=-1 USF=7 Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 73 8b 29 07 00 c0 0c 5a 43 2b 2b 2b 2b 2b 2b 2b +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. Got RLC block, coding scheme: CS-1, length: 23 (23)) @@ -3279,8 +3384,10 @@ Allocating DL TBF: MS_CLASS=12/0 Creating MS object, TLLI = 0x00000000 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 12 +use_trx = 0 Searching for first unallocated TFI: TRX=0 Found TFI=0. +FREE trx = 0 TFI = 0 Slot Allocation (Algorithm B) for class 12 - Rx=4 Tx=4 Sum Rx+Tx=5 Tta=2 Ttb=1 Tra=2 Trb=1 Type=1 - Skipping TS 0, because not enabled @@ -3318,8 +3425,10 @@ Modifying MS object, TLLI = 0x00000000, MS class 0 -> 12 Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 12 Enabled EGPRS for TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS), mode EGPRS +use_trx = 0 Searching for first unallocated TFI: TRX=0 Found TFI=0. +FREE trx = 0 TFI = 0 Slot Allocation (Algorithm B) for class 12 - Rx=4 Tx=4 Sum Rx+Tx=5 Tta=2 Ttb=1 Tra=2 Trb=1 Type=1 - Skipping TS 0, because not enabled @@ -3357,10 +3466,23 @@ MS requests UL TBF on RACH, so we provide one ra=0x73 Fn=2654167 qta=31 is_11bit=0: MS requests single block allocation + Valid TRX=0. + Not valid TRX=1. + Not valid TRX=2. + Not valid TRX=3. + Not valid TRX=4. + Not valid TRX=5. + Not valid TRX=6. + Not valid TRX=7. +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) + sba fn=2654270 ts = 7 trx = 0 RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x73, Fn=2654167 (17,25,9), SBFn=2654270 TX: Immediate Assignment Uplink (AGCH) - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=-1 USF=7 Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 73 8b 29 07 00 c0 0c 5a 43 2b 2b 2b 2b 2b 2b 2b +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. Got RLC block, coding scheme: CS-1, length: 23 (23)) @@ -3453,10 +3575,23 @@ MS requests UL TBF on RACH, so we provide one ra=0x73 Fn=2654167 qta=31 is_11bit=0: MS requests single block allocation + Valid TRX=0. + Not valid TRX=1. + Not valid TRX=2. + Not valid TRX=3. + Not valid TRX=4. + Not valid TRX=5. + Not valid TRX=6. + Not valid TRX=7. +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) + sba fn=2654270 ts = 7 trx = 0 RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x73, Fn=2654167 (17,25,9), SBFn=2654270 TX: Immediate Assignment Uplink (AGCH) - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=-1 USF=7 Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 73 8b 29 07 00 c0 0c 5a 43 2b 2b 2b 2b 2b 2b 2b +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. Got RLC block, coding scheme: CS-1, length: 23 (23)) @@ -3708,6 +3843,8 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) changes state from NULL to ASSIGN TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) starting timer 0. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) append +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. ********** TBF starts here ********** @@ -4043,6 +4180,8 @@ Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc ********** TBF ends here ********** +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. ********** TBF starts here ********** @@ -4323,6 +4462,8 @@ Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc ********** TBF ends here ********** +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. ********** TBF starts here ********** @@ -4562,6 +4703,8 @@ Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc ********** TBF ends here ********** +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. ********** TBF starts here ********** @@ -4765,6 +4908,8 @@ Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc ********** TBF ends here ********** +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. ********** TBF starts here ********** @@ -4946,6 +5091,8 @@ Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc ********** TBF ends here ********** +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. ********** TBF starts here ********** @@ -5108,6 +5255,8 @@ Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc ********** TBF ends here ********** +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. ********** TBF starts here ********** @@ -5266,6 +5415,8 @@ Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc ********** TBF ends here ********** +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. ********** TBF starts here ********** @@ -5411,6 +5562,8 @@ Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc ********** TBF ends here ********** +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. ********** TBF starts here ********** @@ -5557,6 +5710,8 @@ Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc ********** TBF ends here ********** +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. ********** TBF starts here ********** @@ -5609,6 +5764,8 @@ Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc ********** TBF ends here ********** +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. ********** TBF starts here ********** @@ -5661,6 +5818,8 @@ Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc ********** TBF ends here ********** +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. ********** TBF starts here ********** @@ -5713,6 +5872,8 @@ Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc ********** TBF ends here ********** +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. ********** TBF starts here ********** @@ -5784,6 +5945,8 @@ Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc ********** TBF ends here ********** +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. ********** TBF starts here ********** @@ -5855,6 +6018,8 @@ Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc ********** TBF ends here ********** +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. ********** TBF starts here ********** @@ -5926,6 +6091,8 @@ Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc ********** TBF ends here ********** +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. ********** TBF starts here ********** @@ -5997,6 +6164,8 @@ Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc ********** TBF ends here ********** +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. ********** TBF starts here ********** @@ -6055,6 +6224,8 @@ Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc ********** TBF ends here ********** +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. ********** TBF starts here ********** @@ -6113,6 +6284,8 @@ Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc ********** TBF ends here ********** +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. ********** TBF starts here ********** @@ -6171,6 +6344,8 @@ Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc ********** TBF ends here ********** +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. ********** TBF starts here ********** @@ -6239,10 +6414,23 @@ MS requests UL TBF on RACH, so we provide one ra=0x73 Fn=2654167 qta=31 is_11bit=0: MS requests single block allocation + Valid TRX=0. + Not valid TRX=1. + Not valid TRX=2. + Not valid TRX=3. + Not valid TRX=4. + Not valid TRX=5. + Not valid TRX=6. + Not valid TRX=7. +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) + sba fn=2654270 ts = 7 trx = 0 RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x73, Fn=2654167 (17,25,9), SBFn=2654270 TX: Immediate Assignment Uplink (AGCH) - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=-1 USF=7 Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 73 8b 29 07 00 c0 0c 5a 43 2b 2b 2b 2b 2b 2b 2b +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. Got RLC block, coding scheme: CS-1, length: 23 (23)) @@ -6367,8 +6555,10 @@ Modifying MS object, TLLI = 0x00000000, MS class 0 -> 11 Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 11 Enabled EGPRS for TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS), mode EGPRS +use_trx = 0 Searching for first unallocated TFI: TRX=0 Found TFI=0. +FREE trx = 0 TFI = 0 Slot Allocation (Algorithm B) for class 11 - Rx=4 Tx=3 Sum Rx+Tx=5 Tta=3 Ttb=1 Tra=2 Trb=1 Type=1 - Skipping TS 0, because not enabled @@ -6389,8 +6579,10 @@ DL TBF slots: 0x10, N: 1, WS: 192 ********** TBF update ********** PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. +use_trx = 0 Searching for first unallocated TFI: TRX=0 Found TFI=0. +FREE trx = 0 TFI = 0 - Selected DL slots: (TS=0)"..DDDD.."(TS=7) Using 4 slots for DL - Assigning DL TS 2 @@ -6417,10 +6609,23 @@ MS requests UL TBF on RACH, so we provide one ra=0x73 Fn=2654167 qta=31 is_11bit=0: MS requests single block allocation + Valid TRX=0. + Not valid TRX=1. + Not valid TRX=2. + Not valid TRX=3. + Not valid TRX=4. + Not valid TRX=5. + Not valid TRX=6. + Not valid TRX=7. +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) + sba fn=2654270 ts = 7 trx = 0 RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x73, Fn=2654167 (17,25,9), SBFn=2654270 TX: Immediate Assignment Uplink (AGCH) - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=-1 USF=7 Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 73 8b 29 07 00 c0 0c 5a 43 2b 2b 2b 2b 2b 2b 2b +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. Got RLC block, coding scheme: CS-1, length: 23 (23)) @@ -6527,6 +6732,8 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) changes state from NULL to ASSIGN TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) starting timer 0. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) append +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. ********** TBF starts here ********** @@ -6881,9 +7088,18 @@ MS requests UL TBF on RACH, so we provide one ra=0x70 Fn=2654167 qta=31 is_11bit=0: MS requests single block allocation -No PDCH available. + Not valid TRX=0. + Not valid TRX=1. + Not valid TRX=2. + Not valid TRX=3. + Not valid TRX=4. + Not valid TRX=5. + Not valid TRX=6. + Not valid TRX=7. No PDCH resource for single block allocation.sending Immediate Assignment Uplink (AGCH) reject Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=4d 06 3a 10 70 8b 29 14 70 8b 29 14 70 8b 29 14 70 8b 29 14 0b 2b 2b +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(1) +selected pro(4294967295)selected_trx(0) Searching for first unallocated TFI: TRX=0 Found TFI=0. ********** TBF starts here ********** @@ -6908,3 +7124,1307 @@ TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) append +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(0) numpdch(2) prob1(4294967295) seleprob(0) btsnumpdch(4) +selected pro(4294967295)selected_trx(0) +trx(1) cur load(0) numpdch(2) prob1(4294967295) seleprob(4294967295) btsnumpdch(4) +Searching for first unallocated TFI: TRX=0 + Found TFI=0. +FREE trx = 0 TFI = 0 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Possible DL/UL slots: (TS=0)"....CC.."(TS=7) +- Selected DL slots: (TS=0)"....D..."(TS=7), single +Using single slot at TS 4 for DL +- Reserved DL/UL slots: (TS=0)"....C..."(TS=7) +- Assigning DL TS 4 +PDCH(TS 4, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL), 1 TBFs, USFs = 00, TFIs = 00000001. +- Setting Control TS 4 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 0, ul_slots = 10, dl_slots = 10 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(1) numpdch(2) prob1(4294967095) seleprob(0) btsnumpdch(4) +selected pro(4294967095)selected_trx(0) +trx(1) cur load(0) numpdch(2) prob1(4294967295) seleprob(4294967095) btsnumpdch(4) +selected pro(4294967295)selected_trx(1) +Searching for first unallocated TFI: TRX=1 + Found TFI=0. +FREE trx = 1 TFI = 0 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Possible DL/UL slots: (TS=0)"....CC.."(TS=7) +- Selected DL slots: (TS=0)"....D..."(TS=7), single +Using single slot at TS 4 for DL +- Reserved DL/UL slots: (TS=0)"....C..."(TS=7) +- Assigning DL TS 4 +PDCH(TS 4, TRX 1): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL), 1 TBFs, USFs = 00, TFIs = 00000001. +- Setting Control TS 4 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 1, ul_slots = 10, dl_slots = 10 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(1) numpdch(2) prob1(4294967095) seleprob(0) btsnumpdch(4) +selected pro(4294967095)selected_trx(0) +trx(1) cur load(1) numpdch(2) prob1(4294967095) seleprob(4294967095) btsnumpdch(4) +Searching for first unallocated TFI: TRX=0 + Found TFI=1. +FREE trx = 0 TFI = 1 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Possible DL/UL slots: (TS=0)"....CC.."(TS=7) +- Selected DL slots: (TS=0)".....D.."(TS=7), single +Using single slot at TS 5 for DL +- Reserved DL/UL slots: (TS=0)".....C.."(TS=7) +- Assigning DL TS 5 +PDCH(TS 5, TRX 0): Attaching TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL), 1 TBFs, USFs = 00, TFIs = 00000002. +- Setting Control TS 5 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 0, ul_slots = 20, dl_slots = 20 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(2) numpdch(2) prob1(4294966895) seleprob(0) btsnumpdch(4) +selected pro(4294966895)selected_trx(0) +trx(1) cur load(1) numpdch(2) prob1(4294967095) seleprob(4294966895) btsnumpdch(4) +selected pro(4294967095)selected_trx(1) +Searching for first unallocated TFI: TRX=1 + Found TFI=1. +FREE trx = 1 TFI = 1 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Possible DL/UL slots: (TS=0)"....CC.."(TS=7) +- Selected DL slots: (TS=0)".....D.."(TS=7), single +Using single slot at TS 5 for DL +- Reserved DL/UL slots: (TS=0)".....C.."(TS=7) +- Assigning DL TS 5 +PDCH(TS 5, TRX 1): Attaching TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL), 1 TBFs, USFs = 00, TFIs = 00000002. +- Setting Control TS 5 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 1, ul_slots = 20, dl_slots = 20 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(2) numpdch(2) prob1(4294966895) seleprob(0) btsnumpdch(4) +selected pro(4294966895)selected_trx(0) +trx(1) cur load(2) numpdch(2) prob1(4294966895) seleprob(4294966895) btsnumpdch(4) +Searching for first unallocated TFI: TRX=0 + Found TFI=2. +FREE trx = 0 TFI = 2 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Possible DL/UL slots: (TS=0)"....CC.."(TS=7) +- Selected DL slots: (TS=0)"....D..."(TS=7), single +Using single slot at TS 4 for DL +- Reserved DL/UL slots: (TS=0)"....C..."(TS=7) +- Assigning DL TS 4 +PDCH(TS 4, TRX 0): Attaching TBF(TFI=2 TLLI=0x00000000 DIR=DL STATE=NULL), 2 TBFs, USFs = 00, TFIs = 00000005. +- Setting Control TS 4 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=2 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=2 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 0, ul_slots = 10, dl_slots = 10 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(3) numpdch(2) prob1(4294966695) seleprob(0) btsnumpdch(4) +selected pro(4294966695)selected_trx(0) +trx(1) cur load(2) numpdch(2) prob1(4294966895) seleprob(4294966695) btsnumpdch(4) +selected pro(4294966895)selected_trx(1) +Searching for first unallocated TFI: TRX=1 + Found TFI=2. +FREE trx = 1 TFI = 2 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Possible DL/UL slots: (TS=0)"....CC.."(TS=7) +- Selected DL slots: (TS=0)"....D..."(TS=7), single +Using single slot at TS 4 for DL +- Reserved DL/UL slots: (TS=0)"....C..."(TS=7) +- Assigning DL TS 4 +PDCH(TS 4, TRX 1): Attaching TBF(TFI=2 TLLI=0x00000000 DIR=DL STATE=NULL), 2 TBFs, USFs = 00, TFIs = 00000005. +- Setting Control TS 4 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=2 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=2 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 1, ul_slots = 10, dl_slots = 10 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(3) numpdch(2) prob1(4294966695) seleprob(0) btsnumpdch(4) +selected pro(4294966695)selected_trx(0) +trx(1) cur load(3) numpdch(2) prob1(4294966695) seleprob(4294966695) btsnumpdch(4) +Searching for first unallocated TFI: TRX=0 + Found TFI=3. +FREE trx = 0 TFI = 3 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Possible DL/UL slots: (TS=0)"....CC.."(TS=7) +- Selected DL slots: (TS=0)".....D.."(TS=7), single +Using single slot at TS 5 for DL +- Reserved DL/UL slots: (TS=0)".....C.."(TS=7) +- Assigning DL TS 5 +PDCH(TS 5, TRX 0): Attaching TBF(TFI=3 TLLI=0x00000000 DIR=DL STATE=NULL), 2 TBFs, USFs = 00, TFIs = 0000000a. +- Setting Control TS 5 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=3 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=3 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 0, ul_slots = 20, dl_slots = 20 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(4) numpdch(2) prob1(4294966495) seleprob(0) btsnumpdch(4) +selected pro(4294966495)selected_trx(0) +trx(1) cur load(3) numpdch(2) prob1(4294966695) seleprob(4294966495) btsnumpdch(4) +selected pro(4294966695)selected_trx(1) +Searching for first unallocated TFI: TRX=1 + Found TFI=3. +FREE trx = 1 TFI = 3 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Possible DL/UL slots: (TS=0)"....CC.."(TS=7) +- Selected DL slots: (TS=0)".....D.."(TS=7), single +Using single slot at TS 5 for DL +- Reserved DL/UL slots: (TS=0)".....C.."(TS=7) +- Assigning DL TS 5 +PDCH(TS 5, TRX 1): Attaching TBF(TFI=3 TLLI=0x00000000 DIR=DL STATE=NULL), 2 TBFs, USFs = 00, TFIs = 0000000a. +- Setting Control TS 5 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=3 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=3 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 1, ul_slots = 20, dl_slots = 20 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(4) numpdch(2) prob1(4294966495) seleprob(0) btsnumpdch(4) +selected pro(4294966495)selected_trx(0) +trx(1) cur load(4) numpdch(2) prob1(4294966495) seleprob(4294966495) btsnumpdch(4) +Searching for first unallocated TFI: TRX=0 + Found TFI=4. +FREE trx = 0 TFI = 4 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Possible DL/UL slots: (TS=0)"....CC.."(TS=7) +- Selected DL slots: (TS=0)"....D..."(TS=7), single +Using single slot at TS 4 for DL +- Reserved DL/UL slots: (TS=0)"....C..."(TS=7) +- Assigning DL TS 4 +PDCH(TS 4, TRX 0): Attaching TBF(TFI=4 TLLI=0x00000000 DIR=DL STATE=NULL), 3 TBFs, USFs = 00, TFIs = 00000015. +- Setting Control TS 4 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=4 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=4 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 0, ul_slots = 10, dl_slots = 10 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(5) numpdch(2) prob1(4294966295) seleprob(0) btsnumpdch(4) +selected pro(4294966295)selected_trx(0) +trx(1) cur load(4) numpdch(2) prob1(4294966495) seleprob(4294966295) btsnumpdch(4) +selected pro(4294966495)selected_trx(1) +Searching for first unallocated TFI: TRX=1 + Found TFI=4. +FREE trx = 1 TFI = 4 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Possible DL/UL slots: (TS=0)"....CC.."(TS=7) +- Selected DL slots: (TS=0)"....D..."(TS=7), single +Using single slot at TS 4 for DL +- Reserved DL/UL slots: (TS=0)"....C..."(TS=7) +- Assigning DL TS 4 +PDCH(TS 4, TRX 1): Attaching TBF(TFI=4 TLLI=0x00000000 DIR=DL STATE=NULL), 3 TBFs, USFs = 00, TFIs = 00000015. +- Setting Control TS 4 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=4 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=4 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 1, ul_slots = 10, dl_slots = 10 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(5) numpdch(2) prob1(4294966295) seleprob(0) btsnumpdch(4) +selected pro(4294966295)selected_trx(0) +trx(1) cur load(5) numpdch(2) prob1(4294966295) seleprob(4294966295) btsnumpdch(4) +Searching for first unallocated TFI: TRX=0 + Found TFI=5. +FREE trx = 0 TFI = 5 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Possible DL/UL slots: (TS=0)"....CC.."(TS=7) +- Selected DL slots: (TS=0)".....D.."(TS=7), single +Using single slot at TS 5 for DL +- Reserved DL/UL slots: (TS=0)".....C.."(TS=7) +- Assigning DL TS 5 +PDCH(TS 5, TRX 0): Attaching TBF(TFI=5 TLLI=0x00000000 DIR=DL STATE=NULL), 3 TBFs, USFs = 00, TFIs = 0000002a. +- Setting Control TS 5 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=5 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=5 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 0, ul_slots = 20, dl_slots = 20 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(0) numpdch(2) prob1(4294967295) seleprob(0) btsnumpdch(3) +selected pro(4294967295)selected_trx(0) +trx(1) cur load(0) numpdch(1) prob1(4294967295) seleprob(4294967295) btsnumpdch(3) +Searching for first unallocated TFI: TRX=0 + Found TFI=0. +FREE trx = 0 TFI = 0 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Possible DL/UL slots: (TS=0)"....CC.."(TS=7) +- Selected DL slots: (TS=0)"....D..."(TS=7), single +Using single slot at TS 4 for DL +- Reserved DL/UL slots: (TS=0)"....C..."(TS=7) +- Assigning DL TS 4 +PDCH(TS 4, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL), 1 TBFs, USFs = 00, TFIs = 00000001. +- Setting Control TS 4 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 0, ul_slots = 10, dl_slots = 10 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(1) numpdch(2) prob1(4294967145) seleprob(0) btsnumpdch(3) +selected pro(4294967145)selected_trx(0) +trx(1) cur load(0) numpdch(1) prob1(4294967295) seleprob(4294967145) btsnumpdch(3) +selected pro(4294967295)selected_trx(1) +Searching for first unallocated TFI: TRX=1 + Found TFI=0. +FREE trx = 1 TFI = 0 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 5, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Possible DL/UL slots: (TS=0)"....C..."(TS=7) +- Selected DL slots: (TS=0)"....D..."(TS=7), single +Using single slot at TS 4 for DL +- Reserved DL/UL slots: (TS=0)"....C..."(TS=7) +- Assigning DL TS 4 +PDCH(TS 4, TRX 1): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL), 1 TBFs, USFs = 00, TFIs = 00000001. +- Setting Control TS 4 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 1, ul_slots = 10, dl_slots = 10 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(1) numpdch(2) prob1(4294967145) seleprob(0) btsnumpdch(3) +selected pro(4294967145)selected_trx(0) +trx(1) cur load(1) numpdch(1) prob1(4294966995) seleprob(4294967145) btsnumpdch(3) +Searching for first unallocated TFI: TRX=0 + Found TFI=1. +FREE trx = 0 TFI = 1 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Possible DL/UL slots: (TS=0)"....CC.."(TS=7) +- Selected DL slots: (TS=0)".....D.."(TS=7), single +Using single slot at TS 5 for DL +- Reserved DL/UL slots: (TS=0)".....C.."(TS=7) +- Assigning DL TS 5 +PDCH(TS 5, TRX 0): Attaching TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL), 1 TBFs, USFs = 00, TFIs = 00000002. +- Setting Control TS 5 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 0, ul_slots = 20, dl_slots = 20 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(2) numpdch(2) prob1(4294966995) seleprob(0) btsnumpdch(3) +selected pro(4294966995)selected_trx(0) +trx(1) cur load(1) numpdch(1) prob1(4294966995) seleprob(4294966995) btsnumpdch(3) +Searching for first unallocated TFI: TRX=0 + Found TFI=2. +FREE trx = 0 TFI = 2 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Possible DL/UL slots: (TS=0)"....CC.."(TS=7) +- Selected DL slots: (TS=0)"....D..."(TS=7), single +Using single slot at TS 4 for DL +- Reserved DL/UL slots: (TS=0)"....C..."(TS=7) +- Assigning DL TS 4 +PDCH(TS 4, TRX 0): Attaching TBF(TFI=2 TLLI=0x00000000 DIR=DL STATE=NULL), 2 TBFs, USFs = 00, TFIs = 00000005. +- Setting Control TS 4 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=2 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=2 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 0, ul_slots = 10, dl_slots = 10 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(3) numpdch(2) prob1(4294966845) seleprob(0) btsnumpdch(3) +selected pro(4294966845)selected_trx(0) +trx(1) cur load(1) numpdch(1) prob1(4294966995) seleprob(4294966845) btsnumpdch(3) +selected pro(4294966995)selected_trx(1) +Searching for first unallocated TFI: TRX=1 + Found TFI=1. +FREE trx = 1 TFI = 1 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 5, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Possible DL/UL slots: (TS=0)"....C..."(TS=7) +- Selected DL slots: (TS=0)"....D..."(TS=7), single +Using single slot at TS 4 for DL +- Reserved DL/UL slots: (TS=0)"....C..."(TS=7) +- Assigning DL TS 4 +PDCH(TS 4, TRX 1): Attaching TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL), 2 TBFs, USFs = 00, TFIs = 00000003. +- Setting Control TS 4 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 1, ul_slots = 10, dl_slots = 10 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(3) numpdch(2) prob1(4294966845) seleprob(0) btsnumpdch(3) +selected pro(4294966845)selected_trx(0) +trx(1) cur load(2) numpdch(1) prob1(4294966695) seleprob(4294966845) btsnumpdch(3) +Searching for first unallocated TFI: TRX=0 + Found TFI=3. +FREE trx = 0 TFI = 3 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Possible DL/UL slots: (TS=0)"....CC.."(TS=7) +- Selected DL slots: (TS=0)".....D.."(TS=7), single +Using single slot at TS 5 for DL +- Reserved DL/UL slots: (TS=0)".....C.."(TS=7) +- Assigning DL TS 5 +PDCH(TS 5, TRX 0): Attaching TBF(TFI=3 TLLI=0x00000000 DIR=DL STATE=NULL), 2 TBFs, USFs = 00, TFIs = 0000000a. +- Setting Control TS 5 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=3 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=3 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 0, ul_slots = 20, dl_slots = 20 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(4) numpdch(2) prob1(4294966695) seleprob(0) btsnumpdch(3) +selected pro(4294966695)selected_trx(0) +trx(1) cur load(2) numpdch(1) prob1(4294966695) seleprob(4294966695) btsnumpdch(3) +Searching for first unallocated TFI: TRX=0 + Found TFI=4. +FREE trx = 0 TFI = 4 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Possible DL/UL slots: (TS=0)"....CC.."(TS=7) +- Selected DL slots: (TS=0)"....D..."(TS=7), single +Using single slot at TS 4 for DL +- Reserved DL/UL slots: (TS=0)"....C..."(TS=7) +- Assigning DL TS 4 +PDCH(TS 4, TRX 0): Attaching TBF(TFI=4 TLLI=0x00000000 DIR=DL STATE=NULL), 3 TBFs, USFs = 00, TFIs = 00000015. +- Setting Control TS 4 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=4 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=4 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 0, ul_slots = 10, dl_slots = 10 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(5) numpdch(2) prob1(4294966545) seleprob(0) btsnumpdch(3) +selected pro(4294966545)selected_trx(0) +trx(1) cur load(2) numpdch(1) prob1(4294966695) seleprob(4294966545) btsnumpdch(3) +selected pro(4294966695)selected_trx(1) +Searching for first unallocated TFI: TRX=1 + Found TFI=2. +FREE trx = 1 TFI = 2 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 5, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Possible DL/UL slots: (TS=0)"....C..."(TS=7) +- Selected DL slots: (TS=0)"....D..."(TS=7), single +Using single slot at TS 4 for DL +- Reserved DL/UL slots: (TS=0)"....C..."(TS=7) +- Assigning DL TS 4 +PDCH(TS 4, TRX 1): Attaching TBF(TFI=2 TLLI=0x00000000 DIR=DL STATE=NULL), 3 TBFs, USFs = 00, TFIs = 00000007. +- Setting Control TS 4 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=2 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=2 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 1, ul_slots = 10, dl_slots = 10 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(5) numpdch(2) prob1(4294966545) seleprob(0) btsnumpdch(3) +selected pro(4294966545)selected_trx(0) +trx(1) cur load(3) numpdch(1) prob1(4294966395) seleprob(4294966545) btsnumpdch(3) +Searching for first unallocated TFI: TRX=0 + Found TFI=5. +FREE trx = 0 TFI = 5 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Possible DL/UL slots: (TS=0)"....CC.."(TS=7) +- Selected DL slots: (TS=0)".....D.."(TS=7), single +Using single slot at TS 5 for DL +- Reserved DL/UL slots: (TS=0)".....C.."(TS=7) +- Assigning DL TS 5 +PDCH(TS 5, TRX 0): Attaching TBF(TFI=5 TLLI=0x00000000 DIR=DL STATE=NULL), 3 TBFs, USFs = 00, TFIs = 0000002a. +- Setting Control TS 5 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=5 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=5 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 0, ul_slots = 20, dl_slots = 20 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(6) numpdch(2) prob1(4294966395) seleprob(0) btsnumpdch(3) +selected pro(4294966395)selected_trx(0) +trx(1) cur load(3) numpdch(1) prob1(4294966395) seleprob(4294966395) btsnumpdch(3) +Searching for first unallocated TFI: TRX=0 + Found TFI=6. +FREE trx = 0 TFI = 6 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Possible DL/UL slots: (TS=0)"....CC.."(TS=7) +- Selected DL slots: (TS=0)"....D..."(TS=7), single +Using single slot at TS 4 for DL +- Reserved DL/UL slots: (TS=0)"....C..."(TS=7) +- Assigning DL TS 4 +PDCH(TS 4, TRX 0): Attaching TBF(TFI=6 TLLI=0x00000000 DIR=DL STATE=NULL), 4 TBFs, USFs = 00, TFIs = 00000055. +- Setting Control TS 4 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=6 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=6 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 0, ul_slots = 10, dl_slots = 10 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(7) numpdch(2) prob1(4294966245) seleprob(0) btsnumpdch(3) +selected pro(4294966245)selected_trx(0) +trx(1) cur load(3) numpdch(1) prob1(4294966395) seleprob(4294966245) btsnumpdch(3) +selected pro(4294966395)selected_trx(1) +Searching for first unallocated TFI: TRX=1 + Found TFI=3. +FREE trx = 1 TFI = 3 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 5, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Possible DL/UL slots: (TS=0)"....C..."(TS=7) +- Selected DL slots: (TS=0)"....D..."(TS=7), single +Using single slot at TS 4 for DL +- Reserved DL/UL slots: (TS=0)"....C..."(TS=7) +- Assigning DL TS 4 +PDCH(TS 4, TRX 1): Attaching TBF(TFI=3 TLLI=0x00000000 DIR=DL STATE=NULL), 4 TBFs, USFs = 00, TFIs = 0000000f. +- Setting Control TS 4 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=3 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=3 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 1, ul_slots = 10, dl_slots = 10 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(0) numpdch(4) prob1(4294967295) seleprob(0) btsnumpdch(5) +selected pro(4294967295)selected_trx(0) +trx(1) cur load(0) numpdch(1) prob1(4294967295) seleprob(4294967295) btsnumpdch(5) +Searching for first unallocated TFI: TRX=0 + Found TFI=0. +FREE trx = 0 TFI = 0 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Possible DL/UL slots: (TS=0)"....CCCC"(TS=7) +- Selected DL slots: (TS=0)"....D..."(TS=7), single +Using single slot at TS 4 for DL +- Reserved DL/UL slots: (TS=0)"....C..."(TS=7) +- Assigning DL TS 4 +PDCH(TS 4, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL), 1 TBFs, USFs = 00, TFIs = 00000001. +- Setting Control TS 4 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 0, ul_slots = 10, dl_slots = 10 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(1) numpdch(4) prob1(4294967170) seleprob(0) btsnumpdch(5) +selected pro(4294967170)selected_trx(0) +trx(1) cur load(0) numpdch(1) prob1(4294967295) seleprob(4294967170) btsnumpdch(5) +selected pro(4294967295)selected_trx(1) +Searching for first unallocated TFI: TRX=1 + Found TFI=0. +FREE trx = 1 TFI = 0 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 4, because not enabled +- Skipping TS 5, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Possible DL/UL slots: (TS=0)"C......."(TS=7) +- Selected DL slots: (TS=0)"D......."(TS=7), single +Using single slot at TS 0 for DL +- Reserved DL/UL slots: (TS=0)"C......."(TS=7) +- Assigning DL TS 0 +PDCH(TS 0, TRX 1): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL), 1 TBFs, USFs = 00, TFIs = 00000001. +- Setting Control TS 0 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 1, ul_slots = 01, dl_slots = 01 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(1) numpdch(4) prob1(4294967170) seleprob(0) btsnumpdch(5) +selected pro(4294967170)selected_trx(0) +trx(1) cur load(1) numpdch(1) prob1(4294966795) seleprob(4294967170) btsnumpdch(5) +Searching for first unallocated TFI: TRX=0 + Found TFI=1. +FREE trx = 0 TFI = 1 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Possible DL/UL slots: (TS=0)"....CCCC"(TS=7) +- Selected DL slots: (TS=0)".....D.."(TS=7), single +Using single slot at TS 5 for DL +- Reserved DL/UL slots: (TS=0)".....C.."(TS=7) +- Assigning DL TS 5 +PDCH(TS 5, TRX 0): Attaching TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL), 1 TBFs, USFs = 00, TFIs = 00000002. +- Setting Control TS 5 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 0, ul_slots = 20, dl_slots = 20 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(2) numpdch(4) prob1(4294967045) seleprob(0) btsnumpdch(5) +selected pro(4294967045)selected_trx(0) +trx(1) cur load(1) numpdch(1) prob1(4294966795) seleprob(4294967045) btsnumpdch(5) +Searching for first unallocated TFI: TRX=0 + Found TFI=2. +FREE trx = 0 TFI = 2 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Possible DL/UL slots: (TS=0)"....CCCC"(TS=7) +- Selected DL slots: (TS=0)"......D."(TS=7), single +Using single slot at TS 6 for DL +- Reserved DL/UL slots: (TS=0)"......C."(TS=7) +- Assigning DL TS 6 +PDCH(TS 6, TRX 0): Attaching TBF(TFI=2 TLLI=0x00000000 DIR=DL STATE=NULL), 1 TBFs, USFs = 00, TFIs = 00000004. +- Setting Control TS 6 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=2 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=2 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 0, ul_slots = 40, dl_slots = 40 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(3) numpdch(4) prob1(4294966920) seleprob(0) btsnumpdch(5) +selected pro(4294966920)selected_trx(0) +trx(1) cur load(1) numpdch(1) prob1(4294966795) seleprob(4294966920) btsnumpdch(5) +Searching for first unallocated TFI: TRX=0 + Found TFI=3. +FREE trx = 0 TFI = 3 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Possible DL/UL slots: (TS=0)"....CCCC"(TS=7) +- Selected DL slots: (TS=0)".......D"(TS=7), single +Using single slot at TS 7 for DL +- Reserved DL/UL slots: (TS=0)".......C"(TS=7) +- Assigning DL TS 7 +PDCH(TS 7, TRX 0): Attaching TBF(TFI=3 TLLI=0x00000000 DIR=DL STATE=NULL), 1 TBFs, USFs = 00, TFIs = 00000008. +- Setting Control TS 7 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=3 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=3 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 80 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(4) numpdch(4) prob1(4294966795) seleprob(0) btsnumpdch(5) +selected pro(4294966795)selected_trx(0) +trx(1) cur load(1) numpdch(1) prob1(4294966795) seleprob(4294966795) btsnumpdch(5) +Searching for first unallocated TFI: TRX=0 + Found TFI=4. +FREE trx = 0 TFI = 4 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Possible DL/UL slots: (TS=0)"....CCCC"(TS=7) +- Selected DL slots: (TS=0)"....D..."(TS=7), single +Using single slot at TS 4 for DL +- Reserved DL/UL slots: (TS=0)"....C..."(TS=7) +- Assigning DL TS 4 +PDCH(TS 4, TRX 0): Attaching TBF(TFI=4 TLLI=0x00000000 DIR=DL STATE=NULL), 2 TBFs, USFs = 00, TFIs = 00000011. +- Setting Control TS 4 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=4 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=4 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 0, ul_slots = 10, dl_slots = 10 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(5) numpdch(4) prob1(4294966670) seleprob(0) btsnumpdch(5) +selected pro(4294966670)selected_trx(0) +trx(1) cur load(1) numpdch(1) prob1(4294966795) seleprob(4294966670) btsnumpdch(5) +selected pro(4294966795)selected_trx(1) +Searching for first unallocated TFI: TRX=1 + Found TFI=1. +FREE trx = 1 TFI = 1 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 4, because not enabled +- Skipping TS 5, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Possible DL/UL slots: (TS=0)"C......."(TS=7) +- Selected DL slots: (TS=0)"D......."(TS=7), single +Using single slot at TS 0 for DL +- Reserved DL/UL slots: (TS=0)"C......."(TS=7) +- Assigning DL TS 0 +PDCH(TS 0, TRX 1): Attaching TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL), 2 TBFs, USFs = 00, TFIs = 00000003. +- Setting Control TS 0 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 1, ul_slots = 01, dl_slots = 01 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(5) numpdch(4) prob1(4294966670) seleprob(0) btsnumpdch(5) +selected pro(4294966670)selected_trx(0) +trx(1) cur load(2) numpdch(1) prob1(4294966295) seleprob(4294966670) btsnumpdch(5) +Searching for first unallocated TFI: TRX=0 + Found TFI=5. +FREE trx = 0 TFI = 5 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Possible DL/UL slots: (TS=0)"....CCCC"(TS=7) +- Selected DL slots: (TS=0)".....D.."(TS=7), single +Using single slot at TS 5 for DL +- Reserved DL/UL slots: (TS=0)".....C.."(TS=7) +- Assigning DL TS 5 +PDCH(TS 5, TRX 0): Attaching TBF(TFI=5 TLLI=0x00000000 DIR=DL STATE=NULL), 2 TBFs, USFs = 00, TFIs = 00000022. +- Setting Control TS 5 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=5 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=5 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 0, ul_slots = 20, dl_slots = 20 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(6) numpdch(4) prob1(4294966545) seleprob(0) btsnumpdch(5) +selected pro(4294966545)selected_trx(0) +trx(1) cur load(2) numpdch(1) prob1(4294966295) seleprob(4294966545) btsnumpdch(5) +Searching for first unallocated TFI: TRX=0 + Found TFI=6. +FREE trx = 0 TFI = 6 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Possible DL/UL slots: (TS=0)"....CCCC"(TS=7) +- Selected DL slots: (TS=0)"......D."(TS=7), single +Using single slot at TS 6 for DL +- Reserved DL/UL slots: (TS=0)"......C."(TS=7) +- Assigning DL TS 6 +PDCH(TS 6, TRX 0): Attaching TBF(TFI=6 TLLI=0x00000000 DIR=DL STATE=NULL), 2 TBFs, USFs = 00, TFIs = 00000044. +- Setting Control TS 6 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=6 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=6 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 0, ul_slots = 40, dl_slots = 40 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(7) numpdch(4) prob1(4294966420) seleprob(0) btsnumpdch(5) +selected pro(4294966420)selected_trx(0) +trx(1) cur load(2) numpdch(1) prob1(4294966295) seleprob(4294966420) btsnumpdch(5) +Searching for first unallocated TFI: TRX=0 + Found TFI=7. +FREE trx = 0 TFI = 7 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Possible DL/UL slots: (TS=0)"....CCCC"(TS=7) +- Selected DL slots: (TS=0)".......D"(TS=7), single +Using single slot at TS 7 for DL +- Reserved DL/UL slots: (TS=0)".......C"(TS=7) +- Assigning DL TS 7 +PDCH(TS 7, TRX 0): Attaching TBF(TFI=7 TLLI=0x00000000 DIR=DL STATE=NULL), 2 TBFs, USFs = 00, TFIs = 00000088. +- Setting Control TS 7 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=7 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=7 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 80 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(8) numpdch(4) prob1(4294966295) seleprob(0) btsnumpdch(5) +selected pro(4294966295)selected_trx(0) +trx(1) cur load(2) numpdch(1) prob1(4294966295) seleprob(4294966295) btsnumpdch(5) +Searching for first unallocated TFI: TRX=0 + Found TFI=8. +FREE trx = 0 TFI = 8 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Possible DL/UL slots: (TS=0)"....CCCC"(TS=7) +- Selected DL slots: (TS=0)"....D..."(TS=7), single +Using single slot at TS 4 for DL +- Reserved DL/UL slots: (TS=0)"....C..."(TS=7) +- Assigning DL TS 4 +PDCH(TS 4, TRX 0): Attaching TBF(TFI=8 TLLI=0x00000000 DIR=DL STATE=NULL), 3 TBFs, USFs = 00, TFIs = 00000111. +- Setting Control TS 4 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=8 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=8 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 0, ul_slots = 10, dl_slots = 10 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(0) numpdch(2) prob1(4294967295) seleprob(0) btsnumpdch(3) +selected pro(4294967295)selected_trx(0) +trx(1) cur load(0) numpdch(1) prob1(4294967295) seleprob(4294967295) btsnumpdch(3) +Searching for first unallocated TFI: TRX=0 + Found TFI=0. +FREE trx = 0 TFI = 0 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Possible DL/UL slots: (TS=0)"....CC.."(TS=7) +- Selected DL slots: (TS=0)"....D..."(TS=7), single +Using single slot at TS 4 for DL +- Reserved DL/UL slots: (TS=0)"....C..."(TS=7) +- Assigning DL TS 4 +PDCH(TS 4, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL), 1 TBFs, USFs = 00, TFIs = 00000001. +- Setting Control TS 4 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 0, ul_slots = 10, dl_slots = 10 +TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL) changes state from NULL to RELEASING +TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=RELEASING) free +PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=RELEASING), 0 TBFs, USFs = 00, TFIs = 00000000. +Detaching TBF from MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=RELEASING) +Destroying MS object, TLLI = 0x00000000 +********** TBF ends here ********** +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(0) numpdch(2) prob1(4294967295) seleprob(0) btsnumpdch(3) +selected pro(4294967295)selected_trx(0) +trx(1) cur load(0) numpdch(1) prob1(4294967295) seleprob(4294967295) btsnumpdch(3) +Searching for first unallocated TFI: TRX=0 + Found TFI=0. +FREE trx = 0 TFI = 0 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Possible DL/UL slots: (TS=0)"....CC.."(TS=7) +- Selected DL slots: (TS=0)"....D..."(TS=7), single +Using single slot at TS 4 for DL +- Reserved DL/UL slots: (TS=0)"....C..."(TS=7) +- Assigning DL TS 4 +PDCH(TS 4, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL), 1 TBFs, USFs = 00, TFIs = 00000001. +- Setting Control TS 4 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 0, ul_slots = 10, dl_slots = 10 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(1) numpdch(2) prob1(4294967145) seleprob(0) btsnumpdch(3) +selected pro(4294967145)selected_trx(0) +trx(1) cur load(0) numpdch(1) prob1(4294967295) seleprob(4294967145) btsnumpdch(3) +selected pro(4294967295)selected_trx(1) +Searching for first unallocated TFI: TRX=1 + Found TFI=0. +FREE trx = 1 TFI = 0 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 4, because not enabled +- Skipping TS 5, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Possible DL/UL slots: (TS=0)"C......."(TS=7) +- Selected DL slots: (TS=0)"D......."(TS=7), single +Using single slot at TS 0 for DL +- Reserved DL/UL slots: (TS=0)"C......."(TS=7) +- Assigning DL TS 0 +PDCH(TS 0, TRX 1): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL), 1 TBFs, USFs = 00, TFIs = 00000001. +- Setting Control TS 0 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 1, ul_slots = 01, dl_slots = 01 +TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL) changes state from NULL to RELEASING +TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=RELEASING) free +PDCH(TS 0, TRX 1): Detaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=RELEASING), 0 TBFs, USFs = 00, TFIs = 00000000. +Detaching TBF from MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=RELEASING) +Destroying MS object, TLLI = 0x00000000 +********** TBF ends here ********** +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(1) numpdch(2) prob1(4294967145) seleprob(0) btsnumpdch(3) +selected pro(4294967145)selected_trx(0) +trx(1) cur load(0) numpdch(1) prob1(4294967295) seleprob(4294967145) btsnumpdch(3) +selected pro(4294967295)selected_trx(1) +Searching for first unallocated TFI: TRX=1 + Found TFI=0. +FREE trx = 1 TFI = 0 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 4, because not enabled +- Skipping TS 5, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Possible DL/UL slots: (TS=0)"C......."(TS=7) +- Selected DL slots: (TS=0)"D......."(TS=7), single +Using single slot at TS 0 for DL +- Reserved DL/UL slots: (TS=0)"C......."(TS=7) +- Assigning DL TS 0 +PDCH(TS 0, TRX 1): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL), 1 TBFs, USFs = 00, TFIs = 00000001. +- Setting Control TS 0 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 1, ul_slots = 01, dl_slots = 01 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(1) numpdch(2) prob1(4294967145) seleprob(0) btsnumpdch(3) +selected pro(4294967145)selected_trx(0) +trx(1) cur load(1) numpdch(1) prob1(4294966995) seleprob(4294967145) btsnumpdch(3) +Searching for first unallocated TFI: TRX=0 + Found TFI=1. +FREE trx = 0 TFI = 1 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Possible DL/UL slots: (TS=0)"....CC.."(TS=7) +- Selected DL slots: (TS=0)".....D.."(TS=7), single +Using single slot at TS 5 for DL +- Reserved DL/UL slots: (TS=0)".....C.."(TS=7) +- Assigning DL TS 5 +PDCH(TS 5, TRX 0): Attaching TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL), 1 TBFs, USFs = 00, TFIs = 00000002. +- Setting Control TS 5 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 0, ul_slots = 20, dl_slots = 20 +TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL) changes state from NULL to RELEASING +TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=RELEASING) free +PDCH(TS 5, TRX 0): Detaching TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=RELEASING), 0 TBFs, USFs = 00, TFIs = 00000000. +Detaching TBF from MS object, TLLI = 0x00000000, TBF = TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=RELEASING) +Destroying MS object, TLLI = 0x00000000 +********** TBF ends here ********** +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(1) numpdch(2) prob1(4294967145) seleprob(0) btsnumpdch(3) +selected pro(4294967145)selected_trx(0) +trx(1) cur load(1) numpdch(1) prob1(4294966995) seleprob(4294967145) btsnumpdch(3) +Searching for first unallocated TFI: TRX=0 + Found TFI=1. +FREE trx = 0 TFI = 1 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Possible DL/UL slots: (TS=0)"....CC.."(TS=7) +- Selected DL slots: (TS=0)".....D.."(TS=7), single +Using single slot at TS 5 for DL +- Reserved DL/UL slots: (TS=0)".....C.."(TS=7) +- Assigning DL TS 5 +PDCH(TS 5, TRX 0): Attaching TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL), 1 TBFs, USFs = 00, TFIs = 00000002. +- Setting Control TS 5 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 0, ul_slots = 20, dl_slots = 20 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(0) numpdch(1) prob1(4294967295) seleprob(0) btsnumpdch(2) +selected pro(4294967295)selected_trx(0) +trx(1) cur load(0) numpdch(1) prob1(4294967295) seleprob(4294967295) btsnumpdch(2) +Searching for first unallocated TFI: TRX=0 + Found TFI=0. +FREE trx = 0 TFI = 0 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 5, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Possible DL/UL slots: (TS=0)"....C..."(TS=7) +- Selected DL slots: (TS=0)"....D..."(TS=7), single +Using single slot at TS 4 for DL +- Reserved DL/UL slots: (TS=0)"....C..."(TS=7) +- Assigning DL TS 4 +PDCH(TS 4, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL), 1 TBFs, USFs = 00, TFIs = 00000001. +- Setting Control TS 4 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 0, ul_slots = 10, dl_slots = 10 +********** TBF starts here ********** +Allocating UL TBF: MS_CLASS=1/1 +use_trx = 0 +Searching for first unallocated TFI: TRX=0 + Found TFI=0. +FREE trx = 0 TFI = 0 +- Selected UL slots: (TS=0)"....U..."(TS=7) +Using 1 slots for UL +- Assigning UL TS 4 +PDCH(TS 4, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL), 1 TBFs, USFs = 01, TFIs = 00000001. +- Setting Control TS 4 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) +Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 10, dl_slots = 00 +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer 3169. +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(2) numpdch(1) prob1(4294966895) seleprob(0) btsnumpdch(2) +selected pro(4294966895)selected_trx(0) +trx(1) cur load(0) numpdch(1) prob1(4294967295) seleprob(4294966895) btsnumpdch(2) +selected pro(4294967295)selected_trx(1) +Searching for first unallocated TFI: TRX=1 + Found TFI=0. +FREE trx = 1 TFI = 0 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 5, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Possible DL/UL slots: (TS=0)"....C..."(TS=7) +- Selected DL slots: (TS=0)"....D..."(TS=7), single +Using single slot at TS 4 for DL +- Reserved DL/UL slots: (TS=0)"....C..."(TS=7) +- Assigning DL TS 4 +PDCH(TS 4, TRX 1): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL), 1 TBFs, USFs = 00, TFIs = 00000001. +- Setting Control TS 4 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 1, ul_slots = 10, dl_slots = 10 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(2) numpdch(1) prob1(4294966895) seleprob(0) btsnumpdch(2) +selected pro(4294966895)selected_trx(0) +trx(1) cur load(1) numpdch(1) prob1(4294967095) seleprob(4294966895) btsnumpdch(2) +selected pro(4294967095)selected_trx(1) +Searching for first unallocated TFI: TRX=1 + Found TFI=1. +FREE trx = 1 TFI = 1 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 5, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Possible DL/UL slots: (TS=0)"....C..."(TS=7) +- Selected DL slots: (TS=0)"....D..."(TS=7), single +Using single slot at TS 4 for DL +- Reserved DL/UL slots: (TS=0)"....C..."(TS=7) +- Assigning DL TS 4 +PDCH(TS 4, TRX 1): Attaching TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL), 2 TBFs, USFs = 00, TFIs = 00000003. +- Setting Control TS 4 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 1, ul_slots = 10, dl_slots = 10 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +use_trx = -1 +trx(0) cur load(2) numpdch(1) prob1(4294966895) seleprob(0) btsnumpdch(2) +selected pro(4294966895)selected_trx(0) +trx(1) cur load(2) numpdch(1) prob1(4294966895) seleprob(4294966895) btsnumpdch(2) +Searching for first unallocated TFI: TRX=0 + Found TFI=1. +FREE trx = 0 TFI = 1 +Slot Allocation (Algorithm B) for class 1 +- Rx=1 Tx=1 Sum Rx+Tx=2 Tta=3 Ttb=2 Tra=4 Trb=2 Type=1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 5, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Possible DL/UL slots: (TS=0)"....C..."(TS=7) +- Selected DL slots: (TS=0)"....D..."(TS=7), single +Using single slot at TS 4 for DL +- Reserved DL/UL slots: (TS=0)"....C..."(TS=7) +- Assigning DL TS 4 +PDCH(TS 4, TRX 0): Attaching TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL), 2 TBFs, USFs = 01, TFIs = 00000003. +- Setting Control TS 4 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL) +Allocated TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL): trx = 0, ul_slots = 10, dl_slots = 10 +********** TBF starts here ********** +Allocating UL TBF: MS_CLASS=1/1 +use_trx = 0 +Searching for first unallocated TFI: TRX=0 + Found TFI=1. +FREE trx = 0 TFI = 1 +- Selected UL slots: (TS=0)"....U..."(TS=7) +Using 1 slots for UL +- Assigning UL TS 4 +PDCH(TS 4, TRX 0): Attaching TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL), 2 TBFs, USFs = 03, TFIs = 00000003. +- Setting Control TS 4 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL) +Allocated TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 10, dl_slots = 00 +TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN +TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer 3169. diff --git a/tests/tbf/TbfTest.ok b/tests/tbf/TbfTest.ok index dc07fc7..f9dc63e 100644 --- a/tests/tbf/TbfTest.ok +++ b/tests/tbf/TbfTest.ok @@ -75,3 +75,15 @@ === start test_packet_access_rej_epdan === packet reject: 40 84 7f f7 6e e6 41 4b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b === end test_packet_access_rej_epdan === +=== start test_multi_trx_test === +=== start test_multi_trx_test_same_capacity === +=== end test_multi_trx_test_same_capacity === +=== start test_multi_trx_test_1_2_capacity === +=== end test_multi_trx_test_1_2_capacity === +=== start test_multi_trx_test_1_4_capacity === +=== end test_multi_trx_test_1_4_capacity === +=== start test_multi_trx_test_release_alloc === +=== end test_multi_trx_test_release_alloc === +=== start test_multi_trx_test_same_capacity_dl_ul_combined === +=== end test_multi_trx_test_same_capacity_dl_ul_combined === +=== end test_multi_trx_test === -- To view, visit https://gerrit.osmocom.org/1512 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I222c3340872ffa1dd6e8fabe5276d793e660f67d Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Jan 24 07:06:45 2017 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Tue, 24 Jan 2017 07:06:45 +0000 Subject: [PATCH] osmo-pcu[master]: Handle packet access reject during packet resource request In-Reply-To: References: Message-ID: Hello pravin, Harald Welte, Jenkins Builder, sivasankari, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1216 to look at the new patch set (#10). Handle packet access reject during packet resource request When Packet resource request is received, PCU will generate the packet access reject if no resources are present. The encoding is done based on section 7.1.3.2.1 and 8.1.2.5 of 44.060 version 7.27.0 Release 7. This patch also includes the test case to validate the generated packet access reject message. This patch is integration tested on Osmo-trx setup with Ettus B210 board and LG F70 MS with some simulation code changes in Osmo-pcu. Change-Id: I05ff25124b58905586caa0c0c37023d69724f121 --- M src/bts.cpp M src/gprs_rlcmac_sched.cpp M src/tbf.cpp M src/tbf.h M tests/tbf/TbfTest.cpp M tests/tbf/TbfTest.err M tests/tbf/TbfTest.ok 7 files changed, 398 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/16/1216/10 diff --git a/src/bts.cpp b/src/bts.cpp index b4e18e3..25cbc60 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -1356,8 +1356,12 @@ egprs_ms_class); ul_tbf = tbf_alloc_ul(bts_data(), trx_no(), ms_class, egprs_ms_class, tlli, ta, ms); - if (!ul_tbf) + + if (!ul_tbf) { + handle_tbf_reject(bts_data(), ms, tlli, + trx_no(), ts_no); return; + } /* set control ts to current MS's TS, until assignment complete */ LOGP(DRLCMAC, LOGL_DEBUG, "Change control TS to %d until assinment is complete.\n", ts_no); diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp index 8b27cac..3b940f4 100644 --- a/src/gprs_rlcmac_sched.cpp +++ b/src/gprs_rlcmac_sched.cpp @@ -56,7 +56,9 @@ *ul_ack_tbf = ul_tbf; if (ul_tbf->dl_ass_state == GPRS_RLCMAC_DL_ASS_SEND_ASS) *dl_ass_tbf = ul_tbf; - if (ul_tbf->ul_ass_state == GPRS_RLCMAC_UL_ASS_SEND_ASS) + if (ul_tbf->ul_ass_state == GPRS_RLCMAC_UL_ASS_SEND_ASS + || 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?" } @@ -136,8 +138,11 @@ * because they may kill the TBF when the CONTROL ACK is * received, thus preventing the others from being processed. */ - - if (tbf == ul_ass_tbf && tbf->direction == GPRS_RLCMAC_DL_TBF) + if (tbf == ul_ass_tbf && tbf->ul_ass_state == + GPRS_RLCMAC_UL_ASS_SEND_ASS_REJ) + msg = ul_ass_tbf->create_packet_access_reject(); + else if (tbf == ul_ass_tbf && tbf->direction == + GPRS_RLCMAC_DL_TBF) if (tbf->ul_ass_state == GPRS_RLCMAC_UL_ASS_SEND_ASS_REJ) msg = ul_ass_tbf->create_packet_access_reject(); diff --git a/src/tbf.cpp b/src/tbf.cpp index 33d94a8..0d28c5c 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -1174,6 +1174,10 @@ bitvec_free(packet_access_rej); ul_ass_state = GPRS_RLCMAC_UL_ASS_NONE; + /* Start Tmr only if it is UL TBF */ + if (direction == GPRS_RLCMAC_UL_TBF) + tbf_timer_start(this, 0, Treject_pacch); + return msg; } @@ -1403,3 +1407,39 @@ { return ts == control_ts; } + +struct gprs_rlcmac_ul_tbf *handle_tbf_reject(struct gprs_rlcmac_bts *bts, + GprsMs *ms, uint32_t tlli, uint8_t trx_no, uint8_t ts) +{ + struct gprs_rlcmac_ul_tbf *ul_tbf = NULL; + struct gprs_rlcmac_trx *trx = &bts->trx[trx_no]; + + ul_tbf = talloc(tall_pcu_ctx, struct gprs_rlcmac_ul_tbf); + if (!ul_tbf) + return ul_tbf; + + talloc_set_destructor(ul_tbf, ul_tbf_dtor); + new (ul_tbf) gprs_rlcmac_ul_tbf(bts->bts); + if (!ms) + ms = bts->bts->ms_alloc(0, 0); + + ms->set_tlli(tlli); + + llist_add(&ul_tbf->list(), &bts->bts->ul_tbfs()); + ul_tbf->bts->tbf_ul_created(); + ul_tbf->set_state(GPRS_RLCMAC_ASSIGN); + ul_tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); + + ul_tbf->set_ms(ms); + ul_tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF); + ul_tbf->ul_ass_state = GPRS_RLCMAC_UL_ASS_SEND_ASS_REJ; + ul_tbf->control_ts = ts; + ul_tbf->trx = trx; + ul_tbf->m_ctrs = rate_ctr_group_alloc(ul_tbf, &tbf_ctrg_desc, 0); + ul_tbf->m_ul_egprs_ctrs = rate_ctr_group_alloc(ul_tbf, + &tbf_ul_egprs_ctrg_desc, 0); + ul_tbf->m_ul_gprs_ctrs = rate_ctr_group_alloc(ul_tbf, + &tbf_ul_gprs_ctrg_desc, 0); + + return ul_tbf; +} diff --git a/src/tbf.h b/src/tbf.h index 0389595..09e3122 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -43,6 +43,7 @@ #define Tassign_agch 0,200000 /* waiting after IMM.ASS confirm */ #define Tassign_pacch 2,0 /* timeout for pacch assigment */ +#define Treject_pacch 0,2000 /* timeout for tbf reject for PRR*/ enum gprs_rlcmac_tbf_state { GPRS_RLCMAC_NULL = 0, /* new created TBF */ @@ -316,6 +317,9 @@ void tbf_free(struct gprs_rlcmac_tbf *tbf); +struct gprs_rlcmac_ul_tbf *handle_tbf_reject(struct gprs_rlcmac_bts *bts, + GprsMs *ms, uint32_t tlli, uint8_t trx_no, uint8_t ts_no); + int tbf_assign_control_ts(struct gprs_rlcmac_tbf *tbf); void tbf_timer_start(struct gprs_rlcmac_tbf *tbf, unsigned int T, diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index bebb6ef..17e0eb3 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -2833,6 +2833,114 @@ ARRAY_SIZE(default_categories), }; +static void test_packet_access_rej_prr_no_other_tbfs() +{ + BTS the_bts; + uint32_t fn = 2654218; + int ts_no = 7; + uint8_t trx_no = 0; + uint32_t tlli = 0xffeeddcc; + struct gprs_rlcmac_ul_tbf *ul_tbf = NULL; + + printf("=== start %s ===\n", __func__); + + setup_bts(&the_bts, ts_no, 4); + + int rc = 0; + + ul_tbf = handle_tbf_reject(the_bts.bts_data(), NULL, tlli, + trx_no, ts_no); + + OSMO_ASSERT(ul_tbf != 0); + + /* trigger packet access reject */ + uint8_t bn = fn2bn(fn); + + rc = gprs_rlcmac_rcv_rts_block(the_bts.bts_data(), + trx_no, ts_no, fn, bn); + + OSMO_ASSERT(rc == 0); + + ul_tbf->handle_timeout(); + + printf("=== end %s ===\n", __func__); +} + +static void test_packet_access_rej_prr() +{ + BTS the_bts; + uint32_t fn = 2654218; + uint16_t qta = 31; + int ts_no = 7; + uint8_t trx_no = 0; + RlcMacUplink_t ulreq = {0}; + Packet_Resource_Request_t *presreq = NULL; + uint8_t ms_class = 11; + uint8_t egprs_ms_class = 11; + uint32_t rach_fn = fn - 51; + uint32_t sba_fn = fn + 52; + uint32_t tlli = 0xffeeddcc; + MS_Radio_Access_capability_t *pmsradiocap = NULL; + Multislot_capability_t *pmultislotcap = NULL; + + printf("=== start %s ===\n", __func__); + + setup_bts(&the_bts, ts_no, 4); + + int rc = 0; + + /* + * Trigger rach till resources(USF) exhaust + */ + rc = the_bts.rcv_rach(0x78, rach_fn, qta, 0, + GSM_L1_BURST_TYPE_ACCESS_0); + rc = the_bts.rcv_rach(0x79, rach_fn, qta, 0, + GSM_L1_BURST_TYPE_ACCESS_0); + rc = the_bts.rcv_rach(0x7a, rach_fn, qta, 0, + GSM_L1_BURST_TYPE_ACCESS_0); + rc = the_bts.rcv_rach(0x7b, rach_fn, qta, 0, + GSM_L1_BURST_TYPE_ACCESS_0); + rc = the_bts.rcv_rach(0x7c, rach_fn, qta, 0, + GSM_L1_BURST_TYPE_ACCESS_0); + rc = the_bts.rcv_rach(0x7d, rach_fn, qta, 0, + GSM_L1_BURST_TYPE_ACCESS_0); + rc = the_bts.rcv_rach(0x7e, rach_fn, qta, 0, + GSM_L1_BURST_TYPE_ACCESS_0); + + /* fake a resource request */ + ulreq.u.MESSAGE_TYPE = MT_PACKET_RESOURCE_REQUEST; + presreq = &ulreq.u.Packet_Resource_Request; + presreq->PayloadType = GPRS_RLCMAC_CONTROL_BLOCK; + presreq->ID.UnionType = 1; /* != 0 */ + presreq->ID.u.TLLI = tlli; + presreq->Exist_MS_Radio_Access_capability = 1; + pmsradiocap = &presreq->MS_Radio_Access_capability; + pmsradiocap->Count_MS_RA_capability_value = 1; + pmsradiocap->MS_RA_capability_value[0].u.Content. + Exist_Multislot_capability = 1; + pmultislotcap = &pmsradiocap->MS_RA_capability_value[0]. + u.Content.Multislot_capability; + + pmultislotcap->Exist_GPRS_multislot_class = 1; + pmultislotcap->GPRS_multislot_class = ms_class; + if (egprs_ms_class) { + pmultislotcap->Exist_EGPRS_multislot_class = 1; + pmultislotcap->EGPRS_multislot_class = egprs_ms_class; + } + + send_ul_mac_block(&the_bts, trx_no, ts_no, &ulreq, sba_fn); + + /* trigger packet access reject */ + uint8_t bn = fn2bn(fn); + + rc = gprs_rlcmac_rcv_rts_block(the_bts.bts_data(), + trx_no, ts_no, fn, bn); + + OSMO_ASSERT(rc == 0); + + printf("=== end %s ===\n", __func__); +} + void test_packet_access_rej_epdan() { BTS the_bts; @@ -2900,6 +3008,8 @@ test_tbf_epdan_out_of_rx_window(); test_immediate_assign_rej(); test_packet_access_rej_epdan(); + test_packet_access_rej_prr(); + test_packet_access_rej_prr_no_other_tbfs(); if (getenv("TALLOC_REPORT_FULL")) talloc_report_full(tall_pcu_ctx, stderr); diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index 5f5456b..e5369a5 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -6908,3 +6908,230 @@ TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) append +MS requests UL TBF on RACH, so we provide one +ra=0x78 Fn=2654167 qta=31 is_11bit=0: +********** TBF starts here ********** +Allocating UL TBF: MS_CLASS=0/0 +Creating MS object, TLLI = 0x00000000 +Slot Allocation (Algorithm A) for class 0 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 4, because not enabled +- Skipping TS 5, because not enabled +- Skipping TS 6, because not enabled +- Assign uplink TS=7 TFI=0 USF=0 +PDCH(TS 7, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL), 1 TBFs, USFs = 01, TFIs = 00000001. +- Setting Control TS 7 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) +Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 +Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x78, Fn=2654167 (17,25,9) +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) + - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=0 USF=0 +Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 78 8b 29 07 00 c8 00 70 0b 2b 2b 2b 2b 2b 2b 2b +MS requests UL TBF on RACH, so we provide one +ra=0x79 Fn=2654167 qta=31 is_11bit=0: +********** TBF starts here ********** +Allocating UL TBF: MS_CLASS=0/0 +Creating MS object, TLLI = 0x00000000 +Slot Allocation (Algorithm A) for class 0 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 4, because not enabled +- Skipping TS 5, because not enabled +- Skipping TS 6, because not enabled +- Assign uplink TS=7 TFI=1 USF=1 +PDCH(TS 7, TRX 0): Attaching TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL), 2 TBFs, USFs = 03, TFIs = 00000003. +- Setting Control TS 7 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL) +Allocated TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 +Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 +TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW +TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START +TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x79, Fn=2654167 (17,25,9) +TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) + - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=1 USF=1 +Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 79 8b 29 07 00 c8 42 70 0b 2b 2b 2b 2b 2b 2b 2b +MS requests UL TBF on RACH, so we provide one +ra=0x7a Fn=2654167 qta=31 is_11bit=0: +********** TBF starts here ********** +Allocating UL TBF: MS_CLASS=0/0 +Creating MS object, TLLI = 0x00000000 +Slot Allocation (Algorithm A) for class 0 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 4, because not enabled +- Skipping TS 5, because not enabled +- Skipping TS 6, because not enabled +- Assign uplink TS=7 TFI=2 USF=2 +PDCH(TS 7, TRX 0): Attaching TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=NULL), 3 TBFs, USFs = 07, TFIs = 00000007. +- Setting Control TS 7 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=NULL) +Allocated TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 +Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 +TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW +TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START +TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7a, Fn=2654167 (17,25,9) +TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) + - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=2 USF=2 +Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 7a 8b 29 07 00 c8 84 70 0b 2b 2b 2b 2b 2b 2b 2b +MS requests UL TBF on RACH, so we provide one +ra=0x7b Fn=2654167 qta=31 is_11bit=0: +********** TBF starts here ********** +Allocating UL TBF: MS_CLASS=0/0 +Creating MS object, TLLI = 0x00000000 +Slot Allocation (Algorithm A) for class 0 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 4, because not enabled +- Skipping TS 5, because not enabled +- Skipping TS 6, because not enabled +- Assign uplink TS=7 TFI=3 USF=3 +PDCH(TS 7, TRX 0): Attaching TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=NULL), 4 TBFs, USFs = 0f, TFIs = 0000000f. +- Setting Control TS 7 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=NULL) +Allocated TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 +Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 +TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW +TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START +TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7b, Fn=2654167 (17,25,9) +TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) + - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=3 USF=3 +Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 7b 8b 29 07 00 c8 c6 70 0b 2b 2b 2b 2b 2b 2b 2b +MS requests UL TBF on RACH, so we provide one +ra=0x7c Fn=2654167 qta=31 is_11bit=0: +********** TBF starts here ********** +Allocating UL TBF: MS_CLASS=0/0 +Creating MS object, TLLI = 0x00000000 +Slot Allocation (Algorithm A) for class 0 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 4, because not enabled +- Skipping TS 5, because not enabled +- Skipping TS 6, because not enabled +- Assign uplink TS=7 TFI=4 USF=4 +PDCH(TS 7, TRX 0): Attaching TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=NULL), 5 TBFs, USFs = 1f, TFIs = 0000001f. +- Setting Control TS 7 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=NULL) +Allocated TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 +Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 +TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW +TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START +TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7c, Fn=2654167 (17,25,9) +TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) + - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=4 USF=4 +Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 7c 8b 29 07 00 c9 08 70 0b 2b 2b 2b 2b 2b 2b 2b +MS requests UL TBF on RACH, so we provide one +ra=0x7d Fn=2654167 qta=31 is_11bit=0: +********** TBF starts here ********** +Allocating UL TBF: MS_CLASS=0/0 +Creating MS object, TLLI = 0x00000000 +Slot Allocation (Algorithm A) for class 0 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 4, because not enabled +- Skipping TS 5, because not enabled +- Skipping TS 6, because not enabled +- Assign uplink TS=7 TFI=5 USF=5 +PDCH(TS 7, TRX 0): Attaching TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=NULL), 6 TBFs, USFs = 3f, TFIs = 0000003f. +- Setting Control TS 7 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=NULL) +Allocated TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 +Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 +TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW +TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START +TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7d, Fn=2654167 (17,25,9) +TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) + - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=5 USF=5 +Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 7d 8b 29 07 00 c9 4a 70 0b 2b 2b 2b 2b 2b 2b 2b +MS requests UL TBF on RACH, so we provide one +ra=0x7e Fn=2654167 qta=31 is_11bit=0: +********** TBF starts here ********** +Allocating UL TBF: MS_CLASS=0/0 +Creating MS object, TLLI = 0x00000000 +Slot Allocation (Algorithm A) for class 0 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 4, because not enabled +- Skipping TS 5, because not enabled +- Skipping TS 6, because not enabled +- Assign uplink TS=7 TFI=6 USF=6 +PDCH(TS 7, TRX 0): Attaching TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=NULL), 7 TBFs, USFs = 7f, TFIs = 0000007f. +- Setting Control TS 7 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=NULL) +Allocated TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 +Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 +TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW +TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START +TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7e, Fn=2654167 (17,25,9) +TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) + - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=6 USF=6 +Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 7e 8b 29 07 00 c9 8c 70 0b 2b 2b 2b 2b 2b 2b 2b +Got RLC block, coding scheme: CS-1, length: 23 (23)) ++++++++++++++++++++++++++ RX : Uplink Control Block +++++++++++++++++++++++++ +------------------------- RX : Uplink Control Block ------------------------- +MS requests UL TBF in packet resource request of single block, so we provide one: +MS requests UL TBF in packet resource request of single block, but there is no resource request scheduled! +MS supports EGPRS multislot class 11. +********** TBF starts here ********** +Allocating UL TBF: MS_CLASS=11/11 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 11 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 11 +Slot Allocation (Algorithm A) for class 11 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 4, because not enabled +- Skipping TS 5, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because no USF available +- Failed to allocate a TS, no USF available +No PDCH resource +Creating MS object, TLLI = 0x00000000 +Modifying MS object, UL TLLI: 0x00000000 -> 0xffeeddcc, not yet confirmed +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN +Attaching TBF to MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) +Received RTS for PDCH: TRX=0 TS=7 FN=2654218 block_nr=8 scheduling USF=0 for required uplink resource of UL TFI=0 +TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) starting timer 0. +Scheduling control message at RTS for TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) (TRX=0, TS=7) +Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654218 block=8 data=40 84 7f f7 6e e6 41 4b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Destroying MS object, TLLI = 0x00000000 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, UL TLLI: 0x00000000 -> 0xffeeddcc, not yet confirmed +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN +Attaching TBF to MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) +TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) starting timer 0. +Scheduling control message at RTS for TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) (TRX=0, TS=7) +Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654218 block=8 data=47 84 7f f7 6e e6 41 4b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) timer 0 expired. +TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) releasing due to PACCH assignment timeout. +TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) free +TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) stopping timer 0. +Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) +Destroying MS object, TLLI = 0xffeeddcc +********** TBF ends here ********** diff --git a/tests/tbf/TbfTest.ok b/tests/tbf/TbfTest.ok index dc07fc7..aa3194c 100644 --- a/tests/tbf/TbfTest.ok +++ b/tests/tbf/TbfTest.ok @@ -75,3 +75,7 @@ === start test_packet_access_rej_epdan === packet reject: 40 84 7f f7 6e e6 41 4b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b === end test_packet_access_rej_epdan === +=== start test_packet_access_rej_prr === +=== end test_packet_access_rej_prr === +=== start test_packet_access_rej_prr_no_other_tbfs === +=== end test_packet_access_rej_prr_no_other_tbfs === -- To view, visit https://gerrit.osmocom.org/1216 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I05ff25124b58905586caa0c0c37023d69724f121 Gerrit-PatchSet: 10 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: pravin Gerrit-Reviewer: sivasankari From gerrit-no-reply at lists.osmocom.org Tue Jan 24 09:09:08 2017 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Tue, 24 Jan 2017 09:09:08 +0000 Subject: osmo-pcu[master]: Enable padding support for retransmission in EGPRS DL TBF In-Reply-To: References: Message-ID: Patch Set 2: Hi Max, To test this scenario, you need to take this patch and merge it into latest master. Later, you need to simulate the scenario where in, you need to make all fresh transmission as MCS8 for all BSNs and drop it(manually set the status as NACKED). While re-transmission you need to hard code the MCS as 3(this causes the padding scenario). If you are able to see any data rate or even PS attach, this proves the BTS or L1 supports padding case( you can also enable the PCU logs for TBF-DL and TBF and analyse) -- To view, visit https://gerrit.osmocom.org/1513 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idaf956244aa029c4bef70ecf94163044a3c85f59 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 24 09:40:56 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 24 Jan 2017 09:40:56 +0000 Subject: osmo-bts[master]: deb: use gsm_data_shared.* from openbsc-dev In-Reply-To: References: Message-ID: Patch Set 1: Maybe keep the package as native and make --with-openbsc work? -- To view, visit https://gerrit.osmocom.org/1636 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iec6b0f0eb0b7fffaa814c9769c0ee777d641a07f Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 24 09:50:29 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 24 Jan 2017 09:50:29 +0000 Subject: osmo-bts[master]: deb: use gsm_data_shared.* from openbsc-dev In-Reply-To: References: Message-ID: Patch Set 1: Please revert: * It breaks git-buildpackage and we want native packages (right now) * The include is already relative and works with the --with-openbsc= configure macro * The issue is that openbsc-dev doesn't keep the structure (openbsc/openbsc/..) inherited from svn/project layout. I think that should be fixed. -- To view, visit https://gerrit.osmocom.org/1636 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iec6b0f0eb0b7fffaa814c9769c0ee777d641a07f Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 24 09:50:52 2017 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Tue, 24 Jan 2017 09:50:52 +0000 Subject: osmo-pcu[master]: Handle packet access reject during packet resource request In-Reply-To: References: Message-ID: Patch Set 10: rebased to latest master -- To view, visit https://gerrit.osmocom.org/1216 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I05ff25124b58905586caa0c0c37023d69724f121 Gerrit-PatchSet: 10 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: pravin Gerrit-Reviewer: sivasankari Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 24 10:25:24 2017 From: gerrit-no-reply at lists.osmocom.org (sivasankari) Date: Tue, 24 Jan 2017 10:25:24 +0000 Subject: [PATCH] osmo-pcu[master]: Add test case for testing PUAN In-Reply-To: References: Message-ID: Hello arvind.sirsikar, Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/414 to look at the new patch set (#6). Add test case for testing PUAN This test case is for testing generation of EGPRS PUAN. Corresponding log files .ok and .err are modified. Change-Id: I18e6d4a9e90fd6453fe14187beab27dfeae8dbe9 --- M src/rlc.h M tests/tbf/TbfTest.cpp M tests/tbf/TbfTest.err M tests/tbf/TbfTest.ok 4 files changed, 2,390 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/14/414/6 diff --git a/src/rlc.h b/src/rlc.h index 7db205d..ee86c2a 100644 --- a/src/rlc.h +++ b/src/rlc.h @@ -341,6 +341,9 @@ const uint16_t v_r() const; const uint16_t v_q() const; + const void set_v_r(int); + const void set_v_q(int); + const uint16_t ssn() const; bool is_in_window(uint16_t bsn) const; @@ -571,6 +574,16 @@ return is_in_window(bsn) && m_v_n.is_received(bsn) && offset_v_r < ws(); } +inline const void gprs_rlc_ul_window::set_v_r(int v_r) +{ + m_v_r = v_r; +} + +inline const void gprs_rlc_ul_window::set_v_q(int v_q) +{ + m_v_q = v_q; +} + inline const uint16_t gprs_rlc_ul_window::v_r() const { return m_v_r; diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index bebb6ef..7f4c6ac 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -1215,6 +1215,348 @@ return ul_tbf; } +static gprs_rlcmac_ul_tbf *establish_ul_tbf(BTS *the_bts, + uint8_t ts_no, uint32_t tlli, uint32_t *fn, uint16_t qta, + uint8_t ms_class, uint8_t egprs_ms_class) +{ + GprsMs *ms; + uint32_t rach_fn = *fn - 51; + uint32_t sba_fn = *fn + 52; + uint8_t trx_no = 0; + int tfi = 0, i = 0; + gprs_rlcmac_ul_tbf *ul_tbf; + struct gprs_rlcmac_pdch *pdch; + gprs_rlcmac_bts *bts; + RlcMacUplink_t ulreq = {0}; + struct pcu_l1_meas meas; + struct gprs_rlc_ul_header_egprs_3 *egprs3 = NULL; + GprsCodingScheme cs; + + meas.set_rssi(31); + bts = the_bts->bts_data(); + + /* needed to set last_rts_fn in the PDCH object */ + request_dl_rlc_block(bts, trx_no, ts_no, fn); + + /* + * simulate RACH, this sends an Immediate + * Assignment Uplink on the AGCH + */ + the_bts->rcv_rach(0x73, rach_fn, qta, 0, GSM_L1_BURST_TYPE_ACCESS_0); + + /* get next free TFI */ + tfi = the_bts->tfi_find_free(GPRS_RLCMAC_UL_TBF, &trx_no, -1); + + /* fake a resource request */ + ulreq.u.MESSAGE_TYPE = MT_PACKET_RESOURCE_REQUEST; + ulreq.u.Packet_Resource_Request.PayloadType = GPRS_RLCMAC_CONTROL_BLOCK; + ulreq.u.Packet_Resource_Request.ID.UnionType = 1; /* != 0 */ + ulreq.u.Packet_Resource_Request.ID.u.TLLI = tlli; + ulreq.u.Packet_Resource_Request.Exist_MS_Radio_Access_capability = 1; + ulreq.u.Packet_Resource_Request.MS_Radio_Access_capability. + Count_MS_RA_capability_value = 1; + ulreq.u.Packet_Resource_Request.MS_Radio_Access_capability. + MS_RA_capability_value[0].u.Content. + Exist_Multislot_capability = 1; + ulreq.u.Packet_Resource_Request.MS_Radio_Access_capability. + MS_RA_capability_value[0].u.Content.Multislot_capability. + Exist_GPRS_multislot_class = 1; + ulreq.u.Packet_Resource_Request.MS_Radio_Access_capability. + MS_RA_capability_value[0].u.Content.Multislot_capability. + GPRS_multislot_class = ms_class; + if (egprs_ms_class) { + ulreq.u.Packet_Resource_Request.MS_Radio_Access_capability. + MS_RA_capability_value[0].u.Content. + Multislot_capability.Exist_EGPRS_multislot_class = 1; + ulreq.u.Packet_Resource_Request.MS_Radio_Access_capability. + MS_RA_capability_value[0].u.Content. + Multislot_capability.EGPRS_multislot_class = ms_class; + } + send_ul_mac_block(the_bts, trx_no, ts_no, &ulreq, sba_fn); + + /* check the TBF */ + ul_tbf = the_bts->ul_tbf_by_tfi(tfi, trx_no, ts_no); + /* send packet uplink assignment */ + *fn = sba_fn; + request_dl_rlc_block(ul_tbf, fn); + + /* send real acknowledgement */ + send_control_ack(ul_tbf); + + check_tbf(ul_tbf); + + return ul_tbf; +} + +static gprs_rlcmac_ul_tbf *establish_ul_tbf_two_phase_puan_URBB_no_length(BTS *the_bts, + uint8_t ts_no, uint32_t tlli, uint32_t *fn, uint16_t qta, + uint8_t ms_class, uint8_t egprs_ms_class, gprs_rlcmac_ul_tbf *ul_tbf) +{ + OSMO_ASSERT(ul_tbf); + OSMO_ASSERT(ul_tbf->ta() == qta / 4); + GprsMs *ms; + uint32_t rach_fn = *fn - 51; + uint32_t sba_fn = *fn + 52; + uint8_t trx_no = 0; + int tfi = 0, i = 0; + struct gprs_rlcmac_pdch *pdch; + gprs_rlcmac_bts *bts; + RlcMacUplink_t ulreq = {0}; + struct pcu_l1_meas meas; + struct gprs_rlc_ul_header_egprs_3 *egprs3 = NULL; + GprsCodingScheme cs; + + + /* send fake data with cv=0*/ + struct gprs_rlc_ul_header_egprs_3 *hdr3 = NULL; + uint8_t data[49] = {0}; + + hdr3 = (struct gprs_rlc_ul_header_egprs_3 *)data; + + /*header_construction */ + memset(data, 0x2b, sizeof(data)); + /* Message with CRBB */ + for (int i = 0 ; i < 80; i++) { + hdr3->r = 0; + hdr3->si = 0; + hdr3->cv = 10; + hdr3->tfi_hi = (tfi >> 3) & 0x3; + hdr3->tfi_lo = tfi & 0x7; + hdr3->bsn1_hi = ((i * 2)&0x1f); + hdr3->bsn1_lo = ((i * 2)/32); + hdr3->cps_hi = 0; + hdr3->cps_lo = 0; + hdr3->spb = 0; + hdr3->rsb = 0; + hdr3->pi = 0; + hdr3->spare = 0; + hdr3->dummy = 1; + data[4] = 0x0; + data[5] = 0x0; + data[6] = 0x2b; + data[7] = 0x2b; + pdch = &the_bts->bts_data()->trx[trx_no].pdch[ts_no]; + pdch->rcv_block(&data[0], sizeof(data), *fn, &meas); + } + ul_tbf->create_ul_ack(*fn, ts_no); + memset(data, 0x2b, sizeof(data)); + hdr3 = (struct gprs_rlc_ul_header_egprs_3 *)data; + hdr3->r = 0; + hdr3->si = 0; + hdr3->cv = 0; + hdr3->tfi_hi = (tfi >> 3) & 0x3; + hdr3->tfi_lo = tfi & 0x7; + hdr3->bsn1_hi = 0; + hdr3->bsn1_lo = 2; + hdr3->cps_hi = 0; + hdr3->cps_lo = 0; + hdr3->spb = 0; + hdr3->rsb = 0; + hdr3->pi = 0; + hdr3->spare = 0; + hdr3->dummy = 1; + data[4] = 0x0; + data[5] = 0x2b; + data[6] = 0x2b; + data[7] = 0x2b; + + pdch = &the_bts->bts_data()->trx[trx_no].pdch[ts_no]; + pdch->rcv_block(&data[0], sizeof(data), *fn, &meas); + + request_dl_rlc_block(ul_tbf, fn); + + check_tbf(ul_tbf); + OSMO_ASSERT(ul_tbf->ul_ack_state == GPRS_RLCMAC_UL_ACK_NONE); + + ms = the_bts->ms_by_tlli(tlli); + OSMO_ASSERT(ms != NULL); + OSMO_ASSERT(ms->ta() == qta/4); + OSMO_ASSERT(ms->ul_tbf() == ul_tbf); + + return ul_tbf; +} + +static gprs_rlcmac_ul_tbf *establish_ul_tbf_two_phase_puan_URBB_with_length(BTS *the_bts, + uint8_t ts_no, uint32_t tlli, uint32_t *fn, uint16_t qta, + uint8_t ms_class, uint8_t egprs_ms_class, gprs_rlcmac_ul_tbf *ul_tbf) +{ + OSMO_ASSERT(ul_tbf); + OSMO_ASSERT(ul_tbf->ta() == qta / 4); + GprsMs *ms; + uint32_t rach_fn = *fn - 51; + uint32_t sba_fn = *fn + 52; + uint8_t trx_no = 0; + int tfi = 0, i = 0; + struct gprs_rlcmac_pdch *pdch; + gprs_rlcmac_bts *bts; + RlcMacUplink_t ulreq = {0}; + struct pcu_l1_meas meas; + struct gprs_rlc_ul_header_egprs_3 *egprs3 = NULL; + GprsCodingScheme cs; + + check_tbf(ul_tbf); + /* send fake data with cv=0*/ + struct gprs_rlc_ul_header_egprs_3 *hdr3 = NULL; + uint8_t data[49] = {0}; + + hdr3 = (struct gprs_rlc_ul_header_egprs_3 *)data; + + /*header_construction */ + memset(data, 0x2b, sizeof(data)); + + /* Message with URBB & URBB length */ + for (int i = 0 ; i < 20; i++) { + hdr3->r = 0; + hdr3->si = 0; + hdr3->cv = 10; + hdr3->tfi_hi = (tfi >> 3) & 0x3; + hdr3->tfi_lo = tfi & 0x7; + hdr3->bsn1_hi = ((i * 2)&0x1f); + hdr3->bsn1_lo = ((i * 2)/32); + hdr3->cps_hi = 0; + hdr3->cps_lo = 0; + hdr3->spb = 0; + hdr3->rsb = 0; + hdr3->pi = 0; + hdr3->spare = 0; + hdr3->dummy = 1; + data[4] = 0x0; + data[5] = 0x0; + data[6] = 0x2b; + data[7] = 0x2b; + pdch = &the_bts->bts_data()->trx[trx_no].pdch[ts_no]; + pdch->rcv_block(&data[0], sizeof(data), *fn, &meas); + } + ul_tbf->create_ul_ack(*fn, ts_no); + memset(data, 0x2b, sizeof(data)); + hdr3 = (struct gprs_rlc_ul_header_egprs_3 *)data; + hdr3->r = 0; + hdr3->si = 0; + hdr3->cv = 0; + hdr3->tfi_hi = (tfi >> 3) & 0x3; + hdr3->tfi_lo = tfi & 0x7; + hdr3->bsn1_hi = 0; + hdr3->bsn1_lo = 2; + hdr3->cps_hi = 0; + hdr3->cps_lo = 0; + hdr3->spb = 0; + hdr3->rsb = 0; + hdr3->pi = 0; + hdr3->spare = 0; + hdr3->dummy = 1; + data[4] = 0x0; + data[5] = 0x2b; + data[6] = 0x2b; + data[7] = 0x2b; + + pdch = &the_bts->bts_data()->trx[trx_no].pdch[ts_no]; + pdch->rcv_block(&data[0], sizeof(data), *fn, &meas); + + request_dl_rlc_block(ul_tbf, fn); + + check_tbf(ul_tbf); + OSMO_ASSERT(ul_tbf->ul_ack_state == GPRS_RLCMAC_UL_ACK_NONE); + + ms = the_bts->ms_by_tlli(tlli); + OSMO_ASSERT(ms != NULL); + OSMO_ASSERT(ms->ta() == qta/4); + OSMO_ASSERT(ms->ul_tbf() == ul_tbf); + + return ul_tbf; +} + +static gprs_rlcmac_ul_tbf *establish_ul_tbf_two_phase_puan_CRBB(BTS *the_bts, + uint8_t ts_no, uint32_t tlli, uint32_t *fn, uint16_t qta, + uint8_t ms_class, uint8_t egprs_ms_class) +{ + GprsMs *ms; + uint32_t rach_fn = *fn - 51; + uint32_t sba_fn = *fn + 52; + uint8_t trx_no = 0; + int tfi = 0, i = 0; + gprs_rlcmac_ul_tbf *ul_tbf; + struct gprs_rlcmac_pdch *pdch; + gprs_rlcmac_bts *bts; + RlcMacUplink_t ulreq = {0}; + struct pcu_l1_meas meas; + struct gprs_rlc_ul_header_egprs_3 *egprs3 = NULL; + GprsCodingScheme cs; + + + /* check the TBF */ + ul_tbf = the_bts->ul_tbf_by_tfi(tfi, trx_no, ts_no); + OSMO_ASSERT(ul_tbf); + OSMO_ASSERT(ul_tbf->ta() == qta / 4); + + /* send fake data with cv=0*/ + struct gprs_rlc_ul_header_egprs_3 *hdr3 = NULL; + uint8_t data[49] = {0}; + + hdr3 = (struct gprs_rlc_ul_header_egprs_3 *)data; + + /*header_construction */ + memset(data, 0x2b, sizeof(data)); + + /* Message with CRBB */ + for (int i = 80 ; i < 160; i++) { + hdr3->r = 0; + hdr3->si = 0; + hdr3->cv = 10; + hdr3->tfi_hi = (tfi >> 3) & 0x3; + hdr3->tfi_lo = tfi & 0x7; + hdr3->bsn1_hi = ((i)&0x1f); + hdr3->bsn1_lo = ((i)/32); + hdr3->cps_hi = 0; + hdr3->cps_lo = 0; + hdr3->spb = 0; + hdr3->rsb = 0; + hdr3->pi = 0; + hdr3->spare = 0; + hdr3->dummy = 1; + data[4] = 0x0; + data[5] = 0x0; + data[6] = 0x2b; + data[7] = 0x2b; + pdch = &the_bts->bts_data()->trx[trx_no].pdch[ts_no]; + pdch->rcv_block(&data[0], sizeof(data), *fn, &meas); + } + ul_tbf->create_ul_ack(*fn, ts_no); + memset(data, 0x2b, sizeof(data)); + hdr3 = (struct gprs_rlc_ul_header_egprs_3 *)data; + hdr3->r = 0; + hdr3->si = 0; + hdr3->cv = 0; + hdr3->tfi_hi = (tfi >> 3) & 0x3; + hdr3->tfi_lo = tfi & 0x7; + hdr3->bsn1_hi = 0; + hdr3->bsn1_lo = 2; + hdr3->cps_hi = 0; + hdr3->cps_lo = 0; + hdr3->spb = 0; + hdr3->rsb = 0; + hdr3->pi = 0; + hdr3->spare = 0; + hdr3->dummy = 1; + data[4] = 0x0; + data[5] = 0x2b; + data[6] = 0x2b; + data[7] = 0x2b; + + pdch = &the_bts->bts_data()->trx[trx_no].pdch[ts_no]; + pdch->rcv_block(&data[0], sizeof(data), *fn, &meas); + + request_dl_rlc_block(ul_tbf, fn); + + check_tbf(ul_tbf); + OSMO_ASSERT(ul_tbf->ul_ack_state == GPRS_RLCMAC_UL_ACK_NONE); + + ms = the_bts->ms_by_tlli(tlli); + OSMO_ASSERT(ms != NULL); + OSMO_ASSERT(ms->ta() == qta/4); + OSMO_ASSERT(ms->ul_tbf() == ul_tbf); + + return ul_tbf; +} static gprs_rlcmac_ul_tbf *establish_ul_tbf_two_phase(BTS *the_bts, uint8_t ts_no, uint32_t tlli, uint32_t *fn, uint16_t qta, uint8_t ms_class, uint8_t egprs_ms_class) @@ -1372,6 +1714,73 @@ printf("=== end %s ===\n", __func__); } +static void test_tbf_egprs_two_phase_puan(void) +{ + BTS the_bts; + int ts_no = 7; + uint32_t fn = 2654218; + uint16_t qta = 31; + uint32_t tlli = 0xf1223344; + const char *imsi = "0011223344"; + uint8_t ms_class = 1; + gprs_rlcmac_bts *bts; + uint8_t egprs_ms_class = 1; + gprs_rlcmac_ul_tbf *ul_tbf; + GprsMs *ms; + uint8_t test_data[256]; + + printf("=== start %s ===\n", __func__); + + memset(test_data, 1, sizeof(test_data)); + + setup_bts(&the_bts, ts_no, 4); + the_bts.bts_data()->initial_mcs_dl = 9; + the_bts.bts_data()->egprs_enabled = 1; + bts = the_bts.bts_data(); + bts->ws_base = 128; + bts->ws_pdch = 64; + + ul_tbf = establish_ul_tbf(&the_bts, ts_no, tlli, &fn, qta, ms_class, egprs_ms_class); + /* Function to generate URBB with no length */ + ul_tbf = establish_ul_tbf_two_phase_puan_URBB_no_length(&the_bts, ts_no, tlli, &fn, + qta, ms_class, egprs_ms_class, ul_tbf); + + ms = ul_tbf->ms(); + fprintf(stderr, "Got '%s', TA=%d\n", ul_tbf->name(), ul_tbf->ta()); + fprintf(stderr, + "Got MS: TLLI = 0x%08x, TA = %d\n", ms->tlli(), ms->ta()); + send_dl_data(&the_bts, tlli, imsi, test_data, sizeof(test_data)); + + ul_tbf->m_window.set_v_r(0); + ul_tbf->m_window.set_v_q(0); + /* Function to generate URBB with length */ + ul_tbf = establish_ul_tbf_two_phase_puan_URBB_with_length(&the_bts, ts_no, tlli, &fn, + qta, ms_class, egprs_ms_class, ul_tbf); + + ms = ul_tbf->ms(); + fprintf(stderr, "Got '%s', TA=%d\n", ul_tbf->name(), ul_tbf->ta()); + fprintf(stderr, + "Got MS: TLLI = 0x%08x, TA = %d\n", ms->tlli(), ms->ta()); + + send_dl_data(&the_bts, tlli, imsi, test_data, sizeof(test_data)); + + ul_tbf->m_window.set_v_r(0); + ul_tbf->m_window.set_v_q(0); + /* Function to generate CRBB */ + bts->ws_base = 128; + bts->ws_pdch = 64; + ul_tbf = establish_ul_tbf_two_phase_puan_CRBB(&the_bts, ts_no, tlli, &fn, + qta, ms_class, egprs_ms_class); + + ms = ul_tbf->ms(); + fprintf(stderr, "Got '%s', TA=%d\n", ul_tbf->name(), ul_tbf->ta()); + fprintf(stderr, + "Got MS: TLLI = 0x%08x, TA = %d\n", ms->tlli(), ms->ta()); + + send_dl_data(&the_bts, tlli, imsi, test_data, sizeof(test_data)); + + printf("=== end %s ===\n", __func__); +} /* * Trigger rach for single block */ @@ -2899,6 +3308,7 @@ test_tbf_li_decoding(); test_tbf_epdan_out_of_rx_window(); test_immediate_assign_rej(); + test_tbf_egprs_two_phase_puan(); test_packet_access_rej_epdan(); if (getenv("TALLOC_REPORT_FULL")) diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index 5f5456b..f0c3427 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -6884,6 +6884,1971 @@ No PDCH available. No PDCH resource for single block allocation.sending Immediate Assignment Uplink (AGCH) reject Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=4d 06 3a 10 70 8b 29 14 70 8b 29 14 70 8b 29 14 70 8b 29 14 0b 2b 2b +Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654218 block=8 data=47 94 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +MS requests UL TBF on RACH, so we provide one +ra=0x73 Fn=2654167 qta=31 is_11bit=0: +MS requests single block allocation +RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x73, Fn=2654167 (17,25,9), SBFn=2654270 +TX: Immediate Assignment Uplink (AGCH) + - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=-1 USF=7 +Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 73 8b 29 07 00 c0 0c 5a 43 2b 2b 2b 2b 2b 2b 2b +Searching for first unallocated TFI: TRX=0 + Found TFI=0. +Got RLC block, coding scheme: CS-1, length: 23 (23)) ++++++++++++++++++++++++++ RX : Uplink Control Block +++++++++++++++++++++++++ +------------------------- RX : Uplink Control Block ------------------------- +MS requests UL TBF in packet resource request of single block, so we provide one: +MS supports EGPRS multislot class 1. +********** TBF starts here ********** +Allocating UL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +Enabled EGPRS for TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS), mode EGPRS +Slot Allocation (Algorithm A) for class 1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 4, because not enabled +- Skipping TS 5, because not enabled +- Skipping TS 6, because not enabled +- Assign uplink TS=7 TFI=0 USF=0 +PDCH(TS 7, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS), 1 TBFs, USFs = 01, TFIs = 00000001. +- Setting Control TS 7 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) +Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 00 +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): Setting EGPRS window size to 192, base(128) slots(1) ws_pdch(64) +ws(192) +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer 3169. +Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed +Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 +Change control TS to 7 until assinment is complete. +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS)s start Packet Uplink Assignment (PACCH) ++++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ +------------------------- TX : Packet Uplink Assignment ------------------------- +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS): Scheduling polling at FN 2654283 TS 7 +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) Scheduled UL Assignment polling on FN=2654283, TS=7 +Scheduling control message at RTS for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) (TRX=0, TS=7) +Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654270 block=8 data=4f 28 5e 24 46 68 90 f9 0a 39 00 00 88 00 08 2b 2b 2b 2b 2b 2b 2b 2b +Got RLC block, coding scheme: CS-1, length: 23 (23)) ++++++++++++++++++++++++++ RX : Uplink Control Block +++++++++++++++++++++++++ +------------------------- RX : Uplink Control Block ------------------------- +RX: [PCU <- BTS] TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) Packet Control Ack +TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) changes state from ASSIGN to FLOW +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 00 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 0 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 1 +- Taking block 0 out, raising V(Q) to 1 +- Assembling frames: (len=44) +-- Frame 1 starts at offset 0, length=44, is_complete=0 +- No gaps in received block, last block: BSN=0 CV=10 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 10 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=1) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=2, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 2 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 3 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 20 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=3) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=4, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 4 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 5 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 30 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=5) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=6, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 6 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 7 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 40 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=7) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=8, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 8 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 9 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 50 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=9) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=10, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 10 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 11 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 60 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=11) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=12, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 12 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 13 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 70 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=13) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=14, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 14 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 15 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 80 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=15) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=16, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 16 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 17 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 90 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=17) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=18, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 18 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 19 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 a0 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=19) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=20, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 20 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 21 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 b0 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=21) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=22, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 22 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 23 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 c0 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=23) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=24, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 24 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 25 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 d0 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=25) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=26, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 26 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 27 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 e0 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=27) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=28, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 28 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 29 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 f0 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=29) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=30, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 30 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 31 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 00 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=31) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=32, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 32 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 33 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 10 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=33) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=34, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 34 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 35 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 20 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=35) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=36, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 36 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 37 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 30 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=37) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=38, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 38 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 39 +- Scheduling Ack/Nack, because 20 frames received. +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 40 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=39) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=40, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 40 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 41 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 50 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=41) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=42, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 42 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 43 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 60 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=43) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=44, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 44 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 45 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 70 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=45) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=46, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 46 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 47 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 80 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=47) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=48, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 48 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 49 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 90 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=49) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=50, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 50 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 51 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 a0 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=51) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=52, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 52 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 53 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 b0 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=53) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=54, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 54 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 55 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 c0 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=55) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=56, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 56 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 57 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 d0 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=57) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=58, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 58 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 59 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 e0 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=59) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=60, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 60 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 61 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 f0 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=61) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=62, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 62 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 63 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 00 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=63) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=64, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 64 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 65 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 10 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=65) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=66, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 66 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 67 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 20 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=67) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=68, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 68 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 69 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 30 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=69) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=70, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 70 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 71 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 40 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=71) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=72, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 72 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 73 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 50 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=73) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=74, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 74 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 75 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 60 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=75) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=76, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 76 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 77 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 70 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=77) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=78, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 78 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 79 +- Scheduling Ack/Nack, because 20 frames received. +- Sending Ack/Nack is already triggered, don't schedule! +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 80 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=79) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=80, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 80 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 81 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 90 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=81) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=82, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 82 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 83 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 a0 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=83) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=84, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 84 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 85 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 b0 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=85) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=86, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 86 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 87 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 c0 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=87) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=88, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 88 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 89 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 d0 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=89) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=90, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 90 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 91 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 e0 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=91) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=92, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 92 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 93 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 f0 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=93) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=94, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 94 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 95 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 00 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=95) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=96, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 96 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 97 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 10 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=97) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=98, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 98 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 99 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 20 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=99) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=100, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 100 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 101 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 30 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=101) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=102, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 102 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 103 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 40 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=103) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=104, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 104 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 105 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 50 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=105) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=106, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 106 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 107 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 60 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=107) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=108, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 108 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 109 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 70 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=109) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=110, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 110 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 111 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 80 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=111) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=112, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 112 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 113 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 90 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=113) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=114, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 114 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 115 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 a0 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=115) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=116, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 116 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 117 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 b0 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=117) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=118, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 118 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 119 +- Scheduling Ack/Nack, because 20 frames received. +- Sending Ack/Nack is already triggered, don't schedule! +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 c0 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=119) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=120, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 120 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 121 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 d0 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=121) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=122, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 122 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 123 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 e0 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=123) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=124, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 124 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 125 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 f0 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=125) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=126, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 126 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 127 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 00 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=127) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=128, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 128 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 129 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 10 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=129) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=130, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 130 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 131 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 20 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=131) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=132, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 132 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 133 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 30 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=133) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=134, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 134 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 135 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 40 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=135) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=136, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 136 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 137 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 50 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=137) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=138, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 138 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 139 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 60 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=139) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=140, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 140 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 141 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 70 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=141) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=142, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 142 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 143 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 80 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=143) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=144, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 144 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 145 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 90 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=145) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=146, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 146 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 147 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 a0 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=147) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=148, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 148 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 149 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 b0 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=149) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=150, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 150 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 151 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 c0 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=151) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=152, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 152 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 153 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 d0 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=153) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=154, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 154 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 155 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 e0 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=155) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=156, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 156 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 157 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 f0 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=157) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=158, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 158 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 159 +- Scheduling Ack/Nack, because 20 frames received. +- Sending Ack/Nack is already triggered, don't schedule! +Encoding Ack/Nack for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) (final=0) +rest_bits=94 uncompressed len 157 and uncompressed bitmap = aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa a8 +the ucmp len=157 uclen_crbb=19 num_blocks=157 crbb length 78, and the CRBB bitmap = 1e 1e 1e 1e 1e 1e 1e 1e 1e 1e +EGPRS URBB, urbb len = 94, SSN = 2, ESN_CRBB = 1, len present = No,desc len = 109, SNS = 2048, WS = 192, V(Q) = 1, V(R) = 159, BOW +Uplink Ack/Nack bit count 184, max 184, message = 40 24 01 3f 3e 24 46 68 90 20 04 55 55 55 55 55 55 55 55 55 55 55 54 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 00 00 02 80 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=159) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=0, BSN=64, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 64 already received +Received RTS for PDCH: TRX=0 TS=7 FN=2654275 block_nr=9 scheduling USF=0 for required uplink resource of UL TFI=0 +Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654275 block=9 data=40 94 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got 'TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS)', TA=7 +Got MS: TLLI = 0xf1223344, TA = 7 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Enabled EGPRS for TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS), mode EGPRS +Slot Allocation (Algorithm A) for class 0 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 4, because not enabled +- Skipping TS 5, because not enabled +- Skipping TS 6, because not enabled +- Assign downlink TS=7 TFI=0 +PDCH(TS 7, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS), 1 TBFs, USFs = 01, TFIs = 00000001. +- Setting Control TS 7 +Attaching TBF to MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) +Allocated TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 80 +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 192 +ws(192) +Modifying MS object, TLLI: 0xf1223344 confirmed +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) [DOWNLINK] START +Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' +Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) exists +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) changes state from NULL to ASSIGN +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) starting timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) append +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 00 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 0 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 1 +- Taking block 0 out, raising V(Q) to 1 +- Assembling frames: (len=44) +-- Frame 1 starts at offset 0, length=44, is_complete=0 +- No gaps in received block, last block: BSN=0 CV=10 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 10 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=1) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=2, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 2 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 3 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 20 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=3) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=4, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 4 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 5 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 30 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=5) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=6, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 6 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 7 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 40 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=7) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=8, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 8 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 9 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 50 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=9) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=10, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 10 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 11 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 60 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=11) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=12, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 12 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 13 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 70 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=13) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=14, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 14 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 15 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 80 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=15) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=16, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 16 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 17 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 90 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=17) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=18, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 18 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 19 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 a0 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=19) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=20, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 20 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 21 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 b0 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=21) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=22, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 22 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 23 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 c0 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=23) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=24, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 24 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 25 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 d0 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=25) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=26, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 26 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 27 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 e0 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=27) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=28, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 28 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 29 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 f0 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=29) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=30, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 30 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 31 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 00 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=31) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=32, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 32 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 33 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 10 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=33) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=34, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 34 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 35 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 20 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=35) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=36, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 36 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 37 +- Scheduling Ack/Nack, because 20 frames received. +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 30 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=37) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=38, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 38 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 39 +Encoding Ack/Nack for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) (final=0) +EGPRS URBB, urbb len = 37, SSN = 2, ESN_CRBB = 1, len present = yes,desc len = 52, SNS = 2048, WS = 192, V(Q) = 1, V(R) = 39, BOW, EOW +Uplink Ack/Nack bit count 135, max 184, message = 40 24 01 3f 3e 24 46 68 90 9a 30 04 aa aa aa aa a9 2b 2b 2b 2b 2b 2b +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 00 00 02 80 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=39) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=0, BSN=64, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 64 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 65 +Received RTS for PDCH: TRX=0 TS=7 FN=2654279 block_nr=10 scheduling USF=0 for required uplink resource of UL TFI=0 +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) start Packet Downlink Assignment (PACCH) ++++++++++++++++++++++++++ TX : Packet Downlink Assignment +++++++++++++++++++++++++ +------------------------- TX : Packet Downlink Assignment ------------------------- +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Scheduling polling at FN 2654292 TS 7 +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Scheduled DL Assignment polling on FN=2654292, TS=7 +Scheduling control message at RTS for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) (TRX=0, TS=7) +Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654279 block=10 data=48 08 00 00 0c 72 00 02 08 00 80 c8 03 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got 'TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS)', TA=7 +Got MS: TLLI = 0xf1223344, TA = 7 +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) append +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 80 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=80, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 80 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 81 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 88 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=81) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=81, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 81 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 82 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 90 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=82) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=82, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 82 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 83 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 98 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=83) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=83, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 83 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 84 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 a0 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=84) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=84, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 84 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 85 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 a8 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=85) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=85, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 85 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 86 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 b0 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=86) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=86, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 86 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 87 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 b8 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=87) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=87, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 87 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 88 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 c0 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=88) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=88, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 88 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 89 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 c8 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=89) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=89, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 89 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 90 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 d0 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=90) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=90, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 90 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 91 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 d8 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=91) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=91, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 91 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 92 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 e0 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=92) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=92, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 92 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 93 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 e8 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=93) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=93, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 93 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 94 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 f0 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=94) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=94, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 94 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 95 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 f8 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=95) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=95, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 95 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 96 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 00 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=96) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=96, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 96 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 97 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 08 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=97) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=97, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 97 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 98 +- Scheduling Ack/Nack, because 20 frames received. +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 10 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=98) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=98, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 98 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 99 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 18 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=99) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=99, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 99 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 100 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 20 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=100) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=100, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 100 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 101 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 28 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=101) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=101, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 101 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 102 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 30 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=102) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=102, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 102 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 103 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 38 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=103) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=103, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 103 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 104 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 40 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=104) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=104, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 104 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 105 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 48 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=105) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=105, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 105 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 106 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 50 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=106) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=106, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 106 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 107 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 58 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=107) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=107, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 107 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 108 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 60 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=108) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=108, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 108 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 109 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 68 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=109) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=109, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 109 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 110 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 70 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=110) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=110, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 110 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 111 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 78 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=111) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=111, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 111 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 112 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 80 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=112) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=112, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 112 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 113 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 88 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=113) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=113, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 113 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 114 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 90 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=114) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=114, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 114 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 115 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 98 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=115) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=115, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 115 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 116 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 a0 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=116) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=116, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 116 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 117 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 a8 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=117) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=117, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 117 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 118 +- Scheduling Ack/Nack, because 20 frames received. +- Sending Ack/Nack is already triggered, don't schedule! +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 b0 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=118) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=118, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 118 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 119 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 b8 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=119) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=119, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 119 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 120 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 c0 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=120) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=120, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 120 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 121 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 c8 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=121) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=121, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 121 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 122 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 d0 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=122) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=122, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 122 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 123 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 d8 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=123) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=123, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 123 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 124 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 e0 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=124) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=124, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 124 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 125 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 e8 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=125) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=125, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 125 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 126 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 f0 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=126) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=126, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 126 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 127 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 f8 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=127) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=127, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 127 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 128 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 00 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=128) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=128, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 128 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 129 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 08 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=129) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=129, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 129 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 130 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 10 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=130) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=130, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 130 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 131 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 18 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=131) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=131, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 131 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 132 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 20 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=132) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=132, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 132 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 133 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 28 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=133) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=133, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 133 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 134 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 30 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=134) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=134, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 134 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 135 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 38 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=135) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=135, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 135 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 136 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 40 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=136) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=136, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 136 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 137 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 48 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=137) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=137, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 137 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 138 +- Scheduling Ack/Nack, because 20 frames received. +- Sending Ack/Nack is already triggered, don't schedule! +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 50 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=138) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=138, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 138 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 139 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 58 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=139) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=139, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 139 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 140 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 60 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=140) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=140, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 140 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 141 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 68 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=141) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=141, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 141 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 142 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 70 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=142) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=142, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 142 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 143 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 78 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=143) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=143, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 143 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 144 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 80 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=144) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=144, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 144 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 145 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 88 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=145) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=145, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 145 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 146 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 90 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=146) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=146, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 146 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 147 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 98 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=147) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=147, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 147 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 148 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 a0 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=148) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=148, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 148 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 149 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 a8 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=149) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=149, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 149 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 150 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 b0 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=150) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=150, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 150 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 151 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 b8 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=151) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=151, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 151 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 152 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 c0 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=152) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=152, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 152 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 153 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 c8 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=153) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=153, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 153 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 154 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 d0 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=154) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=154, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 154 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 155 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 d8 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=155) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=155, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 155 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 156 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 e0 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=156) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=156, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 156 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 157 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 e8 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=157) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=157, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 157 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 158 +- Scheduling Ack/Nack, because 20 frames received. +- Sending Ack/Nack is already triggered, don't schedule! +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 f0 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=158) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=158, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 158 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 159 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 f8 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=159) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=159, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 159 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 160 +Encoding Ack/Nack for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) (final=0) +rest_bits=94 uncompressed len 159 and uncompressed bitmap = 00 00 00 00 00 00 00 00 00 01 ff ff ff ff ff ff ff ff ff fe +CRBB bitmap = 03 c3 1b a8 +the ucmp len=159 uclen_crbb=159 num_blocks=159 crbb length 30, and the CRBB bitmap = 03 c3 1b a8 +EGPRS CRBB, crbb_len = 30, crbb_start_clr_code = 0 +EGPRS URBB, urbb len = 0, SSN = 1, ESN_CRBB = 159, len present = yes,desc len = 53, SNS = 2048, WS = 192, V(Q) = 0, V(R) = 160, BOW, EOW +Uplink Ack/Nack bit count 136, max 184, message = 40 24 01 3f 3e 24 46 68 90 9a b0 03 3c 03 c3 1b a0 2b 2b 2b 2b 2b 2b +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 00 00 02 80 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=160) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=0, BSN=64, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 64 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +Received RTS for PDCH: TRX=0 TS=7 FN=2654283 block_nr=11 scheduling USF=0 for required uplink resource of UL TFI=0 +Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654283 block=11 data=40 94 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got 'TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS)', TA=7 +Got MS: TLLI = 0xf1223344, TA = 7 +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) append Searching for first unallocated TFI: TRX=0 Found TFI=0. ********** TBF starts here ********** diff --git a/tests/tbf/TbfTest.ok b/tests/tbf/TbfTest.ok index dc07fc7..d531437 100644 --- a/tests/tbf/TbfTest.ok +++ b/tests/tbf/TbfTest.ok @@ -72,6 +72,8 @@ === end test_immediate_assign_rej_multi_block === === start test_immediate_assign_rej_single_block === === end test_immediate_assign_rej_single_block === +=== start test_tbf_egprs_two_phase_puan === +=== end test_tbf_egprs_two_phase_puan === === start test_packet_access_rej_epdan === packet reject: 40 84 7f f7 6e e6 41 4b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b === end test_packet_access_rej_epdan === -- To view, visit https://gerrit.osmocom.org/414 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I18e6d4a9e90fd6453fe14187beab27dfeae8dbe9 Gerrit-PatchSet: 6 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: prasadkg Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: prasadkg Gerrit-Reviewer: pravin Gerrit-Reviewer: sivasankari From gerrit-no-reply at lists.osmocom.org Tue Jan 24 10:39:52 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 24 Jan 2017 10:39:52 +0000 Subject: [PATCH] osmo-bts[master]: Revert "deb: use gsm_data_shared.* from openbsc-dev" Message-ID: Review at https://gerrit.osmocom.org/1650 Revert "deb: use gsm_data_shared.* from openbsc-dev" As the Osmocom project is providing packages and we build them directly from git we should have native packages. openbsc-dev should provide files in the same directory structure as the git repository and then --with-openbsc=/usr/src/osmocom/openbsc/openbsc/include/openbsc can be used. Follow up patches are coming. This reverts commit 70b71507c27f8967b0aa31cad0b3070c6780f3b4. Change-Id: I8bc3a5c2b9446d9e94e362ed5d85a61e3a727f8b --- D debian/patches/01_location_of_gsm_data_shared.patch D debian/patches/series M debian/source/format 3 files changed, 1 insertion(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/50/1650/1 diff --git a/debian/patches/01_location_of_gsm_data_shared.patch b/debian/patches/01_location_of_gsm_data_shared.patch deleted file mode 100644 index b0a1499..0000000 --- a/debian/patches/01_location_of_gsm_data_shared.patch +++ /dev/null @@ -1,18 +0,0 @@ -From: Ruben Undheim -Date: Sat, 28 May 2016 09:38:56 +0200 -Subject: In order to build osmo-bts, - some files shared with openbsc needs to be available. This replaces - the search path for these files so that they are picked from the openbsc-dev - package. - ---- - src/common/gsm_data_shared.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/common/gsm_data_shared.c b/src/common/gsm_data_shared.c -index 706892d..932d71f 100644 ---- a/src/common/gsm_data_shared.c -+++ b/src/common/gsm_data_shared.c -@@ -1 +1 @@ --#include "../../../openbsc/openbsc/src/libcommon/gsm_data_shared.c" -+#include "/usr/src/osmocom/openbsc/libcommon/gsm_data_shared.c" diff --git a/debian/patches/series b/debian/patches/series deleted file mode 100644 index e753172..0000000 --- a/debian/patches/series +++ /dev/null @@ -1,2 +0,0 @@ -01_location_of_gsm_data_shared.patch - diff --git a/debian/source/format b/debian/source/format index 163aaf8..89ae9db 100644 --- a/debian/source/format +++ b/debian/source/format @@ -1 +1 @@ -3.0 (quilt) +3.0 (native) -- To view, visit https://gerrit.osmocom.org/1650 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8bc3a5c2b9446d9e94e362ed5d85a61e3a727f8b Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Tue Jan 24 10:39:45 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 24 Jan 2017 10:39:45 +0000 Subject: osmo-bts[master]: Revert "deb: use gsm_data_shared.* from openbsc-dev" In-Reply-To: References: Message-ID: Holger Freyther has reverted this change. Change subject: Revert "deb: use gsm_data_shared.* from openbsc-dev" ...................................................................... Uploaded patch set 1. -- To view, visit https://gerrit.osmocom.org/1650 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: revert Gerrit-Change-Id: I8bc3a5c2b9446d9e94e362ed5d85a61e3a727f8b Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Tue Jan 24 10:42:14 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 24 Jan 2017 10:42:14 +0000 Subject: [PATCH] openbsc[master]: CTRL: remove boilerplate In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1576 to look at the new patch set (#3). CTRL: remove boilerplate Use CTRL_CMD_DEFINE_WO() and CTRL_CMD_DEFINE_WO_NOVRF() where appropriate to get rid of boilerplate code. Change-Id: I5bcea0b4f4b8f535bef2b423f2013b8b4a218b5b --- M openbsc/src/libbsc/bsc_ctrl_commands.c M openbsc/src/libmsc/ctrl_commands.c M openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c M openbsc/tests/ctrl_test_runner.py 4 files changed, 9 insertions(+), 75 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/76/1576/3 diff --git a/openbsc/src/libbsc/bsc_ctrl_commands.c b/openbsc/src/libbsc/bsc_ctrl_commands.c index 7e84797..d1348e0 100644 --- a/openbsc/src/libbsc/bsc_ctrl_commands.c +++ b/openbsc/src/libbsc/bsc_ctrl_commands.c @@ -70,17 +70,6 @@ CTRL_CMD_VTY_STRING(net_short_name, "short-name", struct gsm_network, name_short); CTRL_CMD_VTY_STRING(net_long_name, "long-name", struct gsm_network, name_long); -static int verify_net_apply_config(struct ctrl_cmd *cmd, const char *v, void *d) -{ - return 0; -} - -static int get_net_apply_config(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Write only attribute"; - return CTRL_CMD_ERROR; -} - static int set_net_apply_config(struct ctrl_cmd *cmd, void *data) { struct gsm_network *net = cmd->node; @@ -107,7 +96,7 @@ return CTRL_CMD_REPLY; } -CTRL_CMD_DEFINE(net_apply_config, "apply-configuration"); +CTRL_CMD_DEFINE_WO_NOVRF(net_apply_config, "apply-configuration"); static int verify_net_mcc_mnc_apply(struct ctrl_cmd *cmd, const char *value, void *d) { @@ -124,12 +113,6 @@ if (!mcc || !mnc) return 1; return 0; -} - -static int get_net_mcc_mnc_apply(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Write only attribute"; - return CTRL_CMD_ERROR; } static int set_net_mcc_mnc_apply(struct ctrl_cmd *cmd, void *data) @@ -165,22 +148,11 @@ cmd->reply = "OOM"; return CTRL_CMD_ERROR; } -CTRL_CMD_DEFINE(net_mcc_mnc_apply, "mcc-mnc-apply"); +CTRL_CMD_DEFINE_WO(net_mcc_mnc_apply, "mcc-mnc-apply"); /* BTS related commands below */ CTRL_CMD_DEFINE_RANGE(bts_lac, "location-area-code", struct gsm_bts, location_area_code, 0, 65535); CTRL_CMD_DEFINE_RANGE(bts_ci, "cell-identity", struct gsm_bts, cell_identity, 0, 65535); - -static int verify_bts_apply_config(struct ctrl_cmd *cmd, const char *v, void *d) -{ - return 0; -} - -static int get_bts_apply_config(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Write only attribute"; - return CTRL_CMD_ERROR; -} static int set_bts_apply_config(struct ctrl_cmd *cmd, void *data) { @@ -196,18 +168,7 @@ return CTRL_CMD_REPLY; } -CTRL_CMD_DEFINE(bts_apply_config, "apply-configuration"); - -static int verify_bts_si(struct ctrl_cmd *cmd, const char *v, void *d) -{ - return 0; -} - -static int get_bts_si(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Write only attribute"; - return CTRL_CMD_ERROR; -} +CTRL_CMD_DEFINE_WO_NOVRF(bts_apply_config, "apply-configuration"); static int set_bts_si(struct ctrl_cmd *cmd, void *data) { @@ -223,7 +184,7 @@ cmd->reply = "Generated new System Information"; return CTRL_CMD_REPLY; } -CTRL_CMD_DEFINE(bts_si, "send-new-system-informations"); +CTRL_CMD_DEFINE_WO_NOVRF(bts_si, "send-new-system-informations"); static int verify_bts_chan_load(struct ctrl_cmd *cmd, const char *v, void *d) { diff --git a/openbsc/src/libmsc/ctrl_commands.c b/openbsc/src/libmsc/ctrl_commands.c index 79e136d..24b68fa 100644 --- a/openbsc/src/libmsc/ctrl_commands.c +++ b/openbsc/src/libmsc/ctrl_commands.c @@ -74,12 +74,6 @@ return rc; } -static int get_subscriber_modify(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Set only attribute"; - return CTRL_CMD_ERROR; -} - static int set_subscriber_modify(struct ctrl_cmd *cmd, void *data) { struct gsm_network *net = cmd->node; @@ -157,18 +151,7 @@ return CTRL_CMD_ERROR; } -CTRL_CMD_DEFINE(subscriber_modify, "subscriber-modify-v1"); - -static int verify_subscriber_delete(struct ctrl_cmd *cmd, const char *v, void *d) -{ - return 0; -} - -static int get_subscriber_delete(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Set only attribute"; - return CTRL_CMD_ERROR; -} +CTRL_CMD_DEFINE_WO(subscriber_modify, "subscriber-modify-v1"); static int set_subscriber_delete(struct ctrl_cmd *cmd, void *data) { @@ -199,7 +182,7 @@ cmd->reply = was_used ? "Removed active subscriber" : "Removed"; return CTRL_CMD_REPLY; } -CTRL_CMD_DEFINE(subscriber_delete, "subscriber-delete-v1"); +CTRL_CMD_DEFINE_WO_NOVRF(subscriber_delete, "subscriber-delete-v1"); static int verify_subscriber_list(struct ctrl_cmd *cmd, const char *value, void *d) { diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c b/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c index ec4243e..057a583 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c @@ -446,11 +446,7 @@ return 0; } -CTRL_CMD_DEFINE(net_save_cmd, "net 0 save-configuration"); -static int verify_net_save_cmd(struct ctrl_cmd *cmd, const char *v, void *d) -{ - return 0; -} +CTRL_CMD_DEFINE_WO_NOVRF(net_save_cmd, "net 0 save-configuration"); static int set_net_save_cmd(struct ctrl_cmd *cmd, void *data) { @@ -462,12 +458,6 @@ } return CTRL_CMD_REPLY; -} - -static int get_net_save_cmd(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Write only attribute"; - return CTRL_CMD_ERROR; } struct ctrl_handle *bsc_nat_controlif_setup(struct bsc_nat *nat, diff --git a/openbsc/tests/ctrl_test_runner.py b/openbsc/tests/ctrl_test_runner.py index 4fd831f..40de782 100644 --- a/openbsc/tests/ctrl_test_runner.py +++ b/openbsc/tests/ctrl_test_runner.py @@ -219,7 +219,7 @@ def testBtsGenerateSystemInformation(self): r = self.do_get('bts.0.send-new-system-informations') self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Write only attribute') + self.assertEquals(r['error'], 'Write Only attribute') # No RSL links so it will fail r = self.do_set('bts.0.send-new-system-informations', '1') @@ -531,7 +531,7 @@ def testApplyConfiguration(self): r = self.do_get('bts.0.apply-configuration') self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Write only attribute') + self.assertEquals(r['error'], 'Write Only attribute') r = self.do_set('bts.0.apply-configuration', '1') self.assertEquals(r['mtype'], 'SET_REPLY') -- To view, visit https://gerrit.osmocom.org/1576 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I5bcea0b4f4b8f535bef2b423f2013b8b4a218b5b Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Jan 24 10:50:48 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 24 Jan 2017 10:50:48 +0000 Subject: [PATCH] openbsc[master]: debian: Install header and source file to different directory Message-ID: Review at https://gerrit.osmocom.org/1651 debian: Install header and source file to different directory osmo-bts consumes the gsm_data_shared.{h,c} files and assumes the OpenBSC directory layout. Install the files into the specific sub-directories to make the --with-openbsc=dir option work. Change-Id: I3da21402dee3d6f1d812b232b0a3f13b8a462d5b --- M debian/control M debian/openbsc-dev.install 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/51/1651/1 diff --git a/debian/control b/debian/control index 93b4bd3..144e649 100644 --- a/debian/control +++ b/debian/control @@ -107,8 +107,8 @@ from OpenBSC. This package installs these files to your file system so that the other packages can build-depend on this package. . - The header file is installed to /usr/include/osmocom/openbsc, while - the .c file is installed to /usr/src/osmocom/openbsc. + The directory structure is copied after the structure in the repository + and the header and .c file are installed into /usr/src/osmocom/openbsc/. Package: osmo-gtphub Architecture: any diff --git a/debian/openbsc-dev.install b/debian/openbsc-dev.install index 557aea1..c44e9af 100644 --- a/debian/openbsc-dev.install +++ b/debian/openbsc-dev.install @@ -1,2 +1,2 @@ -openbsc/include/openbsc/gsm_data_shared.h usr/include/osmocom/openbsc/ -openbsc/src/libcommon/gsm_data_shared.c usr/src/osmocom/openbsc/libcommon/ +openbsc/include/openbsc/gsm_data_shared.h usr/src/osmocom/openbsc/openbsc/include/openbsc/ +openbsc/src/libcommon/gsm_data_shared.c usr/src/osmocom/openbsc/openbsc/src/libcommon/ -- To view, visit https://gerrit.osmocom.org/1651 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3da21402dee3d6f1d812b232b0a3f13b8a462d5b Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Tue Jan 24 10:55:35 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 24 Jan 2017 10:55:35 +0000 Subject: [PATCH] openbsc[master]: debian: Install header and source file to different directory In-Reply-To: References: Message-ID: debian: Install header and source file to different directory osmo-bts consumes the gsm_data_shared.{h,c} files and assumes the OpenBSC directory layout. Install the files into the specific sub-directories to make the --with-openbsc=dir option work. Change-Id: I3da21402dee3d6f1d812b232b0a3f13b8a462d5b --- M debian/control M debian/openbsc-dev.install 2 files changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/51/1651/2 diff --git a/debian/control b/debian/control index 93b4bd3..144e649 100644 --- a/debian/control +++ b/debian/control @@ -107,8 +107,8 @@ from OpenBSC. This package installs these files to your file system so that the other packages can build-depend on this package. . - The header file is installed to /usr/include/osmocom/openbsc, while - the .c file is installed to /usr/src/osmocom/openbsc. + The directory structure is copied after the structure in the repository + and the header and .c file are installed into /usr/src/osmocom/openbsc/. Package: osmo-gtphub Architecture: any diff --git a/debian/openbsc-dev.install b/debian/openbsc-dev.install index 557aea1..398321a 100644 --- a/debian/openbsc-dev.install +++ b/debian/openbsc-dev.install @@ -1,2 +1,3 @@ -openbsc/include/openbsc/gsm_data_shared.h usr/include/osmocom/openbsc/ -openbsc/src/libcommon/gsm_data_shared.c usr/src/osmocom/openbsc/libcommon/ +openbsc/include/openbsc/gsm_data_shared.h usr/src/osmocom/openbsc/openbsc/include/openbsc/ +openbsc/include/openbsc/common_cs.h usr/src/osmocom/openbsc/openbsc/include/openbsc/ +openbsc/src/libcommon/gsm_data_shared.c usr/src/osmocom/openbsc/openbsc/src/libcommon/ -- To view, visit https://gerrit.osmocom.org/1651 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I3da21402dee3d6f1d812b232b0a3f13b8a462d5b Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Jan 24 11:07:35 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 24 Jan 2017 11:07:35 +0000 Subject: [PATCH] osmo-bts[master]: debian: Use the header files installed by openbsc-dev Message-ID: Review at https://gerrit.osmocom.org/1652 debian: Use the header files installed by openbsc-dev Use --with-openbsc= to pick up gsm_data_shared.h coming from the openbsc-dev package. With the revert of the change Iec6b0f0eb0b7fffaa814c9769c0ee777d641a07f, packaging could work now. Change-Id: Ie0a005315454a6450205ce6fd76242b85405de8d --- M debian/rules 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/52/1652/1 diff --git a/debian/rules b/debian/rules index 80ba0b2..12b3334 100755 --- a/debian/rules +++ b/debian/rules @@ -19,7 +19,7 @@ dh_autoreconf override_dh_auto_configure: - dh_auto_configure -- --enable-trx + dh_auto_configure -- --enable-trx --with-openbsc=/usr/src/osmocom/openbsc/openbsc/include/ override_dh_clean: dh_clean -- To view, visit https://gerrit.osmocom.org/1652 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie0a005315454a6450205ce6fd76242b85405de8d Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Tue Jan 24 13:06:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 24 Jan 2017 13:06:36 +0000 Subject: openbsc[master]: CTRL: remove boilerplate In-Reply-To: References: Message-ID: Patch Set 3: (1 comment) https://gerrit.osmocom.org/#/c/1576/3/openbsc/tests/ctrl_test_runner.py File openbsc/tests/ctrl_test_runner.py: Line 222: self.assertEquals(r['error'], 'Write Only attribute') Ok, libosmocore indicates "Write Only" with uppercase-O, so it must match here. Buy why do we expect "Read only" with lower csae in other cases here, despite CTRL_CMD_DEFINE_RO using "Read Only" with uppercase? -- To view, visit https://gerrit.osmocom.org/1576 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5bcea0b4f4b8f535bef2b423f2013b8b4a218b5b Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Jan 24 13:07:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 24 Jan 2017 13:07:27 +0000 Subject: osmo-pcu[master]: Add test case for testing PUAN In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/414 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I18e6d4a9e90fd6453fe14187beab27dfeae8dbe9 Gerrit-PatchSet: 6 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: prasadkg Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: prasadkg Gerrit-Reviewer: pravin Gerrit-Reviewer: sivasankari Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 24 13:07:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 24 Jan 2017 13:07:29 +0000 Subject: [MERGED] osmo-pcu[master]: Add test case for testing PUAN In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add test case for testing PUAN ...................................................................... Add test case for testing PUAN This test case is for testing generation of EGPRS PUAN. Corresponding log files .ok and .err are modified. Change-Id: I18e6d4a9e90fd6453fe14187beab27dfeae8dbe9 --- M src/rlc.h M tests/tbf/TbfTest.cpp M tests/tbf/TbfTest.err M tests/tbf/TbfTest.ok 4 files changed, 2,390 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/rlc.h b/src/rlc.h index 7db205d..ee86c2a 100644 --- a/src/rlc.h +++ b/src/rlc.h @@ -341,6 +341,9 @@ const uint16_t v_r() const; const uint16_t v_q() const; + const void set_v_r(int); + const void set_v_q(int); + const uint16_t ssn() const; bool is_in_window(uint16_t bsn) const; @@ -571,6 +574,16 @@ return is_in_window(bsn) && m_v_n.is_received(bsn) && offset_v_r < ws(); } +inline const void gprs_rlc_ul_window::set_v_r(int v_r) +{ + m_v_r = v_r; +} + +inline const void gprs_rlc_ul_window::set_v_q(int v_q) +{ + m_v_q = v_q; +} + inline const uint16_t gprs_rlc_ul_window::v_r() const { return m_v_r; diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index bebb6ef..7f4c6ac 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -1215,6 +1215,348 @@ return ul_tbf; } +static gprs_rlcmac_ul_tbf *establish_ul_tbf(BTS *the_bts, + uint8_t ts_no, uint32_t tlli, uint32_t *fn, uint16_t qta, + uint8_t ms_class, uint8_t egprs_ms_class) +{ + GprsMs *ms; + uint32_t rach_fn = *fn - 51; + uint32_t sba_fn = *fn + 52; + uint8_t trx_no = 0; + int tfi = 0, i = 0; + gprs_rlcmac_ul_tbf *ul_tbf; + struct gprs_rlcmac_pdch *pdch; + gprs_rlcmac_bts *bts; + RlcMacUplink_t ulreq = {0}; + struct pcu_l1_meas meas; + struct gprs_rlc_ul_header_egprs_3 *egprs3 = NULL; + GprsCodingScheme cs; + + meas.set_rssi(31); + bts = the_bts->bts_data(); + + /* needed to set last_rts_fn in the PDCH object */ + request_dl_rlc_block(bts, trx_no, ts_no, fn); + + /* + * simulate RACH, this sends an Immediate + * Assignment Uplink on the AGCH + */ + the_bts->rcv_rach(0x73, rach_fn, qta, 0, GSM_L1_BURST_TYPE_ACCESS_0); + + /* get next free TFI */ + tfi = the_bts->tfi_find_free(GPRS_RLCMAC_UL_TBF, &trx_no, -1); + + /* fake a resource request */ + ulreq.u.MESSAGE_TYPE = MT_PACKET_RESOURCE_REQUEST; + ulreq.u.Packet_Resource_Request.PayloadType = GPRS_RLCMAC_CONTROL_BLOCK; + ulreq.u.Packet_Resource_Request.ID.UnionType = 1; /* != 0 */ + ulreq.u.Packet_Resource_Request.ID.u.TLLI = tlli; + ulreq.u.Packet_Resource_Request.Exist_MS_Radio_Access_capability = 1; + ulreq.u.Packet_Resource_Request.MS_Radio_Access_capability. + Count_MS_RA_capability_value = 1; + ulreq.u.Packet_Resource_Request.MS_Radio_Access_capability. + MS_RA_capability_value[0].u.Content. + Exist_Multislot_capability = 1; + ulreq.u.Packet_Resource_Request.MS_Radio_Access_capability. + MS_RA_capability_value[0].u.Content.Multislot_capability. + Exist_GPRS_multislot_class = 1; + ulreq.u.Packet_Resource_Request.MS_Radio_Access_capability. + MS_RA_capability_value[0].u.Content.Multislot_capability. + GPRS_multislot_class = ms_class; + if (egprs_ms_class) { + ulreq.u.Packet_Resource_Request.MS_Radio_Access_capability. + MS_RA_capability_value[0].u.Content. + Multislot_capability.Exist_EGPRS_multislot_class = 1; + ulreq.u.Packet_Resource_Request.MS_Radio_Access_capability. + MS_RA_capability_value[0].u.Content. + Multislot_capability.EGPRS_multislot_class = ms_class; + } + send_ul_mac_block(the_bts, trx_no, ts_no, &ulreq, sba_fn); + + /* check the TBF */ + ul_tbf = the_bts->ul_tbf_by_tfi(tfi, trx_no, ts_no); + /* send packet uplink assignment */ + *fn = sba_fn; + request_dl_rlc_block(ul_tbf, fn); + + /* send real acknowledgement */ + send_control_ack(ul_tbf); + + check_tbf(ul_tbf); + + return ul_tbf; +} + +static gprs_rlcmac_ul_tbf *establish_ul_tbf_two_phase_puan_URBB_no_length(BTS *the_bts, + uint8_t ts_no, uint32_t tlli, uint32_t *fn, uint16_t qta, + uint8_t ms_class, uint8_t egprs_ms_class, gprs_rlcmac_ul_tbf *ul_tbf) +{ + OSMO_ASSERT(ul_tbf); + OSMO_ASSERT(ul_tbf->ta() == qta / 4); + GprsMs *ms; + uint32_t rach_fn = *fn - 51; + uint32_t sba_fn = *fn + 52; + uint8_t trx_no = 0; + int tfi = 0, i = 0; + struct gprs_rlcmac_pdch *pdch; + gprs_rlcmac_bts *bts; + RlcMacUplink_t ulreq = {0}; + struct pcu_l1_meas meas; + struct gprs_rlc_ul_header_egprs_3 *egprs3 = NULL; + GprsCodingScheme cs; + + + /* send fake data with cv=0*/ + struct gprs_rlc_ul_header_egprs_3 *hdr3 = NULL; + uint8_t data[49] = {0}; + + hdr3 = (struct gprs_rlc_ul_header_egprs_3 *)data; + + /*header_construction */ + memset(data, 0x2b, sizeof(data)); + /* Message with CRBB */ + for (int i = 0 ; i < 80; i++) { + hdr3->r = 0; + hdr3->si = 0; + hdr3->cv = 10; + hdr3->tfi_hi = (tfi >> 3) & 0x3; + hdr3->tfi_lo = tfi & 0x7; + hdr3->bsn1_hi = ((i * 2)&0x1f); + hdr3->bsn1_lo = ((i * 2)/32); + hdr3->cps_hi = 0; + hdr3->cps_lo = 0; + hdr3->spb = 0; + hdr3->rsb = 0; + hdr3->pi = 0; + hdr3->spare = 0; + hdr3->dummy = 1; + data[4] = 0x0; + data[5] = 0x0; + data[6] = 0x2b; + data[7] = 0x2b; + pdch = &the_bts->bts_data()->trx[trx_no].pdch[ts_no]; + pdch->rcv_block(&data[0], sizeof(data), *fn, &meas); + } + ul_tbf->create_ul_ack(*fn, ts_no); + memset(data, 0x2b, sizeof(data)); + hdr3 = (struct gprs_rlc_ul_header_egprs_3 *)data; + hdr3->r = 0; + hdr3->si = 0; + hdr3->cv = 0; + hdr3->tfi_hi = (tfi >> 3) & 0x3; + hdr3->tfi_lo = tfi & 0x7; + hdr3->bsn1_hi = 0; + hdr3->bsn1_lo = 2; + hdr3->cps_hi = 0; + hdr3->cps_lo = 0; + hdr3->spb = 0; + hdr3->rsb = 0; + hdr3->pi = 0; + hdr3->spare = 0; + hdr3->dummy = 1; + data[4] = 0x0; + data[5] = 0x2b; + data[6] = 0x2b; + data[7] = 0x2b; + + pdch = &the_bts->bts_data()->trx[trx_no].pdch[ts_no]; + pdch->rcv_block(&data[0], sizeof(data), *fn, &meas); + + request_dl_rlc_block(ul_tbf, fn); + + check_tbf(ul_tbf); + OSMO_ASSERT(ul_tbf->ul_ack_state == GPRS_RLCMAC_UL_ACK_NONE); + + ms = the_bts->ms_by_tlli(tlli); + OSMO_ASSERT(ms != NULL); + OSMO_ASSERT(ms->ta() == qta/4); + OSMO_ASSERT(ms->ul_tbf() == ul_tbf); + + return ul_tbf; +} + +static gprs_rlcmac_ul_tbf *establish_ul_tbf_two_phase_puan_URBB_with_length(BTS *the_bts, + uint8_t ts_no, uint32_t tlli, uint32_t *fn, uint16_t qta, + uint8_t ms_class, uint8_t egprs_ms_class, gprs_rlcmac_ul_tbf *ul_tbf) +{ + OSMO_ASSERT(ul_tbf); + OSMO_ASSERT(ul_tbf->ta() == qta / 4); + GprsMs *ms; + uint32_t rach_fn = *fn - 51; + uint32_t sba_fn = *fn + 52; + uint8_t trx_no = 0; + int tfi = 0, i = 0; + struct gprs_rlcmac_pdch *pdch; + gprs_rlcmac_bts *bts; + RlcMacUplink_t ulreq = {0}; + struct pcu_l1_meas meas; + struct gprs_rlc_ul_header_egprs_3 *egprs3 = NULL; + GprsCodingScheme cs; + + check_tbf(ul_tbf); + /* send fake data with cv=0*/ + struct gprs_rlc_ul_header_egprs_3 *hdr3 = NULL; + uint8_t data[49] = {0}; + + hdr3 = (struct gprs_rlc_ul_header_egprs_3 *)data; + + /*header_construction */ + memset(data, 0x2b, sizeof(data)); + + /* Message with URBB & URBB length */ + for (int i = 0 ; i < 20; i++) { + hdr3->r = 0; + hdr3->si = 0; + hdr3->cv = 10; + hdr3->tfi_hi = (tfi >> 3) & 0x3; + hdr3->tfi_lo = tfi & 0x7; + hdr3->bsn1_hi = ((i * 2)&0x1f); + hdr3->bsn1_lo = ((i * 2)/32); + hdr3->cps_hi = 0; + hdr3->cps_lo = 0; + hdr3->spb = 0; + hdr3->rsb = 0; + hdr3->pi = 0; + hdr3->spare = 0; + hdr3->dummy = 1; + data[4] = 0x0; + data[5] = 0x0; + data[6] = 0x2b; + data[7] = 0x2b; + pdch = &the_bts->bts_data()->trx[trx_no].pdch[ts_no]; + pdch->rcv_block(&data[0], sizeof(data), *fn, &meas); + } + ul_tbf->create_ul_ack(*fn, ts_no); + memset(data, 0x2b, sizeof(data)); + hdr3 = (struct gprs_rlc_ul_header_egprs_3 *)data; + hdr3->r = 0; + hdr3->si = 0; + hdr3->cv = 0; + hdr3->tfi_hi = (tfi >> 3) & 0x3; + hdr3->tfi_lo = tfi & 0x7; + hdr3->bsn1_hi = 0; + hdr3->bsn1_lo = 2; + hdr3->cps_hi = 0; + hdr3->cps_lo = 0; + hdr3->spb = 0; + hdr3->rsb = 0; + hdr3->pi = 0; + hdr3->spare = 0; + hdr3->dummy = 1; + data[4] = 0x0; + data[5] = 0x2b; + data[6] = 0x2b; + data[7] = 0x2b; + + pdch = &the_bts->bts_data()->trx[trx_no].pdch[ts_no]; + pdch->rcv_block(&data[0], sizeof(data), *fn, &meas); + + request_dl_rlc_block(ul_tbf, fn); + + check_tbf(ul_tbf); + OSMO_ASSERT(ul_tbf->ul_ack_state == GPRS_RLCMAC_UL_ACK_NONE); + + ms = the_bts->ms_by_tlli(tlli); + OSMO_ASSERT(ms != NULL); + OSMO_ASSERT(ms->ta() == qta/4); + OSMO_ASSERT(ms->ul_tbf() == ul_tbf); + + return ul_tbf; +} + +static gprs_rlcmac_ul_tbf *establish_ul_tbf_two_phase_puan_CRBB(BTS *the_bts, + uint8_t ts_no, uint32_t tlli, uint32_t *fn, uint16_t qta, + uint8_t ms_class, uint8_t egprs_ms_class) +{ + GprsMs *ms; + uint32_t rach_fn = *fn - 51; + uint32_t sba_fn = *fn + 52; + uint8_t trx_no = 0; + int tfi = 0, i = 0; + gprs_rlcmac_ul_tbf *ul_tbf; + struct gprs_rlcmac_pdch *pdch; + gprs_rlcmac_bts *bts; + RlcMacUplink_t ulreq = {0}; + struct pcu_l1_meas meas; + struct gprs_rlc_ul_header_egprs_3 *egprs3 = NULL; + GprsCodingScheme cs; + + + /* check the TBF */ + ul_tbf = the_bts->ul_tbf_by_tfi(tfi, trx_no, ts_no); + OSMO_ASSERT(ul_tbf); + OSMO_ASSERT(ul_tbf->ta() == qta / 4); + + /* send fake data with cv=0*/ + struct gprs_rlc_ul_header_egprs_3 *hdr3 = NULL; + uint8_t data[49] = {0}; + + hdr3 = (struct gprs_rlc_ul_header_egprs_3 *)data; + + /*header_construction */ + memset(data, 0x2b, sizeof(data)); + + /* Message with CRBB */ + for (int i = 80 ; i < 160; i++) { + hdr3->r = 0; + hdr3->si = 0; + hdr3->cv = 10; + hdr3->tfi_hi = (tfi >> 3) & 0x3; + hdr3->tfi_lo = tfi & 0x7; + hdr3->bsn1_hi = ((i)&0x1f); + hdr3->bsn1_lo = ((i)/32); + hdr3->cps_hi = 0; + hdr3->cps_lo = 0; + hdr3->spb = 0; + hdr3->rsb = 0; + hdr3->pi = 0; + hdr3->spare = 0; + hdr3->dummy = 1; + data[4] = 0x0; + data[5] = 0x0; + data[6] = 0x2b; + data[7] = 0x2b; + pdch = &the_bts->bts_data()->trx[trx_no].pdch[ts_no]; + pdch->rcv_block(&data[0], sizeof(data), *fn, &meas); + } + ul_tbf->create_ul_ack(*fn, ts_no); + memset(data, 0x2b, sizeof(data)); + hdr3 = (struct gprs_rlc_ul_header_egprs_3 *)data; + hdr3->r = 0; + hdr3->si = 0; + hdr3->cv = 0; + hdr3->tfi_hi = (tfi >> 3) & 0x3; + hdr3->tfi_lo = tfi & 0x7; + hdr3->bsn1_hi = 0; + hdr3->bsn1_lo = 2; + hdr3->cps_hi = 0; + hdr3->cps_lo = 0; + hdr3->spb = 0; + hdr3->rsb = 0; + hdr3->pi = 0; + hdr3->spare = 0; + hdr3->dummy = 1; + data[4] = 0x0; + data[5] = 0x2b; + data[6] = 0x2b; + data[7] = 0x2b; + + pdch = &the_bts->bts_data()->trx[trx_no].pdch[ts_no]; + pdch->rcv_block(&data[0], sizeof(data), *fn, &meas); + + request_dl_rlc_block(ul_tbf, fn); + + check_tbf(ul_tbf); + OSMO_ASSERT(ul_tbf->ul_ack_state == GPRS_RLCMAC_UL_ACK_NONE); + + ms = the_bts->ms_by_tlli(tlli); + OSMO_ASSERT(ms != NULL); + OSMO_ASSERT(ms->ta() == qta/4); + OSMO_ASSERT(ms->ul_tbf() == ul_tbf); + + return ul_tbf; +} static gprs_rlcmac_ul_tbf *establish_ul_tbf_two_phase(BTS *the_bts, uint8_t ts_no, uint32_t tlli, uint32_t *fn, uint16_t qta, uint8_t ms_class, uint8_t egprs_ms_class) @@ -1372,6 +1714,73 @@ printf("=== end %s ===\n", __func__); } +static void test_tbf_egprs_two_phase_puan(void) +{ + BTS the_bts; + int ts_no = 7; + uint32_t fn = 2654218; + uint16_t qta = 31; + uint32_t tlli = 0xf1223344; + const char *imsi = "0011223344"; + uint8_t ms_class = 1; + gprs_rlcmac_bts *bts; + uint8_t egprs_ms_class = 1; + gprs_rlcmac_ul_tbf *ul_tbf; + GprsMs *ms; + uint8_t test_data[256]; + + printf("=== start %s ===\n", __func__); + + memset(test_data, 1, sizeof(test_data)); + + setup_bts(&the_bts, ts_no, 4); + the_bts.bts_data()->initial_mcs_dl = 9; + the_bts.bts_data()->egprs_enabled = 1; + bts = the_bts.bts_data(); + bts->ws_base = 128; + bts->ws_pdch = 64; + + ul_tbf = establish_ul_tbf(&the_bts, ts_no, tlli, &fn, qta, ms_class, egprs_ms_class); + /* Function to generate URBB with no length */ + ul_tbf = establish_ul_tbf_two_phase_puan_URBB_no_length(&the_bts, ts_no, tlli, &fn, + qta, ms_class, egprs_ms_class, ul_tbf); + + ms = ul_tbf->ms(); + fprintf(stderr, "Got '%s', TA=%d\n", ul_tbf->name(), ul_tbf->ta()); + fprintf(stderr, + "Got MS: TLLI = 0x%08x, TA = %d\n", ms->tlli(), ms->ta()); + send_dl_data(&the_bts, tlli, imsi, test_data, sizeof(test_data)); + + ul_tbf->m_window.set_v_r(0); + ul_tbf->m_window.set_v_q(0); + /* Function to generate URBB with length */ + ul_tbf = establish_ul_tbf_two_phase_puan_URBB_with_length(&the_bts, ts_no, tlli, &fn, + qta, ms_class, egprs_ms_class, ul_tbf); + + ms = ul_tbf->ms(); + fprintf(stderr, "Got '%s', TA=%d\n", ul_tbf->name(), ul_tbf->ta()); + fprintf(stderr, + "Got MS: TLLI = 0x%08x, TA = %d\n", ms->tlli(), ms->ta()); + + send_dl_data(&the_bts, tlli, imsi, test_data, sizeof(test_data)); + + ul_tbf->m_window.set_v_r(0); + ul_tbf->m_window.set_v_q(0); + /* Function to generate CRBB */ + bts->ws_base = 128; + bts->ws_pdch = 64; + ul_tbf = establish_ul_tbf_two_phase_puan_CRBB(&the_bts, ts_no, tlli, &fn, + qta, ms_class, egprs_ms_class); + + ms = ul_tbf->ms(); + fprintf(stderr, "Got '%s', TA=%d\n", ul_tbf->name(), ul_tbf->ta()); + fprintf(stderr, + "Got MS: TLLI = 0x%08x, TA = %d\n", ms->tlli(), ms->ta()); + + send_dl_data(&the_bts, tlli, imsi, test_data, sizeof(test_data)); + + printf("=== end %s ===\n", __func__); +} /* * Trigger rach for single block */ @@ -2899,6 +3308,7 @@ test_tbf_li_decoding(); test_tbf_epdan_out_of_rx_window(); test_immediate_assign_rej(); + test_tbf_egprs_two_phase_puan(); test_packet_access_rej_epdan(); if (getenv("TALLOC_REPORT_FULL")) diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index 5f5456b..f0c3427 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -6884,6 +6884,1971 @@ No PDCH available. No PDCH resource for single block allocation.sending Immediate Assignment Uplink (AGCH) reject Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=4d 06 3a 10 70 8b 29 14 70 8b 29 14 70 8b 29 14 70 8b 29 14 0b 2b 2b +Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654218 block=8 data=47 94 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +MS requests UL TBF on RACH, so we provide one +ra=0x73 Fn=2654167 qta=31 is_11bit=0: +MS requests single block allocation +RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x73, Fn=2654167 (17,25,9), SBFn=2654270 +TX: Immediate Assignment Uplink (AGCH) + - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=-1 USF=7 +Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 73 8b 29 07 00 c0 0c 5a 43 2b 2b 2b 2b 2b 2b 2b +Searching for first unallocated TFI: TRX=0 + Found TFI=0. +Got RLC block, coding scheme: CS-1, length: 23 (23)) ++++++++++++++++++++++++++ RX : Uplink Control Block +++++++++++++++++++++++++ +------------------------- RX : Uplink Control Block ------------------------- +MS requests UL TBF in packet resource request of single block, so we provide one: +MS supports EGPRS multislot class 1. +********** TBF starts here ********** +Allocating UL TBF: MS_CLASS=1/1 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1 +Enabled EGPRS for TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS), mode EGPRS +Slot Allocation (Algorithm A) for class 1 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 4, because not enabled +- Skipping TS 5, because not enabled +- Skipping TS 6, because not enabled +- Assign uplink TS=7 TFI=0 USF=0 +PDCH(TS 7, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS), 1 TBFs, USFs = 01, TFIs = 00000001. +- Setting Control TS 7 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) +Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 00 +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): Setting EGPRS window size to 192, base(128) slots(1) ws_pdch(64) +ws(192) +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer 3169. +Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed +Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 +Change control TS to 7 until assinment is complete. +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS)s start Packet Uplink Assignment (PACCH) ++++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ +------------------------- TX : Packet Uplink Assignment ------------------------- +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS): Scheduling polling at FN 2654283 TS 7 +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) Scheduled UL Assignment polling on FN=2654283, TS=7 +Scheduling control message at RTS for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) (TRX=0, TS=7) +Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654270 block=8 data=4f 28 5e 24 46 68 90 f9 0a 39 00 00 88 00 08 2b 2b 2b 2b 2b 2b 2b 2b +Got RLC block, coding scheme: CS-1, length: 23 (23)) ++++++++++++++++++++++++++ RX : Uplink Control Block +++++++++++++++++++++++++ +------------------------- RX : Uplink Control Block ------------------------- +RX: [PCU <- BTS] TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) Packet Control Ack +TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) changes state from ASSIGN to FLOW +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 00 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 0 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 1 +- Taking block 0 out, raising V(Q) to 1 +- Assembling frames: (len=44) +-- Frame 1 starts at offset 0, length=44, is_complete=0 +- No gaps in received block, last block: BSN=0 CV=10 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 10 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=1) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=2, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 2 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 3 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 20 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=3) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=4, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 4 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 5 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 30 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=5) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=6, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 6 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 7 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 40 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=7) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=8, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 8 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 9 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 50 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=9) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=10, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 10 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 11 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 60 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=11) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=12, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 12 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 13 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 70 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=13) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=14, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 14 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 15 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 80 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=15) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=16, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 16 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 17 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 90 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=17) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=18, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 18 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 19 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 a0 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=19) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=20, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 20 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 21 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 b0 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=21) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=22, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 22 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 23 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 c0 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=23) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=24, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 24 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 25 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 d0 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=25) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=26, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 26 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 27 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 e0 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=27) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=28, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 28 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 29 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 f0 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=29) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=30, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 30 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 31 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 00 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=31) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=32, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 32 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 33 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 10 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=33) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=34, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 34 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 35 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 20 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=35) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=36, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 36 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 37 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 30 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=37) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=38, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 38 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 39 +- Scheduling Ack/Nack, because 20 frames received. +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 40 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=39) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=40, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 40 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 41 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 50 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=41) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=42, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 42 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 43 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 60 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=43) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=44, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 44 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 45 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 70 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=45) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=46, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 46 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 47 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 80 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=47) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=48, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 48 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 49 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 90 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=49) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=50, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 50 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 51 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 a0 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=51) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=52, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 52 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 53 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 b0 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=53) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=54, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 54 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 55 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 c0 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=55) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=56, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 56 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 57 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 d0 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=57) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=58, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 58 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 59 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 e0 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=59) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=60, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 60 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 61 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 f0 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=61) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=62, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 62 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 63 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 00 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=63) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=64, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 64 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 65 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 10 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=65) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=66, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 66 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 67 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 20 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=67) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=68, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 68 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 69 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 30 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=69) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=70, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 70 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 71 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 40 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=71) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=72, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 72 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 73 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 50 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=73) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=74, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 74 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 75 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 60 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=75) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=76, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 76 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 77 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 70 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=77) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=78, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 78 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 79 +- Scheduling Ack/Nack, because 20 frames received. +- Sending Ack/Nack is already triggered, don't schedule! +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 80 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=79) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=80, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 80 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 81 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 90 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=81) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=82, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 82 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 83 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 a0 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=83) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=84, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 84 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 85 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 b0 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=85) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=86, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 86 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 87 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 c0 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=87) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=88, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 88 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 89 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 d0 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=89) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=90, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 90 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 91 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 e0 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=91) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=92, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 92 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 93 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 f0 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=93) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=94, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 94 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 95 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 00 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=95) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=96, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 96 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 97 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 10 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=97) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=98, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 98 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 99 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 20 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=99) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=100, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 100 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 101 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 30 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=101) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=102, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 102 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 103 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 40 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=103) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=104, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 104 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 105 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 50 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=105) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=106, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 106 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 107 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 60 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=107) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=108, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 108 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 109 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 70 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=109) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=110, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 110 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 111 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 80 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=111) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=112, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 112 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 113 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 90 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=113) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=114, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 114 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 115 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 a0 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=115) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=116, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 116 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 117 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 b0 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=117) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=118, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 118 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 119 +- Scheduling Ack/Nack, because 20 frames received. +- Sending Ack/Nack is already triggered, don't schedule! +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 c0 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=119) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=120, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 120 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 121 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 d0 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=121) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=122, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 122 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 123 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 e0 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=123) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=124, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 124 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 125 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 f0 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=125) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=126, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 126 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 127 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 00 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=127) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=128, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 128 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 129 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 10 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=129) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=130, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 130 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 131 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 20 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=131) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=132, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 132 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 133 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 30 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=133) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=134, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 134 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 135 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 40 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=135) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=136, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 136 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 137 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 50 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=137) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=138, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 138 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 139 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 60 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=139) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=140, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 140 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 141 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 70 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=141) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=142, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 142 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 143 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 80 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=143) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=144, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 144 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 145 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 90 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=145) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=146, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 146 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 147 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 a0 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=147) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=148, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 148 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 149 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 b0 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=149) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=150, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 150 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 151 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 c0 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=151) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=152, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 152 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 153 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 d0 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=153) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=154, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 154 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 155 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 e0 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=155) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=156, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 156 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 157 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 f0 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=157) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=158, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 158 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 159 +- Scheduling Ack/Nack, because 20 frames received. +- Sending Ack/Nack is already triggered, don't schedule! +Encoding Ack/Nack for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) (final=0) +rest_bits=94 uncompressed len 157 and uncompressed bitmap = aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa a8 +the ucmp len=157 uclen_crbb=19 num_blocks=157 crbb length 78, and the CRBB bitmap = 1e 1e 1e 1e 1e 1e 1e 1e 1e 1e +EGPRS URBB, urbb len = 94, SSN = 2, ESN_CRBB = 1, len present = No,desc len = 109, SNS = 2048, WS = 192, V(Q) = 1, V(R) = 159, BOW +Uplink Ack/Nack bit count 184, max 184, message = 40 24 01 3f 3e 24 46 68 90 20 04 55 55 55 55 55 55 55 55 55 55 55 54 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 00 00 02 80 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=159) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=0, BSN=64, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 64 already received +Received RTS for PDCH: TRX=0 TS=7 FN=2654275 block_nr=9 scheduling USF=0 for required uplink resource of UL TFI=0 +Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654275 block=9 data=40 94 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got 'TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS)', TA=7 +Got MS: TLLI = 0xf1223344, TA = 7 +********** TBF starts here ********** +Allocating DL TBF: MS_CLASS=1/1 +Enabled EGPRS for TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS), mode EGPRS +Slot Allocation (Algorithm A) for class 0 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 4, because not enabled +- Skipping TS 5, because not enabled +- Skipping TS 6, because not enabled +- Assign downlink TS=7 TFI=0 +PDCH(TS 7, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS), 1 TBFs, USFs = 01, TFIs = 00000001. +- Setting Control TS 7 +Attaching TBF to MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) +Allocated TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 80 +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 192 +ws(192) +Modifying MS object, TLLI: 0xf1223344 confirmed +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) [DOWNLINK] START +Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' +Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) exists +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) changes state from NULL to ASSIGN +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) starting timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) append +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 00 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 0 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 1 +- Taking block 0 out, raising V(Q) to 1 +- Assembling frames: (len=44) +-- Frame 1 starts at offset 0, length=44, is_complete=0 +- No gaps in received block, last block: BSN=0 CV=10 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 10 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=1) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=2, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 2 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 3 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 20 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=3) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=4, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 4 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 5 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 30 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=5) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=6, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 6 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 7 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 40 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=7) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=8, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 8 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 9 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 50 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=9) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=10, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 10 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 11 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 60 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=11) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=12, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 12 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 13 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 70 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=13) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=14, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 14 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 15 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 80 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=15) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=16, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 16 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 17 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 90 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=17) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=18, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 18 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 19 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 a0 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=19) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=20, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 20 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 21 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 b0 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=21) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=22, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 22 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 23 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 c0 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=23) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=24, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 24 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 25 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 d0 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=25) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=26, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 26 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 27 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 e0 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=27) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=28, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 28 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 29 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 f0 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=29) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=30, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 30 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 31 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 00 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=31) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=32, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 32 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 33 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 10 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=33) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=34, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 34 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 35 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 20 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=35) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=36, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 36 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 37 +- Scheduling Ack/Nack, because 20 frames received. +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 30 01 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=37) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=38, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 38 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 39 +Encoding Ack/Nack for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) (final=0) +EGPRS URBB, urbb len = 37, SSN = 2, ESN_CRBB = 1, len present = yes,desc len = 52, SNS = 2048, WS = 192, V(Q) = 1, V(R) = 39, BOW, EOW +Uplink Ack/Nack bit count 135, max 184, message = 40 24 01 3f 3e 24 46 68 90 9a 30 04 aa aa aa aa a9 2b 2b 2b 2b 2b 2b +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 00 00 02 80 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=1 .. V(R)=39) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=0, BSN=64, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 64 storing in window (1..192) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 65 +Received RTS for PDCH: TRX=0 TS=7 FN=2654279 block_nr=10 scheduling USF=0 for required uplink resource of UL TFI=0 +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) start Packet Downlink Assignment (PACCH) ++++++++++++++++++++++++++ TX : Packet Downlink Assignment +++++++++++++++++++++++++ +------------------------- TX : Packet Downlink Assignment ------------------------- +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Scheduling polling at FN 2654292 TS 7 +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Scheduled DL Assignment polling on FN=2654292, TS=7 +Scheduling control message at RTS for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) (TRX=0, TS=7) +Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654279 block=10 data=48 08 00 00 0c 72 00 02 08 00 80 c8 03 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got 'TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS)', TA=7 +Got MS: TLLI = 0xf1223344, TA = 7 +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) append +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 80 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=80, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 80 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 81 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 88 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=81) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=81, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 81 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 82 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 90 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=82) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=82, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 82 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 83 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 98 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=83) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=83, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 83 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 84 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 a0 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=84) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=84, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 84 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 85 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 a8 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=85) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=85, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 85 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 86 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 b0 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=86) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=86, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 86 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 87 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 b8 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=87) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=87, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 87 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 88 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 c0 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=88) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=88, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 88 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 89 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 c8 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=89) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=89, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 89 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 90 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 d0 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=90) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=90, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 90 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 91 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 d8 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=91) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=91, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 91 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 92 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 e0 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=92) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=92, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 92 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 93 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 e8 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=93) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=93, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 93 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 94 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 f0 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=94) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=94, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 94 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 95 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 f8 02 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=95) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=95, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 95 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 96 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 00 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=96) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=96, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 96 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 97 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 08 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=97) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=97, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 97 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 98 +- Scheduling Ack/Nack, because 20 frames received. +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 10 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=98) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=98, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 98 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 99 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 18 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=99) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=99, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 99 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 100 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 20 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=100) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=100, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 100 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 101 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 28 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=101) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=101, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 101 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 102 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 30 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=102) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=102, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 102 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 103 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 38 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=103) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=103, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 103 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 104 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 40 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=104) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=104, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 104 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 105 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 48 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=105) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=105, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 105 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 106 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 50 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=106) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=106, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 106 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 107 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 58 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=107) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=107, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 107 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 108 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 60 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=108) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=108, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 108 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 109 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 68 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=109) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=109, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 109 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 110 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 70 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=110) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=110, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 110 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 111 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 78 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=111) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=111, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 111 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 112 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 80 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=112) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=112, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 112 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 113 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 88 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=113) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=113, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 113 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 114 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 90 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=114) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=114, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 114 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 115 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 98 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=115) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=115, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 115 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 116 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 a0 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=116) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=116, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 116 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 117 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 a8 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=117) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=117, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 117 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 118 +- Scheduling Ack/Nack, because 20 frames received. +- Sending Ack/Nack is already triggered, don't schedule! +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 b0 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=118) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=118, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 118 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 119 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 b8 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=119) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=119, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 119 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 120 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 c0 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=120) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=120, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 120 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 121 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 c8 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=121) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=121, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 121 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 122 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 d0 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=122) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=122, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 122 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 123 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 d8 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=123) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=123, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 123 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 124 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 e0 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=124) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=124, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 124 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 125 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 e8 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=125) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=125, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 125 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 126 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 f0 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=126) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=126, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 126 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 127 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 f8 03 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=127) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=127, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 127 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 128 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 00 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=128) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=128, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 128 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 129 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 08 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=129) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=129, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 129 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 130 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 10 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=130) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=130, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 130 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 131 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 18 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=131) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=131, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 131 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 132 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 20 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=132) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=132, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 132 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 133 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 28 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=133) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=133, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 133 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 134 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 30 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=134) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=134, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 134 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 135 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 38 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=135) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=135, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 135 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 136 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 40 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=136) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=136, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 136 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 137 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 48 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=137) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=137, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 137 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 138 +- Scheduling Ack/Nack, because 20 frames received. +- Sending Ack/Nack is already triggered, don't schedule! +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 50 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=138) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=138, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 138 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 139 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 58 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=139) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=139, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 139 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 140 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 60 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=140) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=140, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 140 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 141 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 68 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=141) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=141, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 141 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 142 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 70 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=142) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=142, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 142 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 143 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 78 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=143) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=143, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 143 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 144 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 80 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=144) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=144, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 144 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 145 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 88 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=145) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=145, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 145 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 146 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 90 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=146) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=146, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 146 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 147 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 98 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=147) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=147, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 147 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 148 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 a0 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=148) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=148, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 148 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 149 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 a8 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=149) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=149, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 149 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 150 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 b0 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=150) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=150, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 150 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 151 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 b8 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=151) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=151, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 151 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 152 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 c0 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=152) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=152, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 152 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 153 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 c8 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=153) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=153, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 153 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 154 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 d0 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=154) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=154, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 154 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 155 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 d8 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=155) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=155, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 155 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 156 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 e0 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=156) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=156, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 156 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 157 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 e8 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=157) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=157, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 157 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 158 +- Scheduling Ack/Nack, because 20 frames received. +- Sending Ack/Nack is already triggered, don't schedule! +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 f0 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=158) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=158, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 158 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 159 +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 28 f8 04 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=159) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=159, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 159 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +- Raising V(R) to 160 +Encoding Ack/Nack for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) (final=0) +rest_bits=94 uncompressed len 159 and uncompressed bitmap = 00 00 00 00 00 00 00 00 00 01 ff ff ff ff ff ff ff ff ff fe +CRBB bitmap = 03 c3 1b a8 +the ucmp len=159 uclen_crbb=159 num_blocks=159 crbb length 30, and the CRBB bitmap = 03 c3 1b a8 +EGPRS CRBB, crbb_len = 30, crbb_start_clr_code = 0 +EGPRS URBB, urbb len = 0, SSN = 1, ESN_CRBB = 159, len present = yes,desc len = 53, SNS = 2048, WS = 192, V(Q) = 0, V(R) = 160, BOW, EOW +Uplink Ack/Nack bit count 136, max 184, message = 40 24 01 3f 3e 24 46 68 90 9a b0 03 3c 03 c3 1b a0 2b 2b 2b 2b 2b 2b +Got RLC block, coding scheme: MCS-4, length: 49 (49)) + UL data: 00 00 02 80 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 +UL DATA TFI=0 received (V(Q)=0 .. V(R)=160) +max_cs_ul cannot be derived (current UL CS: UNKNOWN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=0, BSN=64, SPB=0, PI=0, E=1, TI=0, bitoffs=33 +- BSN 64 storing in window (0..191) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 +Received RTS for PDCH: TRX=0 TS=7 FN=2654283 block_nr=11 scheduling USF=0 for required uplink resource of UL TFI=0 +Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654283 block=11 data=40 94 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Got 'TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS)', TA=7 +Got MS: TLLI = 0xf1223344, TA = 7 +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) append Searching for first unallocated TFI: TRX=0 Found TFI=0. ********** TBF starts here ********** diff --git a/tests/tbf/TbfTest.ok b/tests/tbf/TbfTest.ok index dc07fc7..d531437 100644 --- a/tests/tbf/TbfTest.ok +++ b/tests/tbf/TbfTest.ok @@ -72,6 +72,8 @@ === end test_immediate_assign_rej_multi_block === === start test_immediate_assign_rej_single_block === === end test_immediate_assign_rej_single_block === +=== start test_tbf_egprs_two_phase_puan === +=== end test_tbf_egprs_two_phase_puan === === start test_packet_access_rej_epdan === packet reject: 40 84 7f f7 6e e6 41 4b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b === end test_packet_access_rej_epdan === -- To view, visit https://gerrit.osmocom.org/414 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I18e6d4a9e90fd6453fe14187beab27dfeae8dbe9 Gerrit-PatchSet: 6 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: prasadkg Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: prasadkg Gerrit-Reviewer: pravin Gerrit-Reviewer: sivasankari From gerrit-no-reply at lists.osmocom.org Tue Jan 24 13:10:07 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 24 Jan 2017 13:10:07 +0000 Subject: osmo-bts[master]: OML: internalize failure reporting In-Reply-To: References: Message-ID: Patch Set 4: > Hmm, sure, why not. How should API look like? Like any API: Expressive, flexible, easy to understand, easy to get right, hard to use wrong, with no need for boilerplate code. The rest is up to you. Forcing people to use talloc_sprintf() befoer calling it doesn't really sound all that great. Firstly, I don't understand why we didn't have to do dynamic allocations before this proposed change and we now use them. Secondl, if we use them, the allocation and release of the memory should as far as possible be hidden from the caller. The caller just wants to state "I have alarm XY" in an easy way, without caring about the implementation behind. -- To view, visit https://gerrit.osmocom.org/1570 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I738555c547926e97b325ab53763c0076c42309bc Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 24 13:11:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 24 Jan 2017 13:11:08 +0000 Subject: osmo-pcu[master]: BTS: accept also relative frame numbers with rach requst In-Reply-To: References: Message-ID: Patch Set 4: please manually rebase so ig can be merged -- To view, visit https://gerrit.osmocom.org/1205 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iaa182d8d29c6a0f5fa06064c2eb48b21b1ba2775 Gerrit-PatchSet: 4 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 24 13:11:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 24 Jan 2017 13:11:50 +0000 Subject: osmo-pcu[master]: Handle packet access reject during packet resource request In-Reply-To: References: Message-ID: Patch Set 10: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1216 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I05ff25124b58905586caa0c0c37023d69724f121 Gerrit-PatchSet: 10 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: pravin Gerrit-Reviewer: sivasankari Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 24 13:11:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 24 Jan 2017 13:11:52 +0000 Subject: [MERGED] osmo-pcu[master]: Handle packet access reject during packet resource request In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Handle packet access reject during packet resource request ...................................................................... Handle packet access reject during packet resource request When Packet resource request is received, PCU will generate the packet access reject if no resources are present. The encoding is done based on section 7.1.3.2.1 and 8.1.2.5 of 44.060 version 7.27.0 Release 7. This patch also includes the test case to validate the generated packet access reject message. This patch is integration tested on Osmo-trx setup with Ettus B210 board and LG F70 MS with some simulation code changes in Osmo-pcu. Change-Id: I05ff25124b58905586caa0c0c37023d69724f121 --- M src/bts.cpp M src/gprs_rlcmac_sched.cpp M src/tbf.cpp M src/tbf.h M tests/tbf/TbfTest.cpp M tests/tbf/TbfTest.err M tests/tbf/TbfTest.ok 7 files changed, 398 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/bts.cpp b/src/bts.cpp index b4e18e3..25cbc60 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -1356,8 +1356,12 @@ egprs_ms_class); ul_tbf = tbf_alloc_ul(bts_data(), trx_no(), ms_class, egprs_ms_class, tlli, ta, ms); - if (!ul_tbf) + + if (!ul_tbf) { + handle_tbf_reject(bts_data(), ms, tlli, + trx_no(), ts_no); return; + } /* set control ts to current MS's TS, until assignment complete */ LOGP(DRLCMAC, LOGL_DEBUG, "Change control TS to %d until assinment is complete.\n", ts_no); diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp index 8b27cac..3b940f4 100644 --- a/src/gprs_rlcmac_sched.cpp +++ b/src/gprs_rlcmac_sched.cpp @@ -56,7 +56,9 @@ *ul_ack_tbf = ul_tbf; if (ul_tbf->dl_ass_state == GPRS_RLCMAC_DL_ASS_SEND_ASS) *dl_ass_tbf = ul_tbf; - if (ul_tbf->ul_ass_state == GPRS_RLCMAC_UL_ASS_SEND_ASS) + if (ul_tbf->ul_ass_state == GPRS_RLCMAC_UL_ASS_SEND_ASS + || 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?" } @@ -136,8 +138,11 @@ * because they may kill the TBF when the CONTROL ACK is * received, thus preventing the others from being processed. */ - - if (tbf == ul_ass_tbf && tbf->direction == GPRS_RLCMAC_DL_TBF) + if (tbf == ul_ass_tbf && tbf->ul_ass_state == + GPRS_RLCMAC_UL_ASS_SEND_ASS_REJ) + msg = ul_ass_tbf->create_packet_access_reject(); + else if (tbf == ul_ass_tbf && tbf->direction == + GPRS_RLCMAC_DL_TBF) if (tbf->ul_ass_state == GPRS_RLCMAC_UL_ASS_SEND_ASS_REJ) msg = ul_ass_tbf->create_packet_access_reject(); diff --git a/src/tbf.cpp b/src/tbf.cpp index 33d94a8..0d28c5c 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -1174,6 +1174,10 @@ bitvec_free(packet_access_rej); ul_ass_state = GPRS_RLCMAC_UL_ASS_NONE; + /* Start Tmr only if it is UL TBF */ + if (direction == GPRS_RLCMAC_UL_TBF) + tbf_timer_start(this, 0, Treject_pacch); + return msg; } @@ -1403,3 +1407,39 @@ { return ts == control_ts; } + +struct gprs_rlcmac_ul_tbf *handle_tbf_reject(struct gprs_rlcmac_bts *bts, + GprsMs *ms, uint32_t tlli, uint8_t trx_no, uint8_t ts) +{ + struct gprs_rlcmac_ul_tbf *ul_tbf = NULL; + struct gprs_rlcmac_trx *trx = &bts->trx[trx_no]; + + ul_tbf = talloc(tall_pcu_ctx, struct gprs_rlcmac_ul_tbf); + if (!ul_tbf) + return ul_tbf; + + talloc_set_destructor(ul_tbf, ul_tbf_dtor); + new (ul_tbf) gprs_rlcmac_ul_tbf(bts->bts); + if (!ms) + ms = bts->bts->ms_alloc(0, 0); + + ms->set_tlli(tlli); + + llist_add(&ul_tbf->list(), &bts->bts->ul_tbfs()); + ul_tbf->bts->tbf_ul_created(); + ul_tbf->set_state(GPRS_RLCMAC_ASSIGN); + ul_tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); + + ul_tbf->set_ms(ms); + ul_tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF); + ul_tbf->ul_ass_state = GPRS_RLCMAC_UL_ASS_SEND_ASS_REJ; + ul_tbf->control_ts = ts; + ul_tbf->trx = trx; + ul_tbf->m_ctrs = rate_ctr_group_alloc(ul_tbf, &tbf_ctrg_desc, 0); + ul_tbf->m_ul_egprs_ctrs = rate_ctr_group_alloc(ul_tbf, + &tbf_ul_egprs_ctrg_desc, 0); + ul_tbf->m_ul_gprs_ctrs = rate_ctr_group_alloc(ul_tbf, + &tbf_ul_gprs_ctrg_desc, 0); + + return ul_tbf; +} diff --git a/src/tbf.h b/src/tbf.h index 0389595..09e3122 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -43,6 +43,7 @@ #define Tassign_agch 0,200000 /* waiting after IMM.ASS confirm */ #define Tassign_pacch 2,0 /* timeout for pacch assigment */ +#define Treject_pacch 0,2000 /* timeout for tbf reject for PRR*/ enum gprs_rlcmac_tbf_state { GPRS_RLCMAC_NULL = 0, /* new created TBF */ @@ -316,6 +317,9 @@ void tbf_free(struct gprs_rlcmac_tbf *tbf); +struct gprs_rlcmac_ul_tbf *handle_tbf_reject(struct gprs_rlcmac_bts *bts, + GprsMs *ms, uint32_t tlli, uint8_t trx_no, uint8_t ts_no); + int tbf_assign_control_ts(struct gprs_rlcmac_tbf *tbf); void tbf_timer_start(struct gprs_rlcmac_tbf *tbf, unsigned int T, diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index 7f4c6ac..aec6ef8 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -3242,6 +3242,114 @@ ARRAY_SIZE(default_categories), }; +static void test_packet_access_rej_prr_no_other_tbfs() +{ + BTS the_bts; + uint32_t fn = 2654218; + int ts_no = 7; + uint8_t trx_no = 0; + uint32_t tlli = 0xffeeddcc; + struct gprs_rlcmac_ul_tbf *ul_tbf = NULL; + + printf("=== start %s ===\n", __func__); + + setup_bts(&the_bts, ts_no, 4); + + int rc = 0; + + ul_tbf = handle_tbf_reject(the_bts.bts_data(), NULL, tlli, + trx_no, ts_no); + + OSMO_ASSERT(ul_tbf != 0); + + /* trigger packet access reject */ + uint8_t bn = fn2bn(fn); + + rc = gprs_rlcmac_rcv_rts_block(the_bts.bts_data(), + trx_no, ts_no, fn, bn); + + OSMO_ASSERT(rc == 0); + + ul_tbf->handle_timeout(); + + printf("=== end %s ===\n", __func__); +} + +static void test_packet_access_rej_prr() +{ + BTS the_bts; + uint32_t fn = 2654218; + uint16_t qta = 31; + int ts_no = 7; + uint8_t trx_no = 0; + RlcMacUplink_t ulreq = {0}; + Packet_Resource_Request_t *presreq = NULL; + uint8_t ms_class = 11; + uint8_t egprs_ms_class = 11; + uint32_t rach_fn = fn - 51; + uint32_t sba_fn = fn + 52; + uint32_t tlli = 0xffeeddcc; + MS_Radio_Access_capability_t *pmsradiocap = NULL; + Multislot_capability_t *pmultislotcap = NULL; + + printf("=== start %s ===\n", __func__); + + setup_bts(&the_bts, ts_no, 4); + + int rc = 0; + + /* + * Trigger rach till resources(USF) exhaust + */ + rc = the_bts.rcv_rach(0x78, rach_fn, qta, 0, + GSM_L1_BURST_TYPE_ACCESS_0); + rc = the_bts.rcv_rach(0x79, rach_fn, qta, 0, + GSM_L1_BURST_TYPE_ACCESS_0); + rc = the_bts.rcv_rach(0x7a, rach_fn, qta, 0, + GSM_L1_BURST_TYPE_ACCESS_0); + rc = the_bts.rcv_rach(0x7b, rach_fn, qta, 0, + GSM_L1_BURST_TYPE_ACCESS_0); + rc = the_bts.rcv_rach(0x7c, rach_fn, qta, 0, + GSM_L1_BURST_TYPE_ACCESS_0); + rc = the_bts.rcv_rach(0x7d, rach_fn, qta, 0, + GSM_L1_BURST_TYPE_ACCESS_0); + rc = the_bts.rcv_rach(0x7e, rach_fn, qta, 0, + GSM_L1_BURST_TYPE_ACCESS_0); + + /* fake a resource request */ + ulreq.u.MESSAGE_TYPE = MT_PACKET_RESOURCE_REQUEST; + presreq = &ulreq.u.Packet_Resource_Request; + presreq->PayloadType = GPRS_RLCMAC_CONTROL_BLOCK; + presreq->ID.UnionType = 1; /* != 0 */ + presreq->ID.u.TLLI = tlli; + presreq->Exist_MS_Radio_Access_capability = 1; + pmsradiocap = &presreq->MS_Radio_Access_capability; + pmsradiocap->Count_MS_RA_capability_value = 1; + pmsradiocap->MS_RA_capability_value[0].u.Content. + Exist_Multislot_capability = 1; + pmultislotcap = &pmsradiocap->MS_RA_capability_value[0]. + u.Content.Multislot_capability; + + pmultislotcap->Exist_GPRS_multislot_class = 1; + pmultislotcap->GPRS_multislot_class = ms_class; + if (egprs_ms_class) { + pmultislotcap->Exist_EGPRS_multislot_class = 1; + pmultislotcap->EGPRS_multislot_class = egprs_ms_class; + } + + send_ul_mac_block(&the_bts, trx_no, ts_no, &ulreq, sba_fn); + + /* trigger packet access reject */ + uint8_t bn = fn2bn(fn); + + rc = gprs_rlcmac_rcv_rts_block(the_bts.bts_data(), + trx_no, ts_no, fn, bn); + + OSMO_ASSERT(rc == 0); + + printf("=== end %s ===\n", __func__); +} + void test_packet_access_rej_epdan() { BTS the_bts; @@ -3310,6 +3418,8 @@ test_immediate_assign_rej(); test_tbf_egprs_two_phase_puan(); test_packet_access_rej_epdan(); + test_packet_access_rej_prr(); + test_packet_access_rej_prr_no_other_tbfs(); if (getenv("TALLOC_REPORT_FULL")) talloc_report_full(tall_pcu_ctx, stderr); diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index f0c3427..575b7fb 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -8873,3 +8873,230 @@ TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) append +MS requests UL TBF on RACH, so we provide one +ra=0x78 Fn=2654167 qta=31 is_11bit=0: +********** TBF starts here ********** +Allocating UL TBF: MS_CLASS=0/0 +Creating MS object, TLLI = 0x00000000 +Slot Allocation (Algorithm A) for class 0 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 4, because not enabled +- Skipping TS 5, because not enabled +- Skipping TS 6, because not enabled +- Assign uplink TS=7 TFI=0 USF=0 +PDCH(TS 7, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL), 1 TBFs, USFs = 01, TFIs = 00000001. +- Setting Control TS 7 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) +Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 +Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x78, Fn=2654167 (17,25,9) +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) + - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=0 USF=0 +Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 78 8b 29 07 00 c8 00 70 0b 2b 2b 2b 2b 2b 2b 2b +MS requests UL TBF on RACH, so we provide one +ra=0x79 Fn=2654167 qta=31 is_11bit=0: +********** TBF starts here ********** +Allocating UL TBF: MS_CLASS=0/0 +Creating MS object, TLLI = 0x00000000 +Slot Allocation (Algorithm A) for class 0 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 4, because not enabled +- Skipping TS 5, because not enabled +- Skipping TS 6, because not enabled +- Assign uplink TS=7 TFI=1 USF=1 +PDCH(TS 7, TRX 0): Attaching TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL), 2 TBFs, USFs = 03, TFIs = 00000003. +- Setting Control TS 7 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL) +Allocated TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 +Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 +TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW +TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START +TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x79, Fn=2654167 (17,25,9) +TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) + - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=1 USF=1 +Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 79 8b 29 07 00 c8 42 70 0b 2b 2b 2b 2b 2b 2b 2b +MS requests UL TBF on RACH, so we provide one +ra=0x7a Fn=2654167 qta=31 is_11bit=0: +********** TBF starts here ********** +Allocating UL TBF: MS_CLASS=0/0 +Creating MS object, TLLI = 0x00000000 +Slot Allocation (Algorithm A) for class 0 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 4, because not enabled +- Skipping TS 5, because not enabled +- Skipping TS 6, because not enabled +- Assign uplink TS=7 TFI=2 USF=2 +PDCH(TS 7, TRX 0): Attaching TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=NULL), 3 TBFs, USFs = 07, TFIs = 00000007. +- Setting Control TS 7 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=NULL) +Allocated TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 +Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 +TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW +TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START +TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7a, Fn=2654167 (17,25,9) +TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) + - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=2 USF=2 +Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 7a 8b 29 07 00 c8 84 70 0b 2b 2b 2b 2b 2b 2b 2b +MS requests UL TBF on RACH, so we provide one +ra=0x7b Fn=2654167 qta=31 is_11bit=0: +********** TBF starts here ********** +Allocating UL TBF: MS_CLASS=0/0 +Creating MS object, TLLI = 0x00000000 +Slot Allocation (Algorithm A) for class 0 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 4, because not enabled +- Skipping TS 5, because not enabled +- Skipping TS 6, because not enabled +- Assign uplink TS=7 TFI=3 USF=3 +PDCH(TS 7, TRX 0): Attaching TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=NULL), 4 TBFs, USFs = 0f, TFIs = 0000000f. +- Setting Control TS 7 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=NULL) +Allocated TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 +Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 +TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW +TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START +TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7b, Fn=2654167 (17,25,9) +TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) + - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=3 USF=3 +Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 7b 8b 29 07 00 c8 c6 70 0b 2b 2b 2b 2b 2b 2b 2b +MS requests UL TBF on RACH, so we provide one +ra=0x7c Fn=2654167 qta=31 is_11bit=0: +********** TBF starts here ********** +Allocating UL TBF: MS_CLASS=0/0 +Creating MS object, TLLI = 0x00000000 +Slot Allocation (Algorithm A) for class 0 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 4, because not enabled +- Skipping TS 5, because not enabled +- Skipping TS 6, because not enabled +- Assign uplink TS=7 TFI=4 USF=4 +PDCH(TS 7, TRX 0): Attaching TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=NULL), 5 TBFs, USFs = 1f, TFIs = 0000001f. +- Setting Control TS 7 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=NULL) +Allocated TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 +Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 +TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW +TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START +TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7c, Fn=2654167 (17,25,9) +TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) + - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=4 USF=4 +Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 7c 8b 29 07 00 c9 08 70 0b 2b 2b 2b 2b 2b 2b 2b +MS requests UL TBF on RACH, so we provide one +ra=0x7d Fn=2654167 qta=31 is_11bit=0: +********** TBF starts here ********** +Allocating UL TBF: MS_CLASS=0/0 +Creating MS object, TLLI = 0x00000000 +Slot Allocation (Algorithm A) for class 0 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 4, because not enabled +- Skipping TS 5, because not enabled +- Skipping TS 6, because not enabled +- Assign uplink TS=7 TFI=5 USF=5 +PDCH(TS 7, TRX 0): Attaching TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=NULL), 6 TBFs, USFs = 3f, TFIs = 0000003f. +- Setting Control TS 7 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=NULL) +Allocated TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 +Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 +TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW +TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START +TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7d, Fn=2654167 (17,25,9) +TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) + - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=5 USF=5 +Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 7d 8b 29 07 00 c9 4a 70 0b 2b 2b 2b 2b 2b 2b 2b +MS requests UL TBF on RACH, so we provide one +ra=0x7e Fn=2654167 qta=31 is_11bit=0: +********** TBF starts here ********** +Allocating UL TBF: MS_CLASS=0/0 +Creating MS object, TLLI = 0x00000000 +Slot Allocation (Algorithm A) for class 0 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 4, because not enabled +- Skipping TS 5, because not enabled +- Skipping TS 6, because not enabled +- Assign uplink TS=7 TFI=6 USF=6 +PDCH(TS 7, TRX 0): Attaching TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=NULL), 7 TBFs, USFs = 7f, TFIs = 0000007f. +- Setting Control TS 7 +Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=NULL) +Allocated TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 +Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 +TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW +TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START +TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7e, Fn=2654167 (17,25,9) +TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) + - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=6 USF=6 +Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 7e 8b 29 07 00 c9 8c 70 0b 2b 2b 2b 2b 2b 2b 2b +Got RLC block, coding scheme: CS-1, length: 23 (23)) ++++++++++++++++++++++++++ RX : Uplink Control Block +++++++++++++++++++++++++ +------------------------- RX : Uplink Control Block ------------------------- +MS requests UL TBF in packet resource request of single block, so we provide one: +MS requests UL TBF in packet resource request of single block, but there is no resource request scheduled! +MS supports EGPRS multislot class 11. +********** TBF starts here ********** +Allocating UL TBF: MS_CLASS=11/11 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, TLLI = 0x00000000, MS class 0 -> 11 +Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 11 +Slot Allocation (Algorithm A) for class 11 +- Skipping TS 0, because not enabled +- Skipping TS 1, because not enabled +- Skipping TS 2, because not enabled +- Skipping TS 3, because not enabled +- Skipping TS 4, because not enabled +- Skipping TS 5, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because no USF available +- Failed to allocate a TS, no USF available +No PDCH resource +Creating MS object, TLLI = 0x00000000 +Modifying MS object, UL TLLI: 0x00000000 -> 0xffeeddcc, not yet confirmed +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN +Attaching TBF to MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) +Received RTS for PDCH: TRX=0 TS=7 FN=2654218 block_nr=8 scheduling USF=0 for required uplink resource of UL TFI=0 +TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) starting timer 0. +Scheduling control message at RTS for TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) (TRX=0, TS=7) +Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654218 block=8 data=40 84 7f f7 6e e6 41 4b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +Destroying MS object, TLLI = 0x00000000 +Creating MS object, TLLI = 0x00000000 +Modifying MS object, UL TLLI: 0x00000000 -> 0xffeeddcc, not yet confirmed +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN +Attaching TBF to MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) +TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) starting timer 0. +Scheduling control message at RTS for TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) (TRX=0, TS=7) +Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654218 block=8 data=47 84 7f f7 6e e6 41 4b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) timer 0 expired. +TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) releasing due to PACCH assignment timeout. +TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) free +TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) stopping timer 0. +Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) +Destroying MS object, TLLI = 0xffeeddcc +********** TBF ends here ********** diff --git a/tests/tbf/TbfTest.ok b/tests/tbf/TbfTest.ok index d531437..077ec4e 100644 --- a/tests/tbf/TbfTest.ok +++ b/tests/tbf/TbfTest.ok @@ -77,3 +77,7 @@ === start test_packet_access_rej_epdan === packet reject: 40 84 7f f7 6e e6 41 4b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b === end test_packet_access_rej_epdan === +=== start test_packet_access_rej_prr === +=== end test_packet_access_rej_prr === +=== start test_packet_access_rej_prr_no_other_tbfs === +=== end test_packet_access_rej_prr_no_other_tbfs === -- To view, visit https://gerrit.osmocom.org/1216 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I05ff25124b58905586caa0c0c37023d69724f121 Gerrit-PatchSet: 11 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: pravin Gerrit-Reviewer: sivasankari From gerrit-no-reply at lists.osmocom.org Tue Jan 24 13:14:52 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 24 Jan 2017 13:14:52 +0000 Subject: osmo-bts[master]: Revert "deb: use gsm_data_shared.* from openbsc-dev" In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1650 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8bc3a5c2b9446d9e94e362ed5d85a61e3a727f8b Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 24 13:15:31 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 24 Jan 2017 13:15:31 +0000 Subject: openbsc[master]: debian: Install header and source file to different directory In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1651 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3da21402dee3d6f1d812b232b0a3f13b8a462d5b Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 24 13:15:51 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 24 Jan 2017 13:15:51 +0000 Subject: osmo-bts[master]: debian: Use the header files installed by openbsc-dev In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1652 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie0a005315454a6450205ce6fd76242b85405de8d Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 24 13:16:07 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 24 Jan 2017 13:16:07 +0000 Subject: openbsc[master]: debian: Install header and source file to different directory In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1651 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3da21402dee3d6f1d812b232b0a3f13b8a462d5b Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 24 13:16:10 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 24 Jan 2017 13:16:10 +0000 Subject: [MERGED] openbsc[master]: debian: Install header and source file to different directory In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: debian: Install header and source file to different directory ...................................................................... debian: Install header and source file to different directory osmo-bts consumes the gsm_data_shared.{h,c} files and assumes the OpenBSC directory layout. Install the files into the specific sub-directories to make the --with-openbsc=dir option work. Change-Id: I3da21402dee3d6f1d812b232b0a3f13b8a462d5b --- M debian/control M debian/openbsc-dev.install 2 files changed, 5 insertions(+), 4 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/debian/control b/debian/control index 93b4bd3..144e649 100644 --- a/debian/control +++ b/debian/control @@ -107,8 +107,8 @@ from OpenBSC. This package installs these files to your file system so that the other packages can build-depend on this package. . - The header file is installed to /usr/include/osmocom/openbsc, while - the .c file is installed to /usr/src/osmocom/openbsc. + The directory structure is copied after the structure in the repository + and the header and .c file are installed into /usr/src/osmocom/openbsc/. Package: osmo-gtphub Architecture: any diff --git a/debian/openbsc-dev.install b/debian/openbsc-dev.install index 557aea1..398321a 100644 --- a/debian/openbsc-dev.install +++ b/debian/openbsc-dev.install @@ -1,2 +1,3 @@ -openbsc/include/openbsc/gsm_data_shared.h usr/include/osmocom/openbsc/ -openbsc/src/libcommon/gsm_data_shared.c usr/src/osmocom/openbsc/libcommon/ +openbsc/include/openbsc/gsm_data_shared.h usr/src/osmocom/openbsc/openbsc/include/openbsc/ +openbsc/include/openbsc/common_cs.h usr/src/osmocom/openbsc/openbsc/include/openbsc/ +openbsc/src/libcommon/gsm_data_shared.c usr/src/osmocom/openbsc/openbsc/src/libcommon/ -- To view, visit https://gerrit.osmocom.org/1651 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3da21402dee3d6f1d812b232b0a3f13b8a462d5b Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Tue Jan 24 13:16:18 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 24 Jan 2017 13:16:18 +0000 Subject: osmo-bts[master]: Revert "deb: use gsm_data_shared.* from openbsc-dev" In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1650 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8bc3a5c2b9446d9e94e362ed5d85a61e3a727f8b Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 24 13:16:21 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 24 Jan 2017 13:16:21 +0000 Subject: [MERGED] osmo-bts[master]: Revert "deb: use gsm_data_shared.* from openbsc-dev" In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: Revert "deb: use gsm_data_shared.* from openbsc-dev" ...................................................................... Revert "deb: use gsm_data_shared.* from openbsc-dev" As the Osmocom project is providing packages and we build them directly from git we should have native packages. openbsc-dev should provide files in the same directory structure as the git repository and then --with-openbsc=/usr/src/osmocom/openbsc/openbsc/include/openbsc can be used. Follow up patches are coming. This reverts commit 70b71507c27f8967b0aa31cad0b3070c6780f3b4. Change-Id: I8bc3a5c2b9446d9e94e362ed5d85a61e3a727f8b --- D debian/patches/01_location_of_gsm_data_shared.patch D debian/patches/series M debian/source/format 3 files changed, 1 insertion(+), 21 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/debian/patches/01_location_of_gsm_data_shared.patch b/debian/patches/01_location_of_gsm_data_shared.patch deleted file mode 100644 index b0a1499..0000000 --- a/debian/patches/01_location_of_gsm_data_shared.patch +++ /dev/null @@ -1,18 +0,0 @@ -From: Ruben Undheim -Date: Sat, 28 May 2016 09:38:56 +0200 -Subject: In order to build osmo-bts, - some files shared with openbsc needs to be available. This replaces - the search path for these files so that they are picked from the openbsc-dev - package. - ---- - src/common/gsm_data_shared.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/common/gsm_data_shared.c b/src/common/gsm_data_shared.c -index 706892d..932d71f 100644 ---- a/src/common/gsm_data_shared.c -+++ b/src/common/gsm_data_shared.c -@@ -1 +1 @@ --#include "../../../openbsc/openbsc/src/libcommon/gsm_data_shared.c" -+#include "/usr/src/osmocom/openbsc/libcommon/gsm_data_shared.c" diff --git a/debian/patches/series b/debian/patches/series deleted file mode 100644 index e753172..0000000 --- a/debian/patches/series +++ /dev/null @@ -1,2 +0,0 @@ -01_location_of_gsm_data_shared.patch - diff --git a/debian/source/format b/debian/source/format index 163aaf8..89ae9db 100644 --- a/debian/source/format +++ b/debian/source/format @@ -1 +1 @@ -3.0 (quilt) +3.0 (native) -- To view, visit https://gerrit.osmocom.org/1650 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8bc3a5c2b9446d9e94e362ed5d85a61e3a727f8b Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Tue Jan 24 13:16:27 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 24 Jan 2017 13:16:27 +0000 Subject: osmo-bts[master]: debian: Use the header files installed by openbsc-dev In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1652 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie0a005315454a6450205ce6fd76242b85405de8d Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 24 13:16:29 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 24 Jan 2017 13:16:29 +0000 Subject: [MERGED] osmo-bts[master]: debian: Use the header files installed by openbsc-dev In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: debian: Use the header files installed by openbsc-dev ...................................................................... debian: Use the header files installed by openbsc-dev Use --with-openbsc= to pick up gsm_data_shared.h coming from the openbsc-dev package. With the revert of the change Iec6b0f0eb0b7fffaa814c9769c0ee777d641a07f, packaging could work now. Change-Id: Ie0a005315454a6450205ce6fd76242b85405de8d --- M debian/rules 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Max: Looks good to me, but someone else must approve Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/debian/rules b/debian/rules index 80ba0b2..12b3334 100755 --- a/debian/rules +++ b/debian/rules @@ -19,7 +19,7 @@ dh_autoreconf override_dh_auto_configure: - dh_auto_configure -- --enable-trx + dh_auto_configure -- --enable-trx --with-openbsc=/usr/src/osmocom/openbsc/openbsc/include/ override_dh_clean: dh_clean -- To view, visit https://gerrit.osmocom.org/1652 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie0a005315454a6450205ce6fd76242b85405de8d Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Tue Jan 24 13:27:34 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 24 Jan 2017 13:27:34 +0000 Subject: [PATCH] libosmocore[master]: sim: Link to libtalloc as symbols of it are used here Message-ID: Review at https://gerrit.osmocom.org/1653 sim: Link to libtalloc as symbols of it are used here A DSO should link to the libraries that it is using. Linking to libtalloc will resolve these warnings: Change-Id: I4c8d5e80e194b9d9b4fa2424c4a22377ecee9c7a dpkg-shlibdeps: warning: symbol _talloc_zero used by debian/libosmosim0/usr/lib/i386-linux-gnu/libosmosim.so.0.0.0 found in none of the libraries dpkg-shlibdeps: warning: symbol _talloc_free used by debian/libosmosim0/usr/lib/i386-linux-gnu/libosmosim.so.0.0.0 found in none of the libraries dpkg-shlibdeps: warning: symbol talloc_strndup used by debian/libosmosim0/usr/lib/i386-linux-gnu/libosmosim.so.0.0.0 found in none of the libraries dpkg-shlibdeps: warning: symbol talloc_strdup used by debian/libosmosim0/usr/lib/i386-linux-gnu/libosmosim.so.0.0.0 found in none of the libraries dpkg-shlibdeps: warning: symbol _talloc_memdup used by debian/libosmosim0/usr/lib/i386-linux-gnu/libosmosim.so.0.0.0 found in none of the libraries --- M src/sim/Makefile.am 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/53/1653/1 diff --git a/src/sim/Makefile.am b/src/sim/Makefile.am index 4d21f2a..ba23ebc 100644 --- a/src/sim/Makefile.am +++ b/src/sim/Makefile.am @@ -21,6 +21,7 @@ libosmosim_la_LIBADD = \ $(top_builddir)/src/libosmocore.la \ $(top_builddir)/src/gsm/libosmogsm.la \ + $(TALLOC_LIBS) \ $(PCSC_LIBS) endif -- To view, visit https://gerrit.osmocom.org/1653 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4c8d5e80e194b9d9b4fa2424c4a22377ecee9c7a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Tue Jan 24 13:29:49 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 24 Jan 2017 13:29:49 +0000 Subject: [PATCH] openbsc[master]: CTRL: remove boilerplate In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1576 to look at the new patch set (#4). CTRL: remove boilerplate Use CTRL_CMD_DEFINE_RO(), CTRL_CMD_DEFINE_WO() and CTRL_CMD_DEFINE_WO_NOVRF() where appropriate to get rid of boilerplate code. Change-Id: I5bcea0b4f4b8f535bef2b423f2013b8b4a218b5b --- M openbsc/src/libbsc/bsc_ctrl_commands.c M openbsc/src/libmsc/ctrl_commands.c M openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c M openbsc/tests/ctrl_test_runner.py 4 files changed, 13 insertions(+), 105 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/76/1576/4 diff --git a/openbsc/src/libbsc/bsc_ctrl_commands.c b/openbsc/src/libbsc/bsc_ctrl_commands.c index 7e84797..14e8d71 100644 --- a/openbsc/src/libbsc/bsc_ctrl_commands.c +++ b/openbsc/src/libbsc/bsc_ctrl_commands.c @@ -70,17 +70,6 @@ CTRL_CMD_VTY_STRING(net_short_name, "short-name", struct gsm_network, name_short); CTRL_CMD_VTY_STRING(net_long_name, "long-name", struct gsm_network, name_long); -static int verify_net_apply_config(struct ctrl_cmd *cmd, const char *v, void *d) -{ - return 0; -} - -static int get_net_apply_config(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Write only attribute"; - return CTRL_CMD_ERROR; -} - static int set_net_apply_config(struct ctrl_cmd *cmd, void *data) { struct gsm_network *net = cmd->node; @@ -107,7 +96,7 @@ return CTRL_CMD_REPLY; } -CTRL_CMD_DEFINE(net_apply_config, "apply-configuration"); +CTRL_CMD_DEFINE_WO_NOVRF(net_apply_config, "apply-configuration"); static int verify_net_mcc_mnc_apply(struct ctrl_cmd *cmd, const char *value, void *d) { @@ -124,12 +113,6 @@ if (!mcc || !mnc) return 1; return 0; -} - -static int get_net_mcc_mnc_apply(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Write only attribute"; - return CTRL_CMD_ERROR; } static int set_net_mcc_mnc_apply(struct ctrl_cmd *cmd, void *data) @@ -165,22 +148,11 @@ cmd->reply = "OOM"; return CTRL_CMD_ERROR; } -CTRL_CMD_DEFINE(net_mcc_mnc_apply, "mcc-mnc-apply"); +CTRL_CMD_DEFINE_WO(net_mcc_mnc_apply, "mcc-mnc-apply"); /* BTS related commands below */ CTRL_CMD_DEFINE_RANGE(bts_lac, "location-area-code", struct gsm_bts, location_area_code, 0, 65535); CTRL_CMD_DEFINE_RANGE(bts_ci, "cell-identity", struct gsm_bts, cell_identity, 0, 65535); - -static int verify_bts_apply_config(struct ctrl_cmd *cmd, const char *v, void *d) -{ - return 0; -} - -static int get_bts_apply_config(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Write only attribute"; - return CTRL_CMD_ERROR; -} static int set_bts_apply_config(struct ctrl_cmd *cmd, void *data) { @@ -196,18 +168,7 @@ return CTRL_CMD_REPLY; } -CTRL_CMD_DEFINE(bts_apply_config, "apply-configuration"); - -static int verify_bts_si(struct ctrl_cmd *cmd, const char *v, void *d) -{ - return 0; -} - -static int get_bts_si(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Write only attribute"; - return CTRL_CMD_ERROR; -} +CTRL_CMD_DEFINE_WO_NOVRF(bts_apply_config, "apply-configuration"); static int set_bts_si(struct ctrl_cmd *cmd, void *data) { @@ -223,12 +184,7 @@ cmd->reply = "Generated new System Information"; return CTRL_CMD_REPLY; } -CTRL_CMD_DEFINE(bts_si, "send-new-system-informations"); - -static int verify_bts_chan_load(struct ctrl_cmd *cmd, const char *v, void *d) -{ - return 0; -} +CTRL_CMD_DEFINE_WO_NOVRF(bts_si, "send-new-system-informations"); static int get_bts_chan_load(struct ctrl_cmd *cmd, void *data) { @@ -271,23 +227,7 @@ return CTRL_CMD_ERROR; } -static int set_bts_chan_load(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Read only attribute"; - return CTRL_CMD_ERROR; -} -CTRL_CMD_DEFINE(bts_chan_load, "channel-load"); - -static int verify_bts_oml_conn(struct ctrl_cmd *cmd, const char *value, void *_data) -{ - struct gsm_bts *bts = cmd->node; - - if (!is_ipaccess_bts(bts)) { - cmd->reply = ""; - return -1; - } - return 0; -} +CTRL_CMD_DEFINE_RO(bts_chan_load, "channel-load"); static int get_bts_oml_conn(struct ctrl_cmd *cmd, void *data) { @@ -297,12 +237,7 @@ return CTRL_CMD_REPLY; } -static int set_bts_oml_conn(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Read only attribute"; - return CTRL_CMD_ERROR; -} -CTRL_CMD_DEFINE(bts_oml_conn, "oml-connection-state"); +CTRL_CMD_DEFINE_RO(bts_oml_conn, "oml-connection-state"); static int verify_bts_gprs_mode(struct ctrl_cmd *cmd, const char *value, void *_data) { diff --git a/openbsc/src/libmsc/ctrl_commands.c b/openbsc/src/libmsc/ctrl_commands.c index 79e136d..24b68fa 100644 --- a/openbsc/src/libmsc/ctrl_commands.c +++ b/openbsc/src/libmsc/ctrl_commands.c @@ -74,12 +74,6 @@ return rc; } -static int get_subscriber_modify(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Set only attribute"; - return CTRL_CMD_ERROR; -} - static int set_subscriber_modify(struct ctrl_cmd *cmd, void *data) { struct gsm_network *net = cmd->node; @@ -157,18 +151,7 @@ return CTRL_CMD_ERROR; } -CTRL_CMD_DEFINE(subscriber_modify, "subscriber-modify-v1"); - -static int verify_subscriber_delete(struct ctrl_cmd *cmd, const char *v, void *d) -{ - return 0; -} - -static int get_subscriber_delete(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Set only attribute"; - return CTRL_CMD_ERROR; -} +CTRL_CMD_DEFINE_WO(subscriber_modify, "subscriber-modify-v1"); static int set_subscriber_delete(struct ctrl_cmd *cmd, void *data) { @@ -199,7 +182,7 @@ cmd->reply = was_used ? "Removed active subscriber" : "Removed"; return CTRL_CMD_REPLY; } -CTRL_CMD_DEFINE(subscriber_delete, "subscriber-delete-v1"); +CTRL_CMD_DEFINE_WO_NOVRF(subscriber_delete, "subscriber-delete-v1"); static int verify_subscriber_list(struct ctrl_cmd *cmd, const char *value, void *d) { diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c b/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c index ec4243e..057a583 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c @@ -446,11 +446,7 @@ return 0; } -CTRL_CMD_DEFINE(net_save_cmd, "net 0 save-configuration"); -static int verify_net_save_cmd(struct ctrl_cmd *cmd, const char *v, void *d) -{ - return 0; -} +CTRL_CMD_DEFINE_WO_NOVRF(net_save_cmd, "net 0 save-configuration"); static int set_net_save_cmd(struct ctrl_cmd *cmd, void *data) { @@ -462,12 +458,6 @@ } return CTRL_CMD_REPLY; -} - -static int get_net_save_cmd(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Write only attribute"; - return CTRL_CMD_ERROR; } struct ctrl_handle *bsc_nat_controlif_setup(struct bsc_nat *nat, diff --git a/openbsc/tests/ctrl_test_runner.py b/openbsc/tests/ctrl_test_runner.py index 4fd831f..9050c09 100644 --- a/openbsc/tests/ctrl_test_runner.py +++ b/openbsc/tests/ctrl_test_runner.py @@ -219,7 +219,7 @@ def testBtsGenerateSystemInformation(self): r = self.do_get('bts.0.send-new-system-informations') self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Write only attribute') + self.assertEquals(r['error'], 'Write Only attribute') # No RSL links so it will fail r = self.do_set('bts.0.send-new-system-informations', '1') @@ -229,7 +229,7 @@ def testBtsChannelLoad(self): r = self.do_set('bts.0.channel-load', '1') self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Read only attribute') + self.assertEquals(r['error'], 'Read Only attribute') # No RSL link so everything is 0 r = self.do_get('bts.0.channel-load') @@ -243,7 +243,7 @@ """Check OML state. It will not be connected""" r = self.do_set('bts.0.oml-connection-state', '1') self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Read only attribute') + self.assertEquals(r['error'], 'Read Only attribute') # No RSL link so everything is 0 r = self.do_get('bts.0.oml-connection-state') @@ -531,7 +531,7 @@ def testApplyConfiguration(self): r = self.do_get('bts.0.apply-configuration') self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Write only attribute') + self.assertEquals(r['error'], 'Write Only attribute') r = self.do_set('bts.0.apply-configuration', '1') self.assertEquals(r['mtype'], 'SET_REPLY') -- To view, visit https://gerrit.osmocom.org/1576 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I5bcea0b4f4b8f535bef2b423f2013b8b4a218b5b Gerrit-PatchSet: 4 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Jan 24 13:31:07 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 24 Jan 2017 13:31:07 +0000 Subject: openbsc[master]: CTRL: remove boilerplate In-Reply-To: References: Message-ID: Patch Set 4: Good catch - that's because couple of RO command were defined with non-RO macro. Fixed that in new version. -- To view, visit https://gerrit.osmocom.org/1576 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5bcea0b4f4b8f535bef2b423f2013b8b4a218b5b Gerrit-PatchSet: 4 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From admin at opensuse.org Tue Jan 24 13:23:28 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 24 Jan 2017 13:23:28 +0000 Subject: Build failure of network:osmocom:nightly/libosmo-abis in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <5887555d82a4c_15a5a89c103931da@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmo-abis/Debian_8.0/x86_64 Package network:osmocom:nightly/libosmo-abis failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly libosmo-abis Last lines of build log: [ 101s] CCLD e1inp_ipa_bsc_test [ 101s] ../src/.libs/libosmoabis.so: undefined reference to `llist_count' [ 101s] collect2: error: ld returned 1 exit status [ 101s] Makefile:401: recipe for target 'e1inp_ipa_bsc_test' failed [ 101s] make[4]: *** [e1inp_ipa_bsc_test] Error 1 [ 101s] make[4]: Leaving directory '/usr/src/packages/BUILD/tests' [ 101s] Makefile:566: recipe for target 'check-am' failed [ 101s] make[3]: *** [check-am] Error 2 [ 101s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests' [ 101s] Makefile:457: recipe for target 'check-recursive' failed [ 101s] make[2]: *** [check-recursive] Error 1 [ 101s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 101s] Makefile:748: recipe for target 'check' failed [ 101s] make[1]: *** [check] Error 2 [ 101s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 101s] dh_auto_test: make -j1 check returned exit code 2 [ 101s] debian/rules:12: recipe for target 'build' failed [ 101s] make: *** [build] Error 2 [ 101s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 101s] [ 101s] lamb14 failed "build libosmo-abis_0.3.3.20170124.dsc" at Tue Jan 24 13:23:13 UTC 2017. [ 101s] [ 101s] ### VM INTERACTION START ### [ 102s] Powering off. [ 102s] [ 88.410456] reboot: Power down [ 102s] ### VM INTERACTION END ### [ 102s] [ 102s] lamb14 failed "build libosmo-abis_0.3.3.20170124.dsc" at Tue Jan 24 13:23:14 UTC 2017. [ 102s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue Jan 24 13:23:11 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 24 Jan 2017 13:23:11 +0000 Subject: Build failure of network:osmocom:nightly/libosmo-abis in Debian_8.0/i586 In-Reply-To: References: Message-ID: <5887555934750_15a5a89c10392944@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmo-abis/Debian_8.0/i586 Package network:osmocom:nightly/libosmo-abis failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly libosmo-abis Last lines of build log: [ 104s] CC e1inp_ipa_bsc_test.o [ 104s] CCLD e1inp_ipa_bsc_test [ 104s] ../src/.libs/libosmoabis.so: undefined reference to `llist_count' [ 104s] collect2: error: ld returned 1 exit status [ 104s] Makefile:401: recipe for target 'e1inp_ipa_bsc_test' failed [ 104s] make[4]: *** [e1inp_ipa_bsc_test] Error 1 [ 104s] make[4]: Leaving directory '/usr/src/packages/BUILD/tests' [ 104s] Makefile:566: recipe for target 'check-am' failed [ 104s] make[3]: *** [check-am] Error 2 [ 104s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests' [ 104s] Makefile:457: recipe for target 'check-recursive' failed [ 104s] make[2]: *** [check-recursive] Error 1 [ 104s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 104s] Makefile:748: recipe for target 'check' failed [ 104s] make[1]: *** [check] Error 2 [ 104s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 104s] dh_auto_test: make -j1 check returned exit code 2 [ 104s] debian/rules:12: recipe for target 'build' failed [ 104s] make: *** [build] Error 2 [ 104s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 104s] [ 105s] lamb51 failed "build libosmo-abis_0.3.3.20170124.dsc" at Tue Jan 24 13:22:57 UTC 2017. [ 105s] [ 105s] ### VM INTERACTION START ### [ 106s] Powering off. [ 106s] ### VM INTERACTION END ### [ 106s] [ 106s] lamb51 failed "build libosmo-abis_0.3.3.20170124.dsc" at Tue Jan 24 13:22:59 UTC 2017. [ 106s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Tue Jan 24 13:35:58 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 24 Jan 2017 13:35:58 +0000 Subject: libosmocore[master]: sim: Link to libtalloc as symbols of it are used here In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1653 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4c8d5e80e194b9d9b4fa2424c4a22377ecee9c7a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From admin at opensuse.org Tue Jan 24 13:26:23 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 24 Jan 2017 13:26:23 +0000 Subject: Build failure of network:osmocom:nightly/libosmo-abis in xUbuntu_16.04/i586 In-Reply-To: References: Message-ID: <588756145b0d2_15aba89c10362492@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmo-abis/xUbuntu_16.04/i586 Package network:osmocom:nightly/libosmo-abis failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly libosmo-abis Last lines of build log: [ 265s] /bin/bash ../libtool --tag=CC --mode=link gcc -Wall -g -I/usr/include/ -I/usr/include/ -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now -o e1inp_ipa_bsc_test e1inp_ipa_bsc_test.o ../src/libosmoabis.la -ltalloc -losmocore -ltalloc -losmogsm -losmocore [ 266s] libtool: link: gcc -Wall -g -I/usr/include/ -I/usr/include/ -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z -Wl,relro -Wl,-z -Wl,now -o .libs/e1inp_ipa_bsc_test e1inp_ipa_bsc_test.o ../src/.libs/libosmoabis.so -ltalloc /usr/lib/i386-linux-gnu/libosmogsm.so /usr/lib/i386-linux-gnu/libosmocore.so [ 266s] ../src/.libs/libosmoabis.so: undefined reference to `llist_count' [ 266s] collect2: error: ld returned 1 exit status [ 266s] Makefile:412: recipe for target 'e1inp_ipa_bsc_test' failed [ 266s] make[4]: *** [e1inp_ipa_bsc_test] Error 1 [ 266s] make[4]: Leaving directory '/usr/src/packages/BUILD/tests' [ 266s] Makefile:577: recipe for target 'check-am' failed [ 266s] make[3]: *** [check-am] Error 2 [ 266s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests' [ 266s] Makefile:469: recipe for target 'check-recursive' failed [ 266s] make[2]: *** [check-recursive] Error 1 [ 266s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 266s] Makefile:760: recipe for target 'check' failed [ 266s] make[1]: *** [check] Error 2 [ 266s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 266s] dh_auto_test: make -j1 check returned exit code 2 [ 266s] debian/rules:12: recipe for target 'build' failed [ 266s] make: *** [build] Error 2 [ 266s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 266s] [ 266s] wildcard1 failed "build libosmo-abis_0.3.3.20170124.dsc" at Tue Jan 24 13:26:07 UTC 2017. [ 266s] [ 266s] ### VM INTERACTION START ### [ 269s] [ 244.634353] reboot: Power down [ 269s] ### VM INTERACTION END ### [ 269s] [ 269s] wildcard1 failed "build libosmo-abis_0.3.3.20170124.dsc" at Tue Jan 24 13:26:10 UTC 2017. [ 269s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue Jan 24 13:25:31 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 24 Jan 2017 13:25:31 +0000 Subject: Build failure of network:osmocom:nightly/osmo-trx in xUbuntu_16.04/i586 In-Reply-To: References: Message-ID: <588755dfa7585_159fa89c10385336@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/xUbuntu_16.04/i586 Package network:osmocom:nightly/osmo-trx failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-trx Last lines of build log: [ 142s] #define HAVE_SYS_STAT_H 1 [ 142s] #define HAVE_STDLIB_H 1 [ 142s] #define HAVE_STRING_H 1 [ 142s] #define HAVE_MEMORY_H 1 [ 142s] #define HAVE_STRINGS_H 1 [ 142s] #define HAVE_INTTYPES_H 1 [ 142s] #define HAVE_STDINT_H 1 [ 142s] #define HAVE_UNISTD_H 1 [ 142s] #define HAVE_DLFCN_H 1 [ 142s] #define LT_OBJDIR ".libs/" [ 142s] #define STDC_HEADERS 1 [ 142s] #define HAVE_BYTESWAP_H 1 [ 142s] #define TIME_WITH_SYS_TIME 1 [ 142s] #define USE_UHD_3_9 1 [ 142s] #define USE_UHD 1 [ 142s] [ 142s] configure: exit 1 [ 142s] dh_auto_configure: ./configure --build=i686-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/i386-linux-gnu --libexecdir=${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 142s] debian/rules:6: recipe for target 'build' failed [ 142s] make: *** [build] Error 255 [ 142s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 142s] [ 142s] lamb54 failed "build osmo-trx_0.1.9.20170124.dsc" at Tue Jan 24 13:25:17 UTC 2017. [ 142s] [ 142s] ### VM INTERACTION START ### [ 145s] ### VM INTERACTION END ### [ 145s] [ 145s] lamb54 failed "build osmo-trx_0.1.9.20170124.dsc" at Tue Jan 24 13:25:21 UTC 2017. [ 145s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue Jan 24 13:25:31 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 24 Jan 2017 13:25:31 +0000 Subject: Build failure of network:osmocom:nightly/osmo-trx in xUbuntu_16.10/i586 In-Reply-To: References: Message-ID: <588755df3e8f3_159fa89c10385288@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/xUbuntu_16.10/i586 Package network:osmocom:nightly/osmo-trx failed to build in xUbuntu_16.10/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-trx Last lines of build log: [ 191s] #define HAVE_STRING_H 1 [ 191s] #define HAVE_MEMORY_H 1 [ 191s] #define HAVE_STRINGS_H 1 [ 191s] #define HAVE_INTTYPES_H 1 [ 191s] #define HAVE_STDINT_H 1 [ 191s] #define HAVE_UNISTD_H 1 [ 191s] #define HAVE_DLFCN_H 1 [ 191s] #define LT_OBJDIR ".libs/" [ 191s] #define STDC_HEADERS 1 [ 191s] #define HAVE_BYTESWAP_H 1 [ 191s] #define TIME_WITH_SYS_TIME 1 [ 191s] #define USE_UHD_3_9 1 [ 191s] #define USE_UHD 1 [ 191s] [ 191s] configure: exit 1 [ 191s] dh_auto_configure: ./configure --build=i686-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/i386-linux-gnu --libexecdir=${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 191s] debian/rules:6: recipe for target 'build' failed [ 191s] make: *** [build] Error 2 [ 191s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 191s] [ 191s] lamb55 failed "build osmo-trx_0.1.9.20170124.dsc" at Tue Jan 24 13:25:16 UTC 2017. [ 191s] [ 191s] ### VM INTERACTION START ### [ 191s] [ 172.300739] serial8250: too much work for irq4 [ 193s] [ 174.982701] reboot: Power down [ 194s] ### VM INTERACTION END ### [ 194s] [ 194s] lamb55 failed "build osmo-trx_0.1.9.20170124.dsc" at Tue Jan 24 13:25:20 UTC 2017. [ 194s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue Jan 24 13:25:31 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 24 Jan 2017 13:25:31 +0000 Subject: Build failure of network:osmocom:nightly/osmo-trx in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <588755de24bfb_159fa89c103851ad@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/osmo-trx failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-trx Last lines of build log: [ 163s] #define HAVE_STDLIB_H 1 [ 163s] #define HAVE_STRING_H 1 [ 163s] #define HAVE_MEMORY_H 1 [ 163s] #define HAVE_STRINGS_H 1 [ 163s] #define HAVE_INTTYPES_H 1 [ 163s] #define HAVE_STDINT_H 1 [ 163s] #define HAVE_UNISTD_H 1 [ 163s] #define HAVE_DLFCN_H 1 [ 163s] #define LT_OBJDIR ".libs/" [ 163s] #define STDC_HEADERS 1 [ 163s] #define HAVE_BYTESWAP_H 1 [ 163s] #define TIME_WITH_SYS_TIME 1 [ 163s] #define USE_UHD_3_9 1 [ 163s] #define USE_UHD 1 [ 163s] [ 163s] configure: exit 1 [ 163s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 163s] debian/rules:6: recipe for target 'build' failed [ 163s] make: *** [build] Error 255 [ 163s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 163s] [ 163s] lamb57 failed "build osmo-trx_0.1.9.20170124.dsc" at Tue Jan 24 13:25:10 UTC 2017. [ 163s] [ 163s] ### VM INTERACTION START ### [ 166s] [ 150.990426] reboot: Power down [ 166s] ### VM INTERACTION END ### [ 166s] [ 166s] lamb57 failed "build osmo-trx_0.1.9.20170124.dsc" at Tue Jan 24 13:25:14 UTC 2017. [ 166s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue Jan 24 13:24:57 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 24 Jan 2017 13:24:57 +0000 Subject: Build failure of network:osmocom:nightly/osmo-trx in xUbuntu_16.10/x86_64 In-Reply-To: References: Message-ID: <588755d986e_159fa89c10384870@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/xUbuntu_16.10/x86_64 Package network:osmocom:nightly/osmo-trx failed to build in xUbuntu_16.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-trx Last lines of build log: [ 145s] #define HAVE_STDLIB_H 1 [ 145s] #define HAVE_STRING_H 1 [ 145s] #define HAVE_MEMORY_H 1 [ 145s] #define HAVE_STRINGS_H 1 [ 145s] #define HAVE_INTTYPES_H 1 [ 145s] #define HAVE_STDINT_H 1 [ 145s] #define HAVE_UNISTD_H 1 [ 145s] #define HAVE_DLFCN_H 1 [ 145s] #define LT_OBJDIR ".libs/" [ 145s] #define STDC_HEADERS 1 [ 145s] #define HAVE_BYTESWAP_H 1 [ 145s] #define TIME_WITH_SYS_TIME 1 [ 145s] #define USE_UHD_3_9 1 [ 145s] #define USE_UHD 1 [ 145s] [ 145s] configure: exit 1 [ 145s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 145s] debian/rules:6: recipe for target 'build' failed [ 145s] make: *** [build] Error 2 [ 145s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 145s] [ 145s] wildcard3 failed "build osmo-trx_0.1.9.20170124.dsc" at Tue Jan 24 13:24:22 UTC 2017. [ 145s] [ 145s] ### VM INTERACTION START ### [ 148s] [ 127.184049] reboot: Power down [ 158s] ### VM INTERACTION END ### [ 158s] [ 158s] wildcard3 failed "build osmo-trx_0.1.9.20170124.dsc" at Tue Jan 24 13:24:36 UTC 2017. [ 158s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue Jan 24 13:24:40 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 24 Jan 2017 13:24:40 +0000 Subject: Build failure of network:osmocom:nightly/osmo-trx in Debian_8.0/i586 In-Reply-To: References: Message-ID: <588755b28dceb_15aba89c103620eb@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/Debian_8.0/i586 Package network:osmocom:nightly/osmo-trx failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-trx Last lines of build log: [ 158s] #define HAVE_STDLIB_H 1 [ 158s] #define HAVE_STRING_H 1 [ 158s] #define HAVE_MEMORY_H 1 [ 158s] #define HAVE_STRINGS_H 1 [ 158s] #define HAVE_INTTYPES_H 1 [ 158s] #define HAVE_STDINT_H 1 [ 158s] #define HAVE_UNISTD_H 1 [ 158s] #define HAVE_DLFCN_H 1 [ 158s] #define LT_OBJDIR ".libs/" [ 158s] #define STDC_HEADERS 1 [ 158s] #define HAVE_BYTESWAP_H 1 [ 158s] #define TIME_WITH_SYS_TIME 1 [ 158s] #define USE_UHD 1 [ 158s] [ 158s] configure: exit 1 [ 158s] dh_auto_configure: ./configure --build=i586-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --libdir=${prefix}/lib/i386-linux-gnu --libexecdir=${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 158s] debian/rules:6: recipe for target 'build' failed [ 158s] make: *** [build] Error 255 [ 158s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 158s] [ 158s] lamb60 failed "build osmo-trx_0.1.9.20170124.dsc" at Tue Jan 24 13:24:05 UTC 2017. [ 158s] [ 158s] ### VM INTERACTION START ### [ 159s] Powering off. [ 159s] [ 144.695611] reboot: Power down [ 159s] ### VM INTERACTION END ### [ 159s] [ 159s] lamb60 failed "build osmo-trx_0.1.9.20170124.dsc" at Tue Jan 24 13:24:06 UTC 2017. [ 159s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue Jan 24 13:24:58 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 24 Jan 2017 13:24:58 +0000 Subject: Build failure of network:osmocom:nightly/osmo-trx in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <588755dbac8fb_159fa89c103849ea@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/Debian_8.0/x86_64 Package network:osmocom:nightly/osmo-trx failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-trx Last lines of build log: [ 205s] #define HAVE_STDLIB_H 1 [ 205s] #define HAVE_STRING_H 1 [ 205s] #define HAVE_MEMORY_H 1 [ 205s] #define HAVE_STRINGS_H 1 [ 205s] #define HAVE_INTTYPES_H 1 [ 205s] #define HAVE_STDINT_H 1 [ 205s] #define HAVE_UNISTD_H 1 [ 205s] #define HAVE_DLFCN_H 1 [ 205s] #define LT_OBJDIR ".libs/" [ 205s] #define STDC_HEADERS 1 [ 205s] #define HAVE_BYTESWAP_H 1 [ 205s] #define TIME_WITH_SYS_TIME 1 [ 205s] #define USE_UHD 1 [ 205s] [ 205s] configure: exit 1 [ 205s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 205s] debian/rules:6: recipe for target 'build' failed [ 205s] make: *** [build] Error 255 [ 205s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 205s] [ 205s] cloud121 failed "build osmo-trx_0.1.9.20170124.dsc" at Tue Jan 24 13:24:51 UTC 2017. [ 205s] [ 205s] ### VM INTERACTION START ### [ 207s] Powering off. [ 207s] [ 170.095505] reboot: Power down [ 208s] ### VM INTERACTION END ### [ 208s] [ 208s] cloud121 failed "build osmo-trx_0.1.9.20170124.dsc" at Tue Jan 24 13:24:54 UTC 2017. [ 208s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Tue Jan 24 13:47:14 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 24 Jan 2017 13:47:14 +0000 Subject: [PATCH] osmo-trx[master]: debian: Require fftw3 header files for osmo-trx Message-ID: Review at https://gerrit.osmocom.org/1654 debian: Require fftw3 header files for osmo-trx Install missing development package to get osmo-trx to build. Change-Id: Id80937724d5e4da4ed555cbabfcd3e2457cb2a19 --- M debian/control 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/54/1654/1 diff --git a/debian/control b/debian/control index 0aef88e..b8ec911 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: net Priority: optional Standards-Version: 3.9.3 -Build-Depends: debhelper (>= 9), autotools-dev, libdbd-sqlite3, pkg-config, dh-autoreconf, libuhd-dev, libusb-1.0-0-dev, libboost-all-dev, hardening-wrapper +Build-Depends: debhelper (>= 9), autotools-dev, libdbd-sqlite3, pkg-config, dh-autoreconf, libuhd-dev, libusb-1.0-0-dev, libboost-all-dev, hardening-wrapper, libfftw3-dev Homepage: http://openbsc.osmocom.org/trac/wiki/OsmoTRX Vcs-Git: git://git.osmocom.org/osmo-trx Vcs-Browser: http://cgit.osmocom.org/osmo-trx -- To view, visit https://gerrit.osmocom.org/1654 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id80937724d5e4da4ed555cbabfcd3e2457cb2a19 Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Holger Freyther From admin at opensuse.org Tue Jan 24 13:51:48 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 24 Jan 2017 13:51:48 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bts in xUbuntu_16.10/x86_64 In-Reply-To: References: Message-ID: <58875c0cb652f_159fa89c103869fb@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bts/xUbuntu_16.10/x86_64 Package network:osmocom:nightly/osmo-bts failed to build in xUbuntu_16.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bts Last lines of build log: [ 401s] main.c:56:26: fatal error: openbsc/ctrl.h: No such file or directory [ 401s] #include [ 401s] ^ [ 401s] compilation terminated. [ 401s] Makefile:389: recipe for target 'main.o' failed [ 401s] make[4]: *** [main.o] Error 1 [ 401s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/common' [ 401s] Makefile:341: recipe for target 'all-recursive' failed [ 401s] make[3]: *** [all-recursive] Error 1 [ 401s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 401s] Makefile:390: recipe for target 'all-recursive' failed [ 401s] make[2]: *** [all-recursive] Error 1 [ 401s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 401s] Makefile:331: recipe for target 'all' failed [ 401s] make[1]: *** [all] Error 2 [ 401s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 401s] dh_auto_build: make -j1 returned exit code 2 [ 401s] debian/rules:12: recipe for target 'build' failed [ 401s] make: *** [build] Error 2 [ 401s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 401s] [ 401s] cloud115 failed "build osmo-bts_0.5.0.20170124.dsc" at Tue Jan 24 13:51:32 UTC 2017. [ 401s] [ 401s] ### VM INTERACTION START ### [ 404s] [ 374.014189] reboot: Power down [ 405s] ### VM INTERACTION END ### [ 405s] [ 405s] cloud115 failed "build osmo-bts_0.5.0.20170124.dsc" at Tue Jan 24 13:51:37 UTC 2017. [ 405s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Tue Jan 24 13:53:42 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 24 Jan 2017 13:53:42 +0000 Subject: osmo-trx[master]: debian: Require fftw3 header files for osmo-trx In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 Went to make the fix for OBS and saw that your patch is already here :) -- To view, visit https://gerrit.osmocom.org/1654 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id80937724d5e4da4ed555cbabfcd3e2457cb2a19 Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From admin at opensuse.org Tue Jan 24 13:55:13 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 24 Jan 2017 13:55:13 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bts in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <58875cf5e9cef_159fa89c10387791@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bts/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/osmo-bts failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bts Last lines of build log: [ 96s] gcc -DHAVE_CONFIG_H -I. -I../.. -I../../include -I/usr/src/osmocom/openbsc/openbsc/include/ -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -I/usr/include/ -I/usr/include/ -I/usr/include/ -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -c -o power_control.o power_control.c [ 96s] gcc -DHAVE_CONFIG_H -I. -I../.. -I../../include -I/usr/src/osmocom/openbsc/openbsc/include/ -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -I/usr/include/ -I/usr/include/ -I/usr/include/ -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -c -o main.o main.c [ 96s] main.c:56:26: fatal error: openbsc/ctrl.h: No such file or directory [ 96s] compilation terminated. [ 96s] Makefile:389: recipe for target 'main.o' failed [ 96s] make[4]: *** [main.o] Error 1 [ 96s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/common' [ 96s] Makefile:341: recipe for target 'all-recursive' failed [ 96s] make[3]: *** [all-recursive] Error 1 [ 96s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 96s] Makefile:390: recipe for target 'all-recursive' failed [ 96s] make[2]: *** [all-recursive] Error 1 [ 96s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 96s] Makefile:331: recipe for target 'all' failed [ 96s] make[1]: *** [all] Error 2 [ 96s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 96s] dh_auto_build: make -j1 returned exit code 2 [ 96s] debian/rules:12: recipe for target 'build' failed [ 96s] make: *** [build] Error 2 [ 96s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 96s] [ 96s] lamb10 failed "build osmo-bts_0.5.0.20170124.dsc" at Tue Jan 24 13:55:05 UTC 2017. [ 96s] [ 96s] ### VM INTERACTION START ### [ 99s] [ 87.178725] reboot: Power down [ 99s] ### VM INTERACTION END ### [ 99s] [ 99s] lamb10 failed "build osmo-bts_0.5.0.20170124.dsc" at Tue Jan 24 13:55:09 UTC 2017. [ 99s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Tue Jan 24 13:57:00 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 24 Jan 2017 13:57:00 +0000 Subject: [PATCH] osmo-bts[master]: build: Do not require more headers from OpenBSC Message-ID: Review at https://gerrit.osmocom.org/1655 build: Do not require more headers from OpenBSC There should be no other OpenBSC headers included and nobody is using bsc_controlif_setup. Remove the include. This was introduced in 4723a195081f0f9ff561e360620ee0ade50a2b39. Change-Id: I581f938e8fe9161b1d7076cedd74ff192cea86b2 --- M src/common/main.c 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/55/1655/1 diff --git a/src/common/main.c b/src/common/main.c index 00c8b23..1af4f34 100644 --- a/src/common/main.c +++ b/src/common/main.c @@ -53,7 +53,6 @@ #include #include #include -#include #include int quit = 0; -- To view, visit https://gerrit.osmocom.org/1655 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I581f938e8fe9161b1d7076cedd74ff192cea86b2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Holger Freyther From admin at opensuse.org Tue Jan 24 13:56:58 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 24 Jan 2017 13:56:58 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bts in xUbuntu_16.10/i586 In-Reply-To: References: Message-ID: <58875d3b48478_159fa89c10387912@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bts/xUbuntu_16.10/i586 Package network:osmocom:nightly/osmo-bts failed to build in xUbuntu_16.10/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bts Last lines of build log: [ 179s] gcc -DHAVE_CONFIG_H -I. -I../.. -I../../include -I/usr/src/osmocom/openbsc/openbsc/include/ -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -I/usr/include/ -I/usr/include/ -I/usr/include/ -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fPIE -fstack-protector-strong -Wformat -Werror=format-security -c -o main.o main.c [ 179s] main.c:56:26: fatal error: openbsc/ctrl.h: No such file or directory [ 179s] #include [ 179s] ^ [ 179s] compilation terminated. [ 179s] Makefile:389: recipe for target 'main.o' failed [ 179s] make[4]: *** [main.o] Error 1 [ 179s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/common' [ 179s] Makefile:341: recipe for target 'all-recursive' failed [ 179s] make[3]: *** [all-recursive] Error 1 [ 179s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 179s] Makefile:390: recipe for target 'all-recursive' failed [ 179s] make[2]: *** [all-recursive] Error 1 [ 179s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 179s] Makefile:331: recipe for target 'all' failed [ 179s] make[1]: *** [all] Error 2 [ 179s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 179s] dh_auto_build: make -j1 returned exit code 2 [ 179s] debian/rules:12: recipe for target 'build' failed [ 179s] make: *** [build] Error 2 [ 179s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 179s] [ 179s] cloud125 failed "build osmo-bts_0.5.0.20170124.dsc" at Tue Jan 24 13:56:36 UTC 2017. [ 179s] [ 179s] ### VM INTERACTION START ### [ 184s] ### VM INTERACTION END ### [ 184s] [ 184s] cloud125 failed "build osmo-bts_0.5.0.20170124.dsc" at Tue Jan 24 13:56:42 UTC 2017. [ 184s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Tue Jan 24 13:57:56 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 24 Jan 2017 13:57:56 +0000 Subject: libosmocore[master]: sim: Link to libtalloc as symbols of it are used here In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1653 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4c8d5e80e194b9d9b4fa2424c4a22377ecee9c7a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 24 13:57:58 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 24 Jan 2017 13:57:58 +0000 Subject: [MERGED] libosmocore[master]: sim: Link to libtalloc as symbols of it are used here In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: sim: Link to libtalloc as symbols of it are used here ...................................................................... sim: Link to libtalloc as symbols of it are used here A DSO should link to the libraries that it is using. Linking to libtalloc will resolve these warnings: Change-Id: I4c8d5e80e194b9d9b4fa2424c4a22377ecee9c7a dpkg-shlibdeps: warning: symbol _talloc_zero used by debian/libosmosim0/usr/lib/i386-linux-gnu/libosmosim.so.0.0.0 found in none of the libraries dpkg-shlibdeps: warning: symbol _talloc_free used by debian/libosmosim0/usr/lib/i386-linux-gnu/libosmosim.so.0.0.0 found in none of the libraries dpkg-shlibdeps: warning: symbol talloc_strndup used by debian/libosmosim0/usr/lib/i386-linux-gnu/libosmosim.so.0.0.0 found in none of the libraries dpkg-shlibdeps: warning: symbol talloc_strdup used by debian/libosmosim0/usr/lib/i386-linux-gnu/libosmosim.so.0.0.0 found in none of the libraries dpkg-shlibdeps: warning: symbol _talloc_memdup used by debian/libosmosim0/usr/lib/i386-linux-gnu/libosmosim.so.0.0.0 found in none of the libraries --- M src/sim/Makefile.am 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/sim/Makefile.am b/src/sim/Makefile.am index 4d21f2a..ba23ebc 100644 --- a/src/sim/Makefile.am +++ b/src/sim/Makefile.am @@ -21,6 +21,7 @@ libosmosim_la_LIBADD = \ $(top_builddir)/src/libosmocore.la \ $(top_builddir)/src/gsm/libosmogsm.la \ + $(TALLOC_LIBS) \ $(PCSC_LIBS) endif -- To view, visit https://gerrit.osmocom.org/1653 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4c8d5e80e194b9d9b4fa2424c4a22377ecee9c7a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Tue Jan 24 13:59:01 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 24 Jan 2017 13:59:01 +0000 Subject: osmo-trx[master]: debian: Require fftw3 header files for osmo-trx In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1654 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id80937724d5e4da4ed555cbabfcd3e2457cb2a19 Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 24 14:00:10 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 24 Jan 2017 14:00:10 +0000 Subject: osmo-trx[master]: debian: Require fftw3 header files for osmo-trx In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1654 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id80937724d5e4da4ed555cbabfcd3e2457cb2a19 Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 24 14:00:11 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 24 Jan 2017 14:00:11 +0000 Subject: [MERGED] osmo-trx[master]: debian: Require fftw3 header files for osmo-trx In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: debian: Require fftw3 header files for osmo-trx ...................................................................... debian: Require fftw3 header files for osmo-trx Install missing development package to get osmo-trx to build. Change-Id: Id80937724d5e4da4ed555cbabfcd3e2457cb2a19 --- M debian/control 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Max: Looks good to me, but someone else must approve Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/debian/control b/debian/control index 0aef88e..b8ec911 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: net Priority: optional Standards-Version: 3.9.3 -Build-Depends: debhelper (>= 9), autotools-dev, libdbd-sqlite3, pkg-config, dh-autoreconf, libuhd-dev, libusb-1.0-0-dev, libboost-all-dev, hardening-wrapper +Build-Depends: debhelper (>= 9), autotools-dev, libdbd-sqlite3, pkg-config, dh-autoreconf, libuhd-dev, libusb-1.0-0-dev, libboost-all-dev, hardening-wrapper, libfftw3-dev Homepage: http://openbsc.osmocom.org/trac/wiki/OsmoTRX Vcs-Git: git://git.osmocom.org/osmo-trx Vcs-Browser: http://cgit.osmocom.org/osmo-trx -- To view, visit https://gerrit.osmocom.org/1654 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id80937724d5e4da4ed555cbabfcd3e2457cb2a19 Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Tue Jan 24 14:01:44 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 24 Jan 2017 14:01:44 +0000 Subject: osmo-bts[master]: build: Do not require more headers from OpenBSC In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1655 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I581f938e8fe9161b1d7076cedd74ff192cea86b2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 24 14:02:04 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 24 Jan 2017 14:02:04 +0000 Subject: [MERGED] osmo-bts[master]: build: Do not require more headers from OpenBSC In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: build: Do not require more headers from OpenBSC ...................................................................... build: Do not require more headers from OpenBSC There should be no other OpenBSC headers included and nobody is using bsc_controlif_setup. Remove the include. This was introduced in 4723a195081f0f9ff561e360620ee0ade50a2b39. Change-Id: I581f938e8fe9161b1d7076cedd74ff192cea86b2 --- M src/common/main.c 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/common/main.c b/src/common/main.c index 00c8b23..1af4f34 100644 --- a/src/common/main.c +++ b/src/common/main.c @@ -53,7 +53,6 @@ #include #include #include -#include #include int quit = 0; -- To view, visit https://gerrit.osmocom.org/1655 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I581f938e8fe9161b1d7076cedd74ff192cea86b2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Tue Jan 24 14:16:08 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 24 Jan 2017 14:16:08 +0000 Subject: [PATCH] osmo-trx[master]: Integrate Debian packaging changes In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1483 to look at the new patch set (#2). Integrate Debian packaging changes debian/control: * restructure to make it easier to incorporate further changes * update package descriptions * update project URL debian/rules: * use proper hardening syntax debian/copyright: update to match Debian format Change-Id: I9a89e7311c8632ae26ac2e6c02d1e427d94b1608 Related: OS#1694 --- M debian/control M debian/copyright M debian/rules 3 files changed, 182 insertions(+), 24 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/83/1483/2 diff --git a/debian/control b/debian/control index b8ec911..beb6f6a 100644 --- a/debian/control +++ b/debian/control @@ -1,17 +1,40 @@ Source: osmo-trx -Maintainer: Ivan Klyuchnikov Section: net Priority: optional -Standards-Version: 3.9.3 -Build-Depends: debhelper (>= 9), autotools-dev, libdbd-sqlite3, pkg-config, dh-autoreconf, libuhd-dev, libusb-1.0-0-dev, libboost-all-dev, hardening-wrapper, libfftw3-dev -Homepage: http://openbsc.osmocom.org/trac/wiki/OsmoTRX -Vcs-Git: git://git.osmocom.org/osmo-trx +Maintainer: Ivan Klyuchnikov +Build-Depends: debhelper (>= 9), + autotools-dev, + libdbd-sqlite3, + pkg-config, + dh-autoreconf, + libuhd-dev, + libusb-1.0-0-dev, + libboost-all-dev, + hardening-wrapper, + libfftw3-dev +Standards-Version: 3.9.6 Vcs-Browser: http://cgit.osmocom.org/osmo-trx +Vcs-Git: git://git.osmocom.org/osmo-trx +Homepage: https://projects.osmocom.org/projects/osmotrx Package: osmo-trx Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, libdbd-sqlite3 -Description: OsmoTRX is a software-defined radio transceiver that implements the Layer 1 physical layer of a BTS +Description: SDR transceiver that implements Layer 1 of a GSM BTS + OsmoTRX is a software-defined radio transceiver that implements the Layer 1 + physical layer of a BTS comprising the following 3GPP specifications: + . + TS 05.01 "Physical layer on the radio path" + TS 05.02 "Multiplexing and Multiple Access on the Radio Path" + TS 05.04 "Modulation" + TS 05.10 "Radio subsystem synchronization" + . + In this context, BTS is "Base transceiver station". It's the stations that + connect mobile phones to the mobile network. + . + 3GPP is the "3rd Generation Partnership Project" which is the collaboration + between different telecommunication associations for developing new + generations of mobile phone networks. (post-2G/GSM) Package: osmo-trx-dbg Architecture: any @@ -20,5 +43,3 @@ Depends: osmo-trx (= ${binary:Version}), ${misc:Depends} Description: Debug symbols for the osmo-trx Make debugging possible - - diff --git a/debian/copyright b/debian/copyright index 5f8836d..b60990e 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,25 +1,162 @@ -The Debian packaging is: +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: OsmoTRX +Source: http://cgit.osmocom.org/osmo-trx/ +Files-Excluded: sqlite3 Transceiver52M/std_inband.rbf - Copyright (C) 2014 Max +Files: * +Copyright: 2008-2013 Free Software Foundation + 2010 Kestrel Signal Processing, Inc. + 2010-2012 Range Networks, Inc. +License: AGPL-3+ -It was downloaded from: +Files: Transceiver52M/arm/* + Transceiver52M/x86/* + Transceiver52M/common/* + Transceiver52M/Resampler.cpp + Transceiver52M/Resampler.h + Transceiver52M/osmo-trx.cpp + Transceiver52M/radioInterfaceDiversity.cpp +Copyright: 2012-2013 Thomas Tsou +License: LGPL-2.1+ - git://git.osmocom.org/osmo-trx +Files: config/ax_check_compile_flag.m4 +Copyright: 2008 Guido U. Draheim + 2011 Maarten Bosmans +License: GPL-3+ -Upstream Authors: +Files: config/ax_gcc_x86_cpuid.m4 +Copyright: 2008 Steven G. Johnson + 2008 Matteo Frigo +License: GPL-3+ - Thomas Tsou - David A. Burgess - Harvind S. Samra - Raffi Sevlian +Files: config/ax_ext.m4 +Copyright: 2007 Christophe Tournayre + 2013 Michael Petch +License: license_for_ax_ext_m4 -Copyright: +Files: config/ax_gcc_x86_avx_xgetbv.m4 +Copyright: 2013 Michael Petch +License: GPL-3+ - Copyright (C) 2012-2013 Thomas Tsou - Copyright (C) 2011 Range Networks, Inc. - Copyright (C) 2008-2011 Free Software Foundation, Inc. +Files: CommonLibs/Makefile.am + GSM/Makefile.am + Transceiver52M/Makefile.am + sqlite3/Makefile.am + Transceiver52M/Transceiver.h + Transceiver52M/Transceiver.cpp +Copyright: 2008-2010 Free Software Foundation + 2010-2012 Range Networks, Inc. +License: GPL-3+ -License: +Files: autogen.sh +Copyright: 2005-2009 United States Government as represented by + the U.S. Army Research Laboratory. +License: BSD-3-clause - GNU Affero General Public License, Version 3 +Files: CommonLibs/sqlite3util.cpp +Copyright: 2010 Kestrel Signal Processing Inc. +License: none + No license described for file. +Comment: In the previous version of the file in the git repository + at upstream it is written: + Written by David A. Burgess, Kestrel Signal Processing, Inc., 2010 + The author disclaims copyright to this source code. + In the git log, this is written: + I do not claim any copyright over this change, as it's very basic. + Looking forward to see it merged into mainline. + See revision e766abbf82f02473038a83fd2f78befd08544cab at + https://github.com/osmocom/osmo-trx +Files: debian/* +Copyright: 2015 Ruben Undheim +License: GPL-3+ + + +License: AGPL-3+ + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero 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 Affero General Public License for more details. + . + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + + +License: GPL-3+ + This package 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 package 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, see + . + On Debian systems, the complete text of the GNU General + Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". + + +License: LGPL-2.1+ + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + . + This library 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 + Lesser General Public License for more details. + . + You should have received a copy of the GNU Lesser General Public + License along with this program. If not, see + + . + On Debian systems, the complete text of the GNU Lesser General + Public License version 2.1 can be found in + "/usr/share/common-licenses/LGPL-2.1". + + +License: license_for_ax_ext_m4 + Copying and distribution of this file, with or without modification, are + permitted in any medium without royalty provided the copyright notice + and this notice are preserved. This file is offered as-is, without any + warranty. + + +License: BSD-3-clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + . + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + . + 2. Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + . + 3. The name of the author may not be used to endorse or promote + products derived from this software without specific prior written + permission. + . + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/debian/rules b/debian/rules index 9ec67e5..e6e8c75 100755 --- a/debian/rules +++ b/debian/rules @@ -1,6 +1,6 @@ #!/usr/bin/make -f -DEB_BUILD_HARDENING=1 +export DEB_BUILD_MAINT_OPTIONS = hardening=+all %: dh $@ --with autoreconf -- To view, visit https://gerrit.osmocom.org/1483 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9a89e7311c8632ae26ac2e6c02d1e427d94b1608 Gerrit-PatchSet: 2 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Tom Tsou From gerrit-no-reply at lists.osmocom.org Tue Jan 24 16:02:44 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 24 Jan 2017 16:02:44 +0000 Subject: [PATCH] osmo-bts[master]: OML: internalize failure reporting In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1570 to look at the new patch set (#5). OML: internalize failure reporting * make oml_tx_failure_event_rep() static and use osmo_signal_dispatch() wrapped into oml_fail_rep() to trigger event reports outside of oml.c instead of directly calling into OML layer * remove unnecessary formatting from text messages Related: OS#1615 Change-Id: I738555c547926e97b325ab53763c0076c42309bc --- M include/osmo-bts/oml.h M include/osmo-bts/signal.h M src/common/abis.c M src/common/bts.c M src/common/l1sap.c M src/common/main.c M src/common/oml.c M src/common/rsl.c 8 files changed, 83 insertions(+), 58 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/70/1570/5 diff --git a/include/osmo-bts/oml.h b/include/osmo-bts/oml.h index 217ec64..139464e 100644 --- a/include/osmo-bts/oml.h +++ b/include/osmo-bts/oml.h @@ -9,7 +9,7 @@ struct gsm_lchan; -int oml_init(void); +int oml_init(struct gsm_abis_mo *mo); int down_oml(struct gsm_bts *bts, struct msgb *msg); struct msgb *oml_msgb_alloc(void); @@ -45,7 +45,6 @@ extern const unsigned int oml_default_t200_ms[7]; /* Transmit failure event report */ -int oml_tx_failure_event_rep(struct gsm_abis_mo *mo, uint16_t cause_value, - const char *fmt, ...); +void oml_fail_rep(uint16_t cause_value, const char *fmt, ...); #endif // _OML_H */ diff --git a/include/osmo-bts/signal.h b/include/osmo-bts/signal.h index c8168a2..01d4099 100644 --- a/include/osmo-bts/signal.h +++ b/include/osmo-bts/signal.h @@ -5,6 +5,7 @@ enum sig_subsys { SS_GLOBAL, + SS_FAIL, }; enum signals_global { diff --git a/src/common/abis.c b/src/common/abis.c index 6753149..768d261 100644 --- a/src/common/abis.c +++ b/src/common/abis.c @@ -235,7 +235,7 @@ { g_bts = bts; - oml_init(); + oml_init(&bts->mo); libosmo_abis_init(NULL); osmo_signal_register_handler(SS_L_INPUT, &inp_s_cbfn, bts); diff --git a/src/common/bts.c b/src/common/bts.c index efefb86..9915e1c 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -268,9 +268,9 @@ else rc = bts_model_trx_deact_rf(trx); if (rc < 0) - oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_RSL_FAIL, link ? - "Failed to establish RSL link (%d)\n" : - "Failed to deactivate RF (%d)\n", rc); + oml_fail_rep(OSMO_EVT_MAJ_RSL_FAIL, + link ? "Failed to establish RSL link (%d)" : + "Failed to deactivate RF (%d)", rc); return 0; } diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 9116e23..b2f18d1 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -1065,10 +1065,8 @@ default: LOGP(DL1P, LOGL_NOTICE, "unknown prim %d op %d\n", l1sap->oph.primitive, l1sap->oph.operation); - oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, - "unknown prim %d op %d\n", - l1sap->oph.primitive, - l1sap->oph.operation); + oml_fail_rep(OSMO_EVT_MAJ_UKWN_MSG, "unknown prim %d op %d", + l1sap->oph.primitive, l1sap->oph.operation); break; } diff --git a/src/common/main.c b/src/common/main.c index 1af4f34..4c51848 100644 --- a/src/common/main.c +++ b/src/common/main.c @@ -184,12 +184,9 @@ switch (signal) { case SIGINT: - //osmo_signal_dispatch(SS_GLOBAL, S_GLOBAL_SHUTDOWN, NULL); if (!quit) { - oml_tx_failure_event_rep(&bts->mo, - OSMO_EVT_CRIT_PROC_STOP, - "BTS: SIGINT received -> " - "shutdown\n"); + oml_fail_rep(OSMO_EVT_CRIT_PROC_STOP, + "BTS: SIGINT received -> shutdown"); bts_shutdown(bts, "SIGINT"); } quit++; @@ -197,9 +194,9 @@ case SIGABRT: case SIGUSR1: case SIGUSR2: - oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_CRIT_PROC_STOP, - "BTS: signal %s received\n", - strsignal(signal)); + oml_fail_rep(OSMO_EVT_CRIT_PROC_STOP, + "BTS: signal %d (%s) received", signal, + strsignal(signal)); talloc_report_full(tall_bts_ctx, stderr); break; default: diff --git a/src/common/oml.c b/src/common/oml.c index 1482410..a4e342e 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -25,6 +25,8 @@ */ #include +#include +#include #include #include @@ -56,6 +58,40 @@ struct msgb *oml_msgb_alloc(void) { return msgb_alloc_headroom(1024, 128, "OML"); +} + +/* 3GPP TS 12.21 ? 8.8.2 */ +static int oml_tx_failure_event_rep(struct gsm_abis_mo *mo, uint16_t cause_value, + const char *fmt, ...) +{ + struct msgb *nmsg; + va_list ap; + + LOGP(DOML, LOGL_NOTICE, "Reporting FAILURE to BSC: "); + va_start(ap, fmt); + osmo_vlogp(DOML, LOGL_NOTICE, __FILE__, __LINE__, 1, fmt, ap); + nmsg = abis_nm_fail_evt_vrep(NM_EVT_PROC_FAIL, NM_SEVER_CRITICAL, + NM_PCAUSE_T_MANUF, cause_value, fmt, ap); + va_end(ap); + LOGPC(DOML, LOGL_NOTICE, "\n"); + + if (!nmsg) + return -ENOMEM; + + return oml_mo_send_msg(mo, nmsg, NM_MT_FAILURE_EVENT_REP); +} + +void oml_fail_rep(uint16_t cause_value, const char *fmt, ...) +{ + va_list ap; + char *rep; + + va_start(ap, fmt); + rep = talloc_asprintf(tall_bts_ctx, fmt, ap); + va_end(ap); + /* rep is freed by signal handler once actual report transmitted by + oml_tx_failure_event_rep(), see handle_fail_sig() below */ + osmo_signal_dispatch(SS_FAIL, cause_value, rep); } int oml_send_msg(struct msgb *msg, int is_manuf) @@ -347,7 +383,7 @@ rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); if (rc < 0) { oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, - "New value for Attribute not supported\n"); + "New value for Attribute not supported"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); } @@ -356,7 +392,7 @@ uint16_t arfcn = ntohs(tlvp_val16_unal(&tp, NM_ATT_BCCH_ARFCN)); if (arfcn > 1024) { oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_WARN_SW_WARN, - "Given ARFCN %d is not supported.\n", + "Given ARFCN %u is not supported", arfcn); LOGP(DOML, LOGL_NOTICE, "Given ARFCN %d is not supported.\n", arfcn); return oml_fom_ack_nack(msg, NM_NACK_FREQ_NOTAVAIL); @@ -366,7 +402,7 @@ if (TLVP_PRESENT(&tp, NM_ATT_START_TIME)) { oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, "NM_ATT_START_TIME Attribute not " - "supported\n"); + "supported"); return oml_fom_ack_nack(msg, NM_NACK_SPEC_IMPL_NOTSUPP); } @@ -506,7 +542,7 @@ if (rc < 0) { oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UNSUP_ATTR, "New value for Set Radio Attribute not" - " supported\n"); + " supported"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); } @@ -568,8 +604,15 @@ memcpy(&_value, value, 2); arfcn = ntohs(_value); value += 2; - if (arfcn > 1024) + if (arfcn > 1024) { + oml_tx_failure_event_rep(&trx->bts->mo, + OSMO_EVT_WARN_SW_WARN, + "Given ARFCN %u is unsupported", + arfcn); + LOGP(DOML, LOGL_NOTICE, + "Given ARFCN %u is unsupported.\n", arfcn); return oml_fom_ack_nack(msg, NM_NACK_FREQ_NOTAVAIL); + } trx->arfcn = arfcn; } #endif @@ -672,7 +715,7 @@ if (rc < 0) { oml_tx_failure_event_rep(&ts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, "New value for Set Channel Attribute " - "not supported\n"); + "not supported"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); } @@ -814,7 +857,7 @@ trx->mo.obj_inst.trx_nr = foh->obj_inst.trx_nr; trx->mo.obj_inst.ts_nr = 0xff; oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, - "Formatted O&M message too short\n"); + "Formatted O&M message too short"); } return -EIO; } @@ -828,7 +871,7 @@ trx->mo.obj_inst.ts_nr = 0xff; oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, "Formatted O&M with BTS %d out" - " of range (0:0xFF).\n", + " of range (0:0xFF)", foh->obj_inst.bts_nr); } return oml_fom_ack_nack(msg, NM_NACK_BTSNR_UNKN); @@ -871,12 +914,12 @@ trx->mo.obj_inst.ts_nr = 0xff; oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, "unknown Formatted O&M " - "msg_type 0x%02x\n", + "msg_type 0x%02x", foh->msg_type); } else oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UKWN_MSG, "unknown Formatted O&M " - "msg_type 0x%02x\n", + "msg_type 0x%02x", foh->msg_type); ret = oml_fom_ack_nack(msg, NM_NACK_MSGTYPE_INVAL); } @@ -1191,29 +1234,21 @@ return ret; } -/* 3GPP TS 12.21 ? 8.8.2 */ -int oml_tx_failure_event_rep(struct gsm_abis_mo *mo, uint16_t cause_value, - const char *fmt, ...) +static int handle_fail_sig(unsigned int subsys, unsigned int signal, void *handle, + void *signal_data) { - struct msgb *nmsg; - va_list ap; + oml_tx_failure_event_rep(handle, signal, "%s", signal_data); + if (signal_data) + talloc_free(signal_data); - va_start(ap, fmt); - nmsg = abis_nm_fail_evt_rep(NM_EVT_PROC_FAIL, NM_SEVER_CRITICAL, - NM_PCAUSE_T_MANUF, cause_value, fmt, ap); - LOGP(DOML, LOGL_INFO, fmt, ap); - va_end(ap); - - if (!nmsg) - return -ENOMEM; - - return oml_mo_send_msg(mo, nmsg, NM_MT_FAILURE_EVENT_REP); + return 0; } -int oml_init(void) +int oml_init(struct gsm_abis_mo *mo) { DEBUGP(DOML, "Initializing OML attribute definitions\n"); tlv_def_patch(&abis_nm_att_tlvdef_ipa, &abis_nm_att_tlvdef); + osmo_signal_register_handler(SS_FAIL, handle_fail_sig, mo); return 0; } diff --git a/src/common/rsl.c b/src/common/rsl.c index a34c455..b3e9afb 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -403,9 +403,8 @@ if (rc < 0) { /* FIXME: notfiy the BSC on other errors? */ if (rc == -ENOSPC) - oml_tx_failure_event_rep(&trx->mo, - OSMO_EVT_MIN_PAG_TAB_FULL, - "BTS paging table is full\n"); + oml_fail_rep(OSMO_EVT_MIN_PAG_TAB_FULL, + "BTS paging table is full"); } pcu_tx_pag_req(identity_lv, chan_needed); @@ -1653,11 +1652,9 @@ LOGP(DRSL, LOGL_ERROR, "%s IPAC Failed to create RTP/RTCP sockets\n", gsm_lchan_name(lchan)); - oml_tx_failure_event_rep(&lchan->ts->trx->mo, - OSMO_EVT_CRIT_RTP_TOUT, - "%s IPAC Failed to create " - "RTP/RTCP sockets\n", - gsm_lchan_name(lchan)); + oml_fail_rep(OSMO_EVT_CRIT_RTP_TOUT, + "%s IPAC Failed to create RTP/RTCP sockets", + gsm_lchan_name(lchan)); return tx_ipac_XXcx_nack(lchan, RSL_ERR_RES_UNAVAIL, inc_ip_port, dch->c.msg_type); } @@ -1697,11 +1694,9 @@ LOGP(DRSL, LOGL_ERROR, "%s IPAC Failed to bind RTP/RTCP sockets\n", gsm_lchan_name(lchan)); - oml_tx_failure_event_rep(&lchan->ts->trx->mo, - OSMO_EVT_CRIT_RTP_TOUT, - "%s IPAC Failed to bind " - "RTP/RTCP sockets\n", - gsm_lchan_name(lchan)); + oml_fail_rep(OSMO_EVT_CRIT_RTP_TOUT, + "%s IPAC Failed to bind RTP/RTCP sockets", + gsm_lchan_name(lchan)); osmo_rtp_socket_free(lchan->abis_ip.rtp_socket); lchan->abis_ip.rtp_socket = NULL; msgb_queue_flush(&lchan->dl_tch_queue); -- To view, visit https://gerrit.osmocom.org/1570 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I738555c547926e97b325ab53763c0076c42309bc Gerrit-PatchSet: 5 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Tue Jan 24 16:07:57 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 24 Jan 2017 16:07:57 +0000 Subject: osmo-iuh[master]: cs RAB: add more SDU_FormatInformationParameter items In-Reply-To: References: Message-ID: Patch Set 1: Verified+1 verified that all of these 8 RAB Assignment parameter changes in this queue of patches work with ip.access nano3G as well as the sysmocell5000. -- To view, visit https://gerrit.osmocom.org/1649 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I97e5c0b1e9ab9de00449b50a86d79a967af0d3f3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 24 16:22:35 2017 From: gerrit-no-reply at lists.osmocom.org (jfdionne) Date: Tue, 24 Jan 2017 16:22:35 +0000 Subject: [PATCH] osmo-bts[master]: Fixes memory leak at each call placed. Message-ID: Review at https://gerrit.osmocom.org/1656 Fixes memory leak at each call placed. Change-Id: Ife1293e3238cfda16eac9c28e7e81ffe5595e031 --- M src/osmo-bts-litecell15/l1_if.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/56/1656/1 diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index c70bd9e..f86862d 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -1093,8 +1093,10 @@ rc = handle_mph_time_ind(fl1, &l1p->u.mphTimeInd, msg); break; case GsmL1_PrimId_MphSyncInd: + msgb_free(msg); break; case GsmL1_PrimId_PhConnectInd: + msgb_free(msg); break; case GsmL1_PrimId_PhReadyToSendInd: rc = handle_ph_readytosend_ind(fl1, &l1p->u.phReadyToSendInd, -- To view, visit https://gerrit.osmocom.org/1656 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ife1293e3238cfda16eac9c28e7e81ffe5595e031 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: jfdionne From gerrit-no-reply at lists.osmocom.org Tue Jan 24 16:26:55 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 24 Jan 2017 16:26:55 +0000 Subject: [PATCH] openggsn[master]: abi/debian: Bump ABI version of libgtp after struct size change Message-ID: Review at https://gerrit.osmocom.org/1657 abi/debian: Bump ABI version of libgtp after struct size change The gsn_t changed the size with the addition of the ctrl pointer. Bump the SO version to not break osmo-sgsn/ggsn on upgrade. Change-Id: Iac4d6d2effde1a6b2f60b1e1b49c91513d5ca8c3 --- M debian/changelog M debian/control R debian/libgtp1-dev.install R debian/libgtp1.install M gtp/Makefile.am 5 files changed, 12 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openggsn refs/changes/57/1657/1 diff --git a/debian/changelog b/debian/changelog index a00671b..0c88284 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,9 @@ -openggsn (0.93) UNRELEASED; urgency=medium +openggsn (0.93) precise; urgency=medium * Bump version to ease upgrading from Debian SID. + * Bump libgtp SO version after ABI change. - -- Holger Hans Peter Freyther Tue, 24 May 2016 22:53:16 +0200 + -- Holger Hans Peter Freyther Tue, 24 Jan 2017 17:26:26 +0100 openggsn (0.92) precise; urgency=medium diff --git a/debian/control b/debian/control index 9306656..3adbe02 100644 --- a/debian/control +++ b/debian/control @@ -22,7 +22,7 @@ operators as the interface between the Internet and the rest of the mobile network infrastructure. -Package: libgtp0 +Package: libgtp1 Architecture: any Multi-Arch: same Section: libs @@ -36,12 +36,12 @@ This library is part of openggsn and implements the GTP protocol between SGSN (Serving GPRS support node) and GGSN. -Package: libgtp0-dev +Package: libgtp1-dev Architecture: any Multi-Arch: same Section: libdevel Depends: ${misc:Depends}, - libgtp0 (= ${binary:Version}) + libgtp1 (= ${binary:Version}) Description: Development files for libgtp OpenGGSN is a Gateway GPRS Support Node (GGSN). It is used by mobile operators as the interface between the Internet and the rest of the @@ -54,6 +54,6 @@ Section: debug Architecture: any Priority: extra -Depends: ${shlibs:Depends}, ${misc:Depends}, libgtp0 (= ${binary:Version}), openggsn (= ${binary:Version}) +Depends: ${shlibs:Depends}, ${misc:Depends}, libgtp1 (= ${binary:Version}), openggsn (= ${binary:Version}) Multi-Arch: same Description: Debug symbols for OpenGGSN diff --git a/debian/libgtp0-dev.install b/debian/libgtp1-dev.install similarity index 100% rename from debian/libgtp0-dev.install rename to debian/libgtp1-dev.install diff --git a/debian/libgtp0.install b/debian/libgtp1.install similarity index 100% rename from debian/libgtp0.install rename to debian/libgtp1.install diff --git a/gtp/Makefile.am b/gtp/Makefile.am index 9586dfe..32025d6 100644 --- a/gtp/Makefile.am +++ b/gtp/Makefile.am @@ -1,3 +1,7 @@ +# This is _NOT_ the library release version, it's an API version. +# Please read chapter "Library interface versions" of the libtool documentation +# before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html +LIBVERSION=1:0:0 lib_LTLIBRARIES = libgtp.la include_HEADERS = gtp.h pdp.h gtpie.h @@ -5,6 +9,7 @@ AM_CFLAGS = -O2 -fno-builtin -Wall -DSBINDIR='"$(sbindir)"' -ggdb $(LIBOSMOCORE_CFLAGS) libgtp_la_SOURCES = gtp.c gtp.h gtpie.c gtpie.h pdp.c pdp.h lookupa.c lookupa.h queue.c queue.h +libgtp_la_LDFLAGS = -version-info $(LIBVERSION) -no-undefined libgtp_la_LIBADD = $(LIBOSMOCORE_LIBS) -- To view, visit https://gerrit.osmocom.org/1657 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iac4d6d2effde1a6b2f60b1e1b49c91513d5ca8c3 Gerrit-PatchSet: 1 Gerrit-Project: openggsn Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Tue Jan 24 16:47:06 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 24 Jan 2017 16:47:06 +0000 Subject: [PATCH] openbsc[master]: debian: Require libgtp1-dev after the SO version bump Message-ID: Review at https://gerrit.osmocom.org/1658 debian: Require libgtp1-dev after the SO version bump The ABI of libgtp changed and we require a new library now. In the future we might consider to drop the SO_VERSION from the -dev name. Change-Id: Ib301b27e2c08fda827b55820389247e27e5e8fc7 --- M debian/control 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/58/1658/1 diff --git a/debian/control b/debian/control index 144e649..1df3ed4 100644 --- a/debian/control +++ b/debian/control @@ -6,7 +6,7 @@ autotools-dev, autoconf-archive, pkg-config, - libgtp0-dev, + libgtp1-dev, libosmocore-dev, libosmo-sccp-dev, libdbi0-dev, -- To view, visit https://gerrit.osmocom.org/1658 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib301b27e2c08fda827b55820389247e27e5e8fc7 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Tue Jan 24 17:18:07 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 24 Jan 2017 17:18:07 +0000 Subject: osmo-pcu[master]: PDCH allocation across two TRX In-Reply-To: References: Message-ID: Patch Set 3: Code-Review-1 (2 comments) https://gerrit.osmocom.org/#/c/1512/3/src/bts.cpp File src/bts.cpp: Line 414: * \param[in] _trx The uint8_t * Please be more verbose: not only type, but what it is and what it's for. Line 434: *_trx = use_trx; _trx is marked as [in] but here you assign smth to it - shall it be marked as [out]? What's the purpose of _trx? -- To view, visit https://gerrit.osmocom.org/1512 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I222c3340872ffa1dd6e8fabe5276d793e660f67d Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Jan 24 17:23:51 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 24 Jan 2017 17:23:51 +0000 Subject: osmo-pcu[master]: Enable padding support for retransmission in EGPRS DL TBF In-Reply-To: References: Message-ID: Patch Set 2: Ok, so to test it thoroughly we got to modify source code to hardcode MCS3 etc. Since you've done the tests I presume you this somewhere. Could you please share this test patch somehow alongside with osmo.pcu.cfg you've used during tests? I'll make a ticket to simplify this. -- To view, visit https://gerrit.osmocom.org/1513 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idaf956244aa029c4bef70ecf94163044a3c85f59 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 24 17:26:17 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 24 Jan 2017 17:26:17 +0000 Subject: osmo-pcu[master]: Enable padding support for retransmission in EGPRS DL TBF In-Reply-To: References: Message-ID: Patch Set 2: I've made #1925 for convenience. -- To view, visit https://gerrit.osmocom.org/1513 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idaf956244aa029c4bef70ecf94163044a3c85f59 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 24 17:28:18 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 24 Jan 2017 17:28:18 +0000 Subject: [PATCH] osmo-pcu[master]: Enable padding support for retransmission in EGPRS DL TBF In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1513 to look at the new patch set (#3). Enable padding support for retransmission in EGPRS DL TBF According to section 10.3a.0 of 44.060 version 7.27.0 Release 7, MCS8 retransmission shall be made as either MCS8->MCS8, MCS8->MCS6 padding or MCS8->MCS3 padding. When PCU was enabled for this transition, L1 was discarding this RLC blocks when received from PCU(MS was not receiving it), causing retransmission failure. Hence frequent DL-TBF establishment or degrade of throughput in DL. During discussion with NuRAN, we found, this is the limitation with LiteCell, they have fixed the same Limitation now, so the support has been enabled from the PCU code. This patch is integration tested successfully with LiteCell 1.5 and B210, B200 setup. Related: OS#1925 Change-Id: Idaf956244aa029c4bef70ecf94163044a3c85f59 --- M src/tbf_dl.cpp M tests/tbf/TbfTest.err 2 files changed, 10 insertions(+), 28 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/13/1513/3 diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 78f06e9..f408418 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -391,14 +391,6 @@ ms()->current_cs_dl().to_num(), m_rlc.block(bsn)->cs_current_trans.to_num(), bts->bts_data()->dl_arq_type, bsn); - - /* TODO: Need to remove this check when MCS-8 -> MCS-6 - * transistion is handled. - * Refer commit be881c028fc4da00c4046ecd9296727975c206a3 - */ - if (m_rlc.block(bsn)->cs_init == GprsCodingScheme::MCS8) - m_rlc.block(bsn)->cs_current_trans = - GprsCodingScheme::MCS8; } else m_rlc.block(bsn)->cs_current_trans = m_rlc.block(bsn)->cs_last; @@ -661,15 +653,7 @@ spb_status == EGPRS_RESEG_SECOND_SEG_SENT) need_padding = true; } else if (num_bsns == 1) { - /* TODO: remove the conditional when MCS-6 padding isn't - * failing to be decoded by MEs anymore */ - /* TODO: support of MCS-8 -> MCS-6 transition should be - * handled - * Refer commit be881c028fc4da00c4046ecd9296727975c206a3 - * dated 2016-02-07 23:45:40 (UTC) - */ - if (cs != GprsCodingScheme(GprsCodingScheme::MCS8)) - cs.decToSingleBlock(&need_padding); + cs.decToSingleBlock(&need_padding); } spb = get_egprs_dl_spb(index); diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index 2647551..3e35670 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -5298,18 +5298,17 @@ Complete DL frame for TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS)len=56 data block (BSN 0, MCS-8): 14 71 01 01 01 01 01 01 01 01 01 01 43 c0 01 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b - Restarting at BSN 0, because all blocks have been transmitted (FLOW). -- need_padding 0 spb_status 0 spb 0(BSN1 0 BSN2 -1) +- need_padding 1 spb_status 0 spb 0(BSN1 0 BSN2 -1) - Copying data unit 0 (BSN 0) -- Copying data unit 1 (BSN 0) - Scheduling Ack/Nack polling, because is was requested explicitly (e.g. first final block sent). Polling is already scheduled for TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) -msg block (BSN 0, MCS-8): 07 00 00 00 60 50 c4 05 04 04 04 04 04 04 04 04 04 0c 01 07 ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac 40 11 17 10 10 10 10 10 10 10 10 10 30 04 1c b0 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 02 -Sending data request: trx=0 ts=4 sapi=5 arfcn=0 fn=4 block=1 data=07 00 00 00 60 50 c4 05 04 04 04 04 04 04 04 04 04 0c 01 07 ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac 40 11 17 10 10 10 10 10 10 10 10 10 30 04 1c b0 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 02 +msg block (BSN 0, MCS-6, padded): 07 00 00 04 00 00 00 00 00 00 45 5c 40 40 40 40 40 40 40 40 40 c0 10 70 c0 ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca 0a +Sending data request: trx=0 ts=4 sapi=5 arfcn=0 fn=4 block=1 data=07 00 00 04 00 00 00 00 00 00 45 5c 40 40 40 40 40 40 40 40 40 c0 10 70 c0 ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca 0a TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) append Received RTS for PDCH: TRX=0 TS=4 FN=8 block_nr=2 scheduling free USF for polling at FN=13 of TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Scheduling data message at RTS for DL TFI=0 (TRX=0, TS=4) prio=3 TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink (V(A)==0 .. V(S)==1) -- initial_cs_dl(8) last_mcs(8) demanded_mcs(8) cs_trans(8) arq_type(1) bsn(0) +- initial_cs_dl(8) last_mcs(6) demanded_mcs(8) cs_trans(8) arq_type(1) bsn(0) - Resending BSN 0 - Sending new block at BSN 1, CS=MCS-8 - Dequeue next LLC for TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) (len=512) @@ -5320,8 +5319,8 @@ - Copying data unit 1 (BSN 1) - Scheduling Ack/Nack polling, because is was requested explicitly (e.g. first final block sent). Polling is already scheduled for TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) -msg block (BSN 0, MCS-8): 07 00 00 02 88 50 c4 05 04 04 04 04 04 04 04 04 04 0c 01 07 ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac 14 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 00 -Sending data request: trx=0 ts=4 sapi=5 arfcn=0 fn=8 block=2 data=07 00 00 02 88 50 c4 05 04 04 04 04 04 04 04 04 04 0c 01 07 ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac 14 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 00 +msg block (BSN 0, MCS-8): 07 00 00 02 58 50 c4 05 04 04 04 04 04 04 04 04 04 0c 01 07 ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac 14 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 00 +Sending data request: trx=0 ts=4 sapi=5 arfcn=0 fn=8 block=2 data=07 00 00 02 58 50 c4 05 04 04 04 04 04 04 04 04 04 0c 01 07 ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac 14 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 00 Scheduling data message at RTS for DL TFI=0 (TRX=0, TS=4) prio=3 TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink (V(A)==0 .. V(S)==2) - Sending new block at BSN 2, CS=MCS-8 @@ -5378,13 +5377,12 @@ Complete DL frame for TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS)len=30 data block (BSN 8, MCS-8): 48 3d 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 43 c0 01 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b - Restarting at BSN 0, because all blocks have been transmitted (FLOW). -- need_padding 0 spb_status 0 spb 0(BSN1 8 BSN2 -1) +- need_padding 1 spb_status 0 spb 0(BSN1 8 BSN2 -1) - Copying data unit 0 (BSN 8) -- Copying data unit 1 (BSN 8) - Scheduling Ack/Nack polling, because is was requested explicitly (e.g. first final block sent). Polling is already scheduled for TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) -msg block (BSN 8, MCS-8): 07 00 02 00 60 20 f5 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 0c 01 07 ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac 80 d4 13 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 30 04 1c b0 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 02 -Sending data request: trx=0 ts=4 sapi=5 arfcn=0 fn=26 block=6 data=07 00 02 00 60 20 f5 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 0c 01 07 ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac ac 80 d4 13 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 30 04 1c b0 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 02 +msg block (BSN 8, MCS-6, padded): 07 00 02 04 00 00 00 00 00 00 52 4f 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 c0 10 70 c0 ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca 0a +Sending data request: trx=0 ts=4 sapi=5 arfcn=0 fn=26 block=6 data=07 00 02 04 00 00 00 00 00 00 52 4f 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 c0 10 70 c0 ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca 0a TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -- To view, visit https://gerrit.osmocom.org/1513 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Idaf956244aa029c4bef70ecf94163044a3c85f59 Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: arvind.sirsikar From gerrit-no-reply at lists.osmocom.org Tue Jan 24 17:34:20 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 24 Jan 2017 17:34:20 +0000 Subject: openggsn[master]: abi/debian: Bump ABI version of libgtp after struct size change In-Reply-To: References: Message-ID: Patch Set 1: You're also changing version from UNRELEASED to precise in changelog - does it mean that this commit is release and should be tagged in git accordingly? Or the previous value was wrong? Please clarify. -- To view, visit https://gerrit.osmocom.org/1657 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iac4d6d2effde1a6b2f60b1e1b49c91513d5ca8c3 Gerrit-PatchSet: 1 Gerrit-Project: openggsn Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 24 17:36:26 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 24 Jan 2017 17:36:26 +0000 Subject: openbsc[master]: debian: Require libgtp1-dev after the SO version bump In-Reply-To: References: Message-ID: Patch Set 1: > In the future we might consider to drop the SO_VERSION from the -dev name Why not do it now? We don't have this in any other library. -- To view, visit https://gerrit.osmocom.org/1658 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib301b27e2c08fda827b55820389247e27e5e8fc7 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 24 17:37:32 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 24 Jan 2017 17:37:32 +0000 Subject: osmo-bts[master]: Fixes memory leak at each call placed. In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1656 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ife1293e3238cfda16eac9c28e7e81ffe5595e031 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: jfdionne Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 24 17:39:46 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 24 Jan 2017 17:39:46 +0000 Subject: osmo-iuh[master]: cs RAB: add more SDU_FormatInformationParameter items In-Reply-To: References: Message-ID: Patch Set 1: The commit message seems way too brief. Can this be squashed into one of the previous commits in this series? -- To view, visit https://gerrit.osmocom.org/1649 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I97e5c0b1e9ab9de00449b50a86d79a967af0d3f3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 24 17:57:58 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 24 Jan 2017 17:57:58 +0000 Subject: openggsn[master]: abi/debian: Bump ABI version of libgtp after struct size change In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/1657/1/debian/changelog File debian/changelog: Line 1: openggsn (0.93) precise; urgency=medium Why this is necessary? And why "precise" in particular? -- To view, visit https://gerrit.osmocom.org/1657 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iac4d6d2effde1a6b2f60b1e1b49c91513d5ca8c3 Gerrit-PatchSet: 1 Gerrit-Project: openggsn Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Jan 24 18:09:21 2017 From: gerrit-no-reply at lists.osmocom.org (jfdionne) Date: Tue, 24 Jan 2017 18:09:21 +0000 Subject: [PATCH] osmo-bts[master]: Fixes AMR HR DTX FSM logic. Message-ID: Review at https://gerrit.osmocom.org/1659 Fixes AMR HR DTX FSM logic. Change-Id: Ia811305e15541f2376005df736bd610e8b0d2f69 --- M include/osmo-bts/dtx_dl_amr_fsm.h M include/osmo-bts/rsl.h M src/common/dtx_dl_amr_fsm.c M src/common/msg_utils.c M src/osmo-bts-litecell15/l1_if.c M src/osmo-bts-litecell15/tch.c M src/osmo-bts-sysmo/l1_if.c M src/osmo-bts-sysmo/tch.c 8 files changed, 195 insertions(+), 73 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/59/1659/1 diff --git a/include/osmo-bts/dtx_dl_amr_fsm.h b/include/osmo-bts/dtx_dl_amr_fsm.h index f747f9f..c66ac7d 100644 --- a/include/osmo-bts/dtx_dl_amr_fsm.h +++ b/include/osmo-bts/dtx_dl_amr_fsm.h @@ -12,11 +12,15 @@ ST_VOICE, ST_SID_F1, ST_SID_F2, - ST_F1_INH, - ST_U_INH, + ST_F1_INH_V, + ST_F1_INH_F, + ST_U_INH_V, + ST_U_INH_F, ST_U_NOINH, - ST_F1_INH_REC, - ST_U_INH_REC, + ST_F1_INH_V_REC, + ST_F1_INH_F_REC, + ST_U_INH_V_REC, + ST_U_INH_F_REC, ST_SID_U, ST_ONSET_V, ST_ONSET_F, diff --git a/include/osmo-bts/rsl.h b/include/osmo-bts/rsl.h index a2a6e3d..d5d0f1a 100644 --- a/include/osmo-bts/rsl.h +++ b/include/osmo-bts/rsl.h @@ -13,6 +13,7 @@ }; #define LCHAN_FN_DUMMY 0xFFFFFFFF +#define LCHAN_FN_WAIT 0xFFFFFFFE int msgb_queue_flush(struct llist_head *list); diff --git a/src/common/dtx_dl_amr_fsm.c b/src/common/dtx_dl_amr_fsm.c index 832e8b4..d599048 100644 --- a/src/common/dtx_dl_amr_fsm.c +++ b/src/common/dtx_dl_amr_fsm.c @@ -29,8 +29,13 @@ case E_FACCH: break; case E_SID_F: - case E_SID_U: osmo_fsm_inst_state_chg(fi, ST_SID_F1, 0, 0); + break; + case E_SID_U: + osmo_fsm_inst_state_chg(fi, ST_U_NOINH, 0, 0); + break; + case E_INHIB: + osmo_fsm_inst_state_chg(fi, ST_F1_INH_V, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Inexpected event %d\n", event); @@ -49,17 +54,11 @@ case E_SID_U: osmo_fsm_inst_state_chg(fi, ST_U_NOINH, 0, 0); break; - case E_VOICE: - osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); - break; case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_F1_INH_F, 0, 0); break; case E_FIRST: osmo_fsm_inst_state_chg(fi, ST_SID_F2, 0, 0); - break; - case E_INHIB: - osmo_fsm_inst_state_chg(fi, ST_F1_INH, 0, 0); break; case E_ONSET: osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); @@ -75,10 +74,7 @@ { switch (event) { case E_COMPL: - osmo_fsm_inst_state_chg(fi, ST_SID_U, 0, 0); - break; - case E_VOICE: - osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_U_NOINH, 0, 0); break; case E_FACCH: osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); @@ -93,11 +89,11 @@ } } -void dtx_fsm_f1_inh(struct osmo_fsm_inst *fi, uint32_t event, void *data) +void dtx_fsm_f1_inh_v(struct osmo_fsm_inst *fi, uint32_t event, void *data) { switch (event) { case E_COMPL: - osmo_fsm_inst_state_chg(fi, ST_F1_INH_REC, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_F1_INH_V_REC, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -106,11 +102,11 @@ } } -void dtx_fsm_u_inh(struct osmo_fsm_inst *fi, uint32_t event, void *data) +void dtx_fsm_f1_inh_f(struct osmo_fsm_inst *fi, uint32_t event, void *data) { switch (event) { case E_COMPL: - osmo_fsm_inst_state_chg(fi, ST_U_INH_REC, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_F1_INH_F_REC, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -119,9 +115,36 @@ } } -void dtx_fsm_f1_inh_rec(struct osmo_fsm_inst *fi, uint32_t event, void *data) +void dtx_fsm_u_inh_v(struct osmo_fsm_inst *fi, uint32_t event, void *data) { switch (event) { + case E_COMPL: + osmo_fsm_inst_state_chg(fi, ST_U_INH_V_REC, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_u_inh_f(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_COMPL: + osmo_fsm_inst_state_chg(fi, ST_U_INH_F_REC, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_f1_inh_v_rec(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_VOICE: case E_COMPL: osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); break; @@ -132,11 +155,40 @@ } } -void dtx_fsm_u_inh_rec(struct osmo_fsm_inst *fi, uint32_t event, void *data) +void dtx_fsm_f1_inh_f_rec(struct osmo_fsm_inst *fi, uint32_t event, void *data) { switch (event) { + case E_FACCH: + case E_COMPL: + osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_u_inh_v_rec(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_VOICE: case E_COMPL: osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_u_inh_f_rec(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_FACCH: + case E_COMPL: + osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -176,13 +228,13 @@ { switch (event) { case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_U_INH_F, 0, 0); break; case E_VOICE: osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); break; case E_INHIB: - osmo_fsm_inst_state_chg(fi, ST_U_INH, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_U_INH_V, 0, 0); break; case E_SID_U: case E_SID_F: @@ -270,40 +322,54 @@ static struct osmo_fsm_state dtx_dl_amr_fsm_states[] = { /* default state for non-DTX and DTX when SPEECH is in progress */ [ST_VOICE] = { - .in_event_mask = X(E_SID_F) | X(E_SID_U) | X(E_VOICE) | X(E_FACCH), - .out_state_mask = X(ST_SID_F1), + .in_event_mask = X(E_SID_F) | X(E_SID_U) | X(E_VOICE) | X(E_FACCH) | X(E_INHIB), + .out_state_mask = X(ST_SID_F1) | X(ST_U_NOINH) | X(ST_F1_INH_V), .name = "Voice", .action = dtx_fsm_voice, }, /* SID-FIRST or SID-FIRST-P1 in case of AMR HR: start of silence period (might be interrupted in case of AMR HR) */ [ST_SID_F1]= { - .in_event_mask = X(E_SID_F) | X(E_SID_U) | X(E_VOICE) | X(E_FACCH) | X(E_FIRST) | X(E_INHIB) | X(E_ONSET), - .out_state_mask = X(ST_U_NOINH) | X(ST_VOICE) | X(ST_ONSET_F) | X(ST_SID_F2) | X(ST_F1_INH) | X(ST_ONSET_V), + .in_event_mask = X(E_SID_F) | X(E_SID_U) | X(E_FACCH) | X(E_FIRST) | X(E_ONSET), + .out_state_mask = X(ST_U_NOINH) | X(ST_ONSET_F) | X(ST_SID_F2) | X(ST_ONSET_V), .name = "SID-FIRST (P1)", .action = dtx_fsm_sid_f1, }, /* SID-FIRST P2 (only for AMR HR): actual start of silence period in case of AMR HR */ [ST_SID_F2]= { - .in_event_mask = X(E_COMPL) | X(E_VOICE) | X(E_FACCH) | X(E_ONSET), - .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_ONSET_F) | X(ST_ONSET_V), + .in_event_mask = X(E_COMPL) | X(E_FACCH) | X(E_ONSET), + .out_state_mask = X(ST_U_NOINH) | X(ST_ONSET_F) | X(ST_ONSET_V), .name = "SID-FIRST (P2)", .action = dtx_fsm_sid_f2, }, /* SID-FIRST Inhibited: incoming SPEECH (only for AMR HR) */ - [ST_F1_INH]= { + [ST_F1_INH_V]= { .in_event_mask = X(E_COMPL), - .out_state_mask = X(ST_F1_INH_REC), - .name = "SID-FIRST (Inh)", - .action = dtx_fsm_f1_inh, + .out_state_mask = X(ST_F1_INH_V_REC), + .name = "SID-FIRST (Inh, SPEECH)", + .action = dtx_fsm_f1_inh_v, + }, + /* SID-FIRST Inhibited: incoming FACCH frame (only for AMR HR) */ + [ST_F1_INH_F]= { + .in_event_mask = X(E_COMPL), + .out_state_mask = X(ST_F1_INH_F_REC), + .name = "SID-FIRST (Inh, FACCH)", + .action = dtx_fsm_f1_inh_f, }, /* SID-UPDATE Inhibited: incoming SPEECH (only for AMR HR) */ - [ST_U_INH]= { + [ST_U_INH_V]= { .in_event_mask = X(E_COMPL), - .out_state_mask = X(ST_U_INH_REC), - .name = "SID-UPDATE (Inh)", - .action = dtx_fsm_u_inh, + .out_state_mask = X(ST_U_INH_V_REC), + .name = "SID-UPDATE (Inh, SPEECH)", + .action = dtx_fsm_u_inh_v, + }, + /* SID-UPDATE Inhibited: incoming FACCH frame (only for AMR HR) */ + [ST_U_INH_F]= { + .in_event_mask = X(E_COMPL), + .out_state_mask = X(ST_U_INH_F_REC), + .name = "SID-UPDATE (Inh, FACCH)", + .action = dtx_fsm_u_inh_f, }, /* SID-UPDATE: Inhibited not allowed (only for AMR HR) */ [ST_U_NOINH]= { @@ -314,24 +380,40 @@ }, /* SID-FIRST Inhibition recursion in progress: Inhibit itself was already sent, now have to send the voice that caused it */ - [ST_F1_INH_REC]= { - .in_event_mask = X(E_COMPL), + [ST_F1_INH_V_REC]= { + .in_event_mask = X(E_COMPL) | X(E_VOICE), .out_state_mask = X(ST_VOICE), - .name = "SID-FIRST (Inh, Rec)", - .action = dtx_fsm_f1_inh_rec, + .name = "SID-FIRST (Inh, SPEECH, Rec)", + .action = dtx_fsm_f1_inh_v_rec, + }, + /* SID-FIRST Inhibition recursion in progress: + Inhibit itself was already sent, now have to send the data that caused it */ + [ST_F1_INH_F_REC]= { + .in_event_mask = X(E_COMPL) | X(E_FACCH), + .out_state_mask = X(ST_FACCH), + .name = "SID-FIRST (Inh, FACCH, Rec)", + .action = dtx_fsm_f1_inh_f_rec, }, /* SID-UPDATE Inhibition recursion in progress: Inhibit itself was already sent, now have to send the voice that caused it */ - [ST_U_INH_REC]= { - .in_event_mask = X(E_COMPL), + [ST_U_INH_V_REC]= { + .in_event_mask = X(E_COMPL) | X(E_VOICE), .out_state_mask = X(ST_VOICE), - .name = "SID-UPDATE (Inh, Rec)", - .action = dtx_fsm_u_inh_rec, + .name = "SID-UPDATE (Inh, SPEECH, Rec)", + .action = dtx_fsm_u_inh_v_rec, + }, + /* SID-UPDATE Inhibition recursion in progress: + Inhibit itself was already sent, now have to send the data that caused it */ + [ST_U_INH_F_REC]= { + .in_event_mask = X(E_COMPL) | X(E_FACCH), + .out_state_mask = X(ST_FACCH), + .name = "SID-UPDATE (Inh, FACCH, Rec)", + .action = dtx_fsm_u_inh_f_rec, }, /* Silence period with periodic comfort noise data updates */ [ST_SID_U]= { .in_event_mask = X(E_FACCH) | X(E_VOICE) | X(E_INHIB) | X(E_SID_U) | X(E_SID_F), - .out_state_mask = X(ST_ONSET_F) | X(ST_VOICE) | X(ST_U_INH) | X(ST_U_NOINH), + .out_state_mask = X(ST_ONSET_F) | X(ST_VOICE) | X(ST_U_INH_V) | X(ST_U_INH_F) | X(ST_U_NOINH), .name = "SID-UPDATE (AMR/HR)", .action = dtx_fsm_sid_upd, }, @@ -365,8 +447,7 @@ .name = "ONSET (FACCH, Rec)", .action = dtx_fsm_onset_f_rec, }, - /* FACCH sending state: no SPEECH was observed before so once we're done - FSM should get back to silent period via SID-FIRST */ + /* FACCH sending state */ [ST_FACCH]= { .in_event_mask = X(E_FACCH) | X(E_VOICE) | X(E_COMPL) | X(E_SID_U) | X(E_SID_F), .out_state_mask = X(ST_VOICE) | X(ST_SID_F1), diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index 062f5e3..f936c98 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -137,7 +137,7 @@ size_t length, uint32_t fn, int update) { size_t amr = (update < 0) ? 0 : 2, - copy_len = OSMO_MIN(length + 1, + copy_len = OSMO_MIN(length, ARRAY_SIZE(lchan->tch.dtx.cache) - amr); lchan->tch.dtx.len = copy_len + amr; @@ -230,7 +230,7 @@ if (osmo_amr_is_speech(ft)) { /* AMR HR - SID-FIRST_P1 Inhibition */ - if (marker && dtx_is_first_p1(lchan)) + if (marker && lchan->tch.dtx.dl_amr_fsm->state == ST_VOICE) return osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, E_INHIB, (void *)lchan); @@ -261,7 +261,8 @@ as FIRST regardless of actually decoded type */ dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, false); return osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, - E_SID_F, (void *)lchan); + sti ? E_SID_U : E_SID_F, + (void *)lchan); } else if (lchan->tch.dtx.dl_amr_fsm->state != ST_FACCH) dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, sti); if (lchan->tch.dtx.dl_amr_fsm->state == ST_SID_F2) @@ -319,12 +320,24 @@ already: we rely here on the order of RTS arrival from L1 - we expect that PH-DATA.req ALWAYS comes before PH-TCH.req for the same FN */ - if (lchan->tch.dtx.fn != LCHAN_FN_DUMMY) { - /* FACCH interruption is over */ - dtx_dispatch(lchan, E_COMPL); - return false; - } else - lchan->tch.dtx.fn = fn; + if(lchan->type == GSM_LCHAN_TCH_H) { + if (lchan->tch.dtx.fn != LCHAN_FN_DUMMY && + lchan->tch.dtx.fn != LCHAN_FN_WAIT) { + /* FACCH interruption is over */ + dtx_dispatch(lchan, E_COMPL); + return false; + } else if(lchan->tch.dtx.fn == LCHAN_FN_DUMMY) { + lchan->tch.dtx.fn = LCHAN_FN_WAIT; + } else + lchan->tch.dtx.fn = fn; + } else if(lchan->type == GSM_LCHAN_TCH_F) { + if (lchan->tch.dtx.fn != LCHAN_FN_DUMMY) { + /* FACCH interruption is over */ + dtx_dispatch(lchan, E_COMPL); + return false; + } else + lchan->tch.dtx.fn = fn; + } /* this FN was already used for FACCH or ONSET message so we just prepare things for next one */ return true; @@ -401,9 +414,14 @@ if (!dtx_dl_amr_enabled(lchan)) return false; - if (lchan->tch.dtx.dl_amr_fsm->state == ST_U_INH || - lchan->tch.dtx.dl_amr_fsm->state == ST_U_INH_REC || - lchan->tch.dtx.dl_amr_fsm->state == ST_F1_INH || + if (lchan->tch.dtx.dl_amr_fsm->state == ST_U_INH_V || + lchan->tch.dtx.dl_amr_fsm->state == ST_U_INH_F || + lchan->tch.dtx.dl_amr_fsm->state == ST_U_INH_V_REC || + lchan->tch.dtx.dl_amr_fsm->state == ST_U_INH_F_REC || + lchan->tch.dtx.dl_amr_fsm->state == ST_F1_INH_V || + lchan->tch.dtx.dl_amr_fsm->state == ST_F1_INH_F || + lchan->tch.dtx.dl_amr_fsm->state == ST_F1_INH_V_REC || + lchan->tch.dtx.dl_amr_fsm->state == ST_F1_INH_F_REC || lchan->tch.dtx.dl_amr_fsm->state == ST_ONSET_F || lchan->tch.dtx.dl_amr_fsm->state == ST_ONSET_V || lchan->tch.dtx.dl_amr_fsm->state == ST_ONSET_F_REC || diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index f86862d..17f0847 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -410,7 +410,9 @@ memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, lchan->tch.dtx.facch, msgb_l2len(msg)); else if (dtx_dl_amr_enabled(lchan) && - lchan->tch.dtx.dl_amr_fsm->state == ST_ONSET_F) { + ((lchan->tch.dtx.dl_amr_fsm->state == ST_ONSET_F) || + (lchan->tch.dtx.dl_amr_fsm->state == ST_U_INH_F) || + (lchan->tch.dtx.dl_amr_fsm->state == ST_F1_INH_F))) { if (sapi == GsmL1_Sapi_FacchF) { sapi = GsmL1_Sapi_TchF; } @@ -423,9 +425,16 @@ /* cache FACCH data */ memcpy(lchan->tch.dtx.facch, msg->l2h, msgb_l2len(msg)); - /* prepare ONSET message */ - l1p->u.phDataReq.msgUnitParam.u8Buffer[0] = - GsmL1_TchPlType_Amr_Onset; + /* prepare ONSET or INH message */ + if(lchan->tch.dtx.dl_amr_fsm->state == ST_ONSET_F) + l1p->u.phDataReq.msgUnitParam.u8Buffer[0] = + GsmL1_TchPlType_Amr_Onset; + else if(lchan->tch.dtx.dl_amr_fsm->state == ST_U_INH_F) + l1p->u.phDataReq.msgUnitParam.u8Buffer[0] = + GsmL1_TchPlType_Amr_SidUpdateInH; + else if(lchan->tch.dtx.dl_amr_fsm->state == ST_F1_INH_F) + l1p->u.phDataReq.msgUnitParam.u8Buffer[0] = + GsmL1_TchPlType_Amr_SidFirstInH; /* ignored CMR/CMI pair */ l1p->u.phDataReq.msgUnitParam.u8Buffer[1] = 0; l1p->u.phDataReq.msgUnitParam.u8Buffer[2] = 0; diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index 4b22b64..ffc1eb3 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -311,12 +311,12 @@ rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, ft); return 0; - case ST_F1_INH: + case ST_F1_INH_V: *payload_type = GsmL1_TchPlType_Amr_SidFirstInH; *len = 3; dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); return 1; - case ST_U_INH: + case ST_U_INH_V: *payload_type = GsmL1_TchPlType_Amr_SidUpdateInH; *len = 3; dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 82db8d7..4012a82 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -405,7 +405,9 @@ memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, lchan->tch.dtx.facch, msgb_l2len(msg)); else if (dtx_dl_amr_enabled(lchan) && - lchan->tch.dtx.dl_amr_fsm->state == ST_ONSET_F) { + ((lchan->tch.dtx.dl_amr_fsm->state == ST_ONSET_F) || + (lchan->tch.dtx.dl_amr_fsm->state == ST_U_INH_F) || + (lchan->tch.dtx.dl_amr_fsm->state == ST_F1_INH_F))) { if (sapi == GsmL1_Sapi_FacchF) { sapi = GsmL1_Sapi_TchF; } @@ -418,9 +420,16 @@ /* cache FACCH data */ memcpy(lchan->tch.dtx.facch, msg->l2h, msgb_l2len(msg)); - /* prepare ONSET message */ - l1p->u.phDataReq.msgUnitParam.u8Buffer[0] = - GsmL1_TchPlType_Amr_Onset; + /* prepare ONSET or INH message */ + if(lchan->tch.dtx.dl_amr_fsm->state == ST_ONSET_F) + l1p->u.phDataReq.msgUnitParam.u8Buffer[0] = + GsmL1_TchPlType_Amr_Onset; + else if(lchan->tch.dtx.dl_amr_fsm->state == ST_U_INH_F) + l1p->u.phDataReq.msgUnitParam.u8Buffer[0] = + GsmL1_TchPlType_Amr_SidUpdateInH; + else if(lchan->tch.dtx.dl_amr_fsm->state == ST_F1_INH_F) + l1p->u.phDataReq.msgUnitParam.u8Buffer[0] = + GsmL1_TchPlType_Amr_SidFirstInH; /* ignored CMR/CMI pair */ l1p->u.phDataReq.msgUnitParam.u8Buffer[1] = 0; l1p->u.phDataReq.msgUnitParam.u8Buffer[2] = 0; diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index 8eb419b..55c4049 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -409,12 +409,12 @@ rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, ft); return 0; - case ST_F1_INH: + case ST_F1_INH_V: *payload_type = GsmL1_TchPlType_Amr_SidFirstInH; *len = 3; dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); return 1; - case ST_U_INH: + case ST_U_INH_V: *payload_type = GsmL1_TchPlType_Amr_SidUpdateInH; *len = 3; dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); -- To view, visit https://gerrit.osmocom.org/1659 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia811305e15541f2376005df736bd610e8b0d2f69 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: jfdionne From gerrit-no-reply at lists.osmocom.org Tue Jan 24 18:26:06 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 24 Jan 2017 18:26:06 +0000 Subject: [PATCH] osmo-bts[master]: Fixes memory leak on each call Message-ID: Review at https://gerrit.osmocom.org/1660 Fixes memory leak on each call Port of Ife1293e3238cfda16eac9c28e7e81ffe5595e031 for sysmobts. Change-Id: I6eaf16892ea0048338798d0ba5a5088f0c158344 --- M src/osmo-bts-sysmo/l1_if.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/60/1660/1 diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 82db8d7..d937699 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -1081,8 +1081,10 @@ rc = handle_mph_time_ind(fl1, &l1p->u.mphTimeInd, msg); break; case GsmL1_PrimId_MphSyncInd: + msgb_free(msg); break; case GsmL1_PrimId_PhConnectInd: + msgb_free(msg); break; case GsmL1_PrimId_PhReadyToSendInd: rc = handle_ph_readytosend_ind(fl1, &l1p->u.phReadyToSendInd, -- To view, visit https://gerrit.osmocom.org/1660 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6eaf16892ea0048338798d0ba5a5088f0c158344 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Jan 24 18:47:19 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 24 Jan 2017 18:47:19 +0000 Subject: [ABANDON] libosmocore[master]: Add osmo_sock_init_ifd() In-Reply-To: References: Message-ID: Max has abandoned this change. Change subject: Add osmo_sock_init_ifd() ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/1624 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I938de74c28df29221071913b769e7a2df9d041fa Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From admin at opensuse.org Tue Jan 24 20:06:53 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 24 Jan 2017 20:06:53 +0000 Subject: Build failure of network:osmocom:nightly/libosmo-netif in Debian_8.0/i586 In-Reply-To: References: Message-ID: <5887b3f0c4d5a_15aba89c1038979e@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmo-netif/Debian_8.0/i586 Package network:osmocom:nightly/libosmo-netif failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly libosmo-netif Last lines of build log: [ 173s] case the test suite provides a good starting point. Its output may [ 173s] be found below `tests/testsuite.dir'. [ 173s] [ 173s] Makefile:628: recipe for target 'check-local' failed [ 173s] make[4]: *** [check-local] Error 1 [ 173s] make[4]: Leaving directory '/usr/src/packages/BUILD/tests' [ 173s] Makefile:483: recipe for target 'check-am' failed [ 173s] make[3]: *** [check-am] Error 2 [ 173s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests' [ 173s] Makefile:454: recipe for target 'check-recursive' failed [ 173s] make[2]: *** [check-recursive] Error 1 [ 173s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 173s] Makefile:745: recipe for target 'check' failed [ 173s] make[1]: *** [check] Error 2 [ 173s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 173s] dh_auto_test: make -j1 check returned exit code 2 [ 173s] debian/rules:13: recipe for target 'build' failed [ 173s] make: *** [build] Error 2 [ 173s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 173s] [ 173s] cloud107 failed "build libosmo-netif_0.0.7.20170124.dsc" at Tue Jan 24 20:06:42 UTC 2017. [ 173s] [ 173s] ### VM INTERACTION START ### [ 174s] Powering off. [ 174s] [ 142.700665] reboot: Power down [ 175s] ### VM INTERACTION END ### [ 175s] [ 175s] cloud107 failed "build libosmo-netif_0.0.7.20170124.dsc" at Tue Jan 24 20:06:45 UTC 2017. [ 175s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Wed Jan 25 11:27:55 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 25 Jan 2017 11:27:55 +0000 Subject: [PATCH] openbsc[master]: rsl: Fix dropping of LAPDm UA message. In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1625 to look at the new patch set (#5). rsl: Fix dropping of LAPDm UA message. In some cases, when successive mobile originated calls are made, the LAPDm UA message gets lost because the channel is relased to early. Too overcome the problem we do not send release indications immediately. Instead a flag will be set and the message stored and sent on the next TCH-RTS-IND. This commit adds the required flag and the msg-buffer to struct gsm_lchan. See also coresponding change in osmo-bts.git: Change-Id Ie4f70c75f0137b4bd72d579b3a32575bac2fca38 This patch is is a slightly improved/reformatted version of: https://gitlab.com/nrw_noa/osmo-bts/commit/95d1f15ad108c1c1869c1965144acd64c1395d8c Change-Id: I15fc1ef8e9e83f009bde96de9a8e95702cffbce6 --- M openbsc/include/openbsc/gsm_data_shared.h 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/25/1625/5 diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h index 9407b82..8510a3a 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -350,6 +350,11 @@ uint8_t current; uint8_t fixed; } ms_power_ctrl; + + struct { + unsigned int marker; + struct msgb *msg; + } pending_rel_ind; #endif }; -- To view, visit https://gerrit.osmocom.org/1625 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I15fc1ef8e9e83f009bde96de9a8e95702cffbce6 Gerrit-PatchSet: 5 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Jan 25 11:27:55 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 25 Jan 2017 11:27:55 +0000 Subject: [PATCH] openbsc[master]: gprs: Fix compiler warning about uninitalized cause code Message-ID: Review at https://gerrit.osmocom.org/1661 gprs: Fix compiler warning about uninitalized cause code in gprs_gmm.c:gsm48_rx_gmm_ra_upd_req the variable reject_cause is not initalized, which is ok, since it gets initalized before the jump into the "rejected" path. However, the compiler still throws a warning. This commit fixes the problem by preinitalizing the reject_cause to GMM_CAUSE_PROTO_ERR_UNSPEC Change-Id: I84cffb631e4cad3d4748512b47e3876208f53727 --- M openbsc/src/gprs/gprs_gmm.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/61/1661/1 diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c index 88be512..dc73693 100644 --- a/openbsc/src/gprs/gprs_gmm.c +++ b/openbsc/src/gprs/gprs_gmm.c @@ -1415,7 +1415,7 @@ struct gprs_ra_id old_ra_id; struct tlv_parsed tp; uint8_t upd_type; - enum gsm48_gmm_cause reject_cause; + enum gsm48_gmm_cause reject_cause = GMM_CAUSE_PROTO_ERR_UNSPEC; int rc; /* TODO: In iu mode - handle follow-on request */ -- To view, visit https://gerrit.osmocom.org/1661 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I84cffb631e4cad3d4748512b47e3876208f53727 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Jan 25 11:28:06 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 25 Jan 2017 11:28:06 +0000 Subject: [PATCH] osmo-bts[master]: rsl: Fix dropping of LAPDm UA message. In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1626 to look at the new patch set (#2). rsl: Fix dropping of LAPDm UA message. In some cases, when successive mobile originated calls are made, the LAPDm UA message gets lost because the channel is relased to early. Too overcome the problem we do not send relase indications immediately. Instead a flag will be set and the message stored and sent on the next TCH-RTS-IND. This commit adds the functionality to store the release indication msg, to rsl.c. It also addes the mechanism to forward the release indication to l1sap.c See also coresponding change in openbsc.git: Change-Id I15fc1ef8e9e83f009bde96de9a8e95702cffbce6 This patch is is a slightly improved/reformatted version of: https://gitlab.com/nrw_noa/osmo-bts/commit/95d1f15ad108c1c1869c1965144acd64c1395d8c Change-Id: Ie4f70c75f0137b4bd72d579b3a32575bac2fca38 --- M src/common/l1sap.c M src/common/rsl.c 2 files changed, 25 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/26/1626/2 diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 9116e23..d0e53cb 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -714,6 +714,7 @@ uint8_t chan_nr, marker = 0; uint16_t seq; uint32_t fn, timestamp; + int rc; chan_nr = rts_ind->chan_nr; fn = rts_ind->fn; @@ -757,6 +758,17 @@ resp_l1sap = msgb_l1sap_prim(resp_msg); } + /* check for pending REL_IND */ + if (lchan->pending_rel_ind.marker) { + LOGP(DRSL, LOGL_INFO, "%s Forward REL_IND to L3\n", gsm_lchan_name(lchan)); + /* Forward it to L3 */ + rc = abis_bts_rsl_sendmsg(lchan->pending_rel_ind.msg); + lchan->pending_rel_ind.msg = NULL; + lchan->pending_rel_ind.marker = 0; + if (rc < 0) + return rc; + } + memset(resp_l1sap, 0, sizeof(*resp_l1sap)); osmo_prim_init(&resp_l1sap->oph, SAP_GSM_PH, PRIM_TCH, PRIM_OP_REQUEST, resp_msg); diff --git a/src/common/rsl.c b/src/common/rsl.c index a34c455..4509567 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -2278,6 +2278,7 @@ } msg->trx = lchan->ts->trx; + msg->lchan = lchan; /* check if this is a measurement report from SACCH which needs special * processing before forwarding */ @@ -2286,6 +2287,18 @@ LOGP(DRSL, LOGL_INFO, "%s Handing RLL msg %s from LAPDm to MEAS REP\n", gsm_lchan_name(lchan), rsl_msg_name(rh->msg_type)); + + /* REL_IND handling */ + if (rh->msg_type == RSL_MT_REL_IND) { + LOGP(DRSL, LOGL_INFO, "%s Scheduling %s to L3 in next associated TCH-RTS.ind\n", + gsm_lchan_name(lchan), + rsl_msg_name(rh->msg_type)); + + lchan->pending_rel_ind.marker = 1; + lchan->pending_rel_ind.msg = msg; + return 0; + } + rc = rsl_tx_meas_res(lchan, msgb_l3(msg), msgb_l3len(msg)); msgb_free(msg); return rc; -- To view, visit https://gerrit.osmocom.org/1626 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie4f70c75f0137b4bd72d579b3a32575bac2fca38 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Minh-Quang Nguyen From gerrit-no-reply at lists.osmocom.org Wed Jan 25 11:33:58 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 11:33:58 +0000 Subject: osmo-pcu[master]: Enable padding support for retransmission in EGPRS DL TBF In-Reply-To: References: Message-ID: Patch Set 3: Code-Review-1 let's keep this on hold until it is clear if it breaks other BTS hardware/PHY. -- To view, visit https://gerrit.osmocom.org/1513 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idaf956244aa029c4bef70ecf94163044a3c85f59 Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 25 11:34:53 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 25 Jan 2017 11:34:53 +0000 Subject: osmo-bts[master]: Fixes AMR HR DTX FSM logic. In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 Verified+1 -- To view, visit https://gerrit.osmocom.org/1659 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia811305e15541f2376005df736bd610e8b0d2f69 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: jfdionne Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 25 11:38:07 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 11:38:07 +0000 Subject: osmo-bts[master]: rsl: Fix dropping of LAPDm UA message. In-Reply-To: References: Message-ID: Patch Set 3: Code-Review-1 (1 comment) I don't think this is ready for a merge yet, sorry. https://gerrit.osmocom.org/#/c/1626/3/src/common/rsl.c File src/common/rsl.c: Line 2297: lchan->pending_rel_ind.marker = 1; why do we have the marker? It seems like all it tells us is that there is a 'msg' attached. so we could just as well check on if (lchan->pending_rel_ind.msg) and get rid of the marker? NULL means there is no message pending, non-NULL means there is a message pending? Also, how do we avoid memory leaks in the current code? We blindly set pending_rel_ind.msg = msg without detecting if any previous msg was already stored. So if there was, we loose a reference to it -> mem leak. Either free any previous msg here (and/or at time the lchan is destroyed), or even go as far as to ASSERT that there is never already a pending_rel_ind.msg here. -- To view, visit https://gerrit.osmocom.org/1626 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie4f70c75f0137b4bd72d579b3a32575bac2fca38 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Jan 25 11:38:57 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 11:38:57 +0000 Subject: openbsc[master]: gprs: Fix compiler warning about uninitalized cause code In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1661 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I84cffb631e4cad3d4748512b47e3876208f53727 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 25 11:40:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 11:40:21 +0000 Subject: openbsc[master]: rsl: Fix dropping of LAPDm UA message. In-Reply-To: References: Message-ID: Patch Set 6: Code-Review-1 see comments to related patch in osmo-bts.git. I think the structure with two members can be removed in favor of having only a single 'struct msgb *pending_rel_ind' member or the like. -- To view, visit https://gerrit.osmocom.org/1625 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I15fc1ef8e9e83f009bde96de9a8e95702cffbce6 Gerrit-PatchSet: 6 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 25 11:45:31 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 25 Jan 2017 11:45:31 +0000 Subject: openbsc[master]: debian: Require libgtp1-dev after the SO version bump In-Reply-To: References: Message-ID: Patch Set 1: A little correction - we do for some libs but not for others which feels inconsistent. What's the reasoning behind this and what's considered best practice? -- To view, visit https://gerrit.osmocom.org/1658 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib301b27e2c08fda827b55820389247e27e5e8fc7 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 25 11:46:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 11:46:16 +0000 Subject: osmo-bts[master]: OML: internalize failure reporting In-Reply-To: References: Message-ID: Patch Set 5: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/1570/5/src/common/oml.c File src/common/oml.c: Line 93: oml_tx_failure_event_rep(), see handle_fail_sig() below */ this sort-of defeats a bit the idea of using the signals. Why do we use signals? So multiple interested entities can register for the signal. But there is no guaranteed ordering in how the signal handlers are called. You now register one that free()s part of the data, so if it is called before another signal handler, that other handler will no longer get passed the data. I don't have a bright idea at this point. Maybe use a static buffer for printing the string? aftre all, our "signals" are synchronous, i.e. no second oml_fail_rep() can ever be called before all registered signal handlers hve executed. Any other idas? -- To view, visit https://gerrit.osmocom.org/1570 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I738555c547926e97b325ab53763c0076c42309bc Gerrit-PatchSet: 5 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Jan 25 11:48:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 11:48:52 +0000 Subject: osmo-bts[master]: Add ctrl command to send OML alert In-Reply-To: References: Message-ID: Patch Set 5: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/1575/5/src/common/bts_ctrl_commands.c File src/common/bts_ctrl_commands.c: Line 82: osmo_signal_dispatch(SS_FAIL, OSMO_EVT_EXT_ALARM, rep); see my other comment. This is not how signals work. You cannot pass allocated data into them and then have one (random) registered signal subscriber free it. We would have to have an explicit destructor for a signal if you wanted to do that. -- To view, visit https://gerrit.osmocom.org/1575 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I228cb71ab945e19e3747843469a52f577ee32f97 Gerrit-PatchSet: 5 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Jan 25 11:49:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 11:49:03 +0000 Subject: libosmocore[master]: OML: add external alerts In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1571 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idd7ee085321f8172c72ecfdba320186049f4d988 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 25 11:49:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 11:49:08 +0000 Subject: [MERGED] libosmocore[master]: OML: add external alerts In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OML: add external alerts ...................................................................... OML: add external alerts Add special cause for alerts produced by external processes. Change-Id: Idd7ee085321f8172c72ecfdba320186049f4d988 Related: OS#1615 --- M include/osmocom/gsm/protocol/gsm_12_21.h M src/gsm/abis_nm.c 2 files changed, 3 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/gsm/protocol/gsm_12_21.h b/include/osmocom/gsm/protocol/gsm_12_21.h index 5daab42..d6e8c11 100644 --- a/include/osmocom/gsm/protocol/gsm_12_21.h +++ b/include/osmocom/gsm/protocol/gsm_12_21.h @@ -275,6 +275,8 @@ OSMO_EVT_MIN_PAG_TAB_FULL = 0x0401, /* Warning causes */ OSMO_EVT_WARN_SW_WARN = 0x0001, + /* External causes */ + OSMO_EVT_EXT_ALARM = 0xfeed, }; extern const struct value_string abis_mm_event_cause_names[]; diff --git a/src/gsm/abis_nm.c b/src/gsm/abis_nm.c index 9839d29..10aae9a 100644 --- a/src/gsm/abis_nm.c +++ b/src/gsm/abis_nm.c @@ -161,6 +161,7 @@ { OSMO_EVT_MAJ_NET_CONGEST, "Network congestion" }, { OSMO_EVT_MIN_PAG_TAB_FULL, "Paging table full" }, { OSMO_EVT_WARN_SW_WARN, "Software warning" }, + { OSMO_EVT_EXT_ALARM, "External alarm" }, { 0, NULL } }; -- To view, visit https://gerrit.osmocom.org/1571 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idd7ee085321f8172c72ecfdba320186049f4d988 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Jan 25 11:49:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 11:49:23 +0000 Subject: osmo-trx[master]: Integrate Debian packaging changes In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1483 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9a89e7311c8632ae26ac2e6c02d1e427d94b1608 Gerrit-PatchSet: 2 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Tom Tsou Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 25 11:50:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 11:50:28 +0000 Subject: openbsc[master]: CTRL: remove boilerplate In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1576 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5bcea0b4f4b8f535bef2b423f2013b8b4a218b5b Gerrit-PatchSet: 4 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 25 11:52:25 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 25 Jan 2017 11:52:25 +0000 Subject: osmo-bts[master]: OML: internalize failure reporting In-Reply-To: References: Message-ID: Patch Set 5: Is there a way to mark particular signal handler as last/final - by returning 1 or smth like that? Maybe Holger has an idea - it was his call to use signal in a first place. -- To view, visit https://gerrit.osmocom.org/1570 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I738555c547926e97b325ab53763c0076c42309bc Gerrit-PatchSet: 5 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 25 11:52:45 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 25 Jan 2017 11:52:45 +0000 Subject: [MERGED] openbsc[master]: CTRL: remove boilerplate In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: CTRL: remove boilerplate ...................................................................... CTRL: remove boilerplate Use CTRL_CMD_DEFINE_RO(), CTRL_CMD_DEFINE_WO() and CTRL_CMD_DEFINE_WO_NOVRF() where appropriate to get rid of boilerplate code. Change-Id: I5bcea0b4f4b8f535bef2b423f2013b8b4a218b5b --- M openbsc/src/libbsc/bsc_ctrl_commands.c M openbsc/src/libmsc/ctrl_commands.c M openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c M openbsc/tests/ctrl_test_runner.py 4 files changed, 13 insertions(+), 105 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/src/libbsc/bsc_ctrl_commands.c b/openbsc/src/libbsc/bsc_ctrl_commands.c index 7e84797..14e8d71 100644 --- a/openbsc/src/libbsc/bsc_ctrl_commands.c +++ b/openbsc/src/libbsc/bsc_ctrl_commands.c @@ -70,17 +70,6 @@ CTRL_CMD_VTY_STRING(net_short_name, "short-name", struct gsm_network, name_short); CTRL_CMD_VTY_STRING(net_long_name, "long-name", struct gsm_network, name_long); -static int verify_net_apply_config(struct ctrl_cmd *cmd, const char *v, void *d) -{ - return 0; -} - -static int get_net_apply_config(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Write only attribute"; - return CTRL_CMD_ERROR; -} - static int set_net_apply_config(struct ctrl_cmd *cmd, void *data) { struct gsm_network *net = cmd->node; @@ -107,7 +96,7 @@ return CTRL_CMD_REPLY; } -CTRL_CMD_DEFINE(net_apply_config, "apply-configuration"); +CTRL_CMD_DEFINE_WO_NOVRF(net_apply_config, "apply-configuration"); static int verify_net_mcc_mnc_apply(struct ctrl_cmd *cmd, const char *value, void *d) { @@ -124,12 +113,6 @@ if (!mcc || !mnc) return 1; return 0; -} - -static int get_net_mcc_mnc_apply(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Write only attribute"; - return CTRL_CMD_ERROR; } static int set_net_mcc_mnc_apply(struct ctrl_cmd *cmd, void *data) @@ -165,22 +148,11 @@ cmd->reply = "OOM"; return CTRL_CMD_ERROR; } -CTRL_CMD_DEFINE(net_mcc_mnc_apply, "mcc-mnc-apply"); +CTRL_CMD_DEFINE_WO(net_mcc_mnc_apply, "mcc-mnc-apply"); /* BTS related commands below */ CTRL_CMD_DEFINE_RANGE(bts_lac, "location-area-code", struct gsm_bts, location_area_code, 0, 65535); CTRL_CMD_DEFINE_RANGE(bts_ci, "cell-identity", struct gsm_bts, cell_identity, 0, 65535); - -static int verify_bts_apply_config(struct ctrl_cmd *cmd, const char *v, void *d) -{ - return 0; -} - -static int get_bts_apply_config(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Write only attribute"; - return CTRL_CMD_ERROR; -} static int set_bts_apply_config(struct ctrl_cmd *cmd, void *data) { @@ -196,18 +168,7 @@ return CTRL_CMD_REPLY; } -CTRL_CMD_DEFINE(bts_apply_config, "apply-configuration"); - -static int verify_bts_si(struct ctrl_cmd *cmd, const char *v, void *d) -{ - return 0; -} - -static int get_bts_si(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Write only attribute"; - return CTRL_CMD_ERROR; -} +CTRL_CMD_DEFINE_WO_NOVRF(bts_apply_config, "apply-configuration"); static int set_bts_si(struct ctrl_cmd *cmd, void *data) { @@ -223,12 +184,7 @@ cmd->reply = "Generated new System Information"; return CTRL_CMD_REPLY; } -CTRL_CMD_DEFINE(bts_si, "send-new-system-informations"); - -static int verify_bts_chan_load(struct ctrl_cmd *cmd, const char *v, void *d) -{ - return 0; -} +CTRL_CMD_DEFINE_WO_NOVRF(bts_si, "send-new-system-informations"); static int get_bts_chan_load(struct ctrl_cmd *cmd, void *data) { @@ -271,23 +227,7 @@ return CTRL_CMD_ERROR; } -static int set_bts_chan_load(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Read only attribute"; - return CTRL_CMD_ERROR; -} -CTRL_CMD_DEFINE(bts_chan_load, "channel-load"); - -static int verify_bts_oml_conn(struct ctrl_cmd *cmd, const char *value, void *_data) -{ - struct gsm_bts *bts = cmd->node; - - if (!is_ipaccess_bts(bts)) { - cmd->reply = ""; - return -1; - } - return 0; -} +CTRL_CMD_DEFINE_RO(bts_chan_load, "channel-load"); static int get_bts_oml_conn(struct ctrl_cmd *cmd, void *data) { @@ -297,12 +237,7 @@ return CTRL_CMD_REPLY; } -static int set_bts_oml_conn(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Read only attribute"; - return CTRL_CMD_ERROR; -} -CTRL_CMD_DEFINE(bts_oml_conn, "oml-connection-state"); +CTRL_CMD_DEFINE_RO(bts_oml_conn, "oml-connection-state"); static int verify_bts_gprs_mode(struct ctrl_cmd *cmd, const char *value, void *_data) { diff --git a/openbsc/src/libmsc/ctrl_commands.c b/openbsc/src/libmsc/ctrl_commands.c index d153247..a56d122 100644 --- a/openbsc/src/libmsc/ctrl_commands.c +++ b/openbsc/src/libmsc/ctrl_commands.c @@ -75,12 +75,6 @@ return rc; } -static int get_subscriber_modify(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Set only attribute"; - return CTRL_CMD_ERROR; -} - static int set_subscriber_modify(struct ctrl_cmd *cmd, void *data) { struct gsm_network *net = cmd->node; @@ -157,18 +151,7 @@ return CTRL_CMD_ERROR; } -CTRL_CMD_DEFINE(subscriber_modify, "subscriber-modify-v1"); - -static int verify_subscriber_delete(struct ctrl_cmd *cmd, const char *v, void *d) -{ - return 0; -} - -static int get_subscriber_delete(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Set only attribute"; - return CTRL_CMD_ERROR; -} +CTRL_CMD_DEFINE_WO(subscriber_modify, "subscriber-modify-v1"); static int set_subscriber_delete(struct ctrl_cmd *cmd, void *data) { @@ -199,7 +182,7 @@ cmd->reply = was_used ? "Removed active subscriber" : "Removed"; return CTRL_CMD_REPLY; } -CTRL_CMD_DEFINE(subscriber_delete, "subscriber-delete-v1"); +CTRL_CMD_DEFINE_WO_NOVRF(subscriber_delete, "subscriber-delete-v1"); static int verify_subscriber_list(struct ctrl_cmd *cmd, const char *value, void *d) { diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c b/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c index ec4243e..057a583 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c @@ -446,11 +446,7 @@ return 0; } -CTRL_CMD_DEFINE(net_save_cmd, "net 0 save-configuration"); -static int verify_net_save_cmd(struct ctrl_cmd *cmd, const char *v, void *d) -{ - return 0; -} +CTRL_CMD_DEFINE_WO_NOVRF(net_save_cmd, "net 0 save-configuration"); static int set_net_save_cmd(struct ctrl_cmd *cmd, void *data) { @@ -462,12 +458,6 @@ } return CTRL_CMD_REPLY; -} - -static int get_net_save_cmd(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = "Write only attribute"; - return CTRL_CMD_ERROR; } struct ctrl_handle *bsc_nat_controlif_setup(struct bsc_nat *nat, diff --git a/openbsc/tests/ctrl_test_runner.py b/openbsc/tests/ctrl_test_runner.py index 4fd831f..9050c09 100644 --- a/openbsc/tests/ctrl_test_runner.py +++ b/openbsc/tests/ctrl_test_runner.py @@ -219,7 +219,7 @@ def testBtsGenerateSystemInformation(self): r = self.do_get('bts.0.send-new-system-informations') self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Write only attribute') + self.assertEquals(r['error'], 'Write Only attribute') # No RSL links so it will fail r = self.do_set('bts.0.send-new-system-informations', '1') @@ -229,7 +229,7 @@ def testBtsChannelLoad(self): r = self.do_set('bts.0.channel-load', '1') self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Read only attribute') + self.assertEquals(r['error'], 'Read Only attribute') # No RSL link so everything is 0 r = self.do_get('bts.0.channel-load') @@ -243,7 +243,7 @@ """Check OML state. It will not be connected""" r = self.do_set('bts.0.oml-connection-state', '1') self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Read only attribute') + self.assertEquals(r['error'], 'Read Only attribute') # No RSL link so everything is 0 r = self.do_get('bts.0.oml-connection-state') @@ -531,7 +531,7 @@ def testApplyConfiguration(self): r = self.do_get('bts.0.apply-configuration') self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Write only attribute') + self.assertEquals(r['error'], 'Write Only attribute') r = self.do_set('bts.0.apply-configuration', '1') self.assertEquals(r['mtype'], 'SET_REPLY') -- To view, visit https://gerrit.osmocom.org/1576 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5bcea0b4f4b8f535bef2b423f2013b8b4a218b5b 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 From gerrit-no-reply at lists.osmocom.org Wed Jan 25 11:56:44 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 25 Jan 2017 11:56:44 +0000 Subject: [PATCH] osmo-bts[master]: rsl: Fix dropping of LAPDm UA message. In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1626 to look at the new patch set (#4). rsl: Fix dropping of LAPDm UA message. In some cases, when successive mobile originated calls are made, the LAPDm UA message gets lost because the channel is relased to early. Too overcome the problem we do not send relase indications immediately. Instead a flag will be set and the message stored and sent on the next TCH-RTS-IND. This commit adds the functionality to store the release indication msg, to rsl.c. It also addes the mechanism to forward the release indication to l1sap.c See also coresponding change in openbsc.git: Change-Id I15fc1ef8e9e83f009bde96de9a8e95702cffbce6 This patch is is a slightly improved/reformatted version of: https://gitlab.com/nrw_noa/osmo-bts/commit/95d1f15ad108c1c1869c1965144acd64c1395d8c Change-Id: Ie4f70c75f0137b4bd72d579b3a32575bac2fca38 --- M src/common/l1sap.c M src/common/rsl.c 2 files changed, 28 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/26/1626/4 diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 9116e23..8105312 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -714,6 +714,7 @@ uint8_t chan_nr, marker = 0; uint16_t seq; uint32_t fn, timestamp; + int rc; chan_nr = rts_ind->chan_nr; fn = rts_ind->fn; @@ -757,6 +758,16 @@ resp_l1sap = msgb_l1sap_prim(resp_msg); } + /* check for pending REL_IND */ + if (lchan->pending_rel_ind_msg) { + LOGP(DRSL, LOGL_INFO, "%s Forward REL_IND to L3\n", gsm_lchan_name(lchan)); + /* Forward it to L3 */ + rc = abis_bts_rsl_sendmsg(lchan->pending_rel_ind_msg); + lchan->pending_rel_ind_msg = NULL; + if (rc < 0) + return rc; + } + memset(resp_l1sap, 0, sizeof(*resp_l1sap)); osmo_prim_init(&resp_l1sap->oph, SAP_GSM_PH, PRIM_TCH, PRIM_OP_REQUEST, resp_msg); diff --git a/src/common/rsl.c b/src/common/rsl.c index a34c455..a908fb5 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -2278,6 +2278,7 @@ } msg->trx = lchan->ts->trx; + msg->lchan = lchan; /* check if this is a measurement report from SACCH which needs special * processing before forwarding */ @@ -2286,6 +2287,22 @@ LOGP(DRSL, LOGL_INFO, "%s Handing RLL msg %s from LAPDm to MEAS REP\n", gsm_lchan_name(lchan), rsl_msg_name(rh->msg_type)); + + /* REL_IND handling */ + if (rh->msg_type == RSL_MT_REL_IND) { + LOGP(DRSL, LOGL_INFO, "%s Scheduling %s to L3 in next associated TCH-RTS.ind\n", + gsm_lchan_name(lchan), + rsl_msg_name(rh->msg_type)); + + if(lchan->pending_rel_ind_msg) { + LOGP(DRSL, LOGL_INFO, "Dropping pending release indication message\n"); + msgb_free(lchan->pending_rel_ind_msg); + } + + lchan->pending_rel_ind_msg = msg; + return 0; + } + rc = rsl_tx_meas_res(lchan, msgb_l3(msg), msgb_l3len(msg)); msgb_free(msg); return rc; -- To view, visit https://gerrit.osmocom.org/1626 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie4f70c75f0137b4bd72d579b3a32575bac2fca38 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Minh-Quang Nguyen From gerrit-no-reply at lists.osmocom.org Wed Jan 25 11:56:48 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 25 Jan 2017 11:56:48 +0000 Subject: [PATCH] openbsc[master]: rsl: Fix dropping of LAPDm UA message. In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1625 to look at the new patch set (#7). rsl: Fix dropping of LAPDm UA message. In some cases, when successive mobile originated calls are made, the LAPDm UA message gets lost because the channel is relased to early. Too overcome the problem we do not send release indications immediately. Instead a flag will be set and the message stored and sent on the next TCH-RTS-IND. This commit adds the required flag and the msg-buffer to struct gsm_lchan. See also coresponding change in osmo-bts.git: Change-Id Ie4f70c75f0137b4bd72d579b3a32575bac2fca38 This patch is is a slightly improved/reformatted version of: https://gitlab.com/nrw_noa/osmo-bts/commit/95d1f15ad108c1c1869c1965144acd64c1395d8c Change-Id: I15fc1ef8e9e83f009bde96de9a8e95702cffbce6 --- M openbsc/include/openbsc/gsm_data_shared.h 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/25/1625/7 diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h index 9407b82..eb697e0 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -350,6 +350,8 @@ uint8_t current; uint8_t fixed; } ms_power_ctrl; + + struct msgb *pending_rel_ind_msg; #endif }; -- To view, visit https://gerrit.osmocom.org/1625 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I15fc1ef8e9e83f009bde96de9a8e95702cffbce6 Gerrit-PatchSet: 7 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Jan 25 12:29:25 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 25 Jan 2017 12:29:25 +0000 Subject: [PATCH] osmo-bts[master]: OML: internalize failure reporting In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1570 to look at the new patch set (#6). OML: internalize failure reporting * make oml_tx_failure_event_rep() static and use osmo_signal_dispatch() wrapped into oml_fail_rep() to trigger event reports outside of oml.c instead of directly calling into OML layer * remove unnecessary formatting from text messages Related: OS#1615 Change-Id: I738555c547926e97b325ab53763c0076c42309bc --- M include/osmo-bts/oml.h M include/osmo-bts/signal.h M src/common/abis.c M src/common/bts.c M src/common/l1sap.c M src/common/main.c M src/common/oml.c M src/common/rsl.c 8 files changed, 83 insertions(+), 58 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/70/1570/6 diff --git a/include/osmo-bts/oml.h b/include/osmo-bts/oml.h index 217ec64..139464e 100644 --- a/include/osmo-bts/oml.h +++ b/include/osmo-bts/oml.h @@ -9,7 +9,7 @@ struct gsm_lchan; -int oml_init(void); +int oml_init(struct gsm_abis_mo *mo); int down_oml(struct gsm_bts *bts, struct msgb *msg); struct msgb *oml_msgb_alloc(void); @@ -45,7 +45,6 @@ extern const unsigned int oml_default_t200_ms[7]; /* Transmit failure event report */ -int oml_tx_failure_event_rep(struct gsm_abis_mo *mo, uint16_t cause_value, - const char *fmt, ...); +void oml_fail_rep(uint16_t cause_value, const char *fmt, ...); #endif // _OML_H */ diff --git a/include/osmo-bts/signal.h b/include/osmo-bts/signal.h index c8168a2..01d4099 100644 --- a/include/osmo-bts/signal.h +++ b/include/osmo-bts/signal.h @@ -5,6 +5,7 @@ enum sig_subsys { SS_GLOBAL, + SS_FAIL, }; enum signals_global { diff --git a/src/common/abis.c b/src/common/abis.c index 6753149..768d261 100644 --- a/src/common/abis.c +++ b/src/common/abis.c @@ -235,7 +235,7 @@ { g_bts = bts; - oml_init(); + oml_init(&bts->mo); libosmo_abis_init(NULL); osmo_signal_register_handler(SS_L_INPUT, &inp_s_cbfn, bts); diff --git a/src/common/bts.c b/src/common/bts.c index efefb86..9915e1c 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -268,9 +268,9 @@ else rc = bts_model_trx_deact_rf(trx); if (rc < 0) - oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_RSL_FAIL, link ? - "Failed to establish RSL link (%d)\n" : - "Failed to deactivate RF (%d)\n", rc); + oml_fail_rep(OSMO_EVT_MAJ_RSL_FAIL, + link ? "Failed to establish RSL link (%d)" : + "Failed to deactivate RF (%d)", rc); return 0; } diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 9116e23..b2f18d1 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -1065,10 +1065,8 @@ default: LOGP(DL1P, LOGL_NOTICE, "unknown prim %d op %d\n", l1sap->oph.primitive, l1sap->oph.operation); - oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, - "unknown prim %d op %d\n", - l1sap->oph.primitive, - l1sap->oph.operation); + oml_fail_rep(OSMO_EVT_MAJ_UKWN_MSG, "unknown prim %d op %d", + l1sap->oph.primitive, l1sap->oph.operation); break; } diff --git a/src/common/main.c b/src/common/main.c index 1af4f34..4c51848 100644 --- a/src/common/main.c +++ b/src/common/main.c @@ -184,12 +184,9 @@ switch (signal) { case SIGINT: - //osmo_signal_dispatch(SS_GLOBAL, S_GLOBAL_SHUTDOWN, NULL); if (!quit) { - oml_tx_failure_event_rep(&bts->mo, - OSMO_EVT_CRIT_PROC_STOP, - "BTS: SIGINT received -> " - "shutdown\n"); + oml_fail_rep(OSMO_EVT_CRIT_PROC_STOP, + "BTS: SIGINT received -> shutdown"); bts_shutdown(bts, "SIGINT"); } quit++; @@ -197,9 +194,9 @@ case SIGABRT: case SIGUSR1: case SIGUSR2: - oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_CRIT_PROC_STOP, - "BTS: signal %s received\n", - strsignal(signal)); + oml_fail_rep(OSMO_EVT_CRIT_PROC_STOP, + "BTS: signal %d (%s) received", signal, + strsignal(signal)); talloc_report_full(tall_bts_ctx, stderr); break; default: diff --git a/src/common/oml.c b/src/common/oml.c index 1482410..272123e 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -25,6 +25,8 @@ */ #include +#include +#include #include #include @@ -56,6 +58,42 @@ struct msgb *oml_msgb_alloc(void) { return msgb_alloc_headroom(1024, 128, "OML"); +} + +/* 3GPP TS 12.21 ? 8.8.2 */ +static int oml_tx_failure_event_rep(struct gsm_abis_mo *mo, uint16_t cause_value, + const char *fmt, ...) +{ + struct msgb *nmsg; + va_list ap; + + LOGP(DOML, LOGL_NOTICE, "Reporting FAILURE to BSC: "); + va_start(ap, fmt); + osmo_vlogp(DOML, LOGL_NOTICE, __FILE__, __LINE__, 1, fmt, ap); + nmsg = abis_nm_fail_evt_vrep(NM_EVT_PROC_FAIL, NM_SEVER_CRITICAL, + NM_PCAUSE_T_MANUF, cause_value, fmt, ap); + va_end(ap); + LOGPC(DOML, LOGL_NOTICE, "\n"); + + if (!nmsg) + return -ENOMEM; + + return oml_mo_send_msg(mo, nmsg, NM_MT_FAILURE_EVENT_REP); +} + +void oml_fail_rep(uint16_t cause_value, const char *fmt, ...) +{ + va_list ap; + char *rep; + + va_start(ap, fmt); + rep = talloc_asprintf(tall_bts_ctx, fmt, ap); + va_end(ap); + + osmo_signal_dispatch(SS_FAIL, cause_value, rep); + /* signal dispatch is synchronous so all the signal handlers are + finished already: we're free to free */ + talloc_free(rep); } int oml_send_msg(struct msgb *msg, int is_manuf) @@ -347,7 +385,7 @@ rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); if (rc < 0) { oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, - "New value for Attribute not supported\n"); + "New value for Attribute not supported"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); } @@ -356,7 +394,7 @@ uint16_t arfcn = ntohs(tlvp_val16_unal(&tp, NM_ATT_BCCH_ARFCN)); if (arfcn > 1024) { oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_WARN_SW_WARN, - "Given ARFCN %d is not supported.\n", + "Given ARFCN %u is not supported", arfcn); LOGP(DOML, LOGL_NOTICE, "Given ARFCN %d is not supported.\n", arfcn); return oml_fom_ack_nack(msg, NM_NACK_FREQ_NOTAVAIL); @@ -366,7 +404,7 @@ if (TLVP_PRESENT(&tp, NM_ATT_START_TIME)) { oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, "NM_ATT_START_TIME Attribute not " - "supported\n"); + "supported"); return oml_fom_ack_nack(msg, NM_NACK_SPEC_IMPL_NOTSUPP); } @@ -506,7 +544,7 @@ if (rc < 0) { oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UNSUP_ATTR, "New value for Set Radio Attribute not" - " supported\n"); + " supported"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); } @@ -568,8 +606,15 @@ memcpy(&_value, value, 2); arfcn = ntohs(_value); value += 2; - if (arfcn > 1024) + if (arfcn > 1024) { + oml_tx_failure_event_rep(&trx->bts->mo, + OSMO_EVT_WARN_SW_WARN, + "Given ARFCN %u is unsupported", + arfcn); + LOGP(DOML, LOGL_NOTICE, + "Given ARFCN %u is unsupported.\n", arfcn); return oml_fom_ack_nack(msg, NM_NACK_FREQ_NOTAVAIL); + } trx->arfcn = arfcn; } #endif @@ -672,7 +717,7 @@ if (rc < 0) { oml_tx_failure_event_rep(&ts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, "New value for Set Channel Attribute " - "not supported\n"); + "not supported"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); } @@ -814,7 +859,7 @@ trx->mo.obj_inst.trx_nr = foh->obj_inst.trx_nr; trx->mo.obj_inst.ts_nr = 0xff; oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, - "Formatted O&M message too short\n"); + "Formatted O&M message too short"); } return -EIO; } @@ -828,7 +873,7 @@ trx->mo.obj_inst.ts_nr = 0xff; oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, "Formatted O&M with BTS %d out" - " of range (0:0xFF).\n", + " of range (0:0xFF)", foh->obj_inst.bts_nr); } return oml_fom_ack_nack(msg, NM_NACK_BTSNR_UNKN); @@ -871,12 +916,12 @@ trx->mo.obj_inst.ts_nr = 0xff; oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, "unknown Formatted O&M " - "msg_type 0x%02x\n", + "msg_type 0x%02x", foh->msg_type); } else oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UKWN_MSG, "unknown Formatted O&M " - "msg_type 0x%02x\n", + "msg_type 0x%02x", foh->msg_type); ret = oml_fom_ack_nack(msg, NM_NACK_MSGTYPE_INVAL); } @@ -1191,29 +1236,19 @@ return ret; } -/* 3GPP TS 12.21 ? 8.8.2 */ -int oml_tx_failure_event_rep(struct gsm_abis_mo *mo, uint16_t cause_value, - const char *fmt, ...) +static int handle_fail_sig(unsigned int subsys, unsigned int signal, void *handle, + void *signal_data) { - struct msgb *nmsg; - va_list ap; + oml_tx_failure_event_rep(handle, signal, "%s", signal_data); - va_start(ap, fmt); - nmsg = abis_nm_fail_evt_rep(NM_EVT_PROC_FAIL, NM_SEVER_CRITICAL, - NM_PCAUSE_T_MANUF, cause_value, fmt, ap); - LOGP(DOML, LOGL_INFO, fmt, ap); - va_end(ap); - - if (!nmsg) - return -ENOMEM; - - return oml_mo_send_msg(mo, nmsg, NM_MT_FAILURE_EVENT_REP); + return 0; } -int oml_init(void) +int oml_init(struct gsm_abis_mo *mo) { DEBUGP(DOML, "Initializing OML attribute definitions\n"); tlv_def_patch(&abis_nm_att_tlvdef_ipa, &abis_nm_att_tlvdef); + osmo_signal_register_handler(SS_FAIL, handle_fail_sig, mo); return 0; } diff --git a/src/common/rsl.c b/src/common/rsl.c index a34c455..b3e9afb 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -403,9 +403,8 @@ if (rc < 0) { /* FIXME: notfiy the BSC on other errors? */ if (rc == -ENOSPC) - oml_tx_failure_event_rep(&trx->mo, - OSMO_EVT_MIN_PAG_TAB_FULL, - "BTS paging table is full\n"); + oml_fail_rep(OSMO_EVT_MIN_PAG_TAB_FULL, + "BTS paging table is full"); } pcu_tx_pag_req(identity_lv, chan_needed); @@ -1653,11 +1652,9 @@ LOGP(DRSL, LOGL_ERROR, "%s IPAC Failed to create RTP/RTCP sockets\n", gsm_lchan_name(lchan)); - oml_tx_failure_event_rep(&lchan->ts->trx->mo, - OSMO_EVT_CRIT_RTP_TOUT, - "%s IPAC Failed to create " - "RTP/RTCP sockets\n", - gsm_lchan_name(lchan)); + oml_fail_rep(OSMO_EVT_CRIT_RTP_TOUT, + "%s IPAC Failed to create RTP/RTCP sockets", + gsm_lchan_name(lchan)); return tx_ipac_XXcx_nack(lchan, RSL_ERR_RES_UNAVAIL, inc_ip_port, dch->c.msg_type); } @@ -1697,11 +1694,9 @@ LOGP(DRSL, LOGL_ERROR, "%s IPAC Failed to bind RTP/RTCP sockets\n", gsm_lchan_name(lchan)); - oml_tx_failure_event_rep(&lchan->ts->trx->mo, - OSMO_EVT_CRIT_RTP_TOUT, - "%s IPAC Failed to bind " - "RTP/RTCP sockets\n", - gsm_lchan_name(lchan)); + oml_fail_rep(OSMO_EVT_CRIT_RTP_TOUT, + "%s IPAC Failed to bind RTP/RTCP sockets", + gsm_lchan_name(lchan)); osmo_rtp_socket_free(lchan->abis_ip.rtp_socket); lchan->abis_ip.rtp_socket = NULL; msgb_queue_flush(&lchan->dl_tch_queue); -- To view, visit https://gerrit.osmocom.org/1570 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I738555c547926e97b325ab53763c0076c42309bc Gerrit-PatchSet: 6 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Wed Jan 25 12:29:25 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 25 Jan 2017 12:29:25 +0000 Subject: [PATCH] osmo-bts[master]: Add ctrl command to send OML alert In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1575 to look at the new patch set (#6). Add ctrl command to send OML alert Change-Id: I228cb71ab945e19e3747843469a52f577ee32f97 Related: OS#1615 --- M src/common/bts_ctrl_commands.c 1 file changed, 15 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/75/1575/6 diff --git a/src/common/bts_ctrl_commands.c b/src/common/bts_ctrl_commands.c index 6d223ff..4efb4ee 100644 --- a/src/common/bts_ctrl_commands.c +++ b/src/common/bts_ctrl_commands.c @@ -24,11 +24,15 @@ #include #include +#include #include #include #include #include +#include +#include +#include CTRL_CMD_DEFINE(therm_att, "thermal-attenuation"); static int get_therm_att(struct ctrl_cmd *cmd, void *data) @@ -67,12 +71,23 @@ return 0; } +CTRL_CMD_DEFINE_WO_NOVRF(oml_alert, "oml-alert"); +static int set_oml_alert(struct ctrl_cmd *cmd, void *data) +{ + /* Note: we expect signal dispatch to be synchronous */ + osmo_signal_dispatch(SS_FAIL, OSMO_EVT_EXT_ALARM, cmd->value); + + cmd->reply = "OK"; + + return CTRL_CMD_REPLY; +} int bts_ctrl_cmds_install(struct gsm_bts *bts) { int rc = 0; rc |= ctrl_cmd_install(CTRL_NODE_TRX, &cmd_therm_att); + rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_oml_alert); return rc; } -- To view, visit https://gerrit.osmocom.org/1575 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I228cb71ab945e19e3747843469a52f577ee32f97 Gerrit-PatchSet: 6 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Jan 25 13:20:55 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 25 Jan 2017 13:20:55 +0000 Subject: [PATCH] openbsc[master]: gsm0408_rcv_cc: guard against NULL subscriber Message-ID: Review at https://gerrit.osmocom.org/1662 gsm0408_rcv_cc: guard against NULL subscriber Check conn->subscr against NULL. gsm0408_rcv_cc() dereferences many conn members without checking presence: the bts and lchan members may be expected to be NULL in the ongoing MSC split and 3G developments. But the conn->subscr is initially NULL, so an MS sending a CC message before something like a LU or CM Service Request will result in a segfault. Prevent that. Note: the upcoming VLR will be more restrictive on what messages are processed, this is a "backport" to the situation on current master. Change-Id: If067db7cc0dd3210d9eb1da15be6b637795a3ecf --- M openbsc/src/libmsc/gsm_04_08.c 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/62/1662/1 diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index 742f803..755aa79 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -3605,6 +3605,11 @@ return -EINVAL; } + if (!conn->subscr) { + LOGP(DCC, LOGL_ERROR, "Invalid conn, no subscriber\n"); + return -EINVAL; + } + /* Find transaction */ trans = trans_find_by_id(conn, GSM48_PDISC_CC, transaction_id); -- To view, visit https://gerrit.osmocom.org/1662 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If067db7cc0dd3210d9eb1da15be6b637795a3ecf Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Jan 25 15:50:43 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Wed, 25 Jan 2017 15:50:43 +0000 Subject: [PATCH] osmo-pcu[master]: tbf.cpp: use new tlli instead of old tlli Message-ID: Review at https://gerrit.osmocom.org/1663 tbf.cpp: use new tlli instead of old tlli The old tlli might be 0x00000000. Change-Id: I2fd6fec022506e203d05e91c36ccd9e020ff816c --- M src/tbf.cpp 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/63/1663/1 diff --git a/src/tbf.cpp b/src/tbf.cpp index 0d28c5c..d9eb4bb 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -1311,7 +1311,7 @@ if (dl_tbf && dl_tbf->ms() != ms()) { LOGP(DRLCMACUL, LOGL_NOTICE, "Got RACH from " "TLLI=0x%08x while %s still exists. " - "Killing pending DL TBF\n", tlli(), + "Killing pending DL TBF\n", new_tlli, tbf_name(dl_tbf)); tbf_free(dl_tbf); dl_tbf = NULL; @@ -1319,7 +1319,7 @@ if (ul_tbf && ul_tbf->ms() != ms()) { LOGP(DRLCMACUL, LOGL_NOTICE, "Got RACH from " "TLLI=0x%08x while %s still exists. " - "Killing pending UL TBF\n", tlli(), + "Killing pending UL TBF\n", new_tlli, tbf_name(ul_tbf)); tbf_free(ul_tbf); ul_tbf = NULL; -- To view, visit https://gerrit.osmocom.org/1663 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2fd6fec022506e203d05e91c36ccd9e020ff816c Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Wed Jan 25 17:46:12 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 25 Jan 2017 17:46:12 +0000 Subject: [PATCH] osmo-pcu[master]: BTS: accept also relative frame numbers with rach requst In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1205 to look at the new patch set (#5). BTS: accept also relative frame numbers with rach requst The rach request contains a relative frame number (Fn % 42432), while BTS::rcv_rach() accepts the full frame number only. Since the BTS is always aware of the full frame number this is not a problem. But for BSC co-located PCU schemes it is a problem since the rach request only contains the relative frame number as mentioned above. The pcu continusly receives frame number updates with the GSM time indication message. It is simple to re-calculate the full frame number from that information. This patch makes BTS::rcv_rach() compatible with relative frame numbers, while not breaking the compatibility for full frame numbers Change-Id: Iaa182d8d29c6a0f5fa06064c2eb48b21b1ba2775 --- M src/bts.cpp M tests/tbf/TbfTest.cpp 2 files changed, 21 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/05/1205/5 diff --git a/src/bts.cpp b/src/bts.cpp index 25cbc60..5e4266a 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -536,9 +536,23 @@ if (is_11bit) rach_frame_11bit(); - LOGP(DRLCMAC, LOGL_DEBUG, "MS requests UL TBF on RACH, " - "so we provide one \n" - "ra=0x%02x Fn=%u qta=%d is_11bit=%d:\n", ra, Fn, qta, is_11bit); + /* Note: If a BTS is sending in a rach request it will be fully aware + * of the frame number. If the PCU is used in a BSC-co-located setup. + * The BSC will forward the incoming RACH request. The RACH request + * only contains the relative frame number (Fn % 42432) in its request + * reference. This PCU implementation has to fit both secenarious, so + * we need to assume that Fn is a relative frame number. */ + + /* Ensure that all following calculations are performed with the + * relative frame number */ + Fn = Fn % 42432; + + /* Restore the full frame number + * (See also 3GPP TS 44.018, section 10.5.2.38) */ + Fn = Fn + m_cur_fn - m_cur_fn % 42432; + + LOGP(DRLCMAC, LOGL_DEBUG, "MS requests UL TBF on RACH, so we provide " + "one:\n"); sb = is_single_block(ra, burst_type, is_11bit, &ms_class, &priority); diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index aec6ef8..e367ce6 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -42,6 +42,8 @@ #include +#define DUMMY_FN 2654167 + void *tall_pcu_ctx; int16_t spoof_mnc = 0, spoof_mcc = 0; @@ -166,6 +168,7 @@ trx = &bts->trx[0]; trx->pdch[ts_no].enable(); + the_bts->set_current_frame_number(DUMMY_FN); } static gprs_rlcmac_dl_tbf *create_dl_tbf(BTS *the_bts, uint8_t ms_class, @@ -1692,7 +1695,7 @@ { BTS the_bts; int ts_no = 7; - uint32_t fn = 2654167; /* 17,25,9 */ + uint32_t fn = DUMMY_FN; /* 17,25,9 */ uint32_t tlli = 0xf1223344; const char *imsi = "0011223344"; uint16_t qta = 31; -- To view, visit https://gerrit.osmocom.org/1205 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iaa182d8d29c6a0f5fa06064c2eb48b21b1ba2775 Gerrit-PatchSet: 5 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Jan 25 19:16:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 19:16:18 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: Add ETSI TS 101 220 for AID numbering in smart cards Message-ID: Review at https://gerrit.osmocom.org/1664 Add ETSI TS 101 220 for AID numbering in smart cards Change-Id: If3d04546f6d68e2947705c252464a0ed71377f44 --- M common/chapters/bibliography.adoc 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/64/1664/1 diff --git a/common/chapters/bibliography.adoc b/common/chapters/bibliography.adoc index ab9c6ff..5d0c548 100644 --- a/common/chapters/bibliography.adoc +++ b/common/chapters/bibliography.adoc @@ -92,6 +92,9 @@ - [[[etsi-ts102221]]] ETSI TS 102 221: Smart Cards; UICC-Terminal interface; Physical and logical characteristics http://www.etsi.org/deliver/etsi_ts/102200_102299/102221/13.01.00_60/ts_102221v130100p.pdf +- [[[etsi-ts101220]]] ETSI TS 101 220: Smart Cards; ETSI numbering + system for telecommunication application providers + http://www.etsi.org/deliver/etsi_ts/101200_101299/101220/12.00.00_60/ts_101220v120000p.pdf - [[[ietf-rfc768]]] IETF RFC 768: Internet Protocol https://tools.ietf.org/html/rfc791 -- To view, visit https://gerrit.osmocom.org/1664 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If3d04546f6d68e2947705c252464a0ed71377f44 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Wed Jan 25 19:40:17 2017 From: gerrit-no-reply at lists.osmocom.org (Tom Tsou) Date: Wed, 25 Jan 2017 19:40:17 +0000 Subject: osmo-trx[master]: Integrate Debian packaging changes In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1483 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9a89e7311c8632ae26ac2e6c02d1e427d94b1608 Gerrit-PatchSet: 2 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Tom Tsou Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 25 19:40:43 2017 From: gerrit-no-reply at lists.osmocom.org (Tom Tsou) Date: Wed, 25 Jan 2017 19:40:43 +0000 Subject: osmo-trx[master]: Remove embedded sqlite3 In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1485 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie8e751cc62132fe1f7748ccd78c5d48469027329 Gerrit-PatchSet: 2 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Tom Tsou Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 25 19:41:08 2017 From: gerrit-no-reply at lists.osmocom.org (Tom Tsou) Date: Wed, 25 Jan 2017 19:41:08 +0000 Subject: osmo-trx[master]: Do not embed sqlite3 when building In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1484 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If5edadc04c3ff953b451676e55ad3d00d4e43c82 Gerrit-PatchSet: 2 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Ruben Undheim Gerrit-Reviewer: Tom Tsou Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 25 19:41:16 2017 From: gerrit-no-reply at lists.osmocom.org (Tom Tsou) Date: Wed, 25 Jan 2017 19:41:16 +0000 Subject: osmo-trx[master]: Add gerrit settings In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1482 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6bbe65cc09e086685995f084a07a646a7d60b93c Gerrit-PatchSet: 2 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Tom Tsou Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 25 19:42:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 19:42:32 +0000 Subject: osmo-gsm-manuals[master]: Add ETSI TS 101 220 for AID numbering in smart cards In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1664 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If3d04546f6d68e2947705c252464a0ed71377f44 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 25 19:42:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 19:42:34 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: Add ETSI TS 101 220 for AID numbering in smart cards In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add ETSI TS 101 220 for AID numbering in smart cards ...................................................................... Add ETSI TS 101 220 for AID numbering in smart cards Change-Id: If3d04546f6d68e2947705c252464a0ed71377f44 --- M common/chapters/bibliography.adoc 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/common/chapters/bibliography.adoc b/common/chapters/bibliography.adoc index ab9c6ff..5d0c548 100644 --- a/common/chapters/bibliography.adoc +++ b/common/chapters/bibliography.adoc @@ -92,6 +92,9 @@ - [[[etsi-ts102221]]] ETSI TS 102 221: Smart Cards; UICC-Terminal interface; Physical and logical characteristics http://www.etsi.org/deliver/etsi_ts/102200_102299/102221/13.01.00_60/ts_102221v130100p.pdf +- [[[etsi-ts101220]]] ETSI TS 101 220: Smart Cards; ETSI numbering + system for telecommunication application providers + http://www.etsi.org/deliver/etsi_ts/101200_101299/101220/12.00.00_60/ts_101220v120000p.pdf - [[[ietf-rfc768]]] IETF RFC 768: Internet Protocol https://tools.ietf.org/html/rfc791 -- To view, visit https://gerrit.osmocom.org/1664 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If3d04546f6d68e2947705c252464a0ed71377f44 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Jan 25 19:42:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 19:42:52 +0000 Subject: [MERGED] osmo-trx[master]: Add gerrit settings In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add gerrit settings ...................................................................... Add gerrit settings Make it simple to setup and use this repo with 'git review' command. Change-Id: I6bbe65cc09e086685995f084a07a646a7d60b93c --- A .gitreview 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Tom Tsou: Looks good to me, approved Harald Welte: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..4521e98 --- /dev/null +++ b/.gitreview @@ -0,0 +1,3 @@ +[gerrit] +host=gerrit.osmocom.org +project=osmo-trx -- To view, visit https://gerrit.osmocom.org/1482 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6bbe65cc09e086685995f084a07a646a7d60b93c Gerrit-PatchSet: 2 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Tom Tsou From gerrit-no-reply at lists.osmocom.org Wed Jan 25 19:42:53 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 19:42:53 +0000 Subject: [MERGED] osmo-trx[master]: Do not embed sqlite3 when building In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Do not embed sqlite3 when building ...................................................................... Do not embed sqlite3 when building Change-Id: If5edadc04c3ff953b451676e55ad3d00d4e43c82 --- M Makefile.am M Makefile.common 2 files changed, 1 insertion(+), 2 deletions(-) Approvals: Tom Tsou: Looks good to me, approved Harald Welte: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/Makefile.am b/Makefile.am index 06251f0..f9f5a5c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -28,7 +28,6 @@ # Order must be preserved SUBDIRS = \ - sqlite3 \ CommonLibs \ GSM \ Transceiver52M diff --git a/Makefile.common b/Makefile.common index 734ab3a..d7927a5 100644 --- a/Makefile.common +++ b/Makefile.common @@ -33,6 +33,6 @@ COMMON_LA = $(top_builddir)/CommonLibs/libcommon.la GSM_LA = $(top_builddir)/GSM/libGSM.la -SQLITE_LA = $(top_builddir)/sqlite3/libsqlite.la -ldl +SQLITE_LA = -lsqlite3 MOSTLYCLEANFILES = *~ -- To view, visit https://gerrit.osmocom.org/1484 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If5edadc04c3ff953b451676e55ad3d00d4e43c82 Gerrit-PatchSet: 2 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Ruben Undheim Gerrit-Reviewer: Tom Tsou From gerrit-no-reply at lists.osmocom.org Wed Jan 25 19:42:53 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 19:42:53 +0000 Subject: [MERGED] osmo-trx[master]: Remove embedded sqlite3 In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Remove embedded sqlite3 ...................................................................... Remove embedded sqlite3 Previous patch switches to using system-wide sqlite3 so it's safe to remove local copy now. Change-Id: Ie8e751cc62132fe1f7748ccd78c5d48469027329 --- M configure.ac M debian/copyright D sqlite3/Makefile.am D sqlite3/sqlite3.c D sqlite3/sqlite3.h D sqlite3/sqlite3ext.h 6 files changed, 1 insertion(+), 145,782 deletions(-) Approvals: Tom Tsou: Looks good to me, approved Harald Welte: Looks good to me, but someone else must approve Jenkins Builder: Verified -- To view, visit https://gerrit.osmocom.org/1485 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie8e751cc62132fe1f7748ccd78c5d48469027329 Gerrit-PatchSet: 2 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Tom Tsou From gerrit-no-reply at lists.osmocom.org Wed Jan 25 19:42:54 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 19:42:54 +0000 Subject: [MERGED] osmo-trx[master]: Integrate Debian packaging changes In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Integrate Debian packaging changes ...................................................................... Integrate Debian packaging changes debian/control: * restructure to make it easier to incorporate further changes * update package descriptions * update project URL debian/rules: * use proper hardening syntax debian/copyright: update to match Debian format Change-Id: I9a89e7311c8632ae26ac2e6c02d1e427d94b1608 Related: OS#1694 --- M debian/control M debian/copyright M debian/rules 3 files changed, 182 insertions(+), 24 deletions(-) Approvals: Tom Tsou: Looks good to me, approved Harald Welte: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/debian/control b/debian/control index b8ec911..beb6f6a 100644 --- a/debian/control +++ b/debian/control @@ -1,17 +1,40 @@ Source: osmo-trx -Maintainer: Ivan Klyuchnikov Section: net Priority: optional -Standards-Version: 3.9.3 -Build-Depends: debhelper (>= 9), autotools-dev, libdbd-sqlite3, pkg-config, dh-autoreconf, libuhd-dev, libusb-1.0-0-dev, libboost-all-dev, hardening-wrapper, libfftw3-dev -Homepage: http://openbsc.osmocom.org/trac/wiki/OsmoTRX -Vcs-Git: git://git.osmocom.org/osmo-trx +Maintainer: Ivan Klyuchnikov +Build-Depends: debhelper (>= 9), + autotools-dev, + libdbd-sqlite3, + pkg-config, + dh-autoreconf, + libuhd-dev, + libusb-1.0-0-dev, + libboost-all-dev, + hardening-wrapper, + libfftw3-dev +Standards-Version: 3.9.6 Vcs-Browser: http://cgit.osmocom.org/osmo-trx +Vcs-Git: git://git.osmocom.org/osmo-trx +Homepage: https://projects.osmocom.org/projects/osmotrx Package: osmo-trx Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, libdbd-sqlite3 -Description: OsmoTRX is a software-defined radio transceiver that implements the Layer 1 physical layer of a BTS +Description: SDR transceiver that implements Layer 1 of a GSM BTS + OsmoTRX is a software-defined radio transceiver that implements the Layer 1 + physical layer of a BTS comprising the following 3GPP specifications: + . + TS 05.01 "Physical layer on the radio path" + TS 05.02 "Multiplexing and Multiple Access on the Radio Path" + TS 05.04 "Modulation" + TS 05.10 "Radio subsystem synchronization" + . + In this context, BTS is "Base transceiver station". It's the stations that + connect mobile phones to the mobile network. + . + 3GPP is the "3rd Generation Partnership Project" which is the collaboration + between different telecommunication associations for developing new + generations of mobile phone networks. (post-2G/GSM) Package: osmo-trx-dbg Architecture: any @@ -20,5 +43,3 @@ Depends: osmo-trx (= ${binary:Version}), ${misc:Depends} Description: Debug symbols for the osmo-trx Make debugging possible - - diff --git a/debian/copyright b/debian/copyright index 5f8836d..b60990e 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,25 +1,162 @@ -The Debian packaging is: +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: OsmoTRX +Source: http://cgit.osmocom.org/osmo-trx/ +Files-Excluded: sqlite3 Transceiver52M/std_inband.rbf - Copyright (C) 2014 Max +Files: * +Copyright: 2008-2013 Free Software Foundation + 2010 Kestrel Signal Processing, Inc. + 2010-2012 Range Networks, Inc. +License: AGPL-3+ -It was downloaded from: +Files: Transceiver52M/arm/* + Transceiver52M/x86/* + Transceiver52M/common/* + Transceiver52M/Resampler.cpp + Transceiver52M/Resampler.h + Transceiver52M/osmo-trx.cpp + Transceiver52M/radioInterfaceDiversity.cpp +Copyright: 2012-2013 Thomas Tsou +License: LGPL-2.1+ - git://git.osmocom.org/osmo-trx +Files: config/ax_check_compile_flag.m4 +Copyright: 2008 Guido U. Draheim + 2011 Maarten Bosmans +License: GPL-3+ -Upstream Authors: +Files: config/ax_gcc_x86_cpuid.m4 +Copyright: 2008 Steven G. Johnson + 2008 Matteo Frigo +License: GPL-3+ - Thomas Tsou - David A. Burgess - Harvind S. Samra - Raffi Sevlian +Files: config/ax_ext.m4 +Copyright: 2007 Christophe Tournayre + 2013 Michael Petch +License: license_for_ax_ext_m4 -Copyright: +Files: config/ax_gcc_x86_avx_xgetbv.m4 +Copyright: 2013 Michael Petch +License: GPL-3+ - Copyright (C) 2012-2013 Thomas Tsou - Copyright (C) 2011 Range Networks, Inc. - Copyright (C) 2008-2011 Free Software Foundation, Inc. +Files: CommonLibs/Makefile.am + GSM/Makefile.am + Transceiver52M/Makefile.am + sqlite3/Makefile.am + Transceiver52M/Transceiver.h + Transceiver52M/Transceiver.cpp +Copyright: 2008-2010 Free Software Foundation + 2010-2012 Range Networks, Inc. +License: GPL-3+ -License: +Files: autogen.sh +Copyright: 2005-2009 United States Government as represented by + the U.S. Army Research Laboratory. +License: BSD-3-clause - GNU Affero General Public License, Version 3 +Files: CommonLibs/sqlite3util.cpp +Copyright: 2010 Kestrel Signal Processing Inc. +License: none + No license described for file. +Comment: In the previous version of the file in the git repository + at upstream it is written: + Written by David A. Burgess, Kestrel Signal Processing, Inc., 2010 + The author disclaims copyright to this source code. + In the git log, this is written: + I do not claim any copyright over this change, as it's very basic. + Looking forward to see it merged into mainline. + See revision e766abbf82f02473038a83fd2f78befd08544cab at + https://github.com/osmocom/osmo-trx +Files: debian/* +Copyright: 2015 Ruben Undheim +License: GPL-3+ + + +License: AGPL-3+ + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero 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 Affero General Public License for more details. + . + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + + +License: GPL-3+ + This package 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 package 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, see + . + On Debian systems, the complete text of the GNU General + Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". + + +License: LGPL-2.1+ + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + . + This library 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 + Lesser General Public License for more details. + . + You should have received a copy of the GNU Lesser General Public + License along with this program. If not, see + + . + On Debian systems, the complete text of the GNU Lesser General + Public License version 2.1 can be found in + "/usr/share/common-licenses/LGPL-2.1". + + +License: license_for_ax_ext_m4 + Copying and distribution of this file, with or without modification, are + permitted in any medium without royalty provided the copyright notice + and this notice are preserved. This file is offered as-is, without any + warranty. + + +License: BSD-3-clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + . + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + . + 2. Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + . + 3. The name of the author may not be used to endorse or promote + products derived from this software without specific prior written + permission. + . + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/debian/rules b/debian/rules index 9ec67e5..e6e8c75 100755 --- a/debian/rules +++ b/debian/rules @@ -1,6 +1,6 @@ #!/usr/bin/make -f -DEB_BUILD_HARDENING=1 +export DEB_BUILD_MAINT_OPTIONS = hardening=+all %: dh $@ --with autoreconf -- To view, visit https://gerrit.osmocom.org/1483 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9a89e7311c8632ae26ac2e6c02d1e427d94b1608 Gerrit-PatchSet: 2 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Tom Tsou From gerrit-no-reply at lists.osmocom.org Wed Jan 25 19:43:57 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 19:43:57 +0000 Subject: osmo-bts[master]: OML: internalize failure reporting In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1570 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I738555c547926e97b325ab53763c0076c42309bc Gerrit-PatchSet: 6 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 25 19:44:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 19:44:05 +0000 Subject: osmo-bts[master]: Add ctrl command to send OML alert In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1575 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I228cb71ab945e19e3747843469a52f577ee32f97 Gerrit-PatchSet: 6 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 25 19:44:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 19:44:14 +0000 Subject: [MERGED] osmo-bts[master]: Add ctrl command to send OML alert In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add ctrl command to send OML alert ...................................................................... Add ctrl command to send OML alert Change-Id: I228cb71ab945e19e3747843469a52f577ee32f97 Related: OS#1615 --- M src/common/bts_ctrl_commands.c 1 file changed, 15 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/bts_ctrl_commands.c b/src/common/bts_ctrl_commands.c index 6d223ff..4efb4ee 100644 --- a/src/common/bts_ctrl_commands.c +++ b/src/common/bts_ctrl_commands.c @@ -24,11 +24,15 @@ #include #include +#include #include #include #include #include +#include +#include +#include CTRL_CMD_DEFINE(therm_att, "thermal-attenuation"); static int get_therm_att(struct ctrl_cmd *cmd, void *data) @@ -67,12 +71,23 @@ return 0; } +CTRL_CMD_DEFINE_WO_NOVRF(oml_alert, "oml-alert"); +static int set_oml_alert(struct ctrl_cmd *cmd, void *data) +{ + /* Note: we expect signal dispatch to be synchronous */ + osmo_signal_dispatch(SS_FAIL, OSMO_EVT_EXT_ALARM, cmd->value); + + cmd->reply = "OK"; + + return CTRL_CMD_REPLY; +} int bts_ctrl_cmds_install(struct gsm_bts *bts) { int rc = 0; rc |= ctrl_cmd_install(CTRL_NODE_TRX, &cmd_therm_att); + rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_oml_alert); return rc; } -- To view, visit https://gerrit.osmocom.org/1575 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I228cb71ab945e19e3747843469a52f577ee32f97 Gerrit-PatchSet: 6 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Jan 25 19:44:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 19:44:20 +0000 Subject: [MERGED] osmo-bts[master]: OML: internalize failure reporting In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OML: internalize failure reporting ...................................................................... OML: internalize failure reporting * make oml_tx_failure_event_rep() static and use osmo_signal_dispatch() wrapped into oml_fail_rep() to trigger event reports outside of oml.c instead of directly calling into OML layer * remove unnecessary formatting from text messages Related: OS#1615 Change-Id: I738555c547926e97b325ab53763c0076c42309bc --- M include/osmo-bts/oml.h M include/osmo-bts/signal.h M src/common/abis.c M src/common/bts.c M src/common/l1sap.c M src/common/main.c M src/common/oml.c M src/common/rsl.c 8 files changed, 83 insertions(+), 58 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmo-bts/oml.h b/include/osmo-bts/oml.h index 217ec64..139464e 100644 --- a/include/osmo-bts/oml.h +++ b/include/osmo-bts/oml.h @@ -9,7 +9,7 @@ struct gsm_lchan; -int oml_init(void); +int oml_init(struct gsm_abis_mo *mo); int down_oml(struct gsm_bts *bts, struct msgb *msg); struct msgb *oml_msgb_alloc(void); @@ -45,7 +45,6 @@ extern const unsigned int oml_default_t200_ms[7]; /* Transmit failure event report */ -int oml_tx_failure_event_rep(struct gsm_abis_mo *mo, uint16_t cause_value, - const char *fmt, ...); +void oml_fail_rep(uint16_t cause_value, const char *fmt, ...); #endif // _OML_H */ diff --git a/include/osmo-bts/signal.h b/include/osmo-bts/signal.h index c8168a2..01d4099 100644 --- a/include/osmo-bts/signal.h +++ b/include/osmo-bts/signal.h @@ -5,6 +5,7 @@ enum sig_subsys { SS_GLOBAL, + SS_FAIL, }; enum signals_global { diff --git a/src/common/abis.c b/src/common/abis.c index 6753149..768d261 100644 --- a/src/common/abis.c +++ b/src/common/abis.c @@ -235,7 +235,7 @@ { g_bts = bts; - oml_init(); + oml_init(&bts->mo); libosmo_abis_init(NULL); osmo_signal_register_handler(SS_L_INPUT, &inp_s_cbfn, bts); diff --git a/src/common/bts.c b/src/common/bts.c index efefb86..9915e1c 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -268,9 +268,9 @@ else rc = bts_model_trx_deact_rf(trx); if (rc < 0) - oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_RSL_FAIL, link ? - "Failed to establish RSL link (%d)\n" : - "Failed to deactivate RF (%d)\n", rc); + oml_fail_rep(OSMO_EVT_MAJ_RSL_FAIL, + link ? "Failed to establish RSL link (%d)" : + "Failed to deactivate RF (%d)", rc); return 0; } diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 9116e23..b2f18d1 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -1065,10 +1065,8 @@ default: LOGP(DL1P, LOGL_NOTICE, "unknown prim %d op %d\n", l1sap->oph.primitive, l1sap->oph.operation); - oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, - "unknown prim %d op %d\n", - l1sap->oph.primitive, - l1sap->oph.operation); + oml_fail_rep(OSMO_EVT_MAJ_UKWN_MSG, "unknown prim %d op %d", + l1sap->oph.primitive, l1sap->oph.operation); break; } diff --git a/src/common/main.c b/src/common/main.c index 1af4f34..4c51848 100644 --- a/src/common/main.c +++ b/src/common/main.c @@ -184,12 +184,9 @@ switch (signal) { case SIGINT: - //osmo_signal_dispatch(SS_GLOBAL, S_GLOBAL_SHUTDOWN, NULL); if (!quit) { - oml_tx_failure_event_rep(&bts->mo, - OSMO_EVT_CRIT_PROC_STOP, - "BTS: SIGINT received -> " - "shutdown\n"); + oml_fail_rep(OSMO_EVT_CRIT_PROC_STOP, + "BTS: SIGINT received -> shutdown"); bts_shutdown(bts, "SIGINT"); } quit++; @@ -197,9 +194,9 @@ case SIGABRT: case SIGUSR1: case SIGUSR2: - oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_CRIT_PROC_STOP, - "BTS: signal %s received\n", - strsignal(signal)); + oml_fail_rep(OSMO_EVT_CRIT_PROC_STOP, + "BTS: signal %d (%s) received", signal, + strsignal(signal)); talloc_report_full(tall_bts_ctx, stderr); break; default: diff --git a/src/common/oml.c b/src/common/oml.c index 1482410..272123e 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -25,6 +25,8 @@ */ #include +#include +#include #include #include @@ -56,6 +58,42 @@ struct msgb *oml_msgb_alloc(void) { return msgb_alloc_headroom(1024, 128, "OML"); +} + +/* 3GPP TS 12.21 ? 8.8.2 */ +static int oml_tx_failure_event_rep(struct gsm_abis_mo *mo, uint16_t cause_value, + const char *fmt, ...) +{ + struct msgb *nmsg; + va_list ap; + + LOGP(DOML, LOGL_NOTICE, "Reporting FAILURE to BSC: "); + va_start(ap, fmt); + osmo_vlogp(DOML, LOGL_NOTICE, __FILE__, __LINE__, 1, fmt, ap); + nmsg = abis_nm_fail_evt_vrep(NM_EVT_PROC_FAIL, NM_SEVER_CRITICAL, + NM_PCAUSE_T_MANUF, cause_value, fmt, ap); + va_end(ap); + LOGPC(DOML, LOGL_NOTICE, "\n"); + + if (!nmsg) + return -ENOMEM; + + return oml_mo_send_msg(mo, nmsg, NM_MT_FAILURE_EVENT_REP); +} + +void oml_fail_rep(uint16_t cause_value, const char *fmt, ...) +{ + va_list ap; + char *rep; + + va_start(ap, fmt); + rep = talloc_asprintf(tall_bts_ctx, fmt, ap); + va_end(ap); + + osmo_signal_dispatch(SS_FAIL, cause_value, rep); + /* signal dispatch is synchronous so all the signal handlers are + finished already: we're free to free */ + talloc_free(rep); } int oml_send_msg(struct msgb *msg, int is_manuf) @@ -347,7 +385,7 @@ rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); if (rc < 0) { oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, - "New value for Attribute not supported\n"); + "New value for Attribute not supported"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); } @@ -356,7 +394,7 @@ uint16_t arfcn = ntohs(tlvp_val16_unal(&tp, NM_ATT_BCCH_ARFCN)); if (arfcn > 1024) { oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_WARN_SW_WARN, - "Given ARFCN %d is not supported.\n", + "Given ARFCN %u is not supported", arfcn); LOGP(DOML, LOGL_NOTICE, "Given ARFCN %d is not supported.\n", arfcn); return oml_fom_ack_nack(msg, NM_NACK_FREQ_NOTAVAIL); @@ -366,7 +404,7 @@ if (TLVP_PRESENT(&tp, NM_ATT_START_TIME)) { oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, "NM_ATT_START_TIME Attribute not " - "supported\n"); + "supported"); return oml_fom_ack_nack(msg, NM_NACK_SPEC_IMPL_NOTSUPP); } @@ -506,7 +544,7 @@ if (rc < 0) { oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UNSUP_ATTR, "New value for Set Radio Attribute not" - " supported\n"); + " supported"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); } @@ -568,8 +606,15 @@ memcpy(&_value, value, 2); arfcn = ntohs(_value); value += 2; - if (arfcn > 1024) + if (arfcn > 1024) { + oml_tx_failure_event_rep(&trx->bts->mo, + OSMO_EVT_WARN_SW_WARN, + "Given ARFCN %u is unsupported", + arfcn); + LOGP(DOML, LOGL_NOTICE, + "Given ARFCN %u is unsupported.\n", arfcn); return oml_fom_ack_nack(msg, NM_NACK_FREQ_NOTAVAIL); + } trx->arfcn = arfcn; } #endif @@ -672,7 +717,7 @@ if (rc < 0) { oml_tx_failure_event_rep(&ts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, "New value for Set Channel Attribute " - "not supported\n"); + "not supported"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); } @@ -814,7 +859,7 @@ trx->mo.obj_inst.trx_nr = foh->obj_inst.trx_nr; trx->mo.obj_inst.ts_nr = 0xff; oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, - "Formatted O&M message too short\n"); + "Formatted O&M message too short"); } return -EIO; } @@ -828,7 +873,7 @@ trx->mo.obj_inst.ts_nr = 0xff; oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, "Formatted O&M with BTS %d out" - " of range (0:0xFF).\n", + " of range (0:0xFF)", foh->obj_inst.bts_nr); } return oml_fom_ack_nack(msg, NM_NACK_BTSNR_UNKN); @@ -871,12 +916,12 @@ trx->mo.obj_inst.ts_nr = 0xff; oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, "unknown Formatted O&M " - "msg_type 0x%02x\n", + "msg_type 0x%02x", foh->msg_type); } else oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UKWN_MSG, "unknown Formatted O&M " - "msg_type 0x%02x\n", + "msg_type 0x%02x", foh->msg_type); ret = oml_fom_ack_nack(msg, NM_NACK_MSGTYPE_INVAL); } @@ -1191,29 +1236,19 @@ return ret; } -/* 3GPP TS 12.21 ? 8.8.2 */ -int oml_tx_failure_event_rep(struct gsm_abis_mo *mo, uint16_t cause_value, - const char *fmt, ...) +static int handle_fail_sig(unsigned int subsys, unsigned int signal, void *handle, + void *signal_data) { - struct msgb *nmsg; - va_list ap; + oml_tx_failure_event_rep(handle, signal, "%s", signal_data); - va_start(ap, fmt); - nmsg = abis_nm_fail_evt_rep(NM_EVT_PROC_FAIL, NM_SEVER_CRITICAL, - NM_PCAUSE_T_MANUF, cause_value, fmt, ap); - LOGP(DOML, LOGL_INFO, fmt, ap); - va_end(ap); - - if (!nmsg) - return -ENOMEM; - - return oml_mo_send_msg(mo, nmsg, NM_MT_FAILURE_EVENT_REP); + return 0; } -int oml_init(void) +int oml_init(struct gsm_abis_mo *mo) { DEBUGP(DOML, "Initializing OML attribute definitions\n"); tlv_def_patch(&abis_nm_att_tlvdef_ipa, &abis_nm_att_tlvdef); + osmo_signal_register_handler(SS_FAIL, handle_fail_sig, mo); return 0; } diff --git a/src/common/rsl.c b/src/common/rsl.c index a34c455..b3e9afb 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -403,9 +403,8 @@ if (rc < 0) { /* FIXME: notfiy the BSC on other errors? */ if (rc == -ENOSPC) - oml_tx_failure_event_rep(&trx->mo, - OSMO_EVT_MIN_PAG_TAB_FULL, - "BTS paging table is full\n"); + oml_fail_rep(OSMO_EVT_MIN_PAG_TAB_FULL, + "BTS paging table is full"); } pcu_tx_pag_req(identity_lv, chan_needed); @@ -1653,11 +1652,9 @@ LOGP(DRSL, LOGL_ERROR, "%s IPAC Failed to create RTP/RTCP sockets\n", gsm_lchan_name(lchan)); - oml_tx_failure_event_rep(&lchan->ts->trx->mo, - OSMO_EVT_CRIT_RTP_TOUT, - "%s IPAC Failed to create " - "RTP/RTCP sockets\n", - gsm_lchan_name(lchan)); + oml_fail_rep(OSMO_EVT_CRIT_RTP_TOUT, + "%s IPAC Failed to create RTP/RTCP sockets", + gsm_lchan_name(lchan)); return tx_ipac_XXcx_nack(lchan, RSL_ERR_RES_UNAVAIL, inc_ip_port, dch->c.msg_type); } @@ -1697,11 +1694,9 @@ LOGP(DRSL, LOGL_ERROR, "%s IPAC Failed to bind RTP/RTCP sockets\n", gsm_lchan_name(lchan)); - oml_tx_failure_event_rep(&lchan->ts->trx->mo, - OSMO_EVT_CRIT_RTP_TOUT, - "%s IPAC Failed to bind " - "RTP/RTCP sockets\n", - gsm_lchan_name(lchan)); + oml_fail_rep(OSMO_EVT_CRIT_RTP_TOUT, + "%s IPAC Failed to bind RTP/RTCP sockets", + gsm_lchan_name(lchan)); osmo_rtp_socket_free(lchan->abis_ip.rtp_socket); lchan->abis_ip.rtp_socket = NULL; msgb_queue_flush(&lchan->dl_tch_queue); -- To view, visit https://gerrit.osmocom.org/1570 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I738555c547926e97b325ab53763c0076c42309bc Gerrit-PatchSet: 6 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Wed Jan 25 19:44:55 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 19:44:55 +0000 Subject: [MERGED] openbsc[master]: compression: Fix nullpointer deref In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: compression: Fix nullpointer deref ...................................................................... compression: Fix nullpointer deref When the creation of a new compression entity fails, an error message is created, this error message contains printf with a dereferentiation of the compression entity, that is clearly NULL at that point. This commit corrects that. Change-Id: I87371ade0ccd6a93b446f2013c1747f486739518 --- M openbsc/src/gprs/gprs_sndcp_comp.c 1 file changed, 4 insertions(+), 3 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/openbsc/src/gprs/gprs_sndcp_comp.c b/openbsc/src/gprs/gprs_sndcp_comp.c index 1591f80..a12c39a 100644 --- a/openbsc/src/gprs/gprs_sndcp_comp.c +++ b/openbsc/src/gprs/gprs_sndcp_comp.c @@ -107,13 +107,14 @@ } } - /* Display info message */ + /* Bail on failure */ if (comp_entity == NULL) { LOGP(DSNDCP, LOGL_ERROR, - "Compression entity (%d) creation failed!\n", - comp_entity->entity); + "Compression entity creation failed!\n"); return NULL; } + + /* Display info message */ if (comp_entity->compclass == SNDCP_XID_PROTOCOL_COMPRESSION) { LOGP(DSNDCP, LOGL_INFO, "New header compression entity (%d) created.\n", -- To view, visit https://gerrit.osmocom.org/1640 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I87371ade0ccd6a93b446f2013c1747f486739518 Gerrit-PatchSet: 5 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Jan 25 19:45:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 19:45:15 +0000 Subject: openbsc[master]: rsl: Fix dropping of LAPDm UA message. In-Reply-To: References: Message-ID: Patch Set 7: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1625 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I15fc1ef8e9e83f009bde96de9a8e95702cffbce6 Gerrit-PatchSet: 7 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 25 19:47:30 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 19:47:30 +0000 Subject: osmo-pcu[master]: PCU: Send Immedate Assignment over AGCH, not PCH In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-2 In fact, this is wrong. As I learned recently, in GPRS it is a valid short-cut to send the IMM.ASS inside the PCH *if* we make sure that it is sent during the paging group matching that IMSI. -- To view, visit https://gerrit.osmocom.org/1275 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5bebc5a15efcd6c74b50f02585ffcc8f53cf2ee3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 25 19:47:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 19:47:42 +0000 Subject: [ABANDON] osmo-pcu[master]: PCU: Send Immedate Assignment over AGCH, not PCH In-Reply-To: References: Message-ID: Harald Welte has abandoned this change. Change subject: PCU: Send Immedate Assignment over AGCH, not PCH ...................................................................... Abandoned is not an actual fix. current behavior is within spec. -- To view, visit https://gerrit.osmocom.org/1275 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I5bebc5a15efcd6c74b50f02585ffcc8f53cf2ee3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Jan 25 19:48:39 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 19:48:39 +0000 Subject: [ABANDON] libosmocore[master]: stats: Build UDP socket code only if sys/socket.h exists In-Reply-To: References: Message-ID: Harald Welte has abandoned this change. Change subject: stats: Build UDP socket code only if sys/socket.h exists ...................................................................... Abandoned Holger is right, I independently also discovered that this is a really bad idea. -- To view, visit https://gerrit.osmocom.org/1607 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I6beb4fcc394ed7d3f8dd7a097b6e998245ecf401 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From admin at opensuse.org Wed Jan 25 20:07:03 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 25 Jan 2017 20:07:03 +0000 Subject: Build failure of network:osmocom:nightly/osmo-trx in xUbuntu_16.10/i586 In-Reply-To: References: Message-ID: <588905689b5f3_15a5a89c10465362@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/xUbuntu_16.10/i586 Package network:osmocom:nightly/osmo-trx failed to build in xUbuntu_16.10/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-trx Last lines of build log: [ 105s] /bin/bash /usr/src/packages/BUILD/libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I/usr/src/packages/BUILD -I/usr/src/packages/BUILD/CommonLibs -I/usr/src/packages/BUILD/GSM -I/usr/src/packages/BUILD/sqlite3 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -O3 -g -ldl -lpthread -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fPIE -fstack-protector-strong -Wformat -Werror=format-security -c -o Reporting.lo Reporting.cpp [ 105s] libtool: compile: g++ -DHAVE_CONFIG_H -I. -I/usr/src/packages/BUILD -I/usr/src/packages/BUILD/CommonLibs -I/usr/src/packages/BUILD/GSM -I/usr/src/packages/BUILD/sqlite3 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -O3 -g -ldl -lpthread -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -c Reporting.cpp -fPIC -DPIC -o .libs/Reporting.o [ 105s] In file included from Reporting.h:29:0, [ 105s] from Reporting.cpp:26: [ 105s] ./sqlite3util.h:4:21: fatal error: sqlite3.h: No such file or directory [ 105s] #include [ 105s] ^ [ 105s] compilation terminated. [ 105s] Makefile:647: recipe for target 'Reporting.lo' failed [ 105s] make[3]: *** [Reporting.lo] Error 1 [ 105s] make[3]: Leaving directory '/usr/src/packages/BUILD/CommonLibs' [ 105s] Makefile:499: recipe for target 'all-recursive' failed [ 105s] make[2]: *** [all-recursive] Error 1 [ 105s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 105s] Makefile:430: recipe for target 'all' failed [ 105s] make[1]: *** [all] Error 2 [ 105s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 105s] dh_auto_build: make -j1 returned exit code 2 [ 105s] debian/rules:6: recipe for target 'build' failed [ 105s] make: *** [build] Error 2 [ 105s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 105s] [ 105s] wildcard2 failed "build osmo-trx_0.1.9.20170125.dsc" at Wed Jan 25 20:06:44 UTC 2017. [ 105s] [ 105s] ### VM INTERACTION START ### [ 109s] ### VM INTERACTION END ### [ 109s] [ 109s] wildcard2 failed "build osmo-trx_0.1.9.20170125.dsc" at Wed Jan 25 20:06:48 UTC 2017. [ 109s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Jan 25 20:07:03 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 25 Jan 2017 20:07:03 +0000 Subject: Build failure of network:osmocom:nightly/osmo-trx in xUbuntu_16.10/x86_64 In-Reply-To: References: Message-ID: <58890585f002e_15a5a89c104655a6@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/xUbuntu_16.10/x86_64 Package network:osmocom:nightly/osmo-trx failed to build in xUbuntu_16.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-trx Last lines of build log: [ 110s] libtool: compile: g++ -DHAVE_CONFIG_H -I. -I/usr/src/packages/BUILD -I/usr/src/packages/BUILD/CommonLibs -I/usr/src/packages/BUILD/GSM -I/usr/src/packages/BUILD/sqlite3 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -O3 -g -ldl -lpthread -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -c Reporting.cpp -fPIC -DPIC -o .libs/Reporting.o [ 110s] In file included from Reporting.h:29:0, [ 110s] from Reporting.cpp:26: [ 110s] ./sqlite3util.h:4:21: fatal error: sqlite3.h: No such file or directory [ 110s] #include [ 110s] ^ [ 110s] compilation terminated. [ 110s] Makefile:647: recipe for target 'Reporting.lo' failed [ 110s] make[3]: *** [Reporting.lo] Error 1 [ 110s] make[3]: Leaving directory '/usr/src/packages/BUILD/CommonLibs' [ 110s] Makefile:499: recipe for target 'all-recursive' failed [ 110s] make[2]: *** [all-recursive] Error 1 [ 110s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 110s] Makefile:430: recipe for target 'all' failed [ 110s] make[1]: *** [all] Error 2 [ 110s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 110s] dh_auto_build: make -j1 returned exit code 2 [ 110s] debian/rules:6: recipe for target 'build' failed [ 110s] make: *** [build] Error 2 [ 110s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 110s] [ 110s] lamb07 failed "build osmo-trx_0.1.9.20170125.dsc" at Wed Jan 25 20:06:55 UTC 2017. [ 110s] [ 110s] ### VM INTERACTION START ### [ 113s] [ 100.073142] reboot: Power down [ 113s] ### VM INTERACTION END ### [ 113s] [ 113s] lamb07 failed "build osmo-trx_0.1.9.20170125.dsc" at Wed Jan 25 20:06:59 UTC 2017. [ 113s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Jan 25 20:07:54 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 25 Jan 2017 20:07:54 +0000 Subject: Build failure of network:osmocom:nightly/osmo-trx in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <588905a6c83cd_15a5a89c104658d1@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/Debian_8.0/x86_64 Package network:osmocom:nightly/osmo-trx failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-trx Last lines of build log: [ 167s] In file included from Reporting.h:29:0, [ 167s] from Reporting.cpp:26: [ 167s] ./sqlite3util.h:4:21: fatal error: sqlite3.h: No such file or directory [ 167s] #include [ 167s] ^ [ 167s] compilation terminated. [ 167s] Makefile:634: recipe for target 'Reporting.lo' failed [ 167s] make[3]: *** [Reporting.lo] Error 1 [ 167s] make[3]: Leaving directory '/usr/src/packages/BUILD/CommonLibs' [ 167s] Makefile:487: recipe for target 'all-recursive' failed [ 167s] make[2]: *** [all-recursive] Error 1 [ 167s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 167s] Makefile:417: recipe for target 'all' failed [ 167s] make[1]: *** [all] Error 2 [ 167s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 167s] dh_auto_build: make -j1 returned exit code 2 [ 167s] debian/rules:6: recipe for target 'build' failed [ 167s] make: *** [build] Error 2 [ 167s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 167s] [ 167s] lamb59 failed "build osmo-trx_0.1.9.20170125.dsc" at Wed Jan 25 20:07:46 UTC 2017. [ 167s] [ 167s] ### VM INTERACTION START ### [ 168s] Powering off. [ 168s] [ 112.951565] reboot: Power down [ 168s] ### VM INTERACTION END ### [ 168s] [ 168s] lamb59 failed "build osmo-trx_0.1.9.20170125.dsc" at Wed Jan 25 20:07:48 UTC 2017. [ 168s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Jan 25 20:08:11 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 25 Jan 2017 20:08:11 +0000 Subject: Build failure of network:osmocom:nightly/osmo-trx in Debian_8.0/i586 In-Reply-To: References: Message-ID: <588905c2d6cc0_15a5a89c104659ee@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/Debian_8.0/i586 Package network:osmocom:nightly/osmo-trx failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-trx Last lines of build log: [ 165s] #define HAVE_STDLIB_H 1 [ 165s] #define HAVE_STRING_H 1 [ 165s] #define HAVE_MEMORY_H 1 [ 165s] #define HAVE_STRINGS_H 1 [ 165s] #define HAVE_INTTYPES_H 1 [ 165s] #define HAVE_STDINT_H 1 [ 165s] #define HAVE_UNISTD_H 1 [ 165s] #define HAVE_DLFCN_H 1 [ 165s] #define LT_OBJDIR ".libs/" [ 165s] #define STDC_HEADERS 1 [ 165s] #define HAVE_BYTESWAP_H 1 [ 165s] #define TIME_WITH_SYS_TIME 1 [ 165s] #define USE_UHD 1 [ 165s] [ 165s] configure: exit 1 [ 165s] dh_auto_configure: ./configure --build=i586-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --libdir=${prefix}/lib/i386-linux-gnu --libexecdir=${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 165s] debian/rules:6: recipe for target 'build' failed [ 165s] make: *** [build] Error 255 [ 165s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 165s] [ 165s] cloud117 failed "build osmo-trx_0.1.9.20170125.dsc" at Wed Jan 25 20:07:48 UTC 2017. [ 165s] [ 165s] ### VM INTERACTION START ### [ 166s] Powering off. [ 166s] [ 138.485702] reboot: Power down [ 170s] ### VM INTERACTION END ### [ 170s] [ 170s] cloud117 failed "build osmo-trx_0.1.9.20170125.dsc" at Wed Jan 25 20:07:54 UTC 2017. [ 170s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Jan 25 20:08:11 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 25 Jan 2017 20:08:11 +0000 Subject: Build failure of network:osmocom:nightly/osmo-trx in xUbuntu_16.04/i586 In-Reply-To: References: Message-ID: <588905c43d50_15a5a89c10466079@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/xUbuntu_16.04/i586 Package network:osmocom:nightly/osmo-trx failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-trx Last lines of build log: [ 168s] libtool: compile: g++ -DHAVE_CONFIG_H -I. -I/usr/src/packages/BUILD -I/usr/src/packages/BUILD/CommonLibs -I/usr/src/packages/BUILD/GSM -I/usr/src/packages/BUILD/sqlite3 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -O3 -g -ldl -lpthread -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c Timeval.cpp -fPIC -DPIC -o .libs/Timeval.o [ 168s] /bin/bash /usr/src/packages/BUILD/libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I/usr/src/packages/BUILD -I/usr/src/packages/BUILD/CommonLibs -I/usr/src/packages/BUILD/GSM -I/usr/src/packages/BUILD/sqlite3 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -O3 -g -ldl -lpthread -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -c -o Reporting.lo Reporting.cpp [ 168s] libtool: compile: g++ -DHAVE_CONFIG_H -I. -I/usr/src/packages/BUILD -I/usr/src/packages/BUILD/CommonLibs -I/usr/src/packages/BUILD/GSM -I/usr/src/packages/BUILD/sqlite3 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -O3 -g -ldl -lpthread -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c Reporting.cpp -fPIC -DPIC -o .libs/Reporting.o [ 168s] In file included from Reporting.h:29:0, [ 168s] from Reporting.cpp:26: [ 168s] ./sqlite3util.h:4:21: fatal error: sqlite3.h: No such file or directory [ 168s] compilation terminated. [ 168s] Makefile:647: recipe for target 'Reporting.lo' failed [ 168s] make[3]: *** [Reporting.lo] Error 1 [ 168s] make[3]: Leaving directory '/usr/src/packages/BUILD/CommonLibs' [ 168s] Makefile:499: recipe for target 'all-recursive' failed [ 168s] make[2]: *** [all-recursive] Error 1 [ 168s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 168s] Makefile:430: recipe for target 'all' failed [ 168s] make[1]: *** [all] Error 2 [ 168s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 168s] dh_auto_build: make -j1 returned exit code 2 [ 168s] debian/rules:6: recipe for target 'build' failed [ 168s] make: *** [build] Error 2 [ 168s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 168s] [ 168s] lamb56 failed "build osmo-trx_0.1.9.20170125.dsc" at Wed Jan 25 20:07:57 UTC 2017. [ 168s] [ 168s] ### VM INTERACTION START ### [ 171s] [ 121.967081] reboot: Power down [ 171s] ### VM INTERACTION END ### [ 171s] [ 171s] lamb56 failed "build osmo-trx_0.1.9.20170125.dsc" at Wed Jan 25 20:08:01 UTC 2017. [ 171s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Jan 25 20:08:29 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 25 Jan 2017 20:08:29 +0000 Subject: Build failure of network:osmocom:nightly/osmo-trx in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <588905c7c0ab5_15a5a89c10466219@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/osmo-trx failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-trx Last lines of build log: [ 175s] libtool: compile: g++ -DHAVE_CONFIG_H -I. -I/usr/src/packages/BUILD -I/usr/src/packages/BUILD/CommonLibs -I/usr/src/packages/BUILD/GSM -I/usr/src/packages/BUILD/sqlite3 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -O3 -g -ldl -lpthread -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c Timeval.cpp -fPIC -DPIC -o .libs/Timeval.o [ 175s] /bin/bash /usr/src/packages/BUILD/libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I/usr/src/packages/BUILD -I/usr/src/packages/BUILD/CommonLibs -I/usr/src/packages/BUILD/GSM -I/usr/src/packages/BUILD/sqlite3 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -O3 -g -ldl -lpthread -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -c -o Reporting.lo Reporting.cpp [ 176s] libtool: compile: g++ -DHAVE_CONFIG_H -I. -I/usr/src/packages/BUILD -I/usr/src/packages/BUILD/CommonLibs -I/usr/src/packages/BUILD/GSM -I/usr/src/packages/BUILD/sqlite3 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -O3 -g -ldl -lpthread -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c Reporting.cpp -fPIC -DPIC -o .libs/Reporting.o [ 176s] In file included from Reporting.h:29:0, [ 176s] from Reporting.cpp:26: [ 176s] ./sqlite3util.h:4:21: fatal error: sqlite3.h: No such file or directory [ 176s] compilation terminated. [ 176s] Makefile:647: recipe for target 'Reporting.lo' failed [ 176s] make[3]: *** [Reporting.lo] Error 1 [ 176s] make[3]: Leaving directory '/usr/src/packages/BUILD/CommonLibs' [ 176s] Makefile:499: recipe for target 'all-recursive' failed [ 176s] make[2]: *** [all-recursive] Error 1 [ 176s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 176s] Makefile:430: recipe for target 'all' failed [ 176s] make[1]: *** [all] Error 2 [ 176s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 176s] dh_auto_build: make -j1 returned exit code 2 [ 176s] debian/rules:6: recipe for target 'build' failed [ 176s] make: *** [build] Error 2 [ 176s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 176s] [ 176s] lamb54 failed "build osmo-trx_0.1.9.20170125.dsc" at Wed Jan 25 20:08:07 UTC 2017. [ 176s] [ 176s] ### VM INTERACTION START ### [ 179s] [ 126.047605] reboot: Power down [ 179s] ### VM INTERACTION END ### [ 179s] [ 179s] lamb54 failed "build osmo-trx_0.1.9.20170125.dsc" at Wed Jan 25 20:08:11 UTC 2017. [ 179s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Wed Jan 25 21:40:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 21:40:14 +0000 Subject: [PATCH] libosmo-sccp[master]: allow user to give private data to osmo_sua_user_create() Message-ID: Review at https://gerrit.osmocom.org/1665 allow user to give private data to osmo_sua_user_create() ... which can be resolved from the prim_cb() by calling osmo_sccp_link_get_user_priv(). Change-Id: If4c0f96f0621fb2adf4c78dc5994d3398431d92f --- M include/osmocom/sigtran/sua.h M src/sua.c M tests/sigtran/sua_client_test.c M tests/sigtran/sua_server_test.c 4 files changed, 14 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/65/1665/1 diff --git a/include/osmocom/sigtran/sua.h b/include/osmocom/sigtran/sua.h index 935a4c0..766b488 100644 --- a/include/osmocom/sigtran/sua.h +++ b/include/osmocom/sigtran/sua.h @@ -8,7 +8,8 @@ void osmo_sua_set_log_area(int area); -struct osmo_sccp_user *osmo_sua_user_create(void *ctx, osmo_prim_cb prim_cb); +struct osmo_sccp_user *osmo_sua_user_create(void *ctx, osmo_prim_cb prim_cb, + void *priv); void osmo_sua_user_destroy(struct osmo_sccp_user *user); int osmo_sua_server_listen(struct osmo_sccp_user *user, const char *hostname, uint16_t port); @@ -19,3 +20,4 @@ /* user hands us a SCCP-USER SAP primitive down into the stack */ int osmo_sua_user_link_down(struct osmo_sccp_link *link, struct osmo_prim_hdr *oph); +void *osmo_sccp_link_get_user_priv(struct osmo_sccp_link *slink); diff --git a/src/sua.c b/src/sua.c index 442b2a0..5af8c18 100644 --- a/src/sua.c +++ b/src/sua.c @@ -59,6 +59,7 @@ struct llist_head links; /* user call-back function in case of incoming primitives */ osmo_prim_cb prim_cb; + void *priv; }; struct osmo_sccp_link { @@ -1401,11 +1402,13 @@ static LLIST_HEAD(sua_users); -struct osmo_sccp_user *osmo_sua_user_create(void *ctx, osmo_prim_cb prim_cb) +struct osmo_sccp_user *osmo_sua_user_create(void *ctx, osmo_prim_cb prim_cb, + void *priv) { struct osmo_sccp_user *user = talloc_zero(ctx, struct osmo_sccp_user); user->prim_cb = prim_cb; + user->priv = priv; INIT_LLIST_HEAD(&user->links); llist_add_tail(&user->list, &sua_users); @@ -1413,6 +1416,11 @@ return user; } +void *osmo_sccp_link_get_user_priv(struct osmo_sccp_link *slink) +{ + return slink->user->priv; +} + void osmo_sua_user_destroy(struct osmo_sccp_user *user) { struct osmo_sccp_link *link; diff --git a/tests/sigtran/sua_client_test.c b/tests/sigtran/sua_client_test.c index 5ea7714..3cbd937 100644 --- a/tests/sigtran/sua_client_test.c +++ b/tests/sigtran/sua_client_test.c @@ -36,7 +36,7 @@ osmo_init_logging(&test_log_info); - g_user = osmo_sua_user_create(ctx, sccp_sap_up); + g_user = osmo_sua_user_create(ctx, sccp_sap_up, NULL); rc = osmo_sua_client_connect(g_user, "127.0.0.1", 2342); if (rc < 0) { diff --git a/tests/sigtran/sua_server_test.c b/tests/sigtran/sua_server_test.c index 0e8d9ca..97b2baf 100644 --- a/tests/sigtran/sua_server_test.c +++ b/tests/sigtran/sua_server_test.c @@ -65,7 +65,7 @@ osmo_init_logging(&test_log_info); - user = osmo_sua_user_create(ctx, sccp_sap_up); + user = osmo_sua_user_create(ctx, sccp_sap_up, NULL); rc = osmo_sua_server_listen(user, "127.0.0.1", 2342); if (rc < 0) { -- To view, visit https://gerrit.osmocom.org/1665 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If4c0f96f0621fb2adf4c78dc5994d3398431d92f Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Wed Jan 25 21:40:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 21:40:14 +0000 Subject: [PATCH] libosmo-sccp[master]: sua: Fix typo in log message Message-ID: Review at https://gerrit.osmocom.org/1666 sua: Fix typo in log message Change-Id: I13bb0e2f4ec688fefd9b98d6d2389562e2a2dad7 --- M src/sua.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/66/1666/1 diff --git a/src/sua.c b/src/sua.c index 5af8c18..294dc6a 100644 --- a/src/sua.c +++ b/src/sua.c @@ -526,7 +526,7 @@ /* resolve reference of connection */ conn = conn_find_by_id(link, par->conn_id); if (!conn) { - LOGP(DSUA, LOGL_ERROR, "N-DISCONNECT.resp for unknown " + LOGP(DSUA, LOGL_ERROR, "N-DISCONNECT.req for unknown " "connection ID %u\n", par->conn_id); /* FIXME: Send primitive to user */ return -ENODEV; -- To view, visit https://gerrit.osmocom.org/1666 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I13bb0e2f4ec688fefd9b98d6d2389562e2a2dad7 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Wed Jan 25 21:40:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 21:40:14 +0000 Subject: [PATCH] libosmo-sccp[master]: sua: call conn_disconnect() in sua_disconnect_req() Message-ID: Review at https://gerrit.osmocom.org/1667 sua: call conn_disconnect() in sua_disconnect_req() disconnect is not a class3/4 operation. We simply generate + send the DISCONNECT.ind message to the remote side and drop all local state about the connection. Change-Id: I4e336f9dfd4ebd0122cd9e5a70db3d05e9dc1764 --- M src/sua.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/67/1667/1 diff --git a/src/sua.c b/src/sua.c index 294dc6a..ad8385d 100644 --- a/src/sua.c +++ b/src/sua.c @@ -548,6 +548,7 @@ xua_msg_free(xua); conn_state_set(conn, S_DISCONN_PEND); + conn_destroy(conn); return sua_link_send(link, outmsg); } -- To view, visit https://gerrit.osmocom.org/1667 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4e336f9dfd4ebd0122cd9e5a70db3d05e9dc1764 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Wed Jan 25 21:40:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 21:40:14 +0000 Subject: [PATCH] libosmo-sccp[master]: sua: Ensure that a SUA client will continuously try to recon... Message-ID: Review at https://gerrit.osmocom.org/1668 sua: Ensure that a SUA client will continuously try to reconnect Change-Id: Ic05a2b78e29e4ede214a3395430ef54bacd84e60 --- M src/sua.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/68/1668/1 diff --git a/src/sua.c b/src/sua.c index ad8385d..110f1e5 100644 --- a/src/sua.c +++ b/src/sua.c @@ -1385,7 +1385,7 @@ sual->data = cli; osmo_stream_cli_set_data(cli, sual); - rc = osmo_stream_cli_open(cli); + rc = osmo_stream_cli_open2(cli, 1); if (rc < 0) { sua_link_destroy(sual); osmo_stream_cli_destroy(cli); -- To view, visit https://gerrit.osmocom.org/1668 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic05a2b78e29e4ede214a3395430ef54bacd84e60 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Wed Jan 25 21:54:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 21:54:27 +0000 Subject: [PATCH] libosmo-sccp[master]: SUA COIT: send dest ref nr, not dest addr Message-ID: Review at https://gerrit.osmocom.org/1669 SUA COIT: send dest ref nr, not dest addr See RFC 3868 3.3.11 https://tools.ietf.org/html/rfc3868#section-3.3.11 Change-Id: I083384876d4a8d7fa9c03409fbdc9e00e3c8f416 --- M src/sua.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/69/1669/1 diff --git a/src/sua.c b/src/sua.c index 110f1e5..5ae5f76 100644 --- a/src/sua.c +++ b/src/sua.c @@ -272,7 +272,7 @@ xua_msg_add_u32(xua, SUA_IEI_ROUTE_CTX, 0); /* FIXME */ xua_msg_add_u32(xua, SUA_IEI_PROTO_CLASS, 2); xua_msg_add_u32(xua, SUA_IEI_SRC_REF, conn->conn_id); - xua_msg_add_sccp_addr(xua, SUA_IEI_DEST_ADDR, &conn->called_addr); + xua_msg_add_u32(xua, SUA_IEI_DEST_REF, conn->remote_ref); /* optional: sequence number; credit (both class 3 only) */ outmsg = xua_to_msg(1, xua); -- To view, visit https://gerrit.osmocom.org/1669 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I083384876d4a8d7fa9c03409fbdc9e00e3c8f416 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Jan 25 21:54:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 21:54:28 +0000 Subject: [PATCH] libosmo-sccp[master]: add comment (meaning of COIT) Message-ID: Review at https://gerrit.osmocom.org/1670 add comment (meaning of COIT) Change-Id: I63276ca2bfd6282676618e50268ed2234025b7bb --- M include/osmocom/sigtran/protocol/sua.h 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/70/1670/1 diff --git a/include/osmocom/sigtran/protocol/sua.h b/include/osmocom/sigtran/protocol/sua.h index 864a2df..d61c85a 100644 --- a/include/osmocom/sigtran/protocol/sua.h +++ b/include/osmocom/sigtran/protocol/sua.h @@ -74,7 +74,7 @@ #define SUA_CO_CODT 8 #define SUA_CO_CODA 9 #define SUA_CO_COERR 10 -#define SUA_CO_COIT 11 +#define SUA_CO_COIT 11 /* Connection Oriented Inactiviy Test */ #define SUA_IEI_ROUTE_CTX 0x0006 #define SUA_IEI_CORR_ID 0x0013 -- To view, visit https://gerrit.osmocom.org/1670 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I63276ca2bfd6282676618e50268ed2234025b7bb Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Jan 25 21:54:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 21:54:28 +0000 Subject: [PATCH] libosmo-sccp[master]: add RFC 3868 (SUA) spec in HTML Message-ID: Review at https://gerrit.osmocom.org/1671 add RFC 3868 (SUA) spec in HTML Change-Id: Ieab0212157381f7b71f0196925e94c88e9b5938e --- A specs/RFC_3868__Signalling_Connection_Control_Part_User_Adaptation_Layer_SUA.html 1 file changed, 7,535 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/71/1671/1 -- To view, visit https://gerrit.osmocom.org/1671 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ieab0212157381f7b71f0196925e94c88e9b5938e Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Jan 25 21:54:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 21:54:28 +0000 Subject: [PATCH] libosmo-sccp[master]: cosmetic: add comments for GT, PC, SSN to help noobs finding... Message-ID: Review at https://gerrit.osmocom.org/1672 cosmetic: add comments for GT, PC, SSN to help noobs finding their way Change-Id: I8f47f855c2718f4922b36229a388fa719c628bf6 --- M include/osmocom/sigtran/sccp_sap.h 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/72/1672/1 diff --git a/include/osmocom/sigtran/sccp_sap.h b/include/osmocom/sigtran/sccp_sap.h index a155de5..0aa565a 100644 --- a/include/osmocom/sigtran/sccp_sap.h +++ b/include/osmocom/sigtran/sccp_sap.h @@ -46,9 +46,9 @@ OSMO_SCU_PRIM_N_PCSTATE, }; -#define OSMO_SCCP_ADDR_T_GT 0x0001 -#define OSMO_SCCP_ADDR_T_PC 0x0002 -#define OSMO_SCCP_ADDR_T_SSN 0x0004 +#define OSMO_SCCP_ADDR_T_GT 0x0001 /* global title */ +#define OSMO_SCCP_ADDR_T_PC 0x0002 /* signalling point code */ +#define OSMO_SCCP_ADDR_T_SSN 0x0004 /* subsystem number */ #define OSMO_SCCP_ADDR_T_IPv4 0x0008 #define OSMO_SCCP_ADDR_T_IPv6 0x0010 -- To view, visit https://gerrit.osmocom.org/1672 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8f47f855c2718f4922b36229a388fa719c628bf6 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Jan 25 21:54:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 21:54:28 +0000 Subject: [PATCH] libosmo-sccp[master]: remove two compiler warnings for unused variables Message-ID: Review at https://gerrit.osmocom.org/1673 remove two compiler warnings for unused variables Change-Id: I173dc67050d907f9b09b99265af9dee9d142ace3 --- M src/sua.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/73/1673/1 diff --git a/src/sua.c b/src/sua.c index 5ae5f76..f790a52 100644 --- a/src/sua.c +++ b/src/sua.c @@ -927,7 +927,8 @@ memcpy(¶m->calling_addr, &conn->calling_addr, sizeof(param->calling_addr)); //param->in_sequence_control; - cause = xua_msg_get_u32(xua, SUA_IEI_CAUSE); + /* TODO evaluate cause: + * cause = xua_msg_get_u32(xua, SUA_IEI_CAUSE); */ /* optional: src addr */ /* optional: dest addr */ param->importance = xua_msg_get_u32(xua, SUA_IEI_IMPORTANCE); -- To view, visit https://gerrit.osmocom.org/1673 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I173dc67050d907f9b09b99265af9dee9d142ace3 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Jan 25 21:54:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 21:54:28 +0000 Subject: [PATCH] libosmo-sccp[master]: parse SCCP src+dst addresses Message-ID: Review at https://gerrit.osmocom.org/1674 parse SCCP src+dst addresses In order to receive a Paging command with a valid RANAP SSN, decode the SCCP source and destination address IEs. This is used by hnbgw to forward a Paging from CN to RNC. This may be done more generally as soon as more IEs need parsing of their sub parts. For now, iterate the higher level IE's data chunk and obtain the address sub part IEs without storing sub part locations. Change-Id: I03d0c2a9003fda59c5b88c8738df009c30fbc11c --- M src/sua.c 1 file changed, 85 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/74/1674/1 diff --git a/src/sua.c b/src/sua.c index f790a52..b8e0c09 100644 --- a/src/sua.c +++ b/src/sua.c @@ -177,7 +177,7 @@ if (!tmp) return -ENOMEM; - msgb_put_u16(tmp, 2); /* route on SSN + PC */ + msgb_put_u16(tmp, SUA_RI_SSN_PC); /* route on SSN + PC */ msgb_put_u16(tmp, 7); /* always put all addresses on SCCP side */ if (addr->presence & OSMO_SCCP_ADDR_T_GT) { @@ -726,12 +726,95 @@ uint16_t iei) { const struct xua_msg_part *param = xua_msg_find_tag(xua, iei); + const struct xua_parameter_hdr *par; + uint16_t ri; + uint16_t ai; + uint16_t pos; + uint16_t par_tag, par_len, par_datalen; + uint32_t *p32; if (!param) return -ENODEV; - /* FIXME */ + LOGP(DSUA, LOGL_DEBUG, "sua_parse_addr(IEI=%d) (%d) %s\n", + iei, param->len, + osmo_hexdump(param->dat, param->len)); + + if (param->len < 4) { + LOGP(DSUA, LOGL_ERROR, "SUA IEI %d: invalid address length: %d\n", + iei, param->len); + return -EINVAL; + } + + pos = 0; + ri = ntohs(*(uint16_t*) ¶m->dat[pos]); + pos += 2; + ai = ntohs(*(uint16_t*) ¶m->dat[pos]); + pos += 2; + + if (ri != SUA_RI_SSN_PC) { + LOGP(DSUA, LOGL_ERROR, "SUA IEI %d: Routing Indicator not supported yet: %d\n", + iei, ri); + return -ENOTSUP; + } + + if (ai != 7) { + LOGP(DSUA, LOGL_ERROR, "SUA IEI %d: Address Indicator not supported yet: %x\n", + iei, ai); + return -ENOTSUP; + } + + /* + * FIXME: this parses the encapsulated T16L16V IEs on the go. We + * probably want to have a separate general parsing function storing + * the subparts in xua_msg_part. But before we do, we should find more + * users of this subpart parsing and be aware of the performance + * tradeoff. + */ + + while (pos + sizeof(*par) < param->len) { + par = (struct xua_parameter_hdr *) ¶m->dat[pos]; + par_tag = ntohs(par->tag); + par_len = ntohs(par->len); + par_datalen = par_len - sizeof(*par); + + LOGP(DSUA, LOGL_DEBUG, "SUA IEI %hu pos %hu/%hu: subpart tag %hu, len %hu\n", + iei, pos, param->len, par->tag, par->len); + + switch (par_tag) { + case SUA_IEI_PC: + if (par_datalen != 4) + goto subpar_fail; + p32 = (uint32_t*)par->data; + out->pc = ntohl(*p32); + out->presence |= OSMO_SCCP_ADDR_T_PC; + break; + case SUA_IEI_SSN: + if (par_datalen != 4) + goto subpar_fail; + /* 24 zero bits, then 8 bits SSN */ + out->ssn = par->data[3]; + out->presence |= OSMO_SCCP_ADDR_T_SSN; + break; + case SUA_IEI_GT: + /* TODO */ + out->presence |= OSMO_SCCP_ADDR_T_GT; + break; + default: + LOGP(DSUA, LOGL_ERROR, "SUA IEI %d: Unknown subpart tag %hd\n", + iei, par_tag); + goto subpar_fail; + } + + pos += par_len; + } + return 0; + +subpar_fail: + LOGP(DSUA, LOGL_ERROR, "Failed to parse subparts of address IEI=%d\n", + iei); + return -EINVAL; } static int sua_rx_cldt(struct osmo_sccp_link *link, struct xua_msg *xua) -- To view, visit https://gerrit.osmocom.org/1674 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I03d0c2a9003fda59c5b88c8738df009c30fbc11c Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Jan 25 21:54:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 21:54:29 +0000 Subject: [PATCH] libosmo-sccp[master]: cosmetic: sua.c: comments Message-ID: Review at https://gerrit.osmocom.org/1675 cosmetic: sua.c: comments Add some human readable names. Change-Id: If4aa15aae8b03c764a45b866a751eb3fbabebec1 --- M src/sua.c 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/75/1675/1 diff --git a/src/sua.c b/src/sua.c index b8e0c09..c363cdb 100644 --- a/src/sua.c +++ b/src/sua.c @@ -870,7 +870,7 @@ return rc; } -/* RFC 3868 3.3.3 / SCCP CR */ +/* RFC 3868 3.3.3 / SCCP CR (Connection Request) */ static int sua_rx_core(struct osmo_sccp_link *link, struct xua_msg *xua) { struct osmo_scu_prim *prim; @@ -915,7 +915,7 @@ return 0; } -/* RFC 3868 3.3.4 / SCCP CC */ +/* RFC 3868 3.3.4 / SCCP CC (Connection Confirm) */ static int sua_rx_coak(struct osmo_sccp_link *link, struct xua_msg *xua) { struct osmo_scu_prim *prim; @@ -976,7 +976,7 @@ return 0; } -/* RFC 3868 3.3.5 / SCCP CREF */ +/* RFC 3868 3.3.5 / SCCP CREF (Connection Refused) */ static int sua_rx_coref(struct osmo_sccp_link *link, struct xua_msg *xua) { struct osmo_scu_prim *prim; @@ -1030,7 +1030,7 @@ return 0; } -/* RFC 3868 3.3.6 / SCCP RLSD */ +/* RFC 3868 3.3.6 / SCCP RLSD (Released) */ static int sua_rx_relre(struct osmo_sccp_link *link, struct xua_msg *xua) { struct osmo_scu_prim *prim; @@ -1082,7 +1082,7 @@ return 0; } -/* RFC 3868 3.3.7 / SCCP RLC */ +/* RFC 3868 3.3.7 / SCCP RLC (Release Complete)*/ static int sua_rx_relco(struct osmo_sccp_link *link, struct xua_msg *xua) { struct osmo_scu_prim *prim; @@ -1127,7 +1127,7 @@ } -/* RFC3868 3.3.1 / SCCP DT1 */ +/* RFC3868 3.3.1 / SCCP DT1 (Data Form 1) */ static int sua_rx_codt(struct osmo_sccp_link *link, struct xua_msg *xua) { struct osmo_scu_prim *prim; -- To view, visit https://gerrit.osmocom.org/1675 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If4aa15aae8b03c764a45b866a751eb3fbabebec1 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Jan 25 21:54:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 21:54:29 +0000 Subject: [PATCH] libosmo-sccp[master]: fix: use proper disconnect prim param type Message-ID: Review at https://gerrit.osmocom.org/1676 fix: use proper disconnect prim param type For the N-DISCONNECT prim, parse CREF, RLC and RLSD from the proper parameter struct type: osmo_scu_disconn_param instead of osmo_scu_connect_param. Before this, the conn_id ended up in the wrong place and the other side always received a zero conn_id. Tested only for the RLSD case, which fixes Iu-Release message evaluation for all except the very first SUA conn received by the CN components. In all three cases, set: * param->responding_addr to conn->called_addr. * param->originator to OSMO_SCCP_ORIG_UNDEFINED. Change-Id: I446f2fe57cc3b7c52723f3ab82836513a5d37752 --- M src/sua.c 1 file changed, 12 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/76/1676/1 diff --git a/src/sua.c b/src/sua.c index c363cdb..2b4c64e 100644 --- a/src/sua.c +++ b/src/sua.c @@ -981,7 +981,7 @@ { struct osmo_scu_prim *prim; struct sua_connection *conn; - struct osmo_scu_connect_param *param; + struct osmo_scu_disconn_param *param; struct xua_msg_part *data_ie = xua_msg_find_tag(xua, SUA_IEI_DATA); struct msgb *upmsg; uint32_t conn_id = xua_msg_get_u32(xua, SUA_IEI_DEST_REF); @@ -1000,15 +1000,13 @@ /* fill primitive */ upmsg = sua_msgb_alloc(); prim = (struct osmo_scu_prim *) msgb_put(upmsg, sizeof(*prim)); - param = &prim->u.connect; + param = &prim->u.disconnect; osmo_prim_init(&prim->oph, SCCP_SAP_USER, OSMO_SCU_PRIM_N_DISCONNECT, PRIM_OP_INDICATION, upmsg); param->conn_id = conn_id; - memcpy(¶m->called_addr, &conn->called_addr, - sizeof(param->called_addr)); - memcpy(¶m->calling_addr, &conn->calling_addr, - sizeof(param->calling_addr)); + param->responding_addr = conn->called_addr; + param->originator = OSMO_SCCP_ORIG_UNDEFINED; //param->in_sequence_control; /* TODO evaluate cause: * cause = xua_msg_get_u32(xua, SUA_IEI_CAUSE); */ @@ -1035,7 +1033,7 @@ { struct osmo_scu_prim *prim; struct sua_connection *conn; - struct osmo_scu_connect_param *param; + struct osmo_scu_disconn_param *param; struct xua_msg_part *data_ie = xua_msg_find_tag(xua, SUA_IEI_DATA); struct msgb *upmsg; uint32_t conn_id = xua_msg_get_u32(xua, SUA_IEI_DEST_REF); @@ -1053,7 +1051,7 @@ /* fill primitive */ upmsg = sua_msgb_alloc(); prim = (struct osmo_scu_prim *) msgb_put(upmsg, sizeof(*prim)); - param = &prim->u.connect; + param = &prim->u.disconnect; osmo_prim_init(&prim->oph, SCCP_SAP_USER, OSMO_SCU_PRIM_N_DISCONNECT, PRIM_OP_INDICATION, upmsg); /* what primitive? */ @@ -1068,10 +1066,8 @@ memcpy(upmsg->l2h, data_ie->dat, data_ie->len); } - memcpy(¶m->called_addr, &conn->called_addr, - sizeof(param->called_addr)); - memcpy(¶m->calling_addr, &conn->calling_addr, - sizeof(param->calling_addr)); + param->responding_addr = conn->called_addr; + param->originator = OSMO_SCCP_ORIG_UNDEFINED; /* send to user SAP */ link->user->prim_cb(&prim->oph, link); @@ -1087,7 +1083,7 @@ { struct osmo_scu_prim *prim; struct sua_connection *conn; - struct osmo_scu_connect_param *param; + struct osmo_scu_disconn_param *param; struct msgb *upmsg; uint32_t conn_id = xua_msg_get_u32(xua, SUA_IEI_DEST_REF); @@ -1104,7 +1100,7 @@ /* fill primitive */ upmsg = sua_msgb_alloc(); prim = (struct osmo_scu_prim *) msgb_put(upmsg, sizeof(*prim)); - param = &prim->u.connect; + param = &prim->u.disconnect; osmo_prim_init(&prim->oph, SCCP_SAP_USER, OSMO_SCU_PRIM_N_DISCONNECT, PRIM_OP_CONFIRM, upmsg); /* what primitive? */ @@ -1113,10 +1109,8 @@ /* source reference */ param->importance = xua_msg_get_u32(xua, SUA_IEI_IMPORTANCE); - memcpy(¶m->called_addr, &conn->called_addr, - sizeof(param->called_addr)); - memcpy(¶m->calling_addr, &conn->calling_addr, - sizeof(param->calling_addr)); + param->responding_addr = conn->called_addr; + param->originator = OSMO_SCCP_ORIG_UNDEFINED; /* send to user SAP */ link->user->prim_cb(&prim->oph, link); -- To view, visit https://gerrit.osmocom.org/1676 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I446f2fe57cc3b7c52723f3ab82836513a5d37752 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Jan 25 21:56:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 21:56:09 +0000 Subject: libosmo-sccp[master]: allow user to give private data to osmo_sua_user_create() In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1665 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If4c0f96f0621fb2adf4c78dc5994d3398431d92f Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 25 21:56:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 21:56:12 +0000 Subject: libosmo-sccp[master]: sua: Fix typo in log message In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1666 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I13bb0e2f4ec688fefd9b98d6d2389562e2a2dad7 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 25 21:56:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 21:56:17 +0000 Subject: libosmo-sccp[master]: sua: call conn_disconnect() in sua_disconnect_req() In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1667 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4e336f9dfd4ebd0122cd9e5a70db3d05e9dc1764 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 25 21:56:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 21:56:21 +0000 Subject: libosmo-sccp[master]: sua: Ensure that a SUA client will continuously try to recon... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1668 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic05a2b78e29e4ede214a3395430ef54bacd84e60 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 25 21:56:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 21:56:59 +0000 Subject: libosmo-sccp[master]: SUA COIT: send dest ref nr, not dest addr In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1669 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I083384876d4a8d7fa9c03409fbdc9e00e3c8f416 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 25 21:57:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 21:57:18 +0000 Subject: libosmo-sccp[master]: cosmetic: add comments for GT, PC, SSN to help noobs finding... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1672 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8f47f855c2718f4922b36229a388fa719c628bf6 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 25 21:57:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 21:57:42 +0000 Subject: libosmo-sccp[master]: remove two compiler warnings for unused variables In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1673 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I173dc67050d907f9b09b99265af9dee9d142ace3 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 25 21:57:47 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 21:57:47 +0000 Subject: libosmo-sccp[master]: fix: use proper disconnect prim param type In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1676 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I446f2fe57cc3b7c52723f3ab82836513a5d37752 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 25 21:57:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 21:57:51 +0000 Subject: libosmo-sccp[master]: cosmetic: sua.c: comments In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1675 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If4aa15aae8b03c764a45b866a751eb3fbabebec1 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 25 21:57:55 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 21:57:55 +0000 Subject: libosmo-sccp[master]: parse SCCP src+dst addresses In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1674 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I03d0c2a9003fda59c5b88c8738df009c30fbc11c Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 25 21:59:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 21:59:24 +0000 Subject: libosmo-sccp[master]: add RFC 3868 (SUA) spec in HTML In-Reply-To: References: Message-ID: Patch Set 1: not entirely sure why we need this, to be honest. It's not like we tend to include specs in our other projects (well, ok, 3GPP spec copies would require permission, but anyway) -- To view, visit https://gerrit.osmocom.org/1671 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ieab0212157381f7b71f0196925e94c88e9b5938e Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 25 21:59:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 21:59:32 +0000 Subject: libosmo-sccp[master]: add comment (meaning of COIT) In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1670 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I63276ca2bfd6282676618e50268ed2234025b7bb Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Jan 25 23:15:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 25 Jan 2017 23:15:17 +0000 Subject: libosmo-sccp[master]: add RFC 3868 (SUA) spec in HTML In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1671 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ieab0212157381f7b71f0196925e94c88e9b5938e Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 26 00:47:13 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 26 Jan 2017 00:47:13 +0000 Subject: [PATCH] openbsc[master]: various comment / whitespace tweaks (libmsc, gprs, libcommon... Message-ID: Review at https://gerrit.osmocom.org/1677 various comment / whitespace tweaks (libmsc, gprs, libcommon-cs) cosmetic ws in common_cs_vty.c, osmo_msc.c comment: tiny typo fix in gsm_04_08.c In comments, drop some unbalanced braces, because simplistic C file harvesters will break at a single opening brace even if it is in a comment. This is aimed at the fsm-to-dot.py script in libosmocore/contrib. Change-Id: I3c1fa53195a1e57d6fe0a6791c346d30ceff1251 --- M openbsc/src/gprs/gprs_sndcp.c M openbsc/src/gprs/gtphub.c M openbsc/src/libcommon-cs/common_cs_vty.c M openbsc/src/libmsc/gsm_04_08.c M openbsc/src/libmsc/osmo_msc.c 5 files changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/77/1677/1 diff --git a/openbsc/src/gprs/gprs_sndcp.c b/openbsc/src/gprs/gprs_sndcp.c index 60455b5..a18998f 100644 --- a/openbsc/src/gprs/gprs_sndcp.c +++ b/openbsc/src/gprs/gprs_sndcp.c @@ -911,6 +911,7 @@ case LL_DATA_CONF: case LL_UNITDATA_IND: case LL_STATUS_IND: + } } #endif diff --git a/openbsc/src/gprs/gtphub.c b/openbsc/src/gprs/gtphub.c index 83e17db..a1aaed2 100644 --- a/openbsc/src/gprs/gtphub.c +++ b/openbsc/src/gprs/gtphub.c @@ -553,7 +553,7 @@ } #if 1 - /* TODO if () { ... + /* TODO if () (waiting for a commit from jerlbeck) */ int i; diff --git a/openbsc/src/libcommon-cs/common_cs_vty.c b/openbsc/src/libcommon-cs/common_cs_vty.c index 7f8b495..08a7581 100644 --- a/openbsc/src/libcommon-cs/common_cs_vty.c +++ b/openbsc/src/libcommon-cs/common_cs_vty.c @@ -163,7 +163,7 @@ { struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->a5_encryption= atoi(argv[0]); + gsmnet->a5_encryption = atoi(argv[0]); return CMD_SUCCESS; } diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index 742f803..1e25754 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -3759,7 +3759,7 @@ } /* - * This will be ran by the linker when loading the DSO. We use it to + * This will be run by the linker when loading the DSO. We use it to * do system initialization, e.g. registration of signal handlers. */ static __attribute__((constructor)) void on_dso_load_0408(void) diff --git a/openbsc/src/libmsc/osmo_msc.c b/openbsc/src/libmsc/osmo_msc.c index 12a5117..2389980 100644 --- a/openbsc/src/libmsc/osmo_msc.c +++ b/openbsc/src/libmsc/osmo_msc.c @@ -131,7 +131,7 @@ static struct bsc_api msc_handler = { .sapi_n_reject = msc_sapi_n_reject, .compl_l3 = msc_compl_l3, - .dtap = msc_dtap, + .dtap = msc_dtap, .clear_request = msc_clear_request, .assign_compl = msc_assign_compl, .assign_fail = msc_assign_fail, -- To view, visit https://gerrit.osmocom.org/1677 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3c1fa53195a1e57d6fe0a6791c346d30ceff1251 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Jan 26 00:47:13 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 26 Jan 2017 00:47:13 +0000 Subject: [PATCH] openbsc[master]: osmo_bsc_grace.h: use '<>' include, not '""' Message-ID: Review at https://gerrit.osmocom.org/1678 osmo_bsc_grace.h: use '<>' include, not '""' Change-Id: I2f22be93d1a5fd6f229b85305a1d2a2cf6a43ce2 --- M openbsc/include/openbsc/osmo_bsc_grace.h 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/78/1678/1 diff --git a/openbsc/include/openbsc/osmo_bsc_grace.h b/openbsc/include/openbsc/osmo_bsc_grace.h index e9c1a0a..af77b2f 100644 --- a/openbsc/include/openbsc/osmo_bsc_grace.h +++ b/openbsc/include/openbsc/osmo_bsc_grace.h @@ -21,7 +21,7 @@ #ifndef OSMO_BSC_GRACE_H #define OSMO_BSC_GRACE_H -#include "gsm_data.h" +#include struct osmo_msc_data; -- To view, visit https://gerrit.osmocom.org/1678 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2f22be93d1a5fd6f229b85305a1d2a2cf6a43ce2 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Jan 26 00:47:14 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 26 Jan 2017 00:47:14 +0000 Subject: [PATCH] openbsc[master]: paging.h: use '<>' include, not '""' Message-ID: Review at https://gerrit.osmocom.org/1679 paging.h: use '<>' include, not '""' Also separate openbsc includes from osmocom/core includes. Change-Id: I4da0cb32476202d06902531d07faed8004f689f9 --- M openbsc/include/openbsc/paging.h 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/79/1679/1 diff --git a/openbsc/include/openbsc/paging.h b/openbsc/include/openbsc/paging.h index 2a10f4e..689ff51 100644 --- a/openbsc/include/openbsc/paging.h +++ b/openbsc/include/openbsc/paging.h @@ -24,10 +24,11 @@ #include #include -#include "gsm_data.h" -#include "gsm_subscriber.h" #include +#include +#include + /** * A pending paging request */ -- To view, visit https://gerrit.osmocom.org/1679 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4da0cb32476202d06902531d07faed8004f689f9 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Jan 26 00:47:14 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 26 Jan 2017 00:47:14 +0000 Subject: [PATCH] openbsc[master]: abis_om2000: drop unused function con_group_del() Message-ID: Review at https://gerrit.osmocom.org/1680 abis_om2000: drop unused function con_group_del() Change-Id: Idc47bf790fb680a3c322342170369993ec02f73a --- M openbsc/src/libbsc/abis_om2000_vty.c 1 file changed, 0 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/80/1680/1 diff --git a/openbsc/src/libbsc/abis_om2000_vty.c b/openbsc/src/libbsc/abis_om2000_vty.c index adad479..3e2ac48 100644 --- a/openbsc/src/libbsc/abis_om2000_vty.c +++ b/openbsc/src/libbsc/abis_om2000_vty.c @@ -273,20 +273,6 @@ return ent; } -static int con_group_del(struct gsm_bts *bts, uint8_t cg_id) -{ - struct con_group *cg, *cg2; - - llist_for_each_entry_safe(cg, cg2, &bts->rbs2000.con.conn_groups, list) { - if (cg->cg == cg_id) { - llist_del(&cg->list); - talloc_free(cg); - return 0; - }; - } - return -ENOENT; -} - static void con_group_add_path(struct con_group *cg, uint16_t ccp, uint8_t ci, uint8_t tag, uint8_t tei) { -- To view, visit https://gerrit.osmocom.org/1680 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idc47bf790fb680a3c322342170369993ec02f73a Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Jan 26 00:48:58 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 26 Jan 2017 00:48:58 +0000 Subject: openbsc[master]: various comment / whitespace tweaks (libmsc, gprs, libcommon... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 save others the review time... -- To view, visit https://gerrit.osmocom.org/1677 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3c1fa53195a1e57d6fe0a6791c346d30ceff1251 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 26 00:52:37 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 26 Jan 2017 00:52:37 +0000 Subject: [PATCH] openbsc[master]: Introduce subscriber_connection ref-counting Message-ID: Review at https://gerrit.osmocom.org/1681 Introduce subscriber_connection ref-counting This introduces a reference count for gsm_subscriber_connection. Every user of the connection needs to hold a reference until done. Once the reference count dorps to zero, the connection is cleared towards the BSC (which subsequently will clear any logical channels associated with it). Related: OS#1592 Change-Id: I8c05e6c81f246ff8b5bf91312f80410b1a85f15e --- M openbsc/include/openbsc/gsm_data.h M openbsc/include/openbsc/osmo_msc.h M openbsc/src/libmsc/gsm_04_08.c M openbsc/src/libmsc/gsm_04_11.c M openbsc/src/libmsc/osmo_msc.c M openbsc/src/libmsc/silent_call.c M openbsc/src/libmsc/transaction.c M openbsc/src/libmsc/ussd.c 8 files changed, 64 insertions(+), 20 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/81/1681/1 diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index ac573c4..d477284 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -106,8 +106,13 @@ /* active radio connection of a mobile subscriber */ struct gsm_subscriber_connection { + /* global linked list of subscriber_connections */ struct llist_head entry; + /* usage count. If this drops to zero, we start the release + * towards A/Iu */ + uint32_t use_count; + /* To whom we are allocated at the moment */ struct gsm_subscriber *subscr; diff --git a/openbsc/include/openbsc/osmo_msc.h b/openbsc/include/openbsc/osmo_msc.h index beb3f5e..8f57ce2 100644 --- a/openbsc/include/openbsc/osmo_msc.h +++ b/openbsc/include/openbsc/osmo_msc.h @@ -6,6 +6,7 @@ #include "bsc_api.h" struct bsc_api *msc_bsc_api(); -void msc_release_connection(struct gsm_subscriber_connection *conn); +struct gsm_subscriber_connection *subscr_con_get(struct gsm_subscriber_connection *conn); +void subscr_con_put(struct gsm_subscriber_connection *conn); #endif diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index 8380710..b37ef60 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -176,13 +176,15 @@ talloc_free(conn->sec_operation); conn->sec_operation = NULL; - msc_release_connection(conn); + subscr_con_put(conn); } void allocate_security_operation(struct gsm_subscriber_connection *conn) { conn->sec_operation = talloc_zero(tall_authciphop_ctx, struct gsm_security_operation); + if (conn->sec_operation) + subscr_con_get(conn); } int gsm48_secure_channel(struct gsm_subscriber_connection *conn, int key_seq, @@ -305,8 +307,7 @@ osmo_timer_del(&conn->loc_operation->updating_timer); talloc_free(conn->loc_operation); conn->loc_operation = NULL; - if (release) - msc_release_connection(conn); + subscr_con_put(conn); } static void allocate_loc_updating_req(struct gsm_subscriber_connection *conn) @@ -317,6 +318,8 @@ conn->loc_operation = talloc_zero(tall_locop_ctx, struct gsm_loc_updating_operation); + if (conn->loc_operation) + subscr_con_get(conn); } static int finish_lu(struct gsm_subscriber_connection *conn) @@ -3487,7 +3490,7 @@ return 0; } /* Assign lchan */ - trans->conn = conn; + trans->conn = subscr_con_get(conn); subscr_put(subscr); } else { /* update the subscriber we deal with */ @@ -3636,7 +3639,7 @@ return -ENOMEM; } /* Assign transaction */ - trans->conn = conn; + trans->conn = subscr_con_get(conn); } /* find function for current state and message */ @@ -3665,6 +3668,7 @@ osmo_timer_del(&conn->anch_operation->timeout); talloc_free(conn->anch_operation); conn->anch_operation = NULL; + subscr_con_put(conn); } static void anchor_timeout(void *_data) @@ -3672,7 +3676,6 @@ struct gsm_subscriber_connection *con = _data; release_anchor(con); - msc_release_connection(con); } int gsm0408_new_conn(struct gsm_subscriber_connection *conn) @@ -3681,6 +3684,7 @@ if (!conn->anch_operation) return -1; + subscr_con_get(conn); conn->anch_operation->timeout.data = conn; conn->anch_operation->timeout.cb = anchor_timeout; osmo_timer_schedule(&conn->anch_operation->timeout, 5, 0); diff --git a/openbsc/src/libmsc/gsm_04_11.c b/openbsc/src/libmsc/gsm_04_11.c index 6164a08..e395cd4 100644 --- a/openbsc/src/libmsc/gsm_04_11.c +++ b/openbsc/src/libmsc/gsm_04_11.c @@ -56,6 +56,7 @@ #include #include #include +#include #ifdef BUILD_SMPP #include "smpp_smsc.h" @@ -831,7 +832,7 @@ gsm411_smr_init(&trans->sms.smr_inst, 0, 1, gsm411_rl_recv, gsm411_mn_send); - trans->conn = conn; + trans->conn = subscr_con_get(conn); new_trans = 1; } @@ -910,7 +911,7 @@ gsm411_rl_recv, gsm411_mn_send); trans->sms.sms = sms; - trans->conn = conn; + trans->conn = subscr_con_get(conn); /* Hardcode SMSC Originating Address for now */ data = (uint8_t *)msgb_put(msg, 8); diff --git a/openbsc/src/libmsc/osmo_msc.c b/openbsc/src/libmsc/osmo_msc.c index 2389980..92bc846 100644 --- a/openbsc/src/libmsc/osmo_msc.c +++ b/openbsc/src/libmsc/osmo_msc.c @@ -144,22 +144,21 @@ } /* lchan release handling */ -void msc_release_connection(struct gsm_subscriber_connection *conn) +static void msc_release_connection(struct gsm_subscriber_connection *conn) { /* skip when we are in release, e.g. due an error */ if (conn->in_release) return; - /* skip releasing of silent calls as they have no transaction */ if (conn->silent_call) - return; + LOGP(DMSC, LOGL_ERROR, "release_connection() but silent_call active?!?\n"); /* check if there is a pending operation */ if (conn->loc_operation || conn->sec_operation || conn->anch_operation) - return; + LOGP(DMSC, LOGL_ERROR, "relase_connection() but {loc,sec,anch}_operation alive?!?\n"); if (trans_has_conn(conn)) - return; + LOGP(DMSC, LOGL_ERROR, "release_conncetion() but transactions alive?!?\n"); /* no more connections, asking to release the channel */ @@ -175,3 +174,35 @@ gsm0808_clear(conn); msc_subscr_con_free(conn); } + +/* increment the ref-count. Needs to be called by every user */ +struct gsm_subscriber_connection *subscr_con_get(struct gsm_subscriber_connection *conn) +{ + OSMO_ASSERT(conn); + + if (conn->in_release) + return NULL; + + conn->use_count++; + DEBUGP(DMSC, "increased subscr_con use_count to %u\n", conn->use_count); + + return conn; +} + +/* decrement the ref-count. Once it reaches zero, we release */ +void subscr_con_put(struct gsm_subscriber_connection *conn) +{ + OSMO_ASSERT(conn); + + if (conn->use_count == 0) { + LOGP(DMSC, LOGL_ERROR, "tryin to decrement conn use count, but is alrady 0\n"); + return; + } + + conn->use_count--; + DEBUGP(DMSC, "decreased subscr_con use_count to %u\n", conn->use_count); + + if (conn->use_count == 0) { + msc_release_connection(conn); + } +} diff --git a/openbsc/src/libmsc/silent_call.c b/openbsc/src/libmsc/silent_call.c index 131a178..b5b4813 100644 --- a/openbsc/src/libmsc/silent_call.c +++ b/openbsc/src/libmsc/silent_call.c @@ -55,6 +55,7 @@ DEBUGPC(DLSMS, "success, using Timeslot %u on ARFCN %u\n", conn->lchan->ts->nr, conn->lchan->ts->trx->arfcn); conn->silent_call = 1; + subscr_con_get(conn); /* increment lchan reference count */ osmo_signal_dispatch(SS_SCALL, S_SCALL_SUCCESS, &sigdata); break; @@ -142,7 +143,7 @@ conn->lchan->ts->nr, conn->lchan->ts->trx->arfcn); conn->silent_call = 0; - msc_release_connection(conn); + subscr_con_put(conn); return 0; } diff --git a/openbsc/src/libmsc/transaction.c b/openbsc/src/libmsc/transaction.c index dba4bed..4d0cdb1 100644 --- a/openbsc/src/libmsc/transaction.c +++ b/openbsc/src/libmsc/transaction.c @@ -111,7 +111,7 @@ llist_del(&trans->entry); if (trans->conn) - msc_release_connection(trans->conn); + subscr_con_put(trans->conn); trans->conn = NULL; talloc_free(trans); diff --git a/openbsc/src/libmsc/ussd.c b/openbsc/src/libmsc/ussd.c index f12c1f2..a27b163 100644 --- a/openbsc/src/libmsc/ussd.c +++ b/openbsc/src/libmsc/ussd.c @@ -48,13 +48,17 @@ struct ss_request req; struct gsm48_hdr *gh; + /* TODO: Use subscriber_connection ref-counting if we ever want + * to keep the connection alive due ot ongoing USSD exchange. + * As we answer everytying synchronously so far, there's no need + * yet */ + memset(&req, 0, sizeof(req)); gh = msgb_l3(msg); rc = gsm0480_decode_ss_request(gh, msgb_l3len(msg), &req); if (!rc) { DEBUGP(DMM, "Unhandled SS\n"); rc = gsm0480_send_ussd_reject(conn, msg, &req); - msc_release_connection(conn); return rc; } @@ -63,7 +67,6 @@ if (req.ss_code > 0) { /* Assume interrogateSS or modification of it and reject */ rc = gsm0480_send_ussd_reject(conn, msg, &req); - msc_release_connection(conn); return rc; } /* Still assuming a Release-Complete and returning */ @@ -78,8 +81,6 @@ rc = gsm0480_send_ussd_reject(conn, msg, &req); } - /* check if we can release it */ - msc_release_connection(conn); return rc; } -- To view, visit https://gerrit.osmocom.org/1681 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8c05e6c81f246ff8b5bf91312f80410b1a85f15e Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Jan 26 00:52:37 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 26 Jan 2017 00:52:37 +0000 Subject: [PATCH] openbsc[master]: add struct bsc_sub, separating libbsc from gsm_subscriber Message-ID: Review at https://gerrit.osmocom.org/1682 add struct bsc_sub, separating libbsc from gsm_subscriber Prepare for replacing gsm_subscriber with vlr_subscriber. vlr_subscriber will no longer make sense to be used in libbsc, so have a dedicated BSC subscriber struct. Related: #1592, #1594 Change-Id: Ia61cc00e8bb186b976939a4fc8f7cf9ce6aa3d8e --- M openbsc/include/openbsc/Makefile.am A openbsc/include/openbsc/bsc_subscriber.h M openbsc/include/openbsc/gsm_04_08.h M openbsc/include/openbsc/gsm_data.h M openbsc/include/openbsc/osmo_bsc_grace.h M openbsc/include/openbsc/paging.h M openbsc/src/libbsc/Makefile.am M openbsc/src/libbsc/abis_rsl.c A openbsc/src/libbsc/bsc_subscriber.c M openbsc/src/libbsc/bsc_vty.c M openbsc/src/libbsc/gsm_04_08_utils.c M openbsc/src/libbsc/paging.c M openbsc/src/libcommon-cs/common_cs.c M openbsc/src/libmsc/gsm_subscriber.c M openbsc/src/osmo-bsc/osmo_bsc_bssap.c M openbsc/src/osmo-bsc/osmo_bsc_filter.c M openbsc/src/osmo-bsc/osmo_bsc_grace.c M openbsc/src/osmo-bsc/osmo_bsc_vty.c M openbsc/tests/channel/Makefile.am M openbsc/tests/channel/channel_test.c M openbsc/tests/subscr/subscr_test.c M openbsc/tests/subscr/subscr_test.ok 22 files changed, 420 insertions(+), 125 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/82/1682/1 diff --git a/openbsc/include/openbsc/Makefile.am b/openbsc/include/openbsc/Makefile.am index 2466ce8..16693d7 100644 --- a/openbsc/include/openbsc/Makefile.am +++ b/openbsc/include/openbsc/Makefile.am @@ -10,6 +10,7 @@ bsc_nat_callstats.h \ bsc_nat_sccp.h \ bsc_rll.h \ + bsc_subscriber.h \ bss.h \ bts_ipaccess_nanobts_omlattr.h \ chan_alloc.h \ diff --git a/openbsc/include/openbsc/bsc_subscriber.h b/openbsc/include/openbsc/bsc_subscriber.h new file mode 100644 index 0000000..4d27c8c --- /dev/null +++ b/openbsc/include/openbsc/bsc_subscriber.h @@ -0,0 +1,32 @@ +/* GSM subscriber details for use in BSC land */ + +#pragma once + +#include + +#include +#include + +struct bsc_sub { + struct llist_head entry; + int use_count; + + char imsi[GSM23003_IMSI_MAX_DIGITS+1]; + uint32_t tmsi; + uint16_t lac; +}; + +const char *bsc_sub_name(struct bsc_sub *bsub); + +struct bsc_sub *bsc_sub_have_by_imsi(struct llist_head *list, const char *imsi); +struct bsc_sub *bsc_sub_have_by_tmsi(struct llist_head *list, uint32_t tmsi); + +struct bsc_sub *bsc_sub_find_by_imsi(struct llist_head *list, const char *imsi); +struct bsc_sub *bsc_sub_find_by_tmsi(struct llist_head *list, uint32_t tmsi); + +void bsc_sub_set_imsi(struct bsc_sub *bsub, const char *imsi); + +struct bsc_sub *_bsc_sub_get(struct bsc_sub *bsub, const char *file, int line); +struct bsc_sub *_bsc_sub_put(struct bsc_sub *bsub, const char *file, int line); +#define bsc_sub_get(bsub) _bsc_sub_get(bsub, __BASE_FILE__, __LINE__) +#define bsc_sub_put(bsub) _bsc_sub_put(bsub, __BASE_FILE__, __LINE__) diff --git a/openbsc/include/openbsc/gsm_04_08.h b/openbsc/include/openbsc/gsm_04_08.h index fd0b89d..c515569 100644 --- a/openbsc/include/openbsc/gsm_04_08.h +++ b/openbsc/include/openbsc/gsm_04_08.h @@ -15,6 +15,7 @@ struct gsm_subscriber_connection; struct amr_multirate_conf; struct amr_mode; +struct bsc_sub; #define GSM48_ALLOC_SIZE 2048 #define GSM48_ALLOC_HEADROOM 256 @@ -77,7 +78,8 @@ int send_siemens_mrpci(struct gsm_lchan *lchan, uint8_t *classmark2_lv); int gsm48_extract_mi(uint8_t *classmark2, int length, char *mi_string, uint8_t *mi_type); int gsm48_paging_extract_mi(struct gsm48_pag_resp *pag, int length, char *mi_string, uint8_t *mi_type); -int gsm48_handle_paging_resp(struct gsm_subscriber_connection *conn, struct msgb *msg, struct gsm_subscriber *subscr); +int gsm48_handle_paging_resp(struct gsm_subscriber_connection *conn, + struct msgb *msg, struct bsc_sub *bsub); int gsm48_lchan_modify(struct gsm_lchan *lchan, uint8_t lchan_mode); int gsm48_rx_rr_modif_ack(struct msgb *msg); diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index d477284..9cb46a4 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -23,6 +23,7 @@ struct mncc_sock_state; struct gsm_subscriber_group; +struct bsc_sub; #define OBSC_LINKID_CB(__msgb) (__msgb)->cb[3] @@ -115,6 +116,9 @@ /* To whom we are allocated at the moment */ struct gsm_subscriber *subscr; + + /* libbsc subscriber information */ + struct bsc_sub *bsub; /* LU expiration handling */ uint8_t expire_timer_stopped; @@ -386,6 +390,11 @@ * BTS|RNC specific timezone overrides for multi-tz networks in * OsmoCSCN, this should be tied to the location area code (LAC). */ struct gsm_tz tz; + + /* List of all struct bsc_sub used in libbsc. This llist_head is + * allocated so that the llist_head pointer itself can serve as a + * talloc context. */ + struct llist_head *bsc_subscribers; }; struct osmo_esme; diff --git a/openbsc/include/openbsc/osmo_bsc_grace.h b/openbsc/include/openbsc/osmo_bsc_grace.h index af77b2f..125b52a 100644 --- a/openbsc/include/openbsc/osmo_bsc_grace.h +++ b/openbsc/include/openbsc/osmo_bsc_grace.h @@ -22,10 +22,12 @@ #define OSMO_BSC_GRACE_H #include +#include struct osmo_msc_data; int bsc_grace_allow_new_connection(struct gsm_network *net, struct gsm_bts *bts); -int bsc_grace_paging_request(struct gsm_subscriber *sub, int type, struct osmo_msc_data *msc); +int bsc_grace_paging_request(enum signal_rf rf_policy, struct bsc_sub *subscr, + int chan_needed, struct osmo_msc_data *msc); #endif diff --git a/openbsc/include/openbsc/paging.h b/openbsc/include/openbsc/paging.h index 689ff51..22fe080 100644 --- a/openbsc/include/openbsc/paging.h +++ b/openbsc/include/openbsc/paging.h @@ -27,7 +27,7 @@ #include #include -#include +#include /** * A pending paging request @@ -36,8 +36,8 @@ /* list_head for list of all paging requests */ struct llist_head entry; /* the subscriber which we're paging. Later gsm_paging_request - * should probably become a part of the gsm_subscriber struct? */ - struct gsm_subscriber *subscr; + * should probably become a part of the bsc_sub struct? */ + struct bsc_sub *bsub; /* back-pointer to the BTS on which we are paging */ struct gsm_bts *bts; /* what kind of channel type do we ask the MS to establish */ @@ -55,13 +55,14 @@ }; /* schedule paging request */ -int paging_request(struct gsm_network *network, struct gsm_subscriber *subscr, +int paging_request(struct gsm_network *network, struct bsc_sub *bsub, int type, gsm_cbfn *cbfn, void *data); -int paging_request_bts(struct gsm_bts *bts, struct gsm_subscriber *subscr, - int type, gsm_cbfn *cbfn, void *data); +int paging_request_bts(struct gsm_bts *bts, struct bsc_sub *bsub, + int type, gsm_cbfn *cbfn, void *data); /* stop paging requests */ -void paging_request_stop(struct gsm_bts *bts, struct gsm_subscriber *subscr, +void paging_request_stop(struct llist_head *bts_list, + struct gsm_bts *_bts, struct bsc_sub *bsub, struct gsm_subscriber_connection *conn, struct msgb *msg); @@ -71,6 +72,6 @@ /* pending paging requests */ unsigned int paging_pending_requests_nr(struct gsm_bts *bts); -void *paging_get_data(struct gsm_bts *bts, struct gsm_subscriber *subscr); +void *paging_get_data(struct gsm_bts *bts, struct bsc_sub *bsub); #endif diff --git a/openbsc/src/libbsc/Makefile.am b/openbsc/src/libbsc/Makefile.am index b8e77e6..fd8f37a 100644 --- a/openbsc/src/libbsc/Makefile.am +++ b/openbsc/src/libbsc/Makefile.am @@ -24,6 +24,7 @@ abis_om2000_vty.c \ abis_rsl.c \ bsc_rll.c \ + bsc_subscriber.c \ paging.c \ bts_ericsson_rbs2000.c \ bts_ipaccess_nanobts.c \ diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c index 8a6b111..59c5b75 100644 --- a/openbsc/src/libbsc/abis_rsl.c +++ b/openbsc/src/libbsc/abis_rsl.c @@ -1333,10 +1333,10 @@ static void print_meas_rep(struct gsm_lchan *lchan, struct gsm_meas_rep *mr) { int i; - char *name = ""; + const char *name = ""; if (lchan && lchan->conn) - name = subscr_name(lchan->conn->subscr); + name = bsc_sub_name(lchan->conn->bsub); DEBUGP(DMEAS, "[%s] MEASUREMENT RESULT NR=%d ", name, mr->nr); diff --git a/openbsc/src/libbsc/bsc_subscriber.c b/openbsc/src/libbsc/bsc_subscriber.c new file mode 100644 index 0000000..01e4058 --- /dev/null +++ b/openbsc/src/libbsc/bsc_subscriber.c @@ -0,0 +1,144 @@ +/* GSM subscriber details for use in BSC land */ + +/* + * (C) 2016 by sysmocom s.f.m.c. GmbH + * + * Author: Neels Hofmeyr + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero 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 Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include +#include +#include + +#include +#include + +#include +#include + +static struct bsc_sub *bsc_sub_alloc(struct llist_head *list) +{ + struct bsc_sub *bsub; + + bsub = talloc_zero(list, struct bsc_sub); + if (!bsub) + return NULL; + + llist_add_tail(&bsub->entry, list); + bsub->use_count = 1; + + return bsub; +} + +struct bsc_sub *bsc_sub_find_by_imsi(struct llist_head *list, const char *imsi) +{ + struct bsc_sub *bsub; + + if (!imsi || !*imsi) + return NULL; + + llist_for_each_entry(bsub, list, entry) { + if (!strcmp(bsub->imsi, imsi)) + return bsc_sub_get(bsub); + } + return NULL; +} + +struct bsc_sub *bsc_sub_find_by_tmsi(struct llist_head *list, uint32_t tmsi) +{ + struct bsc_sub *bsub; + + if (tmsi == GSM_RESERVED_TMSI) + return NULL; + + llist_for_each_entry(bsub, list, entry) { + if (bsub->tmsi == tmsi) + return bsc_sub_get(bsub); + } + return NULL; +} + +void bsc_sub_set_imsi(struct bsc_sub *bsub, const char *imsi) +{ + if (!bsub) + return; + strncpy(bsub->imsi, imsi, sizeof(bsub->imsi)); +} + +struct bsc_sub *bsc_sub_have_by_imsi(struct llist_head *list, const char *imsi) +{ + struct bsc_sub *bsub; + bsub = bsc_sub_find_by_imsi(list, imsi); + if (bsub) + return bsub; + bsub = bsc_sub_alloc(list); + bsc_sub_set_imsi(bsub, imsi); + return bsub; +} + +struct bsc_sub *bsc_sub_have_by_tmsi(struct llist_head *list, uint32_t tmsi) +{ + struct bsc_sub *bsub; + bsub = bsc_sub_find_by_tmsi(list, tmsi); + if (bsub) + return bsub; + bsub = bsc_sub_alloc(list); + bsub->tmsi = tmsi; + return bsub; +} + +const char *bsc_sub_name(struct bsc_sub *bsub) +{ + static char buf[32]; + if (!bsub) + return "unknown"; + if (bsub->imsi[0]) + snprintf(buf, sizeof(buf), "IMSI:%s", bsub->imsi); + else + snprintf(buf, sizeof(buf), "TMSI:0x%08x", bsub->tmsi); + return buf; +} + +static void bsc_sub_free(struct bsc_sub *bsub) +{ + llist_del(&bsub->entry); + talloc_free(bsub); +} + +struct bsc_sub *_bsc_sub_get(struct bsc_sub *bsub, const char *file, int line) +{ + OSMO_ASSERT(bsub->use_count < INT_MAX); + bsub->use_count++; + LOGPSRC(DREF, LOGL_DEBUG, file, line, + "BSC subscr %s usage increases to: %d\n", + bsc_sub_name(bsub), bsub->use_count); + return bsub; +} + +struct bsc_sub *_bsc_sub_put(struct bsc_sub *bsub, const char *file, int line) +{ + bsub->use_count--; + LOGPSRC(DREF, bsub->use_count >= 0? LOGL_DEBUG : LOGL_ERROR, + file, line, + "BSC subscr %s usage decreases to: %d\n", + bsc_sub_name(bsub), bsub->use_count); + if (bsub->use_count <= 0) + bsc_sub_free(bsub); + return NULL; +} diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c index 01ee4df..3f6b68e 100644 --- a/openbsc/src/libbsc/bsc_vty.c +++ b/openbsc/src/libbsc/bsc_vty.c @@ -1009,6 +1009,16 @@ vty_out(vty, " Use count: %u%s", subscr->use_count, VTY_NEWLINE); } +static void bsc_sub_dump_vty(struct vty *vty, struct bsc_sub *bsub) +{ + if (strlen(bsub->imsi)) + vty_out(vty, " IMSI: %s%s", bsub->imsi, VTY_NEWLINE); + if (bsub->tmsi != GSM_RESERVED_TMSI) + vty_out(vty, " TMSI: 0x%08x%s", bsub->tmsi, + VTY_NEWLINE); + vty_out(vty, " Use count: %d%s", bsub->use_count, VTY_NEWLINE); +} + static void meas_rep_dump_uni_vty(struct vty *vty, struct gsm_meas_rep_unidir *mru, const char *prefix, @@ -1304,7 +1314,7 @@ static void paging_dump_vty(struct vty *vty, struct gsm_paging_request *pag) { vty_out(vty, "Paging on BTS %u%s", pag->bts->nr, VTY_NEWLINE); - subscr_dump_vty(vty, pag->subscr); + bsc_sub_dump_vty(vty, pag->bsub); } static void bts_paging_dump_vty(struct vty *vty, struct gsm_bts *bts) diff --git a/openbsc/src/libbsc/gsm_04_08_utils.c b/openbsc/src/libbsc/gsm_04_08_utils.c index 98f0790..6e9b608 100644 --- a/openbsc/src/libbsc/gsm_04_08_utils.c +++ b/openbsc/src/libbsc/gsm_04_08_utils.c @@ -283,7 +283,7 @@ } int gsm48_handle_paging_resp(struct gsm_subscriber_connection *conn, - struct msgb *msg, struct gsm_subscriber *subscr) + struct msgb *msg, struct bsc_sub *bsub) { struct gsm_bts *bts = msg->lchan->ts->trx->bts; struct gsm48_hdr *gh = msgb_l3(msg); @@ -292,22 +292,23 @@ if (is_siemens_bts(bts)) send_siemens_mrpci(msg->lchan, classmark2_lv); - if (!conn->subscr) { - conn->subscr = subscr; - } else if (conn->subscr != subscr) { + if (!conn->bsub) { + conn->bsub = bsub; + } else if (conn->bsub != bsub) { LOGP(DRR, LOGL_ERROR, "<- Channel already owned by someone else?\n"); - subscr_put(subscr); + bsc_sub_put(bsub); return -EINVAL; } else { DEBUGP(DRR, "<- Channel already owned by us\n"); - subscr_put(subscr); - subscr = conn->subscr; + bsc_sub_put(bsub); + bsub = conn->bsub; } rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_PAGING_COMPLETED]); /* Stop paging on the bts we received the paging response */ - paging_request_stop(conn->bts, subscr, conn, msg); + paging_request_stop(&bts->network->bts_list, conn->bts, bsub, conn, + msg); return 0; } diff --git a/openbsc/src/libbsc/paging.c b/openbsc/src/libbsc/paging.c index fcb4deb..fa7e925 100644 --- a/openbsc/src/libbsc/paging.c +++ b/openbsc/src/libbsc/paging.c @@ -42,6 +42,7 @@ #include #include +#include #include #include #include @@ -58,11 +59,11 @@ * Kill one paging request update the internal list... */ static void paging_remove_request(struct gsm_bts_paging_state *paging_bts, - struct gsm_paging_request *to_be_deleted) + struct gsm_paging_request *to_be_deleted) { osmo_timer_del(&to_be_deleted->T3113); llist_del(&to_be_deleted->entry); - subscr_put(to_be_deleted->subscr); + bsc_sub_put(to_be_deleted->bsub); talloc_free(to_be_deleted); } @@ -77,20 +78,17 @@ if (!bts->oml_link) return; - log_set_context(BSC_CTX_SUBSCR, request->subscr); + LOGP(DPAG, LOGL_INFO, "Going to send paging commands: imsi: '%s' tmsi: '0x%08x'\n", + request->bsub->imsi, request->bsub->tmsi); - LOGP(DPAG, LOGL_INFO, "Going to send paging commands: imsi: '%s' tmsi: '0x%x'\n", - request->subscr->imsi, request->subscr->tmsi); - - if (request->subscr->tmsi == GSM_RESERVED_TMSI) - mi_len = gsm48_generate_mid_from_imsi(mi, request->subscr->imsi); + if (request->bsub->tmsi == GSM_RESERVED_TMSI) + mi_len = gsm48_generate_mid_from_imsi(mi, request->bsub->imsi); else - mi_len = gsm48_generate_mid_from_tmsi(mi, request->subscr->tmsi); + mi_len = gsm48_generate_mid_from_tmsi(mi, request->bsub->tmsi); page_group = gsm0502_calc_paging_group(&bts->si_common.chan_desc, - str_to_imsi(request->subscr->imsi)); + str_to_imsi(request->bsub->imsi)); gsm0808_page(bts, page_group, mi_len, mi, request->chan_type); - log_set_context(BSC_CTX_SUBSCR, NULL); } static void paging_schedule_if_needed(struct gsm_bts_paging_state *paging_bts) @@ -236,11 +234,12 @@ } static int paging_pending_request(struct gsm_bts_paging_state *bts, - struct gsm_subscriber *subscr) { + struct bsc_sub *bsub) +{ struct gsm_paging_request *req; llist_for_each_entry(req, &bts->pending_requests, entry) { - if (subscr == req->subscr) + if (bsub == req->bsub) return 1; } @@ -254,10 +253,8 @@ gsm_cbfn *cbfn; int msg; - log_set_context(BSC_CTX_SUBSCR, req->subscr); - LOGP(DPAG, LOGL_INFO, "T3113 expired for request %p (%s)\n", - req, req->subscr->imsi); + req, bsc_sub_name(req->bsub)); /* must be destroyed before calling cbfn, to prevent double free */ rate_ctr_inc(&req->bts->network->bsc_ctrs->ctr[BSC_CTR_PAGING_EXPIRED]); @@ -276,21 +273,22 @@ } -static int _paging_request(struct gsm_bts *bts, struct gsm_subscriber *subscr, - int type, gsm_cbfn *cbfn, void *data) +static int _paging_request(struct gsm_bts *bts, struct bsc_sub *bsub, + int type, gsm_cbfn *cbfn, void *data) { struct gsm_bts_paging_state *bts_entry = &bts->paging; struct gsm_paging_request *req; - if (paging_pending_request(bts_entry, subscr)) { - LOGP(DPAG, LOGL_INFO, "Paging request already pending for %s\n", subscr->imsi); + if (paging_pending_request(bts_entry, bsub)) { + LOGP(DPAG, LOGL_INFO, "Paging request already pending for %s\n", + bsc_sub_name(bsub)); return -EEXIST; } - LOGP(DPAG, LOGL_DEBUG, "Start paging of subscriber %llu on bts %d.\n", - subscr->id, bts->nr); + LOGP(DPAG, LOGL_DEBUG, "Start paging of subscriber %s on bts %d.\n", + bsc_sub_name(bsub), bts->nr); req = talloc_zero(tall_paging_ctx, struct gsm_paging_request); - req->subscr = subscr_get(subscr); + req->bsub = bsc_sub_get(bsub); req->bts = bts; req->chan_type = type; req->cbfn = cbfn; @@ -304,8 +302,8 @@ return 0; } -int paging_request_bts(struct gsm_bts *bts, struct gsm_subscriber *subscr, - int type, gsm_cbfn *cbfn, void *data) +int paging_request_bts(struct gsm_bts *bts, struct bsc_sub *bsub, + int type, gsm_cbfn *cbfn, void *data) { int rc; @@ -316,15 +314,14 @@ /* maybe it is the first time we use it */ paging_init_if_needed(bts); - /* Trigger paging, pass any error to the caller */ - rc = _paging_request(bts, subscr, type, cbfn, data); + rc = _paging_request(bts, bsub, type, cbfn, data); if (rc < 0) return rc; return 1; } -int paging_request(struct gsm_network *network, struct gsm_subscriber *subscr, +int paging_request(struct gsm_network *network, struct bsc_sub *bsub, int type, gsm_cbfn *cbfn, void *data) { struct gsm_bts *bts = NULL; @@ -336,13 +333,14 @@ do { int rc; - bts = gsm_bts_by_lac(network, subscr->lac, bts); + bts = gsm_bts_by_lac(network, bsub->lac, bts); if (!bts) break; - rc = paging_request_bts(bts, subscr, type, cbfn, data); + rc = paging_request_bts(bts, bsub, type, cbfn, data); if (rc < 0) { - paging_request_stop(NULL, subscr, NULL, NULL); + paging_request_stop(&network->bts_list, NULL, bsub, + NULL, NULL); return rc; } num_pages += rc; @@ -356,7 +354,7 @@ /* we consciously ignore the type of the request here */ -static void _paging_request_stop(struct gsm_bts *bts, struct gsm_subscriber *subscr, +static void _paging_request_stop(struct gsm_bts *bts, struct bsc_sub *bsub, struct gsm_subscriber_connection *conn, struct msgb *msg) { @@ -366,8 +364,8 @@ paging_init_if_needed(bts); llist_for_each_entry_safe(req, req2, &bts_entry->pending_requests, - entry) { - if (req->subscr == subscr) { + entry) { + if (req->bsub == bsub) { gsm_cbfn *cbfn = req->cbfn; void *param = req->cbfn_param; @@ -376,35 +374,38 @@ req = NULL; if (conn && cbfn) { - LOGP(DPAG, LOGL_DEBUG, "Stop paging on bts %d, calling cbfn.\n", bts->nr); + LOGP(DPAG, LOGL_DEBUG, + "Stop paging on bts %d, calling cbfn.\n", + bts->nr); cbfn(GSM_HOOK_RR_PAGING, GSM_PAGING_SUCCEEDED, - msg, conn, param); + msg, conn, param); } else - LOGP(DPAG, LOGL_DEBUG, "Stop paging on bts %d silently.\n", bts->nr); + LOGP(DPAG, LOGL_DEBUG, + "Stop paging on bts %d silently.\n", + bts->nr); break; } } } /* Stop paging on all other bts' */ -void paging_request_stop(struct gsm_bts *_bts, struct gsm_subscriber *subscr, +void paging_request_stop(struct llist_head *bts_list, + struct gsm_bts *_bts, struct bsc_sub *bsub, struct gsm_subscriber_connection *conn, struct msgb *msg) { struct gsm_bts *bts; - log_set_context(BSC_CTX_SUBSCR, subscr); - /* Stop this first and dispatch the request */ if (_bts) - _paging_request_stop(_bts, subscr, conn, msg); + _paging_request_stop(_bts, bsub, conn, msg); /* Make sure to cancel this everywhere else */ - llist_for_each_entry(bts, &subscr->group->net->bts_list, list) { + llist_for_each_entry(bts, bts_list, list) { /* Sort of an optimization. */ if (bts == _bts) continue; - _paging_request_stop(bts, subscr, NULL, NULL); + _paging_request_stop(bts, bsub, NULL, NULL); } } @@ -433,12 +434,12 @@ /** * Find any paging data for the given subscriber at the given BTS. */ -void *paging_get_data(struct gsm_bts *bts, struct gsm_subscriber *subscr) +void *paging_get_data(struct gsm_bts *bts, struct bsc_sub *bsub) { struct gsm_paging_request *req; llist_for_each_entry(req, &bts->paging.pending_requests, entry) - if (req->subscr == subscr) + if (req->bsub == bsub) return req->cbfn_param; return NULL; diff --git a/openbsc/src/libcommon-cs/common_cs.c b/openbsc/src/libcommon-cs/common_cs.c index 3149580..7905802 100644 --- a/openbsc/src/libcommon-cs/common_cs.c +++ b/openbsc/src/libcommon-cs/common_cs.c @@ -70,6 +70,9 @@ INIT_LLIST_HEAD(&net->upqueue); INIT_LLIST_HEAD(&net->subscr_conns); + net->bsc_subscribers = talloc_zero(net, struct llist_head); + INIT_LLIST_HEAD(net->bsc_subscribers); + /* init statistics */ net->msc_ctrs = rate_ctr_group_alloc(net, &msc_ctrg_desc, 0); net->active_calls = osmo_counter_alloc("msc.active_calls"); diff --git a/openbsc/src/libmsc/gsm_subscriber.c b/openbsc/src/libmsc/gsm_subscriber.c index 4ec0ead..f20dfc8 100644 --- a/openbsc/src/libmsc/gsm_subscriber.c +++ b/openbsc/src/libmsc/gsm_subscriber.c @@ -82,8 +82,11 @@ struct gsm_subscriber_connection *conn = data; struct gsm_subscriber *subscr = param; struct paging_signal_data sig_data; + struct bsc_sub *bsub; OSMO_ASSERT(subscr->is_paging); + + /* TODO MSC split */ /* * Stop paging on all other BTS. E.g. if this is @@ -91,7 +94,11 @@ * timeout soon as well. Let's just stop everything * and forget we wanted to page. */ - paging_request_stop(NULL, subscr, NULL, NULL); + bsub = bsc_sub_have_by_imsi(conn->network->bsc_subscribers, subscr->imsi); + bsub->tmsi = subscr->tmsi; + bsub->lac = subscr->lac; + paging_request_stop(&conn->network->bts_list, NULL, bsub, NULL, NULL); + bsc_sub_put(bsub); /* Inform parts of the system we don't know */ sig_data.subscr = subscr; @@ -169,13 +176,19 @@ { int rc; struct subscr_request *request; + struct bsc_sub *bsub; + struct gsm_network *net = subscr->group->net; /* Start paging.. we know it is async so we can do it before */ if (!subscr->is_paging) { LOGP(DMM, LOGL_DEBUG, "Subscriber %s not paged yet.\n", subscr_name(subscr)); - rc = paging_request(subscr->group->net, subscr, channel_type, - subscr_paging_cb, subscr); + bsub = bsc_sub_have_by_imsi(net->bsc_subscribers, subscr->imsi); + bsub->tmsi = subscr->tmsi; + bsub->lac = subscr->lac; + rc = paging_request(net, bsub, channel_type, subscr_paging_cb, + subscr); + bsc_sub_put(bsub); if (rc <= 0) { LOGP(DMM, LOGL_ERROR, "Subscriber %s paging failed: %d\n", subscr_name(subscr), rc); diff --git a/openbsc/src/osmo-bsc/osmo_bsc_bssap.c b/openbsc/src/osmo-bsc/osmo_bsc_bssap.c index f38c97f..a880f51 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_bssap.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_bssap.c @@ -20,9 +20,10 @@ #include #include +#include #include #include -#include +#include #include #include @@ -99,7 +100,7 @@ static int bssmap_handle_paging(struct osmo_msc_data *msc, struct msgb *msg, unsigned int payload_length) { - struct gsm_subscriber *subscr; + struct bsc_sub *subscr; struct tlv_parsed tp; char mi_string[GSM48_MI_SIZE]; uint32_t tmsi = GSM_RESERVED_TMSI; @@ -157,7 +158,8 @@ LOGP(DMSC, LOGL_ERROR, "eMLPP is not handled\n"); } - subscr = subscr_get_or_create(msc->network->subscr_group, mi_string); + subscr = bsc_sub_have_by_imsi(msc->network->bsc_subscribers, + mi_string); if (!subscr) { LOGP(DMSC, LOGL_ERROR, "Failed to allocate a subscriber for %s\n", mi_string); return -1; @@ -167,7 +169,8 @@ subscr->tmsi = tmsi; LOGP(DMSC, LOGL_INFO, "Paging request from MSC IMSI: '%s' TMSI: '0x%x/%u' LAC: 0x%x\n", mi_string, tmsi, tmsi, lac); - bsc_grace_paging_request(subscr, chan_needed, msc); + bsc_grace_paging_request(msc->network->bsc_data->rf_ctrl->policy, + subscr, chan_needed, msc); return 0; } diff --git a/openbsc/src/osmo-bsc/osmo_bsc_filter.c b/openbsc/src/osmo-bsc/osmo_bsc_filter.c index d5ca2fd..64f3fef 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_filter.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_filter.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -54,14 +55,14 @@ } /* extract a subscriber from the paging response */ -static struct gsm_subscriber *extract_sub(struct gsm_subscriber_connection *conn, - struct msgb *msg) +static struct bsc_sub *extract_sub(struct gsm_subscriber_connection *conn, + struct msgb *msg) { uint8_t mi_type; char mi_string[GSM48_MI_SIZE]; struct gsm48_hdr *gh; struct gsm48_pag_resp *resp; - struct gsm_subscriber *subscr; + struct bsc_sub *subscr; if (msgb_l3len(msg) < sizeof(*gh) + sizeof(*resp)) { LOGP(DMSC, LOGL_ERROR, "PagingResponse too small: %u\n", msgb_l3len(msg)); @@ -78,12 +79,12 @@ switch (mi_type) { case GSM_MI_TYPE_TMSI: - subscr = subscr_active_by_tmsi(conn->bts->network->subscr_group, - tmsi_from_string(mi_string)); + subscr = bsc_sub_find_by_tmsi(conn->network->bsc_subscribers, + tmsi_from_string(mi_string)); break; case GSM_MI_TYPE_IMSI: - subscr = subscr_active_by_imsi(conn->bts->network->subscr_group, - mi_string); + subscr = bsc_sub_find_by_imsi(conn->network->bsc_subscribers, + mi_string); break; default: subscr = NULL; @@ -96,15 +97,16 @@ /* we will need to stop the paging request */ static int handle_page_resp(struct gsm_subscriber_connection *conn, struct msgb *msg) { - struct gsm_subscriber *subscr = extract_sub(conn, msg); + struct bsc_sub *subscr = extract_sub(conn, msg); if (!subscr) { LOGP(DMSC, LOGL_ERROR, "Non active subscriber got paged.\n"); return -1; } - paging_request_stop(conn->bts, subscr, conn, msg); - subscr_put(subscr); + paging_request_stop(&conn->network->bts_list, conn->bts, subscr, conn, + msg); + bsc_sub_put(subscr); return 0; } @@ -130,7 +132,7 @@ uint8_t mtype; struct osmo_bsc_data *bsc; struct osmo_msc_data *msc, *pag_msc; - struct gsm_subscriber *subscr; + struct bsc_sub *subscr; int is_emerg = 0; bsc = conn->bts->network->bsc_data; @@ -183,7 +185,7 @@ } pag_msc = paging_get_data(conn->bts, subscr); - subscr_put(subscr); + bsc_sub_put(subscr); llist_for_each_entry(msc, &bsc->mscs, entry) { if (msc != pag_msc) diff --git a/openbsc/src/osmo-bsc/osmo_bsc_grace.c b/openbsc/src/osmo-bsc/osmo_bsc_grace.c index 6409a3a..4699be6 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_grace.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_grace.c @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include @@ -34,8 +34,8 @@ } -static int normal_paging(struct gsm_subscriber *subscr, int chan_needed, - struct osmo_msc_data *msc) +static int normal_paging(struct bsc_sub *subscr, int chan_needed, + struct osmo_msc_data *msc) { /* we can't page by lac.. we need to page everything */ if (msc->core_lac != -1) { @@ -47,12 +47,11 @@ return 0; } - return paging_request(subscr->group->net, subscr, chan_needed, NULL, - msc); + return paging_request(msc->network, subscr, chan_needed, NULL, msc); } -static int locked_paging(struct gsm_subscriber *subscr, int chan_needed, - struct osmo_msc_data *msc) +static int locked_paging(struct bsc_sub *subscr, int chan_needed, + struct osmo_msc_data *msc) { struct gsm_bts *bts = NULL; @@ -84,10 +83,10 @@ /** * Try to not page if everything the cell is not on. */ -int bsc_grace_paging_request(struct gsm_subscriber *subscr, int chan_needed, - struct osmo_msc_data *msc) +int bsc_grace_paging_request(enum signal_rf rf_policy, struct bsc_sub *subscr, + int chan_needed, struct osmo_msc_data *msc) { - if (subscr->group->net->bsc_data->rf_ctrl->policy == S_RF_ON) + if (rf_policy == S_RF_ON) return normal_paging(subscr, chan_needed, msc); return locked_paging(subscr, chan_needed, msc); } diff --git a/openbsc/src/osmo-bsc/osmo_bsc_vty.c b/openbsc/src/osmo-bsc/osmo_bsc_vty.c index 86ccec4..68506b4 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_vty.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_vty.c @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include @@ -861,13 +861,13 @@ LOGGING_STR FILTER_STR "Filter log messages by IMSI\n" "IMSI to be used as filter\n") { - struct gsm_subscriber *subscr; + struct bsc_sub *subscr; struct log_target *tgt = osmo_log_vty2tgt(vty); if (!tgt) return CMD_WARNING; - subscr = subscr_get_or_create(bsc_gsmnet->subscr_group, argv[0]); + subscr = bsc_sub_have_by_imsi(bsc_gsmnet->bsc_subscribers, argv[0]); if (!subscr) { vty_out(vty, "%%no subscriber with IMSI(%s)%s", argv[0], VTY_NEWLINE); @@ -875,6 +875,8 @@ } log_set_imsi_filter(tgt, subscr); + vty_out(vty, "%%note: subscriber is now locked to remain in memory: %s%s", + bsc_sub_name(subscr), VTY_NEWLINE); return CMD_SUCCESS; } diff --git a/openbsc/tests/channel/Makefile.am b/openbsc/tests/channel/Makefile.am index 5e9583f..ca470ac 100644 --- a/openbsc/tests/channel/Makefile.am +++ b/openbsc/tests/channel/Makefile.am @@ -24,8 +24,8 @@ $(NULL) channel_test_LDADD = \ - $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libmsc/libmsc.a \ + $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ diff --git a/openbsc/tests/channel/channel_test.c b/openbsc/tests/channel/channel_test.c index c69c701..0bae94c 100644 --- a/openbsc/tests/channel/channel_test.c +++ b/openbsc/tests/channel/channel_test.c @@ -72,6 +72,7 @@ exit(1); bts = gsm_bts_alloc(network); bts->location_area_code = 23; + s_conn.network = network; /* Create a dummy subscriber */ struct gsm_subscriber *subscr = subscr_alloc(); diff --git a/openbsc/tests/subscr/subscr_test.c b/openbsc/tests/subscr/subscr_test.c index 2a5d0e1..a290a88 100644 --- a/openbsc/tests/subscr/subscr_test.c +++ b/openbsc/tests/subscr/subscr_test.c @@ -19,53 +19,109 @@ */ #include -#include -#include -#include +#include #include +#include #include #include #include #include -static struct gsm_network dummy_net; -static struct gsm_subscriber_group dummy_sgrp; +struct llist_head *bsc_subscribers; + +#define VERBOSE_ASSERT(val, expect_op, fmt) \ + do { \ + printf(#val " == " fmt "\n", (val)); \ + OSMO_ASSERT((val) expect_op); \ + } while (0); + +static void assert_subscr(const struct bsc_sub *bsub, const char *imsi) +{ + struct bsc_sub *sfound; + OSMO_ASSERT(bsub); + OSMO_ASSERT(strcmp(bsub->imsi, imsi) == 0); + + sfound = bsc_sub_find_by_imsi(bsc_subscribers, imsi); + OSMO_ASSERT(sfound == bsub); + + bsc_sub_put(sfound); +} + static void test_subscr(void) { - struct gsm_subscriber *subscr; - const char *imsi = "1234567890"; + struct bsc_sub *s1, *s2, *s3; + const char *imsi1 = "1234567890"; + const char *imsi2 = "9876543210"; + const char *imsi3 = "5656565656"; - printf("Test subscriber allocation and deletion\n"); + printf("Test BSC subscriber allocation and deletion\n"); - /* Don't keep subscr */ + /* Check for emptiness */ + VERBOSE_ASSERT(llist_count(bsc_subscribers), == 0, "%d"); + OSMO_ASSERT(bsc_sub_find_by_imsi(bsc_subscribers, imsi1) == NULL); + OSMO_ASSERT(bsc_sub_find_by_imsi(bsc_subscribers, imsi2) == NULL); + OSMO_ASSERT(bsc_sub_find_by_imsi(bsc_subscribers, imsi3) == NULL); - dummy_sgrp.keep_subscr = 0; + /* Allocate entry 1 */ + s1 = bsc_sub_have_by_imsi(bsc_subscribers, imsi1); + VERBOSE_ASSERT(llist_count(bsc_subscribers), == 1, "%d"); + assert_subscr(s1, imsi1); + VERBOSE_ASSERT(llist_count(bsc_subscribers), == 1, "%d"); + OSMO_ASSERT(bsc_sub_find_by_imsi(bsc_subscribers, imsi2) == NULL); - OSMO_ASSERT(llist_empty(&active_subscribers)); + /* Allocate entry 2 */ + s2 = bsc_sub_have_by_imsi(bsc_subscribers, imsi2); + VERBOSE_ASSERT(llist_count(bsc_subscribers), == 2, "%d"); - subscr = subscr_get_or_create(&dummy_sgrp, imsi); + /* Allocate entry 3 */ + s3 = bsc_sub_have_by_imsi(bsc_subscribers, imsi3); + VERBOSE_ASSERT(llist_count(bsc_subscribers), == 3, "%d"); - OSMO_ASSERT(!llist_empty(&active_subscribers)); - OSMO_ASSERT(subscr->use_count == 1); + /* Check entries */ + assert_subscr(s1, imsi1); + assert_subscr(s2, imsi2); + assert_subscr(s3, imsi3); - subscr_put(subscr); + /* Free entry 1 */ + bsc_sub_put(s1); + s1 = NULL; + VERBOSE_ASSERT(llist_count(bsc_subscribers), == 2, "%d"); + OSMO_ASSERT(bsc_sub_find_by_imsi(bsc_subscribers, imsi1) == NULL); - OSMO_ASSERT(llist_empty(&active_subscribers)); + assert_subscr(s2, imsi2); + assert_subscr(s3, imsi3); + /* Free entry 2 */ + bsc_sub_put(s2); + s2 = NULL; + VERBOSE_ASSERT(llist_count(bsc_subscribers), == 1, "%d"); + OSMO_ASSERT(bsc_sub_find_by_imsi(bsc_subscribers, imsi1) == NULL); + OSMO_ASSERT(bsc_sub_find_by_imsi(bsc_subscribers, imsi2) == NULL); + assert_subscr(s3, imsi3); + + /* Free entry 3 */ + bsc_sub_put(s3); + s3 = NULL; + VERBOSE_ASSERT(llist_count(bsc_subscribers), == 0, "%d"); + OSMO_ASSERT(bsc_sub_find_by_imsi(bsc_subscribers, imsi3) == NULL); + + OSMO_ASSERT(llist_empty(bsc_subscribers)); + +#if 0 /* Keep subscr */ dummy_sgrp.keep_subscr = 1; subscr = subscr_get_or_create(&dummy_sgrp, imsi); - OSMO_ASSERT(!llist_empty(&active_subscribers)); + OSMO_ASSERT(!llist_empty(&bsc_subscribers)); OSMO_ASSERT(subscr->use_count == 1); subscr_put(subscr); - OSMO_ASSERT(!llist_empty(&active_subscribers)); + OSMO_ASSERT(!llist_empty(&bsc_subscribers)); OSMO_ASSERT(subscr->use_count == 0); subscr_get(subscr); @@ -73,16 +129,16 @@ subscr_purge_inactive(&dummy_sgrp); - OSMO_ASSERT(!llist_empty(&active_subscribers)); + OSMO_ASSERT(!llist_empty(&bsc_subscribers)); OSMO_ASSERT(subscr->use_count == 1); subscr_put(subscr); - OSMO_ASSERT(!llist_empty(&active_subscribers)); + OSMO_ASSERT(!llist_empty(&bsc_subscribers)); OSMO_ASSERT(subscr->use_count == 0); subscr_purge_inactive(&dummy_sgrp); - OSMO_ASSERT(llist_empty(&active_subscribers)); + OSMO_ASSERT(llist_empty(&bsc_subscribers)); /* Test force_no_keep */ @@ -92,13 +148,14 @@ OSMO_ASSERT(subscr); subscr->keep_in_ram = 1; - OSMO_ASSERT(!llist_empty(&active_subscribers)); + OSMO_ASSERT(!llist_empty(&bsc_subscribers)); OSMO_ASSERT(subscr->use_count == 1); subscr->keep_in_ram = 0; subscr_put(subscr); - OSMO_ASSERT(llist_empty(&active_subscribers)); + OSMO_ASSERT(llist_empty(&bsc_subscribers)); +#endif } int main() @@ -106,9 +163,12 @@ printf("Testing subscriber core code.\n"); osmo_init_logging(&log_info); log_set_print_filename(osmo_stderr_target, 0); + log_set_print_timestamp(osmo_stderr_target, 0); + log_set_use_color(osmo_stderr_target, 0); + log_set_print_category(osmo_stderr_target, 1); - dummy_net.subscr_group = &dummy_sgrp; - dummy_sgrp.net = &dummy_net; + bsc_subscribers = talloc_zero(NULL, struct llist_head); + INIT_LLIST_HEAD(bsc_subscribers); test_subscr(); diff --git a/openbsc/tests/subscr/subscr_test.ok b/openbsc/tests/subscr/subscr_test.ok index 72a3769..13e8dfa 100644 --- a/openbsc/tests/subscr/subscr_test.ok +++ b/openbsc/tests/subscr/subscr_test.ok @@ -1,3 +1,11 @@ Testing subscriber core code. -Test subscriber allocation and deletion +Test BSC subscriber allocation and deletion +llist_count(bsc_subscribers) == 0 +llist_count(bsc_subscribers) == 1 +llist_count(bsc_subscribers) == 1 +llist_count(bsc_subscribers) == 2 +llist_count(bsc_subscribers) == 3 +llist_count(bsc_subscribers) == 2 +llist_count(bsc_subscribers) == 1 +llist_count(bsc_subscribers) == 0 Done -- To view, visit https://gerrit.osmocom.org/1682 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia61cc00e8bb186b976939a4fc8f7cf9ce6aa3d8e Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Jan 26 00:52:38 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 26 Jan 2017 00:52:38 +0000 Subject: [PATCH] openbsc[master]: SGSN: Integrate basic support for UMTS AKA Message-ID: Review at https://gerrit.osmocom.org/1683 SGSN: Integrate basic support for UMTS AKA We already had almost all the parts in place before: * GSUP with capability to send us auth_vectors that contain either triplets or quintuples * mm_context that holds such auth_vectors All that we need to add in this patch is the capability to send the AUTN parameter in the GMM AUTH REQ and parse the extended RES in the GMM AUTH RESP. TODO: Implement SQN re-synchronoization mechanism (Auth Fail: Sync Err) Change-Id: Ie6a0cefba5e4e7f02cc2eaf6ec006ac07d5c1816 Related: OS#1592 --- M openbsc/src/gprs/gprs_gmm.c 1 file changed, 90 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/83/1683/1 diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c index 88be512..6471f22 100644 --- a/openbsc/src/gprs/gprs_gmm.c +++ b/openbsc/src/gprs/gprs_gmm.c @@ -527,8 +527,20 @@ return gsm48_gmm_sendmsg(msg, 1, mm, false); } +/* determine if the MS/UE supports R99 or later */ +static bool mmctx_is_r99(const struct sgsn_mm_ctx *mm) +{ + if (mm->ms_network_capa.len < 1) + return false; + if (mm->ms_network_capa.buf[0] & 0x01) + return true; + else + return false; +} + /* 3GPP TS 24.008 Section 9.4.9: Authentication and Ciphering Request */ -static int gsm48_tx_gmm_auth_ciph_req(struct sgsn_mm_ctx *mm, uint8_t *rnd, +static int gsm48_tx_gmm_auth_ciph_req(struct sgsn_mm_ctx *mm, + const struct osmo_auth_vector *vec, uint8_t key_seq, bool force_standby) { struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 AUTH CIPH REQ"); @@ -536,8 +548,13 @@ struct gsm48_auth_ciph_req *acreq; uint8_t *m_rand, *m_cksn, rbyte; - LOGMMCTXP(LOGL_INFO, mm, "<- GPRS AUTH AND CIPHERING REQ (rand = %s)\n", - osmo_hexdump(rnd, 16)); + LOGMMCTXP(LOGL_INFO, mm, "<- GPRS AUTH AND CIPHERING REQ (rand = %s", + osmo_hexdump(vec->rand, sizeof(vec->rand))); + if (mmctx_is_r99(mm) && vec && vec->auth_types & OSMO_AUTH_TYPE_UMTS) { + LOGPC(DMM, LOGL_INFO, ", autn = %s)\n", + osmo_hexdump(vec->autn, sizeof(vec->autn))); + } else + LOGPC(DMM, LOGL_INFO, ")\n"); mmctx2msgid(msg, mm); @@ -561,13 +578,24 @@ mm->ac_ref_nr_used = acreq->ac_ref_nr; /* Only if authentication is requested we need to set RAND + CKSN */ - if (rnd) { - m_rand = msgb_put(msg, 16+1); + if (vec) { + m_rand = msgb_put(msg, sizeof(vec->rand) + 1); m_rand[0] = GSM48_IE_GMM_AUTH_RAND; - memcpy(m_rand + 1, rnd, 16); + memcpy(m_rand + 1, vec->rand, sizeof(vec->rand)); + /* ? 10.5.1.2: */ m_cksn = msgb_put(msg, 1); m_cksn[0] = (GSM48_IE_GMM_CIPH_CKSN << 4) | (key_seq & 0x07); + + /* A Release99 or higher MS/UE must be able to handle + * the optional AUTN IE. If a classic GSM SIM is + * inserted, it will simply ignore AUTN and just use + * RAND */ + if (mmctx_is_r99(mm) && + (vec->auth_types & OSMO_AUTH_TYPE_UMTS)) { + msgb_tlv_put(msg, GSM48_IE_GMM_AUTN, + sizeof(vec->autn), vec->autn); + } } /* FIXME: add AUTN for 3g auth according to 3GPP TS 24.008 ? 10.5.3.1.1 */ /* FIXME: make sure we don't send any other messages to the MS */ @@ -592,6 +620,37 @@ return gsm48_gmm_sendmsg(msg, 0, mm, false); } +/* check if the received authentication response matches */ +static bool check_auth_resp(bool is_r99, bool is_utran, + const struct osmo_auth_vector *vec, + const uint8_t *res, uint8_t res_len) +{ + if (!vec) + return true; + + /* RES must be present and at least 32bit */ + if (!res || res_len < 4) + return false; + + if (is_r99 && vec->auth_types & OSMO_AUTH_TYPE_UMTS) { + /* We have a R99 capable UE and have a UMTS AKA + * capable USIM. However, the ME may still chose to only + * perform GSM AKA, as long as the bearer is GERAN */ + if (is_utran && res_len != vec->res_len) + return false; + } + + if (res_len == vec->res_len && !memcmp(res, vec->res, res_len)) { + /* We have established a UMTS Security Context */ + return true; + } else if (res_len == 4 && !memcmp(res, vec->sres, 4)) { + /* We have establieshed a GSM Security Context */ + return true; + } + + return false; +} + /* Section 9.4.10: Authentication and Ciphering Response */ static int gsm48_rx_gmm_auth_ciph_resp(struct sgsn_mm_ctx *ctx, struct msgb *msg) @@ -600,6 +659,8 @@ struct gsm48_auth_ciph_resp *acr = (struct gsm48_auth_ciph_resp *)gh->data; struct tlv_parsed tp; struct gsm_auth_tuple *at; + uint8_t res[16]; + uint8_t res_len; int rc; LOGMMCTXP(LOGL_INFO, ctx, "-> GPRS AUTH AND CIPH RESPONSE\n"); @@ -624,26 +685,34 @@ (msg->data + msg->len) - acr->data, 0, 0); if (!TLVP_PRESENT(&tp, GSM48_IE_GMM_AUTH_SRES) || - !TLVP_PRESENT(&tp, GSM48_IE_GMM_IMEISV)) { + !TLVP_PRESENT(&tp, GSM48_IE_GMM_IMEISV) || + TLVP_LEN(&tp,GSM48_IE_GMM_AUTH_SRES) != 4) { /* TODO: missing mandatory IE, return STATUS or REJ? */ LOGMMCTXP(LOGL_ERROR, ctx, "Missing mandantory IE\n"); return -EINVAL; } - /* Compare SRES with what we expected */ - LOGMMCTXP(LOGL_DEBUG, ctx, "checking received auth info, SRES = %s\n", - osmo_hexdump(TLVP_VAL(&tp, GSM48_IE_GMM_AUTH_SRES), - TLVP_LEN(&tp, GSM48_IE_GMM_AUTH_SRES))); + /* Start with the good old 4-byte SRES */ + memcpy(res, TLVP_VAL(&tp, GSM48_IE_GMM_AUTH_SRES), 4); + res_len = 4; + + /* Append extended RES as part of UMTS AKA, if any */ + if (TLVP_PRESENT(&tp, GSM48_IE_GMM_AUTH_RES_EXT)) { + unsigned int l = TLVP_LEN(&tp, GSM48_IE_GMM_AUTH_RES_EXT); + if (l > sizeof(res)-4) + l = sizeof(res)-4; + memcpy(res+4, TLVP_VAL(&tp, GSM48_IE_GMM_AUTH_RES_EXT), l); + res_len += l; + } at = &ctx->auth_triplet; - if (TLVP_LEN(&tp, GSM48_IE_GMM_AUTH_SRES) != sizeof(at->vec.sres) || - memcmp(TLVP_VAL(&tp, GSM48_IE_GMM_AUTH_SRES), at->vec.sres, - sizeof(at->vec.sres)) != 0) { - - LOGMMCTXP(LOGL_NOTICE, ctx, "Received SRES doesn't match " - "expected RES %s\n", osmo_hexdump(at->vec.sres, - sizeof(at->vec.sres))); + LOGMMCTXP(LOGL_DEBUG, ctx, "checking auth: received SRES = %s\n", + osmo_hexdump(res, res_len)); + rc = check_auth_resp(mmctx_is_r99(ctx), false, &at->vec, res, res_len); + if (!rc) { + LOGMMCTXP(LOGL_NOTICE, ctx, "Mismatch: expected SRES = %s\n", + osmo_hexdump(at->vec.sres, sizeof(at->vec.sres))); rc = gsm48_tx_gmm_auth_ciph_rej(ctx); mm_ctx_cleanup_free(ctx, "GPRS AUTH AND CIPH REJECT"); return rc; @@ -838,8 +907,8 @@ struct gsm_auth_tuple *at = &ctx->auth_triplet; mmctx_timer_start(ctx, 3360, sgsn->cfg.timers.T3360); - return gsm48_tx_gmm_auth_ciph_req(ctx, at->vec.rand, - at->key_seq, false); + return gsm48_tx_gmm_auth_ciph_req(ctx, &at->vec, at->key_seq, + false); } if (ctx->auth_state == SGSN_AUTH_AUTHENTICATE && ctx->is_authenticated && @@ -1950,7 +2019,7 @@ } at = &mm->auth_triplet; - gsm48_tx_gmm_auth_ciph_req(mm, at->vec.rand, at->key_seq, false); + gsm48_tx_gmm_auth_ciph_req(mm, &at->vec, at->key_seq, false); osmo_timer_schedule(&mm->timer, sgsn->cfg.timers.T3360, 0); break; case 3370: /* waiting for IDENTITY RESPONSE */ -- To view, visit https://gerrit.osmocom.org/1683 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie6a0cefba5e4e7f02cc2eaf6ec006ac07d5c1816 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Jan 26 00:52:38 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 26 Jan 2017 00:52:38 +0000 Subject: [PATCH] openbsc[master]: add struct gprs_sub, separating gprs from gsm_subscriber Message-ID: Review at https://gerrit.osmocom.org/1684 add struct gprs_sub, separating gprs from gsm_subscriber Prepare for replacing gsm_subscriber with vlr_subscriber. vlr_subscriber will not make sense to be used in gprs, so have a dedicated GPRS subscriber struct. (Could change if the gprs code were to use libvlr; is currently independent). Change-Id: Ia8b391ee009c8545763cba04505be3947835120e Related: #1592 --- M openbsc/include/openbsc/gprs_sgsn.h A openbsc/include/openbsc/gprs_subscriber.h M openbsc/include/openbsc/gsm_data.h M openbsc/include/openbsc/gsm_subscriber.h M openbsc/src/gprs/gprs_gmm.c M openbsc/src/gprs/gprs_sgsn.c M openbsc/src/gprs/gprs_subscriber.c M openbsc/src/gprs/sgsn_auth.c M openbsc/src/gprs/sgsn_libgtp.c M openbsc/src/gprs/sgsn_vty.c M openbsc/tests/sgsn/sgsn_test.c M openbsc/tests/sgsn/sgsn_test.ok 12 files changed, 259 insertions(+), 150 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/84/1684/1 diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h index 24e286c..bf0fd6b 100644 --- a/openbsc/include/openbsc/gprs_sgsn.h +++ b/openbsc/include/openbsc/gprs_sgsn.h @@ -18,7 +18,7 @@ struct gprs_llc_lle; struct ctrl_handle; -struct gsm_subscriber; +struct gprs_sub; enum gsm48_gsm_cause; @@ -225,7 +225,7 @@ /* the current GGSN look-up operation */ struct sgsn_ggsn_lookup *ggsn_lookup; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; }; #define LOGMMCTXP(level, mm, fmt, args...) \ @@ -438,6 +438,7 @@ /* * GPRS subscriber data */ +#define GPRS_SUBSCRIBER_FIRST_CONTACT 0x00000001 #define GPRS_SUBSCRIBER_UPDATE_AUTH_INFO_PENDING (1 << 16) #define GPRS_SUBSCRIBER_UPDATE_LOCATION_PENDING (1 << 17) #define GPRS_SUBSCRIBER_CANCELLED (1 << 18) @@ -451,13 +452,13 @@ int gprs_subscr_init(struct sgsn_instance *sgi); int gprs_subscr_request_update_location(struct sgsn_mm_ctx *mmctx); int gprs_subscr_request_auth_info(struct sgsn_mm_ctx *mmctx); -void gprs_subscr_cleanup(struct gsm_subscriber *subscr); -struct gsm_subscriber *gprs_subscr_get_or_create(const char *imsi); -struct gsm_subscriber *gprs_subscr_get_or_create_by_mmctx( struct sgsn_mm_ctx *mmctx); -struct gsm_subscriber *gprs_subscr_get_by_imsi(const char *imsi); -void gprs_subscr_cancel(struct gsm_subscriber *subscr); -void gprs_subscr_update(struct gsm_subscriber *subscr); -void gprs_subscr_update_auth_info(struct gsm_subscriber *subscr); +void gprs_subscr_cleanup(struct gprs_sub *subscr); +struct gprs_sub *gprs_subscr_get_or_create(const char *imsi); +struct gprs_sub *gprs_subscr_get_or_create_by_mmctx( struct sgsn_mm_ctx *mmctx); +struct gprs_sub *gprs_subscr_get_by_imsi(const char *imsi); +void gprs_subscr_cancel(struct gprs_sub *subscr); +void gprs_subscr_update(struct gprs_sub *subscr); +void gprs_subscr_update_auth_info(struct gprs_sub *subscr); int gprs_subscr_rx_gsup_message(struct msgb *msg); /* Called on subscriber data updates */ diff --git a/openbsc/include/openbsc/gprs_subscriber.h b/openbsc/include/openbsc/gprs_subscriber.h new file mode 100644 index 0000000..668402a --- /dev/null +++ b/openbsc/include/openbsc/gprs_subscriber.h @@ -0,0 +1,29 @@ +/* GPRS subscriber details for use in SGSN land */ +#pragma once + +#include + +#include +#include + +extern struct llist_head * const gprs_subscribers; + +struct gprs_sub { + struct llist_head entry; + int use_count; + + char imsi[GSM23003_IMSI_MAX_DIGITS+1]; + uint32_t tmsi; + char imei[GSM23003_IMEISV_NUM_DIGITS+1]; + bool authorized; + bool keep_in_ram; + uint32_t flags; + uint16_t lac; + + struct sgsn_subscriber_data *sgsn_data; +}; + +struct gprs_sub *_gprs_sub_get(struct gprs_sub *gsub, const char *file, int line); +struct gprs_sub *_gprs_sub_put(struct gprs_sub *gsub, const char *file, int line); +#define gprs_sub_get(gsub) _gprs_sub_get(gsub, __BASE_FILE__, __LINE__) +#define gprs_sub_put(gsub) _gprs_sub_put(gsub, __BASE_FILE__, __LINE__) diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index 9cb46a4..8e9fa03 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -27,6 +27,8 @@ #define OBSC_LINKID_CB(__msgb) (__msgb)->cb[3] +#define tmsi_from_string(str) strtoul(str, NULL, 10) + enum gsm_security_event { GSM_SECURITY_NOAVAIL, GSM_SECURITY_AUTH_FAILED, diff --git a/openbsc/include/openbsc/gsm_subscriber.h b/openbsc/include/openbsc/gsm_subscriber.h index 314d619..7e65614 100644 --- a/openbsc/include/openbsc/gsm_subscriber.h +++ b/openbsc/include/openbsc/gsm_subscriber.h @@ -16,7 +16,6 @@ #define GSM_SUBSCRIBER_FIRST_CONTACT 0x00000001 /* gprs_sgsn.h defines additional flags including and above bit 16 (0x10000) */ -#define tmsi_from_string(str) strtoul(str, NULL, 10) #define GSM_SUBSCRIBER_NO_EXPIRATION 0x0 diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c index 6471f22..32d6587 100644 --- a/openbsc/src/gprs/gprs_gmm.c +++ b/openbsc/src/gprs/gprs_gmm.c @@ -64,6 +64,7 @@ #include #include #include +#include #include #include #include diff --git a/openbsc/src/gprs/gprs_sgsn.c b/openbsc/src/gprs/gprs_sgsn.c index e85e1a9..4ef33dd 100644 --- a/openbsc/src/gprs/gprs_sgsn.c +++ b/openbsc/src/gprs/gprs_sgsn.c @@ -31,7 +31,7 @@ #include #include -#include +#include #include #include #include @@ -320,9 +320,9 @@ /* Detach from subscriber which is possibly freed then */ if (mm->subscr) { - struct gsm_subscriber *subscr = subscr_get(mm->subscr); + struct gprs_sub *subscr = gprs_sub_get(mm->subscr); gprs_subscr_cleanup(subscr); - subscr_put(subscr); + gprs_sub_put(subscr); } sgsn_mm_ctx_free(mm); diff --git a/openbsc/src/gprs/gprs_subscriber.c b/openbsc/src/gprs/gprs_subscriber.c index d3e2ea7..477d523 100644 --- a/openbsc/src/gprs/gprs_subscriber.c +++ b/openbsc/src/gprs/gprs_subscriber.c @@ -23,7 +23,8 @@ #include #include #include -#include +#include +#include #include #include @@ -35,6 +36,7 @@ #include #include +#include #define SGSN_SUBSCR_MAX_RETRIES 3 #define SGSN_SUBSCR_RETRY_INTERVAL 10 @@ -45,6 +47,9 @@ ## args) extern void *tall_bsc_ctx; + +LLIST_HEAD(_gprs_subscribers); +struct llist_head * const gprs_subscribers = &_gprs_subscribers; static int gsup_read_cb(struct gsup_client *gsupc, struct msgb *msg); @@ -86,7 +91,7 @@ return rc; } -int gprs_subscr_purge(struct gsm_subscriber *subscr); +int gprs_subscr_purge(struct gprs_sub *subscr); static struct sgsn_subscriber_data *sgsn_subscriber_data_alloc(void *ctx) { @@ -117,28 +122,53 @@ return pdata; } -struct gsm_subscriber *gprs_subscr_get_or_create(const char *imsi) +struct gprs_sub *gprs_subscr_get_by_imsi(const char *imsi) { - struct gsm_subscriber *subscr; + struct gprs_sub *gsub; - subscr = subscr_get_or_create(NULL, imsi); - if (!subscr) + if (!imsi || !*imsi) return NULL; - if (!subscr->sgsn_data) - subscr->sgsn_data = sgsn_subscriber_data_alloc(subscr); - return subscr; + llist_for_each_entry(gsub, gprs_subscribers, entry) { + if (!strcmp(gsub->imsi, imsi)) + return gprs_sub_get(gsub); + } + return NULL; } -struct gsm_subscriber *gprs_subscr_get_by_imsi(const char *imsi) +static struct gprs_sub *gprs_subscr_alloc(void) { - return subscr_active_by_imsi(NULL, imsi); + struct gprs_sub *gsub; + gsub = talloc_zero(tall_bsc_ctx, struct gprs_sub); + if (!gsub) + return NULL; + llist_add_tail(&gsub->entry, gprs_subscribers); + gsub->use_count = 1; + gsub->tmsi = GSM_RESERVED_TMSI; + return gsub; } -void gprs_subscr_cleanup(struct gsm_subscriber *subscr) +struct gprs_sub *gprs_subscr_get_or_create(const char *imsi) +{ + struct gprs_sub *gsub; + + gsub = gprs_subscr_get_by_imsi(imsi); + if (!gsub) { + gsub = gprs_subscr_alloc(); + if (!gsub) + return NULL; + strncpy(gsub->imsi, imsi, sizeof(gsub->imsi)); + } + + if (!gsub->sgsn_data) + gsub->sgsn_data = sgsn_subscriber_data_alloc(gsub); + return gsub; +} + +void gprs_subscr_cleanup(struct gprs_sub *subscr) { if (subscr->sgsn_data->mm) { - subscr_put(subscr->sgsn_data->mm->subscr); + gprs_sub_put(subscr->sgsn_data->mm->subscr); subscr->sgsn_data->mm->subscr = NULL; subscr->sgsn_data->mm = NULL; } @@ -149,7 +179,7 @@ } } -void gprs_subscr_cancel(struct gsm_subscriber *subscr) +void gprs_subscr_cancel(struct gprs_sub *subscr) { subscr->authorized = 0; subscr->flags |= GPRS_SUBSCRIBER_CANCELLED; @@ -159,7 +189,7 @@ gprs_subscr_cleanup(subscr); } -static int gprs_subscr_tx_gsup_message(struct gsm_subscriber *subscr, +static int gprs_subscr_tx_gsup_message(struct gprs_sub *subscr, struct osmo_gsup_message *gsup_msg) { struct msgb *msg = gsup_client_msgb_alloc(); @@ -181,7 +211,7 @@ return gsup_client_send(sgsn->gsup_client, msg); } -static int gprs_subscr_tx_gsup_error_reply(struct gsm_subscriber *subscr, +static int gprs_subscr_tx_gsup_error_reply(struct gprs_sub *subscr, struct osmo_gsup_message *gsup_orig, enum gsm48_gmm_cause cause) { @@ -196,7 +226,7 @@ return gprs_subscr_tx_gsup_message(subscr, &gsup_reply); } -static int gprs_subscr_handle_gsup_auth_res(struct gsm_subscriber *subscr, +static int gprs_subscr_handle_gsup_auth_res(struct gprs_sub *subscr, struct osmo_gsup_message *gsup_msg) { unsigned idx; @@ -235,7 +265,7 @@ return 0; } -static int gprs_subscr_pdp_data_clear(struct gsm_subscriber *subscr) +static int gprs_subscr_pdp_data_clear(struct gprs_sub *subscr) { struct sgsn_subscriber_pdp_data *pdp, *pdp2; int count = 0; @@ -250,7 +280,7 @@ } static struct sgsn_subscriber_pdp_data *gprs_subscr_pdp_data_get_by_id( - struct gsm_subscriber *subscr, unsigned context_id) + struct gprs_sub *subscr, unsigned context_id) { struct sgsn_subscriber_pdp_data *pdp; @@ -263,7 +293,7 @@ } -static void gprs_subscr_gsup_insert_data(struct gsm_subscriber *subscr, +static void gprs_subscr_gsup_insert_data(struct gprs_sub *subscr, struct osmo_gsup_message *gsup_msg) { struct sgsn_subscriber_data *sdata = subscr->sgsn_data; @@ -340,7 +370,7 @@ } } -static int gprs_subscr_handle_gsup_upd_loc_res(struct gsm_subscriber *subscr, +static int gprs_subscr_handle_gsup_upd_loc_res(struct gprs_sub *subscr, struct osmo_gsup_message *gsup_msg) { /* contrary to MAP, we allow piggy-backing subscriber data onto @@ -357,7 +387,7 @@ return 0; } -static int gprs_subscr_handle_gsup_isd_req(struct gsm_subscriber *subscr, +static int gprs_subscr_handle_gsup_isd_req(struct gprs_sub *subscr, struct osmo_gsup_message *gsup_msg) { struct osmo_gsup_message gsup_reply = {0}; @@ -389,7 +419,7 @@ } } -static int gprs_subscr_handle_gsup_auth_err(struct gsm_subscriber *subscr, +static int gprs_subscr_handle_gsup_auth_err(struct gprs_sub *subscr, struct osmo_gsup_message *gsup_msg) { unsigned idx; @@ -442,7 +472,7 @@ return -gsup_msg->cause; } -static int gprs_subscr_handle_gsup_upd_loc_err(struct gsm_subscriber *subscr, +static int gprs_subscr_handle_gsup_upd_loc_err(struct gprs_sub *subscr, struct osmo_gsup_message *gsup_msg) { int cause_err; @@ -503,7 +533,7 @@ return 0; } -static int gprs_subscr_handle_gsup_purge_res(struct gsm_subscriber *subscr, +static int gprs_subscr_handle_gsup_purge_res(struct gprs_sub *subscr, struct osmo_gsup_message *gsup_msg) { LOGGSUBSCRP(LOGL_INFO, subscr, "Completing purge MS\n"); @@ -515,7 +545,7 @@ return 0; } -static int gprs_subscr_handle_gsup_purge_err(struct gsm_subscriber *subscr, +static int gprs_subscr_handle_gsup_purge_err(struct gprs_sub *subscr, struct osmo_gsup_message *gsup_msg) { LOGGSUBSCRP(LOGL_NOTICE, subscr, @@ -548,7 +578,7 @@ return -gsup_msg->cause; } -static int gprs_subscr_handle_loc_cancel_req(struct gsm_subscriber *subscr, +static int gprs_subscr_handle_loc_cancel_req(struct gprs_sub *subscr, struct osmo_gsup_message *gsup_msg) { struct osmo_gsup_message gsup_reply = {0}; @@ -609,7 +639,7 @@ int rc = 0; struct osmo_gsup_message gsup_msg = {0}; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; rc = osmo_gsup_decode(data, data_len, &gsup_msg); if (rc < 0) { @@ -699,12 +729,12 @@ break; }; - subscr_put(subscr); + gprs_sub_put(subscr); return rc; } -int gprs_subscr_purge(struct gsm_subscriber *subscr) +int gprs_subscr_purge(struct gprs_sub *subscr) { struct sgsn_subscriber_data *sdata = subscr->sgsn_data; struct osmo_gsup_message gsup_msg = {0}; @@ -720,7 +750,7 @@ return gprs_subscr_tx_gsup_message(subscr, &gsup_msg); } -int gprs_subscr_query_auth_info(struct gsm_subscriber *subscr) +int gprs_subscr_query_auth_info(struct gprs_sub *subscr) { struct osmo_gsup_message gsup_msg = {0}; @@ -731,7 +761,7 @@ return gprs_subscr_tx_gsup_message(subscr, &gsup_msg); } -int gprs_subscr_location_update(struct gsm_subscriber *subscr) +int gprs_subscr_location_update(struct gprs_sub *subscr) { struct osmo_gsup_message gsup_msg = {0}; @@ -742,60 +772,59 @@ return gprs_subscr_tx_gsup_message(subscr, &gsup_msg); } -void gprs_subscr_update(struct gsm_subscriber *subscr) +void gprs_subscr_update(struct gprs_sub *subscr) { LOGGSUBSCRP(LOGL_DEBUG, subscr, "Updating subscriber data\n"); subscr->flags &= ~GPRS_SUBSCRIBER_UPDATE_LOCATION_PENDING; - subscr->flags &= ~GSM_SUBSCRIBER_FIRST_CONTACT; + subscr->flags &= ~GPRS_SUBSCRIBER_FIRST_CONTACT; if (subscr->sgsn_data->mm) sgsn_update_subscriber_data(subscr->sgsn_data->mm); } -void gprs_subscr_update_auth_info(struct gsm_subscriber *subscr) +void gprs_subscr_update_auth_info(struct gprs_sub *subscr) { LOGGSUBSCRP(LOGL_DEBUG, subscr, "Updating subscriber authentication info\n"); subscr->flags &= ~GPRS_SUBSCRIBER_UPDATE_AUTH_INFO_PENDING; - subscr->flags &= ~GSM_SUBSCRIBER_FIRST_CONTACT; + subscr->flags &= ~GPRS_SUBSCRIBER_FIRST_CONTACT; if (subscr->sgsn_data->mm) sgsn_update_subscriber_data(subscr->sgsn_data->mm); } -struct gsm_subscriber *gprs_subscr_get_or_create_by_mmctx(struct sgsn_mm_ctx *mmctx) +struct gprs_sub *gprs_subscr_get_or_create_by_mmctx(struct sgsn_mm_ctx *mmctx) { - struct gsm_subscriber *subscr = NULL; + struct gprs_sub *subscr = NULL; if (mmctx->subscr) - return subscr_get(mmctx->subscr); + return gprs_sub_get(mmctx->subscr); if (mmctx->imsi[0]) subscr = gprs_subscr_get_by_imsi(mmctx->imsi); if (!subscr) { subscr = gprs_subscr_get_or_create(mmctx->imsi); - subscr->flags |= GSM_SUBSCRIBER_FIRST_CONTACT; + subscr->flags |= GPRS_SUBSCRIBER_FIRST_CONTACT; subscr->flags &= ~GPRS_SUBSCRIBER_ENABLE_PURGE; } - osmo_strlcpy(subscr->equipment.imei, mmctx->imei, - sizeof(subscr->equipment.imei)); + osmo_strlcpy(subscr->imei, mmctx->imei, sizeof(subscr->imei)); if (subscr->lac != mmctx->ra.lac) subscr->lac = mmctx->ra.lac; subscr->sgsn_data->mm = mmctx; - mmctx->subscr = subscr_get(subscr); + mmctx->subscr = gprs_sub_get(subscr); return subscr; } int gprs_subscr_request_update_location(struct sgsn_mm_ctx *mmctx) { - struct gsm_subscriber *subscr = NULL; + struct gprs_sub *subscr = NULL; int rc; LOGMMCTXP(LOGL_DEBUG, mmctx, "Requesting subscriber data update\n"); @@ -805,13 +834,13 @@ subscr->flags |= GPRS_SUBSCRIBER_UPDATE_LOCATION_PENDING; rc = gprs_subscr_location_update(subscr); - subscr_put(subscr); + gprs_sub_put(subscr); return rc; } int gprs_subscr_request_auth_info(struct sgsn_mm_ctx *mmctx) { - struct gsm_subscriber *subscr = NULL; + struct gprs_sub *subscr = NULL; int rc; LOGMMCTXP(LOGL_DEBUG, mmctx, "Requesting subscriber authentication info\n"); @@ -821,6 +850,34 @@ subscr->flags |= GPRS_SUBSCRIBER_UPDATE_AUTH_INFO_PENDING; rc = gprs_subscr_query_auth_info(subscr); - subscr_put(subscr); + gprs_sub_put(subscr); return rc; } + +static void gprs_sub_free(struct gprs_sub *gsub) +{ + llist_del(&gsub->entry); + talloc_free(gsub); +} + +struct gprs_sub *_gprs_sub_get(struct gprs_sub *gsub, const char *file, int line) +{ + OSMO_ASSERT(gsub->use_count < INT_MAX); + gsub->use_count++; + LOGPSRC(DREF, LOGL_DEBUG, file, line, + "subscr %s usage increases to: %d\n", + gsub->imsi, gsub->use_count); + return gsub; +} + +struct gprs_sub *_gprs_sub_put(struct gprs_sub *gsub, const char *file, int line) +{ + gsub->use_count--; + LOGPSRC(DREF, gsub->use_count >= 0? LOGL_DEBUG : LOGL_ERROR, + file, line, + "subscr %s usage decreases to: %d\n", + gsub->imsi, gsub->use_count); + if (gsub->use_count <= 0) + gprs_sub_free(gsub); + return NULL; +} diff --git a/openbsc/src/gprs/sgsn_auth.c b/openbsc/src/gprs/sgsn_auth.c index 1fa7fc4..8a11e95 100644 --- a/openbsc/src/gprs/sgsn_auth.c +++ b/openbsc/src/gprs/sgsn_auth.c @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include const struct value_string auth_state_names[] = { @@ -151,7 +151,7 @@ */ int sgsn_auth_request(struct sgsn_mm_ctx *mmctx) { - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; struct gsm_auth_tuple *at; int need_update_location; int rc; @@ -169,7 +169,7 @@ /* This has the side effect of registering the subscr with the mmctx */ subscr = gprs_subscr_get_or_create_by_mmctx(mmctx); - subscr_put(subscr); + gprs_sub_put(subscr); OSMO_ASSERT(mmctx->subscr != NULL); @@ -207,7 +207,7 @@ void sgsn_auth_update(struct sgsn_mm_ctx *mmctx) { enum sgsn_auth_state auth_state; - struct gsm_subscriber *subscr = mmctx->subscr; + struct gprs_sub *subscr = mmctx->subscr; struct gsm_auth_tuple *at; int gmm_cause; diff --git a/openbsc/src/gprs/sgsn_libgtp.c b/openbsc/src/gprs/sgsn_libgtp.c index 072b9ba..d408615 100644 --- a/openbsc/src/gprs/sgsn_libgtp.c +++ b/openbsc/src/gprs/sgsn_libgtp.c @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include #ifdef BUILD_IU diff --git a/openbsc/src/gprs/sgsn_vty.c b/openbsc/src/gprs/sgsn_vty.c index 21c865b..4875d15 100644 --- a/openbsc/src/gprs/sgsn_vty.c +++ b/openbsc/src/gprs/sgsn_vty.c @@ -638,40 +638,37 @@ } /* Subscriber */ -#include +#include -static void subscr_dump_full_vty(struct vty *vty, struct gsm_subscriber *subscr, int pending) +static void subscr_dump_full_vty(struct vty *vty, struct gprs_sub *gsub, int pending) { +#if 0 char expire_time[200]; +#endif struct gsm_auth_tuple *at; int at_idx; struct sgsn_subscriber_pdp_data *pdp; - vty_out(vty, " ID: %llu, Authorized: %d%s", subscr->id, - subscr->authorized, VTY_NEWLINE); - if (strlen(subscr->name)) - vty_out(vty, " Name: '%s'%s", subscr->name, VTY_NEWLINE); - if (strlen(subscr->extension)) - vty_out(vty, " Extension: %s%s", subscr->extension, - VTY_NEWLINE); + vty_out(vty, " Authorized: %d%s", + gsub->authorized, VTY_NEWLINE); vty_out(vty, " LAC: %d/0x%x%s", - subscr->lac, subscr->lac, VTY_NEWLINE); - vty_out(vty, " IMSI: %s%s", subscr->imsi, VTY_NEWLINE); - if (subscr->tmsi != GSM_RESERVED_TMSI) - vty_out(vty, " TMSI: %08X%s", subscr->tmsi, + gsub->lac, gsub->lac, VTY_NEWLINE); + vty_out(vty, " IMSI: %s%s", gsub->imsi, VTY_NEWLINE); + if (gsub->tmsi != GSM_RESERVED_TMSI) + vty_out(vty, " TMSI: %08X%s", gsub->tmsi, VTY_NEWLINE); - if (subscr->sgsn_data->msisdn_len > 0) + if (gsub->sgsn_data->msisdn_len > 0) vty_out(vty, " MSISDN (BCD): %s%s", - osmo_hexdump(subscr->sgsn_data->msisdn, - subscr->sgsn_data->msisdn_len), + osmo_hexdump(gsub->sgsn_data->msisdn, + gsub->sgsn_data->msisdn_len), VTY_NEWLINE); - if (strlen(subscr->equipment.imei) > 0) - vty_out(vty, " IMEI: %s%s", subscr->equipment.imei, VTY_NEWLINE); + if (strlen(gsub->imei) > 0) + vty_out(vty, " IMEI: %s%s", gsub->imei, VTY_NEWLINE); - for (at_idx = 0; at_idx < ARRAY_SIZE(subscr->sgsn_data->auth_triplets); + for (at_idx = 0; at_idx < ARRAY_SIZE(gsub->sgsn_data->auth_triplets); at_idx++) { - at = &subscr->sgsn_data->auth_triplets[at_idx]; + at = &gsub->sgsn_data->auth_triplets[at_idx]; if (at->key_seq == GSM_KEY_SEQ_INVAL) continue; @@ -688,36 +685,38 @@ VTY_NEWLINE); } - llist_for_each_entry(pdp, &subscr->sgsn_data->pdp_list, list) { + llist_for_each_entry(pdp, &gsub->sgsn_data->pdp_list, list) { vty_out(vty, " PDP info: Id: %d, Type: 0x%04x, APN: '%s' QoS: %s%s", pdp->context_id, pdp->pdp_type, pdp->apn_str, osmo_hexdump(pdp->qos_subscribed, pdp->qos_subscribed_len), VTY_NEWLINE); } +#if 0 /* print the expiration time of a subscriber */ - if (subscr->expire_lu) { + if (gsub->expire_lu) { strftime(expire_time, sizeof(expire_time), - "%a, %d %b %Y %T %z", localtime(&subscr->expire_lu)); + "%a, %d %b %Y %T %z", localtime(&gsub->expire_lu)); expire_time[sizeof(expire_time) - 1] = '\0'; vty_out(vty, " Expiration Time: %s%s", expire_time, VTY_NEWLINE); } +#endif - if (subscr->flags) + if (gsub->flags) vty_out(vty, " Flags: %s%s%s%s%s%s", - subscr->flags & GSM_SUBSCRIBER_FIRST_CONTACT ? + gsub->flags & GPRS_SUBSCRIBER_FIRST_CONTACT ? "FIRST_CONTACT " : "", - subscr->flags & GPRS_SUBSCRIBER_CANCELLED ? + gsub->flags & GPRS_SUBSCRIBER_CANCELLED ? "CANCELLED " : "", - subscr->flags & GPRS_SUBSCRIBER_UPDATE_LOCATION_PENDING ? + gsub->flags & GPRS_SUBSCRIBER_UPDATE_LOCATION_PENDING ? "UPDATE_LOCATION_PENDING " : "", - subscr->flags & GPRS_SUBSCRIBER_UPDATE_AUTH_INFO_PENDING ? + gsub->flags & GPRS_SUBSCRIBER_UPDATE_AUTH_INFO_PENDING ? "AUTH_INFO_PENDING " : "", - subscr->flags & GPRS_SUBSCRIBER_ENABLE_PURGE ? + gsub->flags & GPRS_SUBSCRIBER_ENABLE_PURGE ? "ENABLE_PURGE " : "", VTY_NEWLINE); - vty_out(vty, " Use count: %u%s", subscr->use_count, VTY_NEWLINE); + vty_out(vty, " Use count: %u%s", gsub->use_count, VTY_NEWLINE); } DEFUN(show_subscr_cache, @@ -726,9 +725,9 @@ SHOW_STR "Show information about subscribers\n" "Display contents of subscriber cache\n") { - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; - llist_for_each_entry(subscr, &active_subscribers, entry) { + llist_for_each_entry(subscr, gprs_subscribers, entry) { vty_out(vty, " Subscriber:%s", VTY_NEWLINE); subscr_dump_full_vty(vty, subscr, 0); } @@ -760,7 +759,7 @@ const char *kc_str = argv[4]; struct gsm_auth_tuple at = {0,}; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; subscr = gprs_subscr_get_by_imsi(imsi); if (!subscr) { @@ -791,12 +790,12 @@ subscr->sgsn_data->auth_triplets[cksn] = at; subscr->sgsn_data->auth_triplets_updated = 1; - subscr_put(subscr); + gprs_sub_put(subscr); return CMD_SUCCESS; failed: - subscr_put(subscr); + gprs_sub_put(subscr); return CMD_SUCCESS; } @@ -810,7 +809,7 @@ const char *imsi = argv[0]; const char *cancel_type = argv[1]; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; subscr = gprs_subscr_get_by_imsi(imsi); if (!subscr) { @@ -825,7 +824,7 @@ subscr->sgsn_data->error_cause = GMM_CAUSE_IMPL_DETACHED; gprs_subscr_cancel(subscr); - subscr_put(subscr); + gprs_sub_put(subscr); return CMD_SUCCESS; } @@ -837,7 +836,7 @@ { const char *imsi = argv[0]; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; subscr = gprs_subscr_get_by_imsi(imsi); if (subscr) { @@ -848,7 +847,7 @@ subscr = gprs_subscr_get_or_create(imsi); subscr->keep_in_ram = 1; - subscr_put(subscr); + gprs_sub_put(subscr); return CMD_SUCCESS; } @@ -860,7 +859,7 @@ { const char *imsi = argv[0]; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; subscr = gprs_subscr_get_by_imsi(imsi); if (!subscr) { @@ -875,7 +874,7 @@ if (subscr->use_count > 1) vty_out(vty, "%% subscriber is still in use%s", VTY_NEWLINE); - subscr_put(subscr); + gprs_sub_put(subscr); return CMD_SUCCESS; } @@ -900,7 +899,7 @@ const char *imsi = argv[0]; const char *ret_code_str = argv[1]; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; const struct value_string cause_mapping[] = { { GMM_CAUSE_NET_FAIL, "system-failure" }, @@ -929,7 +928,7 @@ gprs_subscr_update(subscr); - subscr_put(subscr); + gprs_sub_put(subscr); return CMD_SUCCESS; } @@ -941,7 +940,7 @@ { const char *imsi = argv[0]; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; subscr = gprs_subscr_get_by_imsi(imsi); if (!subscr) { @@ -952,7 +951,7 @@ gprs_subscr_update_auth_info(subscr); - subscr_put(subscr); + gprs_sub_put(subscr); return CMD_SUCCESS; } diff --git a/openbsc/tests/sgsn/sgsn_test.c b/openbsc/tests/sgsn/sgsn_test.c index e1fd2e7..5659b4e 100644 --- a/openbsc/tests/sgsn/sgsn_test.c +++ b/openbsc/tests/sgsn/sgsn_test.c @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include @@ -248,7 +248,7 @@ cleanup_test(); } -struct gsm_subscriber *last_updated_subscr = NULL; +struct gprs_sub *last_updated_subscr = NULL; void my_dummy_sgsn_update_subscriber_data(struct sgsn_mm_ctx *mmctx) { OSMO_ASSERT(mmctx); @@ -257,23 +257,23 @@ last_updated_subscr = mmctx->subscr; } -static void assert_subscr(const struct gsm_subscriber *subscr, const char *imsi) +static void assert_subscr(const struct gprs_sub *subscr, const char *imsi) { - struct gsm_subscriber *sfound; + struct gprs_sub *sfound; OSMO_ASSERT(subscr); OSMO_ASSERT(strcmp(subscr->imsi, imsi) == 0); sfound = gprs_subscr_get_by_imsi(imsi); OSMO_ASSERT(sfound == subscr); - subscr_put(sfound); + gprs_sub_put(sfound); } static void show_subscrs(FILE *out) { - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; - llist_for_each_entry(subscr, &active_subscribers, entry) { + llist_for_each_entry(subscr, gprs_subscribers, entry) { fprintf(out, " Subscriber: %s, " "use count: %d\n", subscr->imsi, subscr->use_count); @@ -284,12 +284,18 @@ { show_subscrs(stdout); fflush(stdout); - OSMO_ASSERT(llist_empty(&active_subscribers)); + OSMO_ASSERT(llist_empty(gprs_subscribers)); } + +#define VERBOSE_ASSERT(val, expect_op, fmt) \ + do { \ + printf(#val " == " fmt "\n", (val)); \ + OSMO_ASSERT((val) expect_op); \ + } while (0); static void test_subscriber(void) { - struct gsm_subscriber *s1, *s2, *s3, *sfound; + struct gprs_sub *s1, *s2, *s3; const char *imsi1 = "1234567890"; const char *imsi2 = "9876543210"; const char *imsi3 = "5656565656"; @@ -302,19 +308,24 @@ OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi1) == NULL); OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi2) == NULL); OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi3) == NULL); + VERBOSE_ASSERT(llist_count(gprs_subscribers), == 0, "%d"); /* Allocate entry 1 */ s1 = gprs_subscr_get_or_create(imsi1); - s1->flags |= GSM_SUBSCRIBER_FIRST_CONTACT; + VERBOSE_ASSERT(llist_count(gprs_subscribers), == 1, "%d"); + s1->flags |= GPRS_SUBSCRIBER_FIRST_CONTACT; assert_subscr(s1, imsi1); + VERBOSE_ASSERT(llist_count(gprs_subscribers), == 1, "%d"); OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi2) == NULL); /* Allocate entry 2 */ s2 = gprs_subscr_get_or_create(imsi2); - s2->flags |= GSM_SUBSCRIBER_FIRST_CONTACT; + VERBOSE_ASSERT(llist_count(gprs_subscribers), == 2, "%d"); + s2->flags |= GPRS_SUBSCRIBER_FIRST_CONTACT; /* Allocate entry 3 */ s3 = gprs_subscr_get_or_create(imsi3); + VERBOSE_ASSERT(llist_count(gprs_subscribers), == 3, "%d"); /* Check entries */ assert_subscr(s1, imsi1); @@ -326,33 +337,35 @@ gprs_subscr_update(s1); OSMO_ASSERT(last_updated_subscr == NULL); OSMO_ASSERT(s1->sgsn_data->mm == NULL); - OSMO_ASSERT((s1->flags & GSM_SUBSCRIBER_FIRST_CONTACT) == 0); + OSMO_ASSERT((s1->flags & GPRS_SUBSCRIBER_FIRST_CONTACT) == 0); /* There is no subscriber cache. Verify it */ gprs_subscr_cleanup(s1); - subscr_put(s1); + gprs_sub_put(s1); s1 = NULL; - sfound = gprs_subscr_get_by_imsi(imsi1); - OSMO_ASSERT(sfound == NULL); + VERBOSE_ASSERT(llist_count(gprs_subscribers), == 2, "%d"); + OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi1) == NULL); assert_subscr(s2, imsi2); assert_subscr(s3, imsi3); - /* Free entry 2 (GSM_SUBSCRIBER_FIRST_CONTACT is set) */ + /* Free entry 2 (GPRS_SUBSCRIBER_FIRST_CONTACT is set) */ gprs_subscr_cleanup(s2); - subscr_put(s2); + gprs_sub_put(s2); s2 = NULL; + VERBOSE_ASSERT(llist_count(gprs_subscribers), == 1, "%d"); OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi1) == NULL); OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi2) == NULL); assert_subscr(s3, imsi3); /* Try to delete entry 3 */ gprs_subscr_cleanup(s3); - subscr_put(s3); + gprs_sub_put(s3); s3 = NULL; + VERBOSE_ASSERT(llist_count(gprs_subscribers), == 0, "%d"); OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi3) == NULL); - OSMO_ASSERT(llist_empty(&active_subscribers)); + OSMO_ASSERT(llist_empty(gprs_subscribers)); update_subscriber_data_cb = __real_sgsn_update_subscriber_data; @@ -361,7 +374,7 @@ static void test_auth_triplets(void) { - struct gsm_subscriber *s1, *s1found; + struct gprs_sub *s1, *s1found; const char *imsi1 = "1234567890"; struct gsm_auth_tuple *at; struct sgsn_mm_ctx *ctx; @@ -375,17 +388,17 @@ /* Allocate entry 1 */ s1 = gprs_subscr_get_or_create(imsi1); - s1->flags |= GSM_SUBSCRIBER_FIRST_CONTACT; + s1->flags |= GPRS_SUBSCRIBER_FIRST_CONTACT; s1found = gprs_subscr_get_by_imsi(imsi1); OSMO_ASSERT(s1found == s1); - subscr_put(s1found); + gprs_sub_put(s1found); /* Create a context */ OSMO_ASSERT(count(gprs_llme_list()) == 0); ctx = alloc_mm_ctx(local_tlli, &raid); /* Attach s1 to ctx */ - ctx->subscr = subscr_get(s1); + ctx->subscr = gprs_sub_get(s1); ctx->subscr->sgsn_data->mm = ctx; /* Try to get auth tuple */ @@ -414,7 +427,7 @@ OSMO_ASSERT(at == NULL); /* Free MM context and subscriber */ - subscr_put(s1); + gprs_sub_put(s1); sgsn_mm_ctx_cleanup_free(ctx); s1found = gprs_subscr_get_by_imsi(imsi1); OSMO_ASSERT(s1found == NULL); @@ -441,7 +454,7 @@ static void test_subscriber_gsup(void) { - struct gsm_subscriber *s1, *s1found; + struct gprs_sub *s1, *s1found; const char *imsi1 = "1234567890"; struct sgsn_mm_ctx *ctx; struct gprs_ra_id raid = { 0, }; @@ -563,17 +576,17 @@ /* Allocate entry 1 */ s1 = gprs_subscr_get_or_create(imsi1); - s1->flags |= GSM_SUBSCRIBER_FIRST_CONTACT; + s1->flags |= GPRS_SUBSCRIBER_FIRST_CONTACT; s1found = gprs_subscr_get_by_imsi(imsi1); OSMO_ASSERT(s1found == s1); - subscr_put(s1found); + gprs_sub_put(s1found); /* Create a context */ OSMO_ASSERT(count(gprs_llme_list()) == 0); ctx = alloc_mm_ctx(local_tlli, &raid); /* Attach s1 to ctx */ - ctx->subscr = subscr_get(s1); + ctx->subscr = gprs_sub_get(s1); ctx->subscr->sgsn_data->mm = ctx; /* Inject SendAuthInfoReq GSUP message */ @@ -674,7 +687,7 @@ /* Free MM context and subscriber */ OSMO_ASSERT(ctx->subscr == NULL); sgsn_mm_ctx_cleanup_free(ctx); - subscr_put(s1); + gprs_sub_put(s1); s1found = gprs_subscr_get_by_imsi(imsi1); OSMO_ASSERT(s1found == NULL); @@ -1089,7 +1102,7 @@ static void test_gmm_attach_subscr(void) { const enum sgsn_auth_policy saved_auth_policy = sgsn->cfg.auth_policy; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; sgsn_inst.cfg.auth_policy = SGSN_AUTH_POLICY_REMOTE; subscr_request_update_location_cb = my_subscr_request_update_location; @@ -1100,7 +1113,7 @@ printf("Auth policy 'remote': "); test_gmm_attach(0); - subscr_put(subscr); + gprs_sub_put(subscr); assert_no_subscrs(); sgsn->cfg.auth_policy = saved_auth_policy; @@ -1123,7 +1136,7 @@ static void test_gmm_attach_subscr_fake_auth(void) { const enum sgsn_auth_policy saved_auth_policy = sgsn->cfg.auth_policy; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; sgsn_inst.cfg.auth_policy = SGSN_AUTH_POLICY_REMOTE; subscr_request_update_location_cb = my_subscr_request_update_location; @@ -1136,7 +1149,7 @@ printf("Auth policy 'remote', auth faked: "); test_gmm_attach(0); - subscr_put(subscr); + gprs_sub_put(subscr); assert_no_subscrs(); sgsn->cfg.auth_policy = saved_auth_policy; @@ -1165,7 +1178,7 @@ static void test_gmm_attach_subscr_real_auth(void) { const enum sgsn_auth_policy saved_auth_policy = sgsn->cfg.auth_policy; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; sgsn_inst.cfg.auth_policy = SGSN_AUTH_POLICY_REMOTE; subscr_request_update_location_cb = my_subscr_request_update_location; @@ -1179,7 +1192,7 @@ printf("Auth policy 'remote', triplet based auth: "); test_gmm_attach(0); - subscr_put(subscr); + gprs_sub_put(subscr); assert_no_subscrs(); sgsn->cfg.auth_policy = saved_auth_policy; @@ -1253,7 +1266,7 @@ static void test_gmm_attach_subscr_gsup_auth(int retry) { const enum sgsn_auth_policy saved_auth_policy = sgsn->cfg.auth_policy; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; sgsn_inst.cfg.auth_policy = SGSN_AUTH_POLICY_REMOTE; subscr_request_update_location_cb = my_subscr_request_update_gsup_auth; @@ -1267,7 +1280,7 @@ subscr->authorized = 1; sgsn->cfg.require_authentication = 1; sgsn->cfg.require_update_location = 1; - subscr_put(subscr); + gprs_sub_put(subscr); printf("Auth policy 'remote', GSUP based auth: "); test_gmm_attach(retry); @@ -1336,7 +1349,7 @@ static void test_gmm_attach_subscr_real_gsup_auth(int retry) { const enum sgsn_auth_policy saved_auth_policy = sgsn->cfg.auth_policy; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; sgsn_inst.cfg.auth_policy = SGSN_AUTH_POLICY_REMOTE; gsup_client_send_cb = my_gsup_client_send; @@ -2227,7 +2240,7 @@ { struct apn_ctx *actxs[4]; struct sgsn_ggsn_ctx *ggc, *ggcs[3]; - struct gsm_subscriber *s1; + struct gprs_sub *s1; const char *imsi1 = "1234567890"; struct sgsn_mm_ctx *ctx; struct gprs_ra_id raid = { 0, }; @@ -2346,7 +2359,7 @@ /* Cleanup */ - subscr_put(s1); + gprs_sub_put(s1); sgsn_mm_ctx_cleanup_free(ctx); assert_no_subscrs(); diff --git a/openbsc/tests/sgsn/sgsn_test.ok b/openbsc/tests/sgsn/sgsn_test.ok index c7a53b9..f38d730 100644 --- a/openbsc/tests/sgsn/sgsn_test.ok +++ b/openbsc/tests/sgsn/sgsn_test.ok @@ -1,5 +1,13 @@ Testing LLME allocations Testing core subscriber data API +llist_count(gprs_subscribers) == 0 +llist_count(gprs_subscribers) == 1 +llist_count(gprs_subscribers) == 1 +llist_count(gprs_subscribers) == 2 +llist_count(gprs_subscribers) == 3 +llist_count(gprs_subscribers) == 2 +llist_count(gprs_subscribers) == 1 +llist_count(gprs_subscribers) == 0 Testing authentication triplet handling Testing subscriber GSUP handling Testing GMM detach -- To view, visit https://gerrit.osmocom.org/1684 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia8b391ee009c8545763cba04505be3947835120e Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Jan 26 00:54:45 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 26 Jan 2017 00:54:45 +0000 Subject: openbsc[master]: Introduce subscriber_connection ref-counting In-Reply-To: References: Message-ID: Patch Set 1: NOTE: this has only been tested as part of the vlr branch, not on its own -- To view, visit https://gerrit.osmocom.org/1681 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8c05e6c81f246ff8b5bf91312f80410b1a85f15e Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 26 00:54:56 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 26 Jan 2017 00:54:56 +0000 Subject: openbsc[master]: add struct bsc_sub, separating libbsc from gsm_subscriber In-Reply-To: References: Message-ID: Patch Set 1: NOTE: this has only been tested as part of the vlr branch, not on its own -- To view, visit https://gerrit.osmocom.org/1682 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia61cc00e8bb186b976939a4fc8f7cf9ce6aa3d8e Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 26 00:55:08 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 26 Jan 2017 00:55:08 +0000 Subject: openbsc[master]: SGSN: Integrate basic support for UMTS AKA In-Reply-To: References: Message-ID: Patch Set 1: NOTE: this has only been tested as part of the vlr branch, not on its own -- To view, visit https://gerrit.osmocom.org/1683 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie6a0cefba5e4e7f02cc2eaf6ec006ac07d5c1816 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 26 00:55:18 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 26 Jan 2017 00:55:18 +0000 Subject: openbsc[master]: add struct gprs_sub, separating gprs from gsm_subscriber In-Reply-To: References: Message-ID: Patch Set 1: NOTE: this has only been tested as part of the vlr branch, not on its own -- To view, visit https://gerrit.osmocom.org/1684 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia8b391ee009c8545763cba04505be3947835120e Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 26 01:18:52 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 26 Jan 2017 01:18:52 +0000 Subject: [PATCH] openbsc[master]: add struct bsc_sub, separating libbsc from gsm_subscriber In-Reply-To: References: Message-ID: add struct bsc_sub, separating libbsc from gsm_subscriber Prepare for replacing gsm_subscriber with vlr_subscriber. vlr_subscriber will no longer make sense to be used in libbsc, so have a dedicated BSC subscriber struct. Related: #1592, #1594 Change-Id: Ia61cc00e8bb186b976939a4fc8f7cf9ce6aa3d8e --- M openbsc/include/openbsc/Makefile.am A openbsc/include/openbsc/bsc_subscriber.h M openbsc/include/openbsc/gsm_04_08.h M openbsc/include/openbsc/gsm_data.h M openbsc/include/openbsc/osmo_bsc_grace.h M openbsc/include/openbsc/paging.h M openbsc/src/libbsc/Makefile.am M openbsc/src/libbsc/abis_rsl.c A openbsc/src/libbsc/bsc_subscriber.c M openbsc/src/libbsc/bsc_vty.c M openbsc/src/libbsc/gsm_04_08_utils.c M openbsc/src/libbsc/paging.c M openbsc/src/libcommon-cs/common_cs.c M openbsc/src/libmsc/gsm_subscriber.c M openbsc/src/osmo-bsc/osmo_bsc_bssap.c M openbsc/src/osmo-bsc/osmo_bsc_filter.c M openbsc/src/osmo-bsc/osmo_bsc_grace.c M openbsc/src/osmo-bsc/osmo_bsc_vty.c M openbsc/tests/channel/Makefile.am M openbsc/tests/channel/channel_test.c M openbsc/tests/subscr/subscr_test.c M openbsc/tests/subscr/subscr_test.ok 22 files changed, 416 insertions(+), 123 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/82/1682/2 diff --git a/openbsc/include/openbsc/Makefile.am b/openbsc/include/openbsc/Makefile.am index 2466ce8..16693d7 100644 --- a/openbsc/include/openbsc/Makefile.am +++ b/openbsc/include/openbsc/Makefile.am @@ -10,6 +10,7 @@ bsc_nat_callstats.h \ bsc_nat_sccp.h \ bsc_rll.h \ + bsc_subscriber.h \ bss.h \ bts_ipaccess_nanobts_omlattr.h \ chan_alloc.h \ diff --git a/openbsc/include/openbsc/bsc_subscriber.h b/openbsc/include/openbsc/bsc_subscriber.h new file mode 100644 index 0000000..4d27c8c --- /dev/null +++ b/openbsc/include/openbsc/bsc_subscriber.h @@ -0,0 +1,32 @@ +/* GSM subscriber details for use in BSC land */ + +#pragma once + +#include + +#include +#include + +struct bsc_sub { + struct llist_head entry; + int use_count; + + char imsi[GSM23003_IMSI_MAX_DIGITS+1]; + uint32_t tmsi; + uint16_t lac; +}; + +const char *bsc_sub_name(struct bsc_sub *bsub); + +struct bsc_sub *bsc_sub_have_by_imsi(struct llist_head *list, const char *imsi); +struct bsc_sub *bsc_sub_have_by_tmsi(struct llist_head *list, uint32_t tmsi); + +struct bsc_sub *bsc_sub_find_by_imsi(struct llist_head *list, const char *imsi); +struct bsc_sub *bsc_sub_find_by_tmsi(struct llist_head *list, uint32_t tmsi); + +void bsc_sub_set_imsi(struct bsc_sub *bsub, const char *imsi); + +struct bsc_sub *_bsc_sub_get(struct bsc_sub *bsub, const char *file, int line); +struct bsc_sub *_bsc_sub_put(struct bsc_sub *bsub, const char *file, int line); +#define bsc_sub_get(bsub) _bsc_sub_get(bsub, __BASE_FILE__, __LINE__) +#define bsc_sub_put(bsub) _bsc_sub_put(bsub, __BASE_FILE__, __LINE__) diff --git a/openbsc/include/openbsc/gsm_04_08.h b/openbsc/include/openbsc/gsm_04_08.h index fd0b89d..c515569 100644 --- a/openbsc/include/openbsc/gsm_04_08.h +++ b/openbsc/include/openbsc/gsm_04_08.h @@ -15,6 +15,7 @@ struct gsm_subscriber_connection; struct amr_multirate_conf; struct amr_mode; +struct bsc_sub; #define GSM48_ALLOC_SIZE 2048 #define GSM48_ALLOC_HEADROOM 256 @@ -77,7 +78,8 @@ int send_siemens_mrpci(struct gsm_lchan *lchan, uint8_t *classmark2_lv); int gsm48_extract_mi(uint8_t *classmark2, int length, char *mi_string, uint8_t *mi_type); int gsm48_paging_extract_mi(struct gsm48_pag_resp *pag, int length, char *mi_string, uint8_t *mi_type); -int gsm48_handle_paging_resp(struct gsm_subscriber_connection *conn, struct msgb *msg, struct gsm_subscriber *subscr); +int gsm48_handle_paging_resp(struct gsm_subscriber_connection *conn, + struct msgb *msg, struct bsc_sub *bsub); int gsm48_lchan_modify(struct gsm_lchan *lchan, uint8_t lchan_mode); int gsm48_rx_rr_modif_ack(struct msgb *msg); diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index d477284..9cb46a4 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -23,6 +23,7 @@ struct mncc_sock_state; struct gsm_subscriber_group; +struct bsc_sub; #define OBSC_LINKID_CB(__msgb) (__msgb)->cb[3] @@ -115,6 +116,9 @@ /* To whom we are allocated at the moment */ struct gsm_subscriber *subscr; + + /* libbsc subscriber information */ + struct bsc_sub *bsub; /* LU expiration handling */ uint8_t expire_timer_stopped; @@ -386,6 +390,11 @@ * BTS|RNC specific timezone overrides for multi-tz networks in * OsmoCSCN, this should be tied to the location area code (LAC). */ struct gsm_tz tz; + + /* List of all struct bsc_sub used in libbsc. This llist_head is + * allocated so that the llist_head pointer itself can serve as a + * talloc context. */ + struct llist_head *bsc_subscribers; }; struct osmo_esme; diff --git a/openbsc/include/openbsc/osmo_bsc_grace.h b/openbsc/include/openbsc/osmo_bsc_grace.h index af77b2f..125b52a 100644 --- a/openbsc/include/openbsc/osmo_bsc_grace.h +++ b/openbsc/include/openbsc/osmo_bsc_grace.h @@ -22,10 +22,12 @@ #define OSMO_BSC_GRACE_H #include +#include struct osmo_msc_data; int bsc_grace_allow_new_connection(struct gsm_network *net, struct gsm_bts *bts); -int bsc_grace_paging_request(struct gsm_subscriber *sub, int type, struct osmo_msc_data *msc); +int bsc_grace_paging_request(enum signal_rf rf_policy, struct bsc_sub *subscr, + int chan_needed, struct osmo_msc_data *msc); #endif diff --git a/openbsc/include/openbsc/paging.h b/openbsc/include/openbsc/paging.h index 689ff51..22fe080 100644 --- a/openbsc/include/openbsc/paging.h +++ b/openbsc/include/openbsc/paging.h @@ -27,7 +27,7 @@ #include #include -#include +#include /** * A pending paging request @@ -36,8 +36,8 @@ /* list_head for list of all paging requests */ struct llist_head entry; /* the subscriber which we're paging. Later gsm_paging_request - * should probably become a part of the gsm_subscriber struct? */ - struct gsm_subscriber *subscr; + * should probably become a part of the bsc_sub struct? */ + struct bsc_sub *bsub; /* back-pointer to the BTS on which we are paging */ struct gsm_bts *bts; /* what kind of channel type do we ask the MS to establish */ @@ -55,13 +55,14 @@ }; /* schedule paging request */ -int paging_request(struct gsm_network *network, struct gsm_subscriber *subscr, +int paging_request(struct gsm_network *network, struct bsc_sub *bsub, int type, gsm_cbfn *cbfn, void *data); -int paging_request_bts(struct gsm_bts *bts, struct gsm_subscriber *subscr, - int type, gsm_cbfn *cbfn, void *data); +int paging_request_bts(struct gsm_bts *bts, struct bsc_sub *bsub, + int type, gsm_cbfn *cbfn, void *data); /* stop paging requests */ -void paging_request_stop(struct gsm_bts *bts, struct gsm_subscriber *subscr, +void paging_request_stop(struct llist_head *bts_list, + struct gsm_bts *_bts, struct bsc_sub *bsub, struct gsm_subscriber_connection *conn, struct msgb *msg); @@ -71,6 +72,6 @@ /* pending paging requests */ unsigned int paging_pending_requests_nr(struct gsm_bts *bts); -void *paging_get_data(struct gsm_bts *bts, struct gsm_subscriber *subscr); +void *paging_get_data(struct gsm_bts *bts, struct bsc_sub *bsub); #endif diff --git a/openbsc/src/libbsc/Makefile.am b/openbsc/src/libbsc/Makefile.am index b8e77e6..fd8f37a 100644 --- a/openbsc/src/libbsc/Makefile.am +++ b/openbsc/src/libbsc/Makefile.am @@ -24,6 +24,7 @@ abis_om2000_vty.c \ abis_rsl.c \ bsc_rll.c \ + bsc_subscriber.c \ paging.c \ bts_ericsson_rbs2000.c \ bts_ipaccess_nanobts.c \ diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c index 8a6b111..59c5b75 100644 --- a/openbsc/src/libbsc/abis_rsl.c +++ b/openbsc/src/libbsc/abis_rsl.c @@ -1333,10 +1333,10 @@ static void print_meas_rep(struct gsm_lchan *lchan, struct gsm_meas_rep *mr) { int i; - char *name = ""; + const char *name = ""; if (lchan && lchan->conn) - name = subscr_name(lchan->conn->subscr); + name = bsc_sub_name(lchan->conn->bsub); DEBUGP(DMEAS, "[%s] MEASUREMENT RESULT NR=%d ", name, mr->nr); diff --git a/openbsc/src/libbsc/bsc_subscriber.c b/openbsc/src/libbsc/bsc_subscriber.c new file mode 100644 index 0000000..01e4058 --- /dev/null +++ b/openbsc/src/libbsc/bsc_subscriber.c @@ -0,0 +1,144 @@ +/* GSM subscriber details for use in BSC land */ + +/* + * (C) 2016 by sysmocom s.f.m.c. GmbH + * + * Author: Neels Hofmeyr + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero 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 Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include +#include +#include + +#include +#include + +#include +#include + +static struct bsc_sub *bsc_sub_alloc(struct llist_head *list) +{ + struct bsc_sub *bsub; + + bsub = talloc_zero(list, struct bsc_sub); + if (!bsub) + return NULL; + + llist_add_tail(&bsub->entry, list); + bsub->use_count = 1; + + return bsub; +} + +struct bsc_sub *bsc_sub_find_by_imsi(struct llist_head *list, const char *imsi) +{ + struct bsc_sub *bsub; + + if (!imsi || !*imsi) + return NULL; + + llist_for_each_entry(bsub, list, entry) { + if (!strcmp(bsub->imsi, imsi)) + return bsc_sub_get(bsub); + } + return NULL; +} + +struct bsc_sub *bsc_sub_find_by_tmsi(struct llist_head *list, uint32_t tmsi) +{ + struct bsc_sub *bsub; + + if (tmsi == GSM_RESERVED_TMSI) + return NULL; + + llist_for_each_entry(bsub, list, entry) { + if (bsub->tmsi == tmsi) + return bsc_sub_get(bsub); + } + return NULL; +} + +void bsc_sub_set_imsi(struct bsc_sub *bsub, const char *imsi) +{ + if (!bsub) + return; + strncpy(bsub->imsi, imsi, sizeof(bsub->imsi)); +} + +struct bsc_sub *bsc_sub_have_by_imsi(struct llist_head *list, const char *imsi) +{ + struct bsc_sub *bsub; + bsub = bsc_sub_find_by_imsi(list, imsi); + if (bsub) + return bsub; + bsub = bsc_sub_alloc(list); + bsc_sub_set_imsi(bsub, imsi); + return bsub; +} + +struct bsc_sub *bsc_sub_have_by_tmsi(struct llist_head *list, uint32_t tmsi) +{ + struct bsc_sub *bsub; + bsub = bsc_sub_find_by_tmsi(list, tmsi); + if (bsub) + return bsub; + bsub = bsc_sub_alloc(list); + bsub->tmsi = tmsi; + return bsub; +} + +const char *bsc_sub_name(struct bsc_sub *bsub) +{ + static char buf[32]; + if (!bsub) + return "unknown"; + if (bsub->imsi[0]) + snprintf(buf, sizeof(buf), "IMSI:%s", bsub->imsi); + else + snprintf(buf, sizeof(buf), "TMSI:0x%08x", bsub->tmsi); + return buf; +} + +static void bsc_sub_free(struct bsc_sub *bsub) +{ + llist_del(&bsub->entry); + talloc_free(bsub); +} + +struct bsc_sub *_bsc_sub_get(struct bsc_sub *bsub, const char *file, int line) +{ + OSMO_ASSERT(bsub->use_count < INT_MAX); + bsub->use_count++; + LOGPSRC(DREF, LOGL_DEBUG, file, line, + "BSC subscr %s usage increases to: %d\n", + bsc_sub_name(bsub), bsub->use_count); + return bsub; +} + +struct bsc_sub *_bsc_sub_put(struct bsc_sub *bsub, const char *file, int line) +{ + bsub->use_count--; + LOGPSRC(DREF, bsub->use_count >= 0? LOGL_DEBUG : LOGL_ERROR, + file, line, + "BSC subscr %s usage decreases to: %d\n", + bsc_sub_name(bsub), bsub->use_count); + if (bsub->use_count <= 0) + bsc_sub_free(bsub); + return NULL; +} diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c index 01ee4df..3f6b68e 100644 --- a/openbsc/src/libbsc/bsc_vty.c +++ b/openbsc/src/libbsc/bsc_vty.c @@ -1009,6 +1009,16 @@ vty_out(vty, " Use count: %u%s", subscr->use_count, VTY_NEWLINE); } +static void bsc_sub_dump_vty(struct vty *vty, struct bsc_sub *bsub) +{ + if (strlen(bsub->imsi)) + vty_out(vty, " IMSI: %s%s", bsub->imsi, VTY_NEWLINE); + if (bsub->tmsi != GSM_RESERVED_TMSI) + vty_out(vty, " TMSI: 0x%08x%s", bsub->tmsi, + VTY_NEWLINE); + vty_out(vty, " Use count: %d%s", bsub->use_count, VTY_NEWLINE); +} + static void meas_rep_dump_uni_vty(struct vty *vty, struct gsm_meas_rep_unidir *mru, const char *prefix, @@ -1304,7 +1314,7 @@ static void paging_dump_vty(struct vty *vty, struct gsm_paging_request *pag) { vty_out(vty, "Paging on BTS %u%s", pag->bts->nr, VTY_NEWLINE); - subscr_dump_vty(vty, pag->subscr); + bsc_sub_dump_vty(vty, pag->bsub); } static void bts_paging_dump_vty(struct vty *vty, struct gsm_bts *bts) diff --git a/openbsc/src/libbsc/gsm_04_08_utils.c b/openbsc/src/libbsc/gsm_04_08_utils.c index 98f0790..6e9b608 100644 --- a/openbsc/src/libbsc/gsm_04_08_utils.c +++ b/openbsc/src/libbsc/gsm_04_08_utils.c @@ -283,7 +283,7 @@ } int gsm48_handle_paging_resp(struct gsm_subscriber_connection *conn, - struct msgb *msg, struct gsm_subscriber *subscr) + struct msgb *msg, struct bsc_sub *bsub) { struct gsm_bts *bts = msg->lchan->ts->trx->bts; struct gsm48_hdr *gh = msgb_l3(msg); @@ -292,22 +292,23 @@ if (is_siemens_bts(bts)) send_siemens_mrpci(msg->lchan, classmark2_lv); - if (!conn->subscr) { - conn->subscr = subscr; - } else if (conn->subscr != subscr) { + if (!conn->bsub) { + conn->bsub = bsub; + } else if (conn->bsub != bsub) { LOGP(DRR, LOGL_ERROR, "<- Channel already owned by someone else?\n"); - subscr_put(subscr); + bsc_sub_put(bsub); return -EINVAL; } else { DEBUGP(DRR, "<- Channel already owned by us\n"); - subscr_put(subscr); - subscr = conn->subscr; + bsc_sub_put(bsub); + bsub = conn->bsub; } rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_PAGING_COMPLETED]); /* Stop paging on the bts we received the paging response */ - paging_request_stop(conn->bts, subscr, conn, msg); + paging_request_stop(&bts->network->bts_list, conn->bts, bsub, conn, + msg); return 0; } diff --git a/openbsc/src/libbsc/paging.c b/openbsc/src/libbsc/paging.c index fcb4deb..fa7e925 100644 --- a/openbsc/src/libbsc/paging.c +++ b/openbsc/src/libbsc/paging.c @@ -42,6 +42,7 @@ #include #include +#include #include #include #include @@ -58,11 +59,11 @@ * Kill one paging request update the internal list... */ static void paging_remove_request(struct gsm_bts_paging_state *paging_bts, - struct gsm_paging_request *to_be_deleted) + struct gsm_paging_request *to_be_deleted) { osmo_timer_del(&to_be_deleted->T3113); llist_del(&to_be_deleted->entry); - subscr_put(to_be_deleted->subscr); + bsc_sub_put(to_be_deleted->bsub); talloc_free(to_be_deleted); } @@ -77,20 +78,17 @@ if (!bts->oml_link) return; - log_set_context(BSC_CTX_SUBSCR, request->subscr); + LOGP(DPAG, LOGL_INFO, "Going to send paging commands: imsi: '%s' tmsi: '0x%08x'\n", + request->bsub->imsi, request->bsub->tmsi); - LOGP(DPAG, LOGL_INFO, "Going to send paging commands: imsi: '%s' tmsi: '0x%x'\n", - request->subscr->imsi, request->subscr->tmsi); - - if (request->subscr->tmsi == GSM_RESERVED_TMSI) - mi_len = gsm48_generate_mid_from_imsi(mi, request->subscr->imsi); + if (request->bsub->tmsi == GSM_RESERVED_TMSI) + mi_len = gsm48_generate_mid_from_imsi(mi, request->bsub->imsi); else - mi_len = gsm48_generate_mid_from_tmsi(mi, request->subscr->tmsi); + mi_len = gsm48_generate_mid_from_tmsi(mi, request->bsub->tmsi); page_group = gsm0502_calc_paging_group(&bts->si_common.chan_desc, - str_to_imsi(request->subscr->imsi)); + str_to_imsi(request->bsub->imsi)); gsm0808_page(bts, page_group, mi_len, mi, request->chan_type); - log_set_context(BSC_CTX_SUBSCR, NULL); } static void paging_schedule_if_needed(struct gsm_bts_paging_state *paging_bts) @@ -236,11 +234,12 @@ } static int paging_pending_request(struct gsm_bts_paging_state *bts, - struct gsm_subscriber *subscr) { + struct bsc_sub *bsub) +{ struct gsm_paging_request *req; llist_for_each_entry(req, &bts->pending_requests, entry) { - if (subscr == req->subscr) + if (bsub == req->bsub) return 1; } @@ -254,10 +253,8 @@ gsm_cbfn *cbfn; int msg; - log_set_context(BSC_CTX_SUBSCR, req->subscr); - LOGP(DPAG, LOGL_INFO, "T3113 expired for request %p (%s)\n", - req, req->subscr->imsi); + req, bsc_sub_name(req->bsub)); /* must be destroyed before calling cbfn, to prevent double free */ rate_ctr_inc(&req->bts->network->bsc_ctrs->ctr[BSC_CTR_PAGING_EXPIRED]); @@ -276,21 +273,22 @@ } -static int _paging_request(struct gsm_bts *bts, struct gsm_subscriber *subscr, - int type, gsm_cbfn *cbfn, void *data) +static int _paging_request(struct gsm_bts *bts, struct bsc_sub *bsub, + int type, gsm_cbfn *cbfn, void *data) { struct gsm_bts_paging_state *bts_entry = &bts->paging; struct gsm_paging_request *req; - if (paging_pending_request(bts_entry, subscr)) { - LOGP(DPAG, LOGL_INFO, "Paging request already pending for %s\n", subscr->imsi); + if (paging_pending_request(bts_entry, bsub)) { + LOGP(DPAG, LOGL_INFO, "Paging request already pending for %s\n", + bsc_sub_name(bsub)); return -EEXIST; } - LOGP(DPAG, LOGL_DEBUG, "Start paging of subscriber %llu on bts %d.\n", - subscr->id, bts->nr); + LOGP(DPAG, LOGL_DEBUG, "Start paging of subscriber %s on bts %d.\n", + bsc_sub_name(bsub), bts->nr); req = talloc_zero(tall_paging_ctx, struct gsm_paging_request); - req->subscr = subscr_get(subscr); + req->bsub = bsc_sub_get(bsub); req->bts = bts; req->chan_type = type; req->cbfn = cbfn; @@ -304,8 +302,8 @@ return 0; } -int paging_request_bts(struct gsm_bts *bts, struct gsm_subscriber *subscr, - int type, gsm_cbfn *cbfn, void *data) +int paging_request_bts(struct gsm_bts *bts, struct bsc_sub *bsub, + int type, gsm_cbfn *cbfn, void *data) { int rc; @@ -316,15 +314,14 @@ /* maybe it is the first time we use it */ paging_init_if_needed(bts); - /* Trigger paging, pass any error to the caller */ - rc = _paging_request(bts, subscr, type, cbfn, data); + rc = _paging_request(bts, bsub, type, cbfn, data); if (rc < 0) return rc; return 1; } -int paging_request(struct gsm_network *network, struct gsm_subscriber *subscr, +int paging_request(struct gsm_network *network, struct bsc_sub *bsub, int type, gsm_cbfn *cbfn, void *data) { struct gsm_bts *bts = NULL; @@ -336,13 +333,14 @@ do { int rc; - bts = gsm_bts_by_lac(network, subscr->lac, bts); + bts = gsm_bts_by_lac(network, bsub->lac, bts); if (!bts) break; - rc = paging_request_bts(bts, subscr, type, cbfn, data); + rc = paging_request_bts(bts, bsub, type, cbfn, data); if (rc < 0) { - paging_request_stop(NULL, subscr, NULL, NULL); + paging_request_stop(&network->bts_list, NULL, bsub, + NULL, NULL); return rc; } num_pages += rc; @@ -356,7 +354,7 @@ /* we consciously ignore the type of the request here */ -static void _paging_request_stop(struct gsm_bts *bts, struct gsm_subscriber *subscr, +static void _paging_request_stop(struct gsm_bts *bts, struct bsc_sub *bsub, struct gsm_subscriber_connection *conn, struct msgb *msg) { @@ -366,8 +364,8 @@ paging_init_if_needed(bts); llist_for_each_entry_safe(req, req2, &bts_entry->pending_requests, - entry) { - if (req->subscr == subscr) { + entry) { + if (req->bsub == bsub) { gsm_cbfn *cbfn = req->cbfn; void *param = req->cbfn_param; @@ -376,35 +374,38 @@ req = NULL; if (conn && cbfn) { - LOGP(DPAG, LOGL_DEBUG, "Stop paging on bts %d, calling cbfn.\n", bts->nr); + LOGP(DPAG, LOGL_DEBUG, + "Stop paging on bts %d, calling cbfn.\n", + bts->nr); cbfn(GSM_HOOK_RR_PAGING, GSM_PAGING_SUCCEEDED, - msg, conn, param); + msg, conn, param); } else - LOGP(DPAG, LOGL_DEBUG, "Stop paging on bts %d silently.\n", bts->nr); + LOGP(DPAG, LOGL_DEBUG, + "Stop paging on bts %d silently.\n", + bts->nr); break; } } } /* Stop paging on all other bts' */ -void paging_request_stop(struct gsm_bts *_bts, struct gsm_subscriber *subscr, +void paging_request_stop(struct llist_head *bts_list, + struct gsm_bts *_bts, struct bsc_sub *bsub, struct gsm_subscriber_connection *conn, struct msgb *msg) { struct gsm_bts *bts; - log_set_context(BSC_CTX_SUBSCR, subscr); - /* Stop this first and dispatch the request */ if (_bts) - _paging_request_stop(_bts, subscr, conn, msg); + _paging_request_stop(_bts, bsub, conn, msg); /* Make sure to cancel this everywhere else */ - llist_for_each_entry(bts, &subscr->group->net->bts_list, list) { + llist_for_each_entry(bts, bts_list, list) { /* Sort of an optimization. */ if (bts == _bts) continue; - _paging_request_stop(bts, subscr, NULL, NULL); + _paging_request_stop(bts, bsub, NULL, NULL); } } @@ -433,12 +434,12 @@ /** * Find any paging data for the given subscriber at the given BTS. */ -void *paging_get_data(struct gsm_bts *bts, struct gsm_subscriber *subscr) +void *paging_get_data(struct gsm_bts *bts, struct bsc_sub *bsub) { struct gsm_paging_request *req; llist_for_each_entry(req, &bts->paging.pending_requests, entry) - if (req->subscr == subscr) + if (req->bsub == bsub) return req->cbfn_param; return NULL; diff --git a/openbsc/src/libcommon-cs/common_cs.c b/openbsc/src/libcommon-cs/common_cs.c index 3149580..7905802 100644 --- a/openbsc/src/libcommon-cs/common_cs.c +++ b/openbsc/src/libcommon-cs/common_cs.c @@ -70,6 +70,9 @@ INIT_LLIST_HEAD(&net->upqueue); INIT_LLIST_HEAD(&net->subscr_conns); + net->bsc_subscribers = talloc_zero(net, struct llist_head); + INIT_LLIST_HEAD(net->bsc_subscribers); + /* init statistics */ net->msc_ctrs = rate_ctr_group_alloc(net, &msc_ctrg_desc, 0); net->active_calls = osmo_counter_alloc("msc.active_calls"); diff --git a/openbsc/src/libmsc/gsm_subscriber.c b/openbsc/src/libmsc/gsm_subscriber.c index 4ec0ead..f20dfc8 100644 --- a/openbsc/src/libmsc/gsm_subscriber.c +++ b/openbsc/src/libmsc/gsm_subscriber.c @@ -82,8 +82,11 @@ struct gsm_subscriber_connection *conn = data; struct gsm_subscriber *subscr = param; struct paging_signal_data sig_data; + struct bsc_sub *bsub; OSMO_ASSERT(subscr->is_paging); + + /* TODO MSC split */ /* * Stop paging on all other BTS. E.g. if this is @@ -91,7 +94,11 @@ * timeout soon as well. Let's just stop everything * and forget we wanted to page. */ - paging_request_stop(NULL, subscr, NULL, NULL); + bsub = bsc_sub_have_by_imsi(conn->network->bsc_subscribers, subscr->imsi); + bsub->tmsi = subscr->tmsi; + bsub->lac = subscr->lac; + paging_request_stop(&conn->network->bts_list, NULL, bsub, NULL, NULL); + bsc_sub_put(bsub); /* Inform parts of the system we don't know */ sig_data.subscr = subscr; @@ -169,13 +176,19 @@ { int rc; struct subscr_request *request; + struct bsc_sub *bsub; + struct gsm_network *net = subscr->group->net; /* Start paging.. we know it is async so we can do it before */ if (!subscr->is_paging) { LOGP(DMM, LOGL_DEBUG, "Subscriber %s not paged yet.\n", subscr_name(subscr)); - rc = paging_request(subscr->group->net, subscr, channel_type, - subscr_paging_cb, subscr); + bsub = bsc_sub_have_by_imsi(net->bsc_subscribers, subscr->imsi); + bsub->tmsi = subscr->tmsi; + bsub->lac = subscr->lac; + rc = paging_request(net, bsub, channel_type, subscr_paging_cb, + subscr); + bsc_sub_put(bsub); if (rc <= 0) { LOGP(DMM, LOGL_ERROR, "Subscriber %s paging failed: %d\n", subscr_name(subscr), rc); diff --git a/openbsc/src/osmo-bsc/osmo_bsc_bssap.c b/openbsc/src/osmo-bsc/osmo_bsc_bssap.c index f38c97f..a880f51 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_bssap.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_bssap.c @@ -20,9 +20,10 @@ #include #include +#include #include #include -#include +#include #include #include @@ -99,7 +100,7 @@ static int bssmap_handle_paging(struct osmo_msc_data *msc, struct msgb *msg, unsigned int payload_length) { - struct gsm_subscriber *subscr; + struct bsc_sub *subscr; struct tlv_parsed tp; char mi_string[GSM48_MI_SIZE]; uint32_t tmsi = GSM_RESERVED_TMSI; @@ -157,7 +158,8 @@ LOGP(DMSC, LOGL_ERROR, "eMLPP is not handled\n"); } - subscr = subscr_get_or_create(msc->network->subscr_group, mi_string); + subscr = bsc_sub_have_by_imsi(msc->network->bsc_subscribers, + mi_string); if (!subscr) { LOGP(DMSC, LOGL_ERROR, "Failed to allocate a subscriber for %s\n", mi_string); return -1; @@ -167,7 +169,8 @@ subscr->tmsi = tmsi; LOGP(DMSC, LOGL_INFO, "Paging request from MSC IMSI: '%s' TMSI: '0x%x/%u' LAC: 0x%x\n", mi_string, tmsi, tmsi, lac); - bsc_grace_paging_request(subscr, chan_needed, msc); + bsc_grace_paging_request(msc->network->bsc_data->rf_ctrl->policy, + subscr, chan_needed, msc); return 0; } diff --git a/openbsc/src/osmo-bsc/osmo_bsc_filter.c b/openbsc/src/osmo-bsc/osmo_bsc_filter.c index d5ca2fd..64f3fef 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_filter.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_filter.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -54,14 +55,14 @@ } /* extract a subscriber from the paging response */ -static struct gsm_subscriber *extract_sub(struct gsm_subscriber_connection *conn, - struct msgb *msg) +static struct bsc_sub *extract_sub(struct gsm_subscriber_connection *conn, + struct msgb *msg) { uint8_t mi_type; char mi_string[GSM48_MI_SIZE]; struct gsm48_hdr *gh; struct gsm48_pag_resp *resp; - struct gsm_subscriber *subscr; + struct bsc_sub *subscr; if (msgb_l3len(msg) < sizeof(*gh) + sizeof(*resp)) { LOGP(DMSC, LOGL_ERROR, "PagingResponse too small: %u\n", msgb_l3len(msg)); @@ -78,12 +79,12 @@ switch (mi_type) { case GSM_MI_TYPE_TMSI: - subscr = subscr_active_by_tmsi(conn->bts->network->subscr_group, - tmsi_from_string(mi_string)); + subscr = bsc_sub_find_by_tmsi(conn->network->bsc_subscribers, + tmsi_from_string(mi_string)); break; case GSM_MI_TYPE_IMSI: - subscr = subscr_active_by_imsi(conn->bts->network->subscr_group, - mi_string); + subscr = bsc_sub_find_by_imsi(conn->network->bsc_subscribers, + mi_string); break; default: subscr = NULL; @@ -96,15 +97,16 @@ /* we will need to stop the paging request */ static int handle_page_resp(struct gsm_subscriber_connection *conn, struct msgb *msg) { - struct gsm_subscriber *subscr = extract_sub(conn, msg); + struct bsc_sub *subscr = extract_sub(conn, msg); if (!subscr) { LOGP(DMSC, LOGL_ERROR, "Non active subscriber got paged.\n"); return -1; } - paging_request_stop(conn->bts, subscr, conn, msg); - subscr_put(subscr); + paging_request_stop(&conn->network->bts_list, conn->bts, subscr, conn, + msg); + bsc_sub_put(subscr); return 0; } @@ -130,7 +132,7 @@ uint8_t mtype; struct osmo_bsc_data *bsc; struct osmo_msc_data *msc, *pag_msc; - struct gsm_subscriber *subscr; + struct bsc_sub *subscr; int is_emerg = 0; bsc = conn->bts->network->bsc_data; @@ -183,7 +185,7 @@ } pag_msc = paging_get_data(conn->bts, subscr); - subscr_put(subscr); + bsc_sub_put(subscr); llist_for_each_entry(msc, &bsc->mscs, entry) { if (msc != pag_msc) diff --git a/openbsc/src/osmo-bsc/osmo_bsc_grace.c b/openbsc/src/osmo-bsc/osmo_bsc_grace.c index 6409a3a..4699be6 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_grace.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_grace.c @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include @@ -34,8 +34,8 @@ } -static int normal_paging(struct gsm_subscriber *subscr, int chan_needed, - struct osmo_msc_data *msc) +static int normal_paging(struct bsc_sub *subscr, int chan_needed, + struct osmo_msc_data *msc) { /* we can't page by lac.. we need to page everything */ if (msc->core_lac != -1) { @@ -47,12 +47,11 @@ return 0; } - return paging_request(subscr->group->net, subscr, chan_needed, NULL, - msc); + return paging_request(msc->network, subscr, chan_needed, NULL, msc); } -static int locked_paging(struct gsm_subscriber *subscr, int chan_needed, - struct osmo_msc_data *msc) +static int locked_paging(struct bsc_sub *subscr, int chan_needed, + struct osmo_msc_data *msc) { struct gsm_bts *bts = NULL; @@ -84,10 +83,10 @@ /** * Try to not page if everything the cell is not on. */ -int bsc_grace_paging_request(struct gsm_subscriber *subscr, int chan_needed, - struct osmo_msc_data *msc) +int bsc_grace_paging_request(enum signal_rf rf_policy, struct bsc_sub *subscr, + int chan_needed, struct osmo_msc_data *msc) { - if (subscr->group->net->bsc_data->rf_ctrl->policy == S_RF_ON) + if (rf_policy == S_RF_ON) return normal_paging(subscr, chan_needed, msc); return locked_paging(subscr, chan_needed, msc); } diff --git a/openbsc/src/osmo-bsc/osmo_bsc_vty.c b/openbsc/src/osmo-bsc/osmo_bsc_vty.c index 8f0d883..ba4e159 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_vty.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_vty.c @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include diff --git a/openbsc/tests/channel/Makefile.am b/openbsc/tests/channel/Makefile.am index 5e9583f..ca470ac 100644 --- a/openbsc/tests/channel/Makefile.am +++ b/openbsc/tests/channel/Makefile.am @@ -24,8 +24,8 @@ $(NULL) channel_test_LDADD = \ - $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libmsc/libmsc.a \ + $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ diff --git a/openbsc/tests/channel/channel_test.c b/openbsc/tests/channel/channel_test.c index c69c701..0bae94c 100644 --- a/openbsc/tests/channel/channel_test.c +++ b/openbsc/tests/channel/channel_test.c @@ -72,6 +72,7 @@ exit(1); bts = gsm_bts_alloc(network); bts->location_area_code = 23; + s_conn.network = network; /* Create a dummy subscriber */ struct gsm_subscriber *subscr = subscr_alloc(); diff --git a/openbsc/tests/subscr/subscr_test.c b/openbsc/tests/subscr/subscr_test.c index 2a5d0e1..a290a88 100644 --- a/openbsc/tests/subscr/subscr_test.c +++ b/openbsc/tests/subscr/subscr_test.c @@ -19,53 +19,109 @@ */ #include -#include -#include -#include +#include #include +#include #include #include #include #include -static struct gsm_network dummy_net; -static struct gsm_subscriber_group dummy_sgrp; +struct llist_head *bsc_subscribers; + +#define VERBOSE_ASSERT(val, expect_op, fmt) \ + do { \ + printf(#val " == " fmt "\n", (val)); \ + OSMO_ASSERT((val) expect_op); \ + } while (0); + +static void assert_subscr(const struct bsc_sub *bsub, const char *imsi) +{ + struct bsc_sub *sfound; + OSMO_ASSERT(bsub); + OSMO_ASSERT(strcmp(bsub->imsi, imsi) == 0); + + sfound = bsc_sub_find_by_imsi(bsc_subscribers, imsi); + OSMO_ASSERT(sfound == bsub); + + bsc_sub_put(sfound); +} + static void test_subscr(void) { - struct gsm_subscriber *subscr; - const char *imsi = "1234567890"; + struct bsc_sub *s1, *s2, *s3; + const char *imsi1 = "1234567890"; + const char *imsi2 = "9876543210"; + const char *imsi3 = "5656565656"; - printf("Test subscriber allocation and deletion\n"); + printf("Test BSC subscriber allocation and deletion\n"); - /* Don't keep subscr */ + /* Check for emptiness */ + VERBOSE_ASSERT(llist_count(bsc_subscribers), == 0, "%d"); + OSMO_ASSERT(bsc_sub_find_by_imsi(bsc_subscribers, imsi1) == NULL); + OSMO_ASSERT(bsc_sub_find_by_imsi(bsc_subscribers, imsi2) == NULL); + OSMO_ASSERT(bsc_sub_find_by_imsi(bsc_subscribers, imsi3) == NULL); - dummy_sgrp.keep_subscr = 0; + /* Allocate entry 1 */ + s1 = bsc_sub_have_by_imsi(bsc_subscribers, imsi1); + VERBOSE_ASSERT(llist_count(bsc_subscribers), == 1, "%d"); + assert_subscr(s1, imsi1); + VERBOSE_ASSERT(llist_count(bsc_subscribers), == 1, "%d"); + OSMO_ASSERT(bsc_sub_find_by_imsi(bsc_subscribers, imsi2) == NULL); - OSMO_ASSERT(llist_empty(&active_subscribers)); + /* Allocate entry 2 */ + s2 = bsc_sub_have_by_imsi(bsc_subscribers, imsi2); + VERBOSE_ASSERT(llist_count(bsc_subscribers), == 2, "%d"); - subscr = subscr_get_or_create(&dummy_sgrp, imsi); + /* Allocate entry 3 */ + s3 = bsc_sub_have_by_imsi(bsc_subscribers, imsi3); + VERBOSE_ASSERT(llist_count(bsc_subscribers), == 3, "%d"); - OSMO_ASSERT(!llist_empty(&active_subscribers)); - OSMO_ASSERT(subscr->use_count == 1); + /* Check entries */ + assert_subscr(s1, imsi1); + assert_subscr(s2, imsi2); + assert_subscr(s3, imsi3); - subscr_put(subscr); + /* Free entry 1 */ + bsc_sub_put(s1); + s1 = NULL; + VERBOSE_ASSERT(llist_count(bsc_subscribers), == 2, "%d"); + OSMO_ASSERT(bsc_sub_find_by_imsi(bsc_subscribers, imsi1) == NULL); - OSMO_ASSERT(llist_empty(&active_subscribers)); + assert_subscr(s2, imsi2); + assert_subscr(s3, imsi3); + /* Free entry 2 */ + bsc_sub_put(s2); + s2 = NULL; + VERBOSE_ASSERT(llist_count(bsc_subscribers), == 1, "%d"); + OSMO_ASSERT(bsc_sub_find_by_imsi(bsc_subscribers, imsi1) == NULL); + OSMO_ASSERT(bsc_sub_find_by_imsi(bsc_subscribers, imsi2) == NULL); + assert_subscr(s3, imsi3); + + /* Free entry 3 */ + bsc_sub_put(s3); + s3 = NULL; + VERBOSE_ASSERT(llist_count(bsc_subscribers), == 0, "%d"); + OSMO_ASSERT(bsc_sub_find_by_imsi(bsc_subscribers, imsi3) == NULL); + + OSMO_ASSERT(llist_empty(bsc_subscribers)); + +#if 0 /* Keep subscr */ dummy_sgrp.keep_subscr = 1; subscr = subscr_get_or_create(&dummy_sgrp, imsi); - OSMO_ASSERT(!llist_empty(&active_subscribers)); + OSMO_ASSERT(!llist_empty(&bsc_subscribers)); OSMO_ASSERT(subscr->use_count == 1); subscr_put(subscr); - OSMO_ASSERT(!llist_empty(&active_subscribers)); + OSMO_ASSERT(!llist_empty(&bsc_subscribers)); OSMO_ASSERT(subscr->use_count == 0); subscr_get(subscr); @@ -73,16 +129,16 @@ subscr_purge_inactive(&dummy_sgrp); - OSMO_ASSERT(!llist_empty(&active_subscribers)); + OSMO_ASSERT(!llist_empty(&bsc_subscribers)); OSMO_ASSERT(subscr->use_count == 1); subscr_put(subscr); - OSMO_ASSERT(!llist_empty(&active_subscribers)); + OSMO_ASSERT(!llist_empty(&bsc_subscribers)); OSMO_ASSERT(subscr->use_count == 0); subscr_purge_inactive(&dummy_sgrp); - OSMO_ASSERT(llist_empty(&active_subscribers)); + OSMO_ASSERT(llist_empty(&bsc_subscribers)); /* Test force_no_keep */ @@ -92,13 +148,14 @@ OSMO_ASSERT(subscr); subscr->keep_in_ram = 1; - OSMO_ASSERT(!llist_empty(&active_subscribers)); + OSMO_ASSERT(!llist_empty(&bsc_subscribers)); OSMO_ASSERT(subscr->use_count == 1); subscr->keep_in_ram = 0; subscr_put(subscr); - OSMO_ASSERT(llist_empty(&active_subscribers)); + OSMO_ASSERT(llist_empty(&bsc_subscribers)); +#endif } int main() @@ -106,9 +163,12 @@ printf("Testing subscriber core code.\n"); osmo_init_logging(&log_info); log_set_print_filename(osmo_stderr_target, 0); + log_set_print_timestamp(osmo_stderr_target, 0); + log_set_use_color(osmo_stderr_target, 0); + log_set_print_category(osmo_stderr_target, 1); - dummy_net.subscr_group = &dummy_sgrp; - dummy_sgrp.net = &dummy_net; + bsc_subscribers = talloc_zero(NULL, struct llist_head); + INIT_LLIST_HEAD(bsc_subscribers); test_subscr(); diff --git a/openbsc/tests/subscr/subscr_test.ok b/openbsc/tests/subscr/subscr_test.ok index 72a3769..13e8dfa 100644 --- a/openbsc/tests/subscr/subscr_test.ok +++ b/openbsc/tests/subscr/subscr_test.ok @@ -1,3 +1,11 @@ Testing subscriber core code. -Test subscriber allocation and deletion +Test BSC subscriber allocation and deletion +llist_count(bsc_subscribers) == 0 +llist_count(bsc_subscribers) == 1 +llist_count(bsc_subscribers) == 1 +llist_count(bsc_subscribers) == 2 +llist_count(bsc_subscribers) == 3 +llist_count(bsc_subscribers) == 2 +llist_count(bsc_subscribers) == 1 +llist_count(bsc_subscribers) == 0 Done -- To view, visit https://gerrit.osmocom.org/1682 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia61cc00e8bb186b976939a4fc8f7cf9ce6aa3d8e Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Jan 26 01:18:55 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 26 Jan 2017 01:18:55 +0000 Subject: [PATCH] openbsc[master]: log: disable imsi filter Message-ID: Review at https://gerrit.osmocom.org/1685 log: disable imsi filter gsm_subscriber will soon be split in separate BSC, GPRS and VLR structs, and making the IMSI filter work with these changes is currently not worth the effort. The IMSI filter doesn't work well and new libvlr will allow specific subscribers' FSMs to be put in debug mode. We may want to re-add something similar later on, but for now just drop it. Change-Id: Ifecc3c55ae7c050ee53553d6f85d9afbede66ee3 --- M openbsc/include/openbsc/debug.h M openbsc/src/libcommon/debug.c M openbsc/src/libmsc/vty_interface_layer3.c M openbsc/src/osmo-bsc/osmo_bsc_vty.c 4 files changed, 8 insertions(+), 55 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/85/1685/1 diff --git a/openbsc/include/openbsc/debug.h b/openbsc/include/openbsc/debug.h index ca3d4ad..b46a41f 100644 --- a/openbsc/include/openbsc/debug.h +++ b/openbsc/include/openbsc/debug.h @@ -61,7 +61,6 @@ struct bssgp_bvc_ctx; struct gsm_subscriber; -void log_set_imsi_filter(struct log_target *target, struct gsm_subscriber *subscr); void log_set_nsvc_filter(struct log_target *target, struct gprs_nsvc *nsvc); void log_set_bvc_filter(struct log_target *target, diff --git a/openbsc/src/libcommon/debug.c b/openbsc/src/libcommon/debug.c index cf5beeb..ff4a1ce 100644 --- a/openbsc/src/libcommon/debug.c +++ b/openbsc/src/libcommon/debug.c @@ -187,13 +187,8 @@ static int filter_fn(const struct log_context *ctx, struct log_target *tar) { - struct gsm_subscriber *subscr = ctx->ctx[BSC_CTX_SUBSCR]; const struct gprs_nsvc *nsvc = ctx->ctx[GPRS_CTX_NSVC]; const struct gprs_nsvc *bvc = ctx->ctx[GPRS_CTX_BVC]; - - if ((tar->filter_map & (1 << FLT_IMSI)) != 0 - && subscr && subscr == tar->filter_data[FLT_IMSI]) - return 1; /* Filter on the NS Virtual Connection */ if ((tar->filter_map & (1 << FLT_NSVC)) != 0 @@ -213,19 +208,3 @@ .cat = default_categories, .num_cat = ARRAY_SIZE(default_categories), }; - -void log_set_imsi_filter(struct log_target *target, struct gsm_subscriber *subscr) -{ - /* free the old data */ - if (target->filter_data[FLT_IMSI]) { - subscr_put(target->filter_data[FLT_IMSI]); - target->filter_data[FLT_IMSI] = NULL; - } - - if (subscr) { - target->filter_map |= (1 << FLT_IMSI); - target->filter_data[FLT_IMSI] = subscr_get(subscr); - } else { - target->filter_map &= ~(1 << FLT_IMSI); - } -} diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index 11d9022..1ae52b9 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -1032,24 +1032,11 @@ logging_fltr_imsi_cmd, "logging filter imsi IMSI", LOGGING_STR FILTER_STR - "Filter log messages by IMSI\n" "IMSI to be used as filter\n") + "DEPRECATED (Filter log messages by IMSI)\n" "IMSI to be used as filter\n") { - struct gsm_subscriber *subscr; - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - struct log_target *tgt = osmo_log_vty2tgt(vty); - - if (!tgt) - return CMD_WARNING; - - subscr = subscr_get_by_imsi(gsmnet->subscr_group, argv[0]); - if (!subscr) { - vty_out(vty, "%%no subscriber with IMSI(%s)%s", - argv[0], VTY_NEWLINE); - return CMD_WARNING; - } - - log_set_imsi_filter(tgt, subscr); - return CMD_SUCCESS; + vty_out(vty, "%% 'logging filter imsi' is no longer supported.%s", + VTY_NEWLINE); + return CMD_WARNING; } static struct cmd_node nitb_node = { diff --git a/openbsc/src/osmo-bsc/osmo_bsc_vty.c b/openbsc/src/osmo-bsc/osmo_bsc_vty.c index 86ccec4..8f0d883 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_vty.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_vty.c @@ -859,23 +859,11 @@ logging_fltr_imsi_cmd, "logging filter imsi IMSI", LOGGING_STR FILTER_STR - "Filter log messages by IMSI\n" "IMSI to be used as filter\n") + "DEPRECATED (Filter log messages by IMSI)\n" "IMSI to be used as filter\n") { - struct gsm_subscriber *subscr; - struct log_target *tgt = osmo_log_vty2tgt(vty); - - if (!tgt) - return CMD_WARNING; - - subscr = subscr_get_or_create(bsc_gsmnet->subscr_group, argv[0]); - if (!subscr) { - vty_out(vty, "%%no subscriber with IMSI(%s)%s", - argv[0], VTY_NEWLINE); - return CMD_WARNING; - } - - log_set_imsi_filter(tgt, subscr); - return CMD_SUCCESS; + vty_out(vty, "%% 'logging filter imsi' is no longer supported.%s", + VTY_NEWLINE); + return CMD_WARNING; } int bsc_vty_init_extra(void) -- To view, visit https://gerrit.osmocom.org/1685 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifecc3c55ae7c050ee53553d6f85d9afbede66ee3 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Jan 26 01:50:23 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 26 Jan 2017 01:50:23 +0000 Subject: openbsc[master]: Introduce subscriber_connection ref-counting In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-2 temporarily mark so that we don't merge this series of patches until https://osmocom.org/issues/1927 (BTS tests with these patches) is done. -- To view, visit https://gerrit.osmocom.org/1681 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8c05e6c81f246ff8b5bf91312f80410b1a85f15e Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 26 02:20:26 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 26 Jan 2017 02:20:26 +0000 Subject: [MERGED] openbsc[master]: various comment / whitespace tweaks (libmsc, gprs, libcommon... In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: various comment / whitespace tweaks (libmsc, gprs, libcommon-cs) ...................................................................... various comment / whitespace tweaks (libmsc, gprs, libcommon-cs) cosmetic ws in common_cs_vty.c, osmo_msc.c comment: tiny typo fix in gsm_04_08.c In comments, drop some unbalanced braces, because simplistic C file harvesters will break at a single opening brace even if it is in a comment. This is aimed at the fsm-to-dot.py script in libosmocore/contrib. Change-Id: I3c1fa53195a1e57d6fe0a6791c346d30ceff1251 --- M openbsc/src/gprs/gprs_sndcp.c M openbsc/src/gprs/gtphub.c M openbsc/src/libcommon-cs/common_cs_vty.c M openbsc/src/libmsc/gsm_04_08.c M openbsc/src/libmsc/osmo_msc.c 5 files changed, 5 insertions(+), 4 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved diff --git a/openbsc/src/gprs/gprs_sndcp.c b/openbsc/src/gprs/gprs_sndcp.c index 60455b5..a18998f 100644 --- a/openbsc/src/gprs/gprs_sndcp.c +++ b/openbsc/src/gprs/gprs_sndcp.c @@ -911,6 +911,7 @@ case LL_DATA_CONF: case LL_UNITDATA_IND: case LL_STATUS_IND: + } } #endif diff --git a/openbsc/src/gprs/gtphub.c b/openbsc/src/gprs/gtphub.c index 83e17db..a1aaed2 100644 --- a/openbsc/src/gprs/gtphub.c +++ b/openbsc/src/gprs/gtphub.c @@ -553,7 +553,7 @@ } #if 1 - /* TODO if () { ... + /* TODO if () (waiting for a commit from jerlbeck) */ int i; diff --git a/openbsc/src/libcommon-cs/common_cs_vty.c b/openbsc/src/libcommon-cs/common_cs_vty.c index 7f8b495..08a7581 100644 --- a/openbsc/src/libcommon-cs/common_cs_vty.c +++ b/openbsc/src/libcommon-cs/common_cs_vty.c @@ -163,7 +163,7 @@ { struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->a5_encryption= atoi(argv[0]); + gsmnet->a5_encryption = atoi(argv[0]); return CMD_SUCCESS; } diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index 742f803..1e25754 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -3759,7 +3759,7 @@ } /* - * This will be ran by the linker when loading the DSO. We use it to + * This will be run by the linker when loading the DSO. We use it to * do system initialization, e.g. registration of signal handlers. */ static __attribute__((constructor)) void on_dso_load_0408(void) diff --git a/openbsc/src/libmsc/osmo_msc.c b/openbsc/src/libmsc/osmo_msc.c index 12a5117..2389980 100644 --- a/openbsc/src/libmsc/osmo_msc.c +++ b/openbsc/src/libmsc/osmo_msc.c @@ -131,7 +131,7 @@ static struct bsc_api msc_handler = { .sapi_n_reject = msc_sapi_n_reject, .compl_l3 = msc_compl_l3, - .dtap = msc_dtap, + .dtap = msc_dtap, .clear_request = msc_clear_request, .assign_compl = msc_assign_compl, .assign_fail = msc_assign_fail, -- To view, visit https://gerrit.osmocom.org/1677 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3c1fa53195a1e57d6fe0a6791c346d30ceff1251 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Jan 26 02:45:02 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 26 Jan 2017 02:45:02 +0000 Subject: [PATCH] openbsc[master]: add struct gprs_sub, separating gprs from gsm_subscriber In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1684 to look at the new patch set (#3). add struct gprs_sub, separating gprs from gsm_subscriber Prepare for replacing gsm_subscriber with vlr_subscriber. vlr_subscriber will not make sense to be used in gprs, so have a dedicated GPRS subscriber struct. (Could change if the gprs code were to use libvlr; is currently independent). Change-Id: Ia8b391ee009c8545763cba04505be3947835120e Related: #1592 --- M openbsc/include/openbsc/gprs_sgsn.h A openbsc/include/openbsc/gprs_subscriber.h M openbsc/include/openbsc/gsm_data.h M openbsc/include/openbsc/gsm_subscriber.h M openbsc/src/gprs/gprs_gmm.c M openbsc/src/gprs/gprs_sgsn.c M openbsc/src/gprs/gprs_subscriber.c M openbsc/src/gprs/sgsn_auth.c M openbsc/src/gprs/sgsn_libgtp.c M openbsc/src/gprs/sgsn_vty.c M openbsc/tests/sgsn/sgsn_test.c M openbsc/tests/sgsn/sgsn_test.ok 12 files changed, 263 insertions(+), 150 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/84/1684/3 diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h index 24e286c..bf0fd6b 100644 --- a/openbsc/include/openbsc/gprs_sgsn.h +++ b/openbsc/include/openbsc/gprs_sgsn.h @@ -18,7 +18,7 @@ struct gprs_llc_lle; struct ctrl_handle; -struct gsm_subscriber; +struct gprs_sub; enum gsm48_gsm_cause; @@ -225,7 +225,7 @@ /* the current GGSN look-up operation */ struct sgsn_ggsn_lookup *ggsn_lookup; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; }; #define LOGMMCTXP(level, mm, fmt, args...) \ @@ -438,6 +438,7 @@ /* * GPRS subscriber data */ +#define GPRS_SUBSCRIBER_FIRST_CONTACT 0x00000001 #define GPRS_SUBSCRIBER_UPDATE_AUTH_INFO_PENDING (1 << 16) #define GPRS_SUBSCRIBER_UPDATE_LOCATION_PENDING (1 << 17) #define GPRS_SUBSCRIBER_CANCELLED (1 << 18) @@ -451,13 +452,13 @@ int gprs_subscr_init(struct sgsn_instance *sgi); int gprs_subscr_request_update_location(struct sgsn_mm_ctx *mmctx); int gprs_subscr_request_auth_info(struct sgsn_mm_ctx *mmctx); -void gprs_subscr_cleanup(struct gsm_subscriber *subscr); -struct gsm_subscriber *gprs_subscr_get_or_create(const char *imsi); -struct gsm_subscriber *gprs_subscr_get_or_create_by_mmctx( struct sgsn_mm_ctx *mmctx); -struct gsm_subscriber *gprs_subscr_get_by_imsi(const char *imsi); -void gprs_subscr_cancel(struct gsm_subscriber *subscr); -void gprs_subscr_update(struct gsm_subscriber *subscr); -void gprs_subscr_update_auth_info(struct gsm_subscriber *subscr); +void gprs_subscr_cleanup(struct gprs_sub *subscr); +struct gprs_sub *gprs_subscr_get_or_create(const char *imsi); +struct gprs_sub *gprs_subscr_get_or_create_by_mmctx( struct sgsn_mm_ctx *mmctx); +struct gprs_sub *gprs_subscr_get_by_imsi(const char *imsi); +void gprs_subscr_cancel(struct gprs_sub *subscr); +void gprs_subscr_update(struct gprs_sub *subscr); +void gprs_subscr_update_auth_info(struct gprs_sub *subscr); int gprs_subscr_rx_gsup_message(struct msgb *msg); /* Called on subscriber data updates */ diff --git a/openbsc/include/openbsc/gprs_subscriber.h b/openbsc/include/openbsc/gprs_subscriber.h new file mode 100644 index 0000000..668402a --- /dev/null +++ b/openbsc/include/openbsc/gprs_subscriber.h @@ -0,0 +1,29 @@ +/* GPRS subscriber details for use in SGSN land */ +#pragma once + +#include + +#include +#include + +extern struct llist_head * const gprs_subscribers; + +struct gprs_sub { + struct llist_head entry; + int use_count; + + char imsi[GSM23003_IMSI_MAX_DIGITS+1]; + uint32_t tmsi; + char imei[GSM23003_IMEISV_NUM_DIGITS+1]; + bool authorized; + bool keep_in_ram; + uint32_t flags; + uint16_t lac; + + struct sgsn_subscriber_data *sgsn_data; +}; + +struct gprs_sub *_gprs_sub_get(struct gprs_sub *gsub, const char *file, int line); +struct gprs_sub *_gprs_sub_put(struct gprs_sub *gsub, const char *file, int line); +#define gprs_sub_get(gsub) _gprs_sub_get(gsub, __BASE_FILE__, __LINE__) +#define gprs_sub_put(gsub) _gprs_sub_put(gsub, __BASE_FILE__, __LINE__) diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index 9cb46a4..8e9fa03 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -27,6 +27,8 @@ #define OBSC_LINKID_CB(__msgb) (__msgb)->cb[3] +#define tmsi_from_string(str) strtoul(str, NULL, 10) + enum gsm_security_event { GSM_SECURITY_NOAVAIL, GSM_SECURITY_AUTH_FAILED, diff --git a/openbsc/include/openbsc/gsm_subscriber.h b/openbsc/include/openbsc/gsm_subscriber.h index 314d619..7e65614 100644 --- a/openbsc/include/openbsc/gsm_subscriber.h +++ b/openbsc/include/openbsc/gsm_subscriber.h @@ -16,7 +16,6 @@ #define GSM_SUBSCRIBER_FIRST_CONTACT 0x00000001 /* gprs_sgsn.h defines additional flags including and above bit 16 (0x10000) */ -#define tmsi_from_string(str) strtoul(str, NULL, 10) #define GSM_SUBSCRIBER_NO_EXPIRATION 0x0 diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c index 6471f22..32d6587 100644 --- a/openbsc/src/gprs/gprs_gmm.c +++ b/openbsc/src/gprs/gprs_gmm.c @@ -64,6 +64,7 @@ #include #include #include +#include #include #include #include diff --git a/openbsc/src/gprs/gprs_sgsn.c b/openbsc/src/gprs/gprs_sgsn.c index e85e1a9..4ef33dd 100644 --- a/openbsc/src/gprs/gprs_sgsn.c +++ b/openbsc/src/gprs/gprs_sgsn.c @@ -31,7 +31,7 @@ #include #include -#include +#include #include #include #include @@ -320,9 +320,9 @@ /* Detach from subscriber which is possibly freed then */ if (mm->subscr) { - struct gsm_subscriber *subscr = subscr_get(mm->subscr); + struct gprs_sub *subscr = gprs_sub_get(mm->subscr); gprs_subscr_cleanup(subscr); - subscr_put(subscr); + gprs_sub_put(subscr); } sgsn_mm_ctx_free(mm); diff --git a/openbsc/src/gprs/gprs_subscriber.c b/openbsc/src/gprs/gprs_subscriber.c index d3e2ea7..865e092 100644 --- a/openbsc/src/gprs/gprs_subscriber.c +++ b/openbsc/src/gprs/gprs_subscriber.c @@ -23,7 +23,8 @@ #include #include #include -#include +#include +#include #include #include @@ -35,6 +36,7 @@ #include #include +#include #define SGSN_SUBSCR_MAX_RETRIES 3 #define SGSN_SUBSCR_RETRY_INTERVAL 10 @@ -45,6 +47,9 @@ ## args) extern void *tall_bsc_ctx; + +LLIST_HEAD(_gprs_subscribers); +struct llist_head * const gprs_subscribers = &_gprs_subscribers; static int gsup_read_cb(struct gsup_client *gsupc, struct msgb *msg); @@ -86,7 +91,7 @@ return rc; } -int gprs_subscr_purge(struct gsm_subscriber *subscr); +int gprs_subscr_purge(struct gprs_sub *subscr); static struct sgsn_subscriber_data *sgsn_subscriber_data_alloc(void *ctx) { @@ -117,28 +122,53 @@ return pdata; } -struct gsm_subscriber *gprs_subscr_get_or_create(const char *imsi) +struct gprs_sub *gprs_subscr_get_by_imsi(const char *imsi) { - struct gsm_subscriber *subscr; + struct gprs_sub *gsub; - subscr = subscr_get_or_create(NULL, imsi); - if (!subscr) + if (!imsi || !*imsi) return NULL; - if (!subscr->sgsn_data) - subscr->sgsn_data = sgsn_subscriber_data_alloc(subscr); - return subscr; + llist_for_each_entry(gsub, gprs_subscribers, entry) { + if (!strcmp(gsub->imsi, imsi)) + return gprs_sub_get(gsub); + } + return NULL; } -struct gsm_subscriber *gprs_subscr_get_by_imsi(const char *imsi) +static struct gprs_sub *gprs_subscr_alloc(void) { - return subscr_active_by_imsi(NULL, imsi); + struct gprs_sub *gsub; + gsub = talloc_zero(tall_bsc_ctx, struct gprs_sub); + if (!gsub) + return NULL; + llist_add_tail(&gsub->entry, gprs_subscribers); + gsub->use_count = 1; + gsub->tmsi = GSM_RESERVED_TMSI; + return gsub; } -void gprs_subscr_cleanup(struct gsm_subscriber *subscr) +struct gprs_sub *gprs_subscr_get_or_create(const char *imsi) +{ + struct gprs_sub *gsub; + + gsub = gprs_subscr_get_by_imsi(imsi); + if (!gsub) { + gsub = gprs_subscr_alloc(); + if (!gsub) + return NULL; + strncpy(gsub->imsi, imsi, sizeof(gsub->imsi)); + } + + if (!gsub->sgsn_data) + gsub->sgsn_data = sgsn_subscriber_data_alloc(gsub); + return gsub; +} + +void gprs_subscr_cleanup(struct gprs_sub *subscr) { if (subscr->sgsn_data->mm) { - subscr_put(subscr->sgsn_data->mm->subscr); + gprs_sub_put(subscr->sgsn_data->mm->subscr); subscr->sgsn_data->mm->subscr = NULL; subscr->sgsn_data->mm = NULL; } @@ -149,7 +179,7 @@ } } -void gprs_subscr_cancel(struct gsm_subscriber *subscr) +void gprs_subscr_cancel(struct gprs_sub *subscr) { subscr->authorized = 0; subscr->flags |= GPRS_SUBSCRIBER_CANCELLED; @@ -159,7 +189,7 @@ gprs_subscr_cleanup(subscr); } -static int gprs_subscr_tx_gsup_message(struct gsm_subscriber *subscr, +static int gprs_subscr_tx_gsup_message(struct gprs_sub *subscr, struct osmo_gsup_message *gsup_msg) { struct msgb *msg = gsup_client_msgb_alloc(); @@ -181,7 +211,7 @@ return gsup_client_send(sgsn->gsup_client, msg); } -static int gprs_subscr_tx_gsup_error_reply(struct gsm_subscriber *subscr, +static int gprs_subscr_tx_gsup_error_reply(struct gprs_sub *subscr, struct osmo_gsup_message *gsup_orig, enum gsm48_gmm_cause cause) { @@ -196,7 +226,7 @@ return gprs_subscr_tx_gsup_message(subscr, &gsup_reply); } -static int gprs_subscr_handle_gsup_auth_res(struct gsm_subscriber *subscr, +static int gprs_subscr_handle_gsup_auth_res(struct gprs_sub *subscr, struct osmo_gsup_message *gsup_msg) { unsigned idx; @@ -235,7 +265,7 @@ return 0; } -static int gprs_subscr_pdp_data_clear(struct gsm_subscriber *subscr) +static int gprs_subscr_pdp_data_clear(struct gprs_sub *subscr) { struct sgsn_subscriber_pdp_data *pdp, *pdp2; int count = 0; @@ -250,7 +280,7 @@ } static struct sgsn_subscriber_pdp_data *gprs_subscr_pdp_data_get_by_id( - struct gsm_subscriber *subscr, unsigned context_id) + struct gprs_sub *subscr, unsigned context_id) { struct sgsn_subscriber_pdp_data *pdp; @@ -263,7 +293,7 @@ } -static void gprs_subscr_gsup_insert_data(struct gsm_subscriber *subscr, +static void gprs_subscr_gsup_insert_data(struct gprs_sub *subscr, struct osmo_gsup_message *gsup_msg) { struct sgsn_subscriber_data *sdata = subscr->sgsn_data; @@ -340,7 +370,7 @@ } } -static int gprs_subscr_handle_gsup_upd_loc_res(struct gsm_subscriber *subscr, +static int gprs_subscr_handle_gsup_upd_loc_res(struct gprs_sub *subscr, struct osmo_gsup_message *gsup_msg) { /* contrary to MAP, we allow piggy-backing subscriber data onto @@ -357,7 +387,7 @@ return 0; } -static int gprs_subscr_handle_gsup_isd_req(struct gsm_subscriber *subscr, +static int gprs_subscr_handle_gsup_isd_req(struct gprs_sub *subscr, struct osmo_gsup_message *gsup_msg) { struct osmo_gsup_message gsup_reply = {0}; @@ -389,7 +419,7 @@ } } -static int gprs_subscr_handle_gsup_auth_err(struct gsm_subscriber *subscr, +static int gprs_subscr_handle_gsup_auth_err(struct gprs_sub *subscr, struct osmo_gsup_message *gsup_msg) { unsigned idx; @@ -442,7 +472,7 @@ return -gsup_msg->cause; } -static int gprs_subscr_handle_gsup_upd_loc_err(struct gsm_subscriber *subscr, +static int gprs_subscr_handle_gsup_upd_loc_err(struct gprs_sub *subscr, struct osmo_gsup_message *gsup_msg) { int cause_err; @@ -503,7 +533,7 @@ return 0; } -static int gprs_subscr_handle_gsup_purge_res(struct gsm_subscriber *subscr, +static int gprs_subscr_handle_gsup_purge_res(struct gprs_sub *subscr, struct osmo_gsup_message *gsup_msg) { LOGGSUBSCRP(LOGL_INFO, subscr, "Completing purge MS\n"); @@ -515,7 +545,7 @@ return 0; } -static int gprs_subscr_handle_gsup_purge_err(struct gsm_subscriber *subscr, +static int gprs_subscr_handle_gsup_purge_err(struct gprs_sub *subscr, struct osmo_gsup_message *gsup_msg) { LOGGSUBSCRP(LOGL_NOTICE, subscr, @@ -548,7 +578,7 @@ return -gsup_msg->cause; } -static int gprs_subscr_handle_loc_cancel_req(struct gsm_subscriber *subscr, +static int gprs_subscr_handle_loc_cancel_req(struct gprs_sub *subscr, struct osmo_gsup_message *gsup_msg) { struct osmo_gsup_message gsup_reply = {0}; @@ -609,7 +639,7 @@ int rc = 0; struct osmo_gsup_message gsup_msg = {0}; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; rc = osmo_gsup_decode(data, data_len, &gsup_msg); if (rc < 0) { @@ -699,12 +729,12 @@ break; }; - subscr_put(subscr); + gprs_sub_put(subscr); return rc; } -int gprs_subscr_purge(struct gsm_subscriber *subscr) +int gprs_subscr_purge(struct gprs_sub *subscr) { struct sgsn_subscriber_data *sdata = subscr->sgsn_data; struct osmo_gsup_message gsup_msg = {0}; @@ -720,7 +750,7 @@ return gprs_subscr_tx_gsup_message(subscr, &gsup_msg); } -int gprs_subscr_query_auth_info(struct gsm_subscriber *subscr) +int gprs_subscr_query_auth_info(struct gprs_sub *subscr) { struct osmo_gsup_message gsup_msg = {0}; @@ -731,7 +761,7 @@ return gprs_subscr_tx_gsup_message(subscr, &gsup_msg); } -int gprs_subscr_location_update(struct gsm_subscriber *subscr) +int gprs_subscr_location_update(struct gprs_sub *subscr) { struct osmo_gsup_message gsup_msg = {0}; @@ -742,60 +772,59 @@ return gprs_subscr_tx_gsup_message(subscr, &gsup_msg); } -void gprs_subscr_update(struct gsm_subscriber *subscr) +void gprs_subscr_update(struct gprs_sub *subscr) { LOGGSUBSCRP(LOGL_DEBUG, subscr, "Updating subscriber data\n"); subscr->flags &= ~GPRS_SUBSCRIBER_UPDATE_LOCATION_PENDING; - subscr->flags &= ~GSM_SUBSCRIBER_FIRST_CONTACT; + subscr->flags &= ~GPRS_SUBSCRIBER_FIRST_CONTACT; if (subscr->sgsn_data->mm) sgsn_update_subscriber_data(subscr->sgsn_data->mm); } -void gprs_subscr_update_auth_info(struct gsm_subscriber *subscr) +void gprs_subscr_update_auth_info(struct gprs_sub *subscr) { LOGGSUBSCRP(LOGL_DEBUG, subscr, "Updating subscriber authentication info\n"); subscr->flags &= ~GPRS_SUBSCRIBER_UPDATE_AUTH_INFO_PENDING; - subscr->flags &= ~GSM_SUBSCRIBER_FIRST_CONTACT; + subscr->flags &= ~GPRS_SUBSCRIBER_FIRST_CONTACT; if (subscr->sgsn_data->mm) sgsn_update_subscriber_data(subscr->sgsn_data->mm); } -struct gsm_subscriber *gprs_subscr_get_or_create_by_mmctx(struct sgsn_mm_ctx *mmctx) +struct gprs_sub *gprs_subscr_get_or_create_by_mmctx(struct sgsn_mm_ctx *mmctx) { - struct gsm_subscriber *subscr = NULL; + struct gprs_sub *subscr = NULL; if (mmctx->subscr) - return subscr_get(mmctx->subscr); + return gprs_sub_get(mmctx->subscr); if (mmctx->imsi[0]) subscr = gprs_subscr_get_by_imsi(mmctx->imsi); if (!subscr) { subscr = gprs_subscr_get_or_create(mmctx->imsi); - subscr->flags |= GSM_SUBSCRIBER_FIRST_CONTACT; + subscr->flags |= GPRS_SUBSCRIBER_FIRST_CONTACT; subscr->flags &= ~GPRS_SUBSCRIBER_ENABLE_PURGE; } - osmo_strlcpy(subscr->equipment.imei, mmctx->imei, - sizeof(subscr->equipment.imei)); + osmo_strlcpy(subscr->imei, mmctx->imei, sizeof(subscr->imei)); if (subscr->lac != mmctx->ra.lac) subscr->lac = mmctx->ra.lac; subscr->sgsn_data->mm = mmctx; - mmctx->subscr = subscr_get(subscr); + mmctx->subscr = gprs_sub_get(subscr); return subscr; } int gprs_subscr_request_update_location(struct sgsn_mm_ctx *mmctx) { - struct gsm_subscriber *subscr = NULL; + struct gprs_sub *subscr = NULL; int rc; LOGMMCTXP(LOGL_DEBUG, mmctx, "Requesting subscriber data update\n"); @@ -805,13 +834,13 @@ subscr->flags |= GPRS_SUBSCRIBER_UPDATE_LOCATION_PENDING; rc = gprs_subscr_location_update(subscr); - subscr_put(subscr); + gprs_sub_put(subscr); return rc; } int gprs_subscr_request_auth_info(struct sgsn_mm_ctx *mmctx) { - struct gsm_subscriber *subscr = NULL; + struct gprs_sub *subscr = NULL; int rc; LOGMMCTXP(LOGL_DEBUG, mmctx, "Requesting subscriber authentication info\n"); @@ -821,6 +850,38 @@ subscr->flags |= GPRS_SUBSCRIBER_UPDATE_AUTH_INFO_PENDING; rc = gprs_subscr_query_auth_info(subscr); - subscr_put(subscr); + gprs_sub_put(subscr); return rc; } + +static void gprs_sub_free(struct gprs_sub *gsub) +{ + llist_del(&gsub->entry); + talloc_free(gsub); +} + +struct gprs_sub *_gprs_sub_get(struct gprs_sub *gsub, const char *file, int line) +{ + OSMO_ASSERT(gsub->use_count < INT_MAX); + gsub->use_count++; + LOGPSRC(DREF, LOGL_DEBUG, file, line, + "subscr %s usage increases to: %d\n", + gsub->imsi, gsub->use_count); + return gsub; +} + +struct gprs_sub *_gprs_sub_put(struct gprs_sub *gsub, const char *file, int line) +{ + gsub->use_count--; + LOGPSRC(DREF, gsub->use_count >= 0? LOGL_DEBUG : LOGL_ERROR, + file, line, + "subscr %s usage decreases to: %d%s\n", + gsub->imsi, gsub->use_count, + gsub->keep_in_ram? ", keep-in-ram flag is set" : ""); + if (gsub->use_count > 0) + return gsub; + if (gsub->keep_in_ram) + return gsub; + gprs_sub_free(gsub); + return NULL; +} diff --git a/openbsc/src/gprs/sgsn_auth.c b/openbsc/src/gprs/sgsn_auth.c index 1fa7fc4..8a11e95 100644 --- a/openbsc/src/gprs/sgsn_auth.c +++ b/openbsc/src/gprs/sgsn_auth.c @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include const struct value_string auth_state_names[] = { @@ -151,7 +151,7 @@ */ int sgsn_auth_request(struct sgsn_mm_ctx *mmctx) { - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; struct gsm_auth_tuple *at; int need_update_location; int rc; @@ -169,7 +169,7 @@ /* This has the side effect of registering the subscr with the mmctx */ subscr = gprs_subscr_get_or_create_by_mmctx(mmctx); - subscr_put(subscr); + gprs_sub_put(subscr); OSMO_ASSERT(mmctx->subscr != NULL); @@ -207,7 +207,7 @@ void sgsn_auth_update(struct sgsn_mm_ctx *mmctx) { enum sgsn_auth_state auth_state; - struct gsm_subscriber *subscr = mmctx->subscr; + struct gprs_sub *subscr = mmctx->subscr; struct gsm_auth_tuple *at; int gmm_cause; diff --git a/openbsc/src/gprs/sgsn_libgtp.c b/openbsc/src/gprs/sgsn_libgtp.c index 072b9ba..d408615 100644 --- a/openbsc/src/gprs/sgsn_libgtp.c +++ b/openbsc/src/gprs/sgsn_libgtp.c @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include #ifdef BUILD_IU diff --git a/openbsc/src/gprs/sgsn_vty.c b/openbsc/src/gprs/sgsn_vty.c index 21c865b..4875d15 100644 --- a/openbsc/src/gprs/sgsn_vty.c +++ b/openbsc/src/gprs/sgsn_vty.c @@ -638,40 +638,37 @@ } /* Subscriber */ -#include +#include -static void subscr_dump_full_vty(struct vty *vty, struct gsm_subscriber *subscr, int pending) +static void subscr_dump_full_vty(struct vty *vty, struct gprs_sub *gsub, int pending) { +#if 0 char expire_time[200]; +#endif struct gsm_auth_tuple *at; int at_idx; struct sgsn_subscriber_pdp_data *pdp; - vty_out(vty, " ID: %llu, Authorized: %d%s", subscr->id, - subscr->authorized, VTY_NEWLINE); - if (strlen(subscr->name)) - vty_out(vty, " Name: '%s'%s", subscr->name, VTY_NEWLINE); - if (strlen(subscr->extension)) - vty_out(vty, " Extension: %s%s", subscr->extension, - VTY_NEWLINE); + vty_out(vty, " Authorized: %d%s", + gsub->authorized, VTY_NEWLINE); vty_out(vty, " LAC: %d/0x%x%s", - subscr->lac, subscr->lac, VTY_NEWLINE); - vty_out(vty, " IMSI: %s%s", subscr->imsi, VTY_NEWLINE); - if (subscr->tmsi != GSM_RESERVED_TMSI) - vty_out(vty, " TMSI: %08X%s", subscr->tmsi, + gsub->lac, gsub->lac, VTY_NEWLINE); + vty_out(vty, " IMSI: %s%s", gsub->imsi, VTY_NEWLINE); + if (gsub->tmsi != GSM_RESERVED_TMSI) + vty_out(vty, " TMSI: %08X%s", gsub->tmsi, VTY_NEWLINE); - if (subscr->sgsn_data->msisdn_len > 0) + if (gsub->sgsn_data->msisdn_len > 0) vty_out(vty, " MSISDN (BCD): %s%s", - osmo_hexdump(subscr->sgsn_data->msisdn, - subscr->sgsn_data->msisdn_len), + osmo_hexdump(gsub->sgsn_data->msisdn, + gsub->sgsn_data->msisdn_len), VTY_NEWLINE); - if (strlen(subscr->equipment.imei) > 0) - vty_out(vty, " IMEI: %s%s", subscr->equipment.imei, VTY_NEWLINE); + if (strlen(gsub->imei) > 0) + vty_out(vty, " IMEI: %s%s", gsub->imei, VTY_NEWLINE); - for (at_idx = 0; at_idx < ARRAY_SIZE(subscr->sgsn_data->auth_triplets); + for (at_idx = 0; at_idx < ARRAY_SIZE(gsub->sgsn_data->auth_triplets); at_idx++) { - at = &subscr->sgsn_data->auth_triplets[at_idx]; + at = &gsub->sgsn_data->auth_triplets[at_idx]; if (at->key_seq == GSM_KEY_SEQ_INVAL) continue; @@ -688,36 +685,38 @@ VTY_NEWLINE); } - llist_for_each_entry(pdp, &subscr->sgsn_data->pdp_list, list) { + llist_for_each_entry(pdp, &gsub->sgsn_data->pdp_list, list) { vty_out(vty, " PDP info: Id: %d, Type: 0x%04x, APN: '%s' QoS: %s%s", pdp->context_id, pdp->pdp_type, pdp->apn_str, osmo_hexdump(pdp->qos_subscribed, pdp->qos_subscribed_len), VTY_NEWLINE); } +#if 0 /* print the expiration time of a subscriber */ - if (subscr->expire_lu) { + if (gsub->expire_lu) { strftime(expire_time, sizeof(expire_time), - "%a, %d %b %Y %T %z", localtime(&subscr->expire_lu)); + "%a, %d %b %Y %T %z", localtime(&gsub->expire_lu)); expire_time[sizeof(expire_time) - 1] = '\0'; vty_out(vty, " Expiration Time: %s%s", expire_time, VTY_NEWLINE); } +#endif - if (subscr->flags) + if (gsub->flags) vty_out(vty, " Flags: %s%s%s%s%s%s", - subscr->flags & GSM_SUBSCRIBER_FIRST_CONTACT ? + gsub->flags & GPRS_SUBSCRIBER_FIRST_CONTACT ? "FIRST_CONTACT " : "", - subscr->flags & GPRS_SUBSCRIBER_CANCELLED ? + gsub->flags & GPRS_SUBSCRIBER_CANCELLED ? "CANCELLED " : "", - subscr->flags & GPRS_SUBSCRIBER_UPDATE_LOCATION_PENDING ? + gsub->flags & GPRS_SUBSCRIBER_UPDATE_LOCATION_PENDING ? "UPDATE_LOCATION_PENDING " : "", - subscr->flags & GPRS_SUBSCRIBER_UPDATE_AUTH_INFO_PENDING ? + gsub->flags & GPRS_SUBSCRIBER_UPDATE_AUTH_INFO_PENDING ? "AUTH_INFO_PENDING " : "", - subscr->flags & GPRS_SUBSCRIBER_ENABLE_PURGE ? + gsub->flags & GPRS_SUBSCRIBER_ENABLE_PURGE ? "ENABLE_PURGE " : "", VTY_NEWLINE); - vty_out(vty, " Use count: %u%s", subscr->use_count, VTY_NEWLINE); + vty_out(vty, " Use count: %u%s", gsub->use_count, VTY_NEWLINE); } DEFUN(show_subscr_cache, @@ -726,9 +725,9 @@ SHOW_STR "Show information about subscribers\n" "Display contents of subscriber cache\n") { - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; - llist_for_each_entry(subscr, &active_subscribers, entry) { + llist_for_each_entry(subscr, gprs_subscribers, entry) { vty_out(vty, " Subscriber:%s", VTY_NEWLINE); subscr_dump_full_vty(vty, subscr, 0); } @@ -760,7 +759,7 @@ const char *kc_str = argv[4]; struct gsm_auth_tuple at = {0,}; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; subscr = gprs_subscr_get_by_imsi(imsi); if (!subscr) { @@ -791,12 +790,12 @@ subscr->sgsn_data->auth_triplets[cksn] = at; subscr->sgsn_data->auth_triplets_updated = 1; - subscr_put(subscr); + gprs_sub_put(subscr); return CMD_SUCCESS; failed: - subscr_put(subscr); + gprs_sub_put(subscr); return CMD_SUCCESS; } @@ -810,7 +809,7 @@ const char *imsi = argv[0]; const char *cancel_type = argv[1]; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; subscr = gprs_subscr_get_by_imsi(imsi); if (!subscr) { @@ -825,7 +824,7 @@ subscr->sgsn_data->error_cause = GMM_CAUSE_IMPL_DETACHED; gprs_subscr_cancel(subscr); - subscr_put(subscr); + gprs_sub_put(subscr); return CMD_SUCCESS; } @@ -837,7 +836,7 @@ { const char *imsi = argv[0]; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; subscr = gprs_subscr_get_by_imsi(imsi); if (subscr) { @@ -848,7 +847,7 @@ subscr = gprs_subscr_get_or_create(imsi); subscr->keep_in_ram = 1; - subscr_put(subscr); + gprs_sub_put(subscr); return CMD_SUCCESS; } @@ -860,7 +859,7 @@ { const char *imsi = argv[0]; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; subscr = gprs_subscr_get_by_imsi(imsi); if (!subscr) { @@ -875,7 +874,7 @@ if (subscr->use_count > 1) vty_out(vty, "%% subscriber is still in use%s", VTY_NEWLINE); - subscr_put(subscr); + gprs_sub_put(subscr); return CMD_SUCCESS; } @@ -900,7 +899,7 @@ const char *imsi = argv[0]; const char *ret_code_str = argv[1]; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; const struct value_string cause_mapping[] = { { GMM_CAUSE_NET_FAIL, "system-failure" }, @@ -929,7 +928,7 @@ gprs_subscr_update(subscr); - subscr_put(subscr); + gprs_sub_put(subscr); return CMD_SUCCESS; } @@ -941,7 +940,7 @@ { const char *imsi = argv[0]; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; subscr = gprs_subscr_get_by_imsi(imsi); if (!subscr) { @@ -952,7 +951,7 @@ gprs_subscr_update_auth_info(subscr); - subscr_put(subscr); + gprs_sub_put(subscr); return CMD_SUCCESS; } diff --git a/openbsc/tests/sgsn/sgsn_test.c b/openbsc/tests/sgsn/sgsn_test.c index e1fd2e7..5659b4e 100644 --- a/openbsc/tests/sgsn/sgsn_test.c +++ b/openbsc/tests/sgsn/sgsn_test.c @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include @@ -248,7 +248,7 @@ cleanup_test(); } -struct gsm_subscriber *last_updated_subscr = NULL; +struct gprs_sub *last_updated_subscr = NULL; void my_dummy_sgsn_update_subscriber_data(struct sgsn_mm_ctx *mmctx) { OSMO_ASSERT(mmctx); @@ -257,23 +257,23 @@ last_updated_subscr = mmctx->subscr; } -static void assert_subscr(const struct gsm_subscriber *subscr, const char *imsi) +static void assert_subscr(const struct gprs_sub *subscr, const char *imsi) { - struct gsm_subscriber *sfound; + struct gprs_sub *sfound; OSMO_ASSERT(subscr); OSMO_ASSERT(strcmp(subscr->imsi, imsi) == 0); sfound = gprs_subscr_get_by_imsi(imsi); OSMO_ASSERT(sfound == subscr); - subscr_put(sfound); + gprs_sub_put(sfound); } static void show_subscrs(FILE *out) { - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; - llist_for_each_entry(subscr, &active_subscribers, entry) { + llist_for_each_entry(subscr, gprs_subscribers, entry) { fprintf(out, " Subscriber: %s, " "use count: %d\n", subscr->imsi, subscr->use_count); @@ -284,12 +284,18 @@ { show_subscrs(stdout); fflush(stdout); - OSMO_ASSERT(llist_empty(&active_subscribers)); + OSMO_ASSERT(llist_empty(gprs_subscribers)); } + +#define VERBOSE_ASSERT(val, expect_op, fmt) \ + do { \ + printf(#val " == " fmt "\n", (val)); \ + OSMO_ASSERT((val) expect_op); \ + } while (0); static void test_subscriber(void) { - struct gsm_subscriber *s1, *s2, *s3, *sfound; + struct gprs_sub *s1, *s2, *s3; const char *imsi1 = "1234567890"; const char *imsi2 = "9876543210"; const char *imsi3 = "5656565656"; @@ -302,19 +308,24 @@ OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi1) == NULL); OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi2) == NULL); OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi3) == NULL); + VERBOSE_ASSERT(llist_count(gprs_subscribers), == 0, "%d"); /* Allocate entry 1 */ s1 = gprs_subscr_get_or_create(imsi1); - s1->flags |= GSM_SUBSCRIBER_FIRST_CONTACT; + VERBOSE_ASSERT(llist_count(gprs_subscribers), == 1, "%d"); + s1->flags |= GPRS_SUBSCRIBER_FIRST_CONTACT; assert_subscr(s1, imsi1); + VERBOSE_ASSERT(llist_count(gprs_subscribers), == 1, "%d"); OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi2) == NULL); /* Allocate entry 2 */ s2 = gprs_subscr_get_or_create(imsi2); - s2->flags |= GSM_SUBSCRIBER_FIRST_CONTACT; + VERBOSE_ASSERT(llist_count(gprs_subscribers), == 2, "%d"); + s2->flags |= GPRS_SUBSCRIBER_FIRST_CONTACT; /* Allocate entry 3 */ s3 = gprs_subscr_get_or_create(imsi3); + VERBOSE_ASSERT(llist_count(gprs_subscribers), == 3, "%d"); /* Check entries */ assert_subscr(s1, imsi1); @@ -326,33 +337,35 @@ gprs_subscr_update(s1); OSMO_ASSERT(last_updated_subscr == NULL); OSMO_ASSERT(s1->sgsn_data->mm == NULL); - OSMO_ASSERT((s1->flags & GSM_SUBSCRIBER_FIRST_CONTACT) == 0); + OSMO_ASSERT((s1->flags & GPRS_SUBSCRIBER_FIRST_CONTACT) == 0); /* There is no subscriber cache. Verify it */ gprs_subscr_cleanup(s1); - subscr_put(s1); + gprs_sub_put(s1); s1 = NULL; - sfound = gprs_subscr_get_by_imsi(imsi1); - OSMO_ASSERT(sfound == NULL); + VERBOSE_ASSERT(llist_count(gprs_subscribers), == 2, "%d"); + OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi1) == NULL); assert_subscr(s2, imsi2); assert_subscr(s3, imsi3); - /* Free entry 2 (GSM_SUBSCRIBER_FIRST_CONTACT is set) */ + /* Free entry 2 (GPRS_SUBSCRIBER_FIRST_CONTACT is set) */ gprs_subscr_cleanup(s2); - subscr_put(s2); + gprs_sub_put(s2); s2 = NULL; + VERBOSE_ASSERT(llist_count(gprs_subscribers), == 1, "%d"); OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi1) == NULL); OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi2) == NULL); assert_subscr(s3, imsi3); /* Try to delete entry 3 */ gprs_subscr_cleanup(s3); - subscr_put(s3); + gprs_sub_put(s3); s3 = NULL; + VERBOSE_ASSERT(llist_count(gprs_subscribers), == 0, "%d"); OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi3) == NULL); - OSMO_ASSERT(llist_empty(&active_subscribers)); + OSMO_ASSERT(llist_empty(gprs_subscribers)); update_subscriber_data_cb = __real_sgsn_update_subscriber_data; @@ -361,7 +374,7 @@ static void test_auth_triplets(void) { - struct gsm_subscriber *s1, *s1found; + struct gprs_sub *s1, *s1found; const char *imsi1 = "1234567890"; struct gsm_auth_tuple *at; struct sgsn_mm_ctx *ctx; @@ -375,17 +388,17 @@ /* Allocate entry 1 */ s1 = gprs_subscr_get_or_create(imsi1); - s1->flags |= GSM_SUBSCRIBER_FIRST_CONTACT; + s1->flags |= GPRS_SUBSCRIBER_FIRST_CONTACT; s1found = gprs_subscr_get_by_imsi(imsi1); OSMO_ASSERT(s1found == s1); - subscr_put(s1found); + gprs_sub_put(s1found); /* Create a context */ OSMO_ASSERT(count(gprs_llme_list()) == 0); ctx = alloc_mm_ctx(local_tlli, &raid); /* Attach s1 to ctx */ - ctx->subscr = subscr_get(s1); + ctx->subscr = gprs_sub_get(s1); ctx->subscr->sgsn_data->mm = ctx; /* Try to get auth tuple */ @@ -414,7 +427,7 @@ OSMO_ASSERT(at == NULL); /* Free MM context and subscriber */ - subscr_put(s1); + gprs_sub_put(s1); sgsn_mm_ctx_cleanup_free(ctx); s1found = gprs_subscr_get_by_imsi(imsi1); OSMO_ASSERT(s1found == NULL); @@ -441,7 +454,7 @@ static void test_subscriber_gsup(void) { - struct gsm_subscriber *s1, *s1found; + struct gprs_sub *s1, *s1found; const char *imsi1 = "1234567890"; struct sgsn_mm_ctx *ctx; struct gprs_ra_id raid = { 0, }; @@ -563,17 +576,17 @@ /* Allocate entry 1 */ s1 = gprs_subscr_get_or_create(imsi1); - s1->flags |= GSM_SUBSCRIBER_FIRST_CONTACT; + s1->flags |= GPRS_SUBSCRIBER_FIRST_CONTACT; s1found = gprs_subscr_get_by_imsi(imsi1); OSMO_ASSERT(s1found == s1); - subscr_put(s1found); + gprs_sub_put(s1found); /* Create a context */ OSMO_ASSERT(count(gprs_llme_list()) == 0); ctx = alloc_mm_ctx(local_tlli, &raid); /* Attach s1 to ctx */ - ctx->subscr = subscr_get(s1); + ctx->subscr = gprs_sub_get(s1); ctx->subscr->sgsn_data->mm = ctx; /* Inject SendAuthInfoReq GSUP message */ @@ -674,7 +687,7 @@ /* Free MM context and subscriber */ OSMO_ASSERT(ctx->subscr == NULL); sgsn_mm_ctx_cleanup_free(ctx); - subscr_put(s1); + gprs_sub_put(s1); s1found = gprs_subscr_get_by_imsi(imsi1); OSMO_ASSERT(s1found == NULL); @@ -1089,7 +1102,7 @@ static void test_gmm_attach_subscr(void) { const enum sgsn_auth_policy saved_auth_policy = sgsn->cfg.auth_policy; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; sgsn_inst.cfg.auth_policy = SGSN_AUTH_POLICY_REMOTE; subscr_request_update_location_cb = my_subscr_request_update_location; @@ -1100,7 +1113,7 @@ printf("Auth policy 'remote': "); test_gmm_attach(0); - subscr_put(subscr); + gprs_sub_put(subscr); assert_no_subscrs(); sgsn->cfg.auth_policy = saved_auth_policy; @@ -1123,7 +1136,7 @@ static void test_gmm_attach_subscr_fake_auth(void) { const enum sgsn_auth_policy saved_auth_policy = sgsn->cfg.auth_policy; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; sgsn_inst.cfg.auth_policy = SGSN_AUTH_POLICY_REMOTE; subscr_request_update_location_cb = my_subscr_request_update_location; @@ -1136,7 +1149,7 @@ printf("Auth policy 'remote', auth faked: "); test_gmm_attach(0); - subscr_put(subscr); + gprs_sub_put(subscr); assert_no_subscrs(); sgsn->cfg.auth_policy = saved_auth_policy; @@ -1165,7 +1178,7 @@ static void test_gmm_attach_subscr_real_auth(void) { const enum sgsn_auth_policy saved_auth_policy = sgsn->cfg.auth_policy; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; sgsn_inst.cfg.auth_policy = SGSN_AUTH_POLICY_REMOTE; subscr_request_update_location_cb = my_subscr_request_update_location; @@ -1179,7 +1192,7 @@ printf("Auth policy 'remote', triplet based auth: "); test_gmm_attach(0); - subscr_put(subscr); + gprs_sub_put(subscr); assert_no_subscrs(); sgsn->cfg.auth_policy = saved_auth_policy; @@ -1253,7 +1266,7 @@ static void test_gmm_attach_subscr_gsup_auth(int retry) { const enum sgsn_auth_policy saved_auth_policy = sgsn->cfg.auth_policy; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; sgsn_inst.cfg.auth_policy = SGSN_AUTH_POLICY_REMOTE; subscr_request_update_location_cb = my_subscr_request_update_gsup_auth; @@ -1267,7 +1280,7 @@ subscr->authorized = 1; sgsn->cfg.require_authentication = 1; sgsn->cfg.require_update_location = 1; - subscr_put(subscr); + gprs_sub_put(subscr); printf("Auth policy 'remote', GSUP based auth: "); test_gmm_attach(retry); @@ -1336,7 +1349,7 @@ static void test_gmm_attach_subscr_real_gsup_auth(int retry) { const enum sgsn_auth_policy saved_auth_policy = sgsn->cfg.auth_policy; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; sgsn_inst.cfg.auth_policy = SGSN_AUTH_POLICY_REMOTE; gsup_client_send_cb = my_gsup_client_send; @@ -2227,7 +2240,7 @@ { struct apn_ctx *actxs[4]; struct sgsn_ggsn_ctx *ggc, *ggcs[3]; - struct gsm_subscriber *s1; + struct gprs_sub *s1; const char *imsi1 = "1234567890"; struct sgsn_mm_ctx *ctx; struct gprs_ra_id raid = { 0, }; @@ -2346,7 +2359,7 @@ /* Cleanup */ - subscr_put(s1); + gprs_sub_put(s1); sgsn_mm_ctx_cleanup_free(ctx); assert_no_subscrs(); diff --git a/openbsc/tests/sgsn/sgsn_test.ok b/openbsc/tests/sgsn/sgsn_test.ok index c7a53b9..f38d730 100644 --- a/openbsc/tests/sgsn/sgsn_test.ok +++ b/openbsc/tests/sgsn/sgsn_test.ok @@ -1,5 +1,13 @@ Testing LLME allocations Testing core subscriber data API +llist_count(gprs_subscribers) == 0 +llist_count(gprs_subscribers) == 1 +llist_count(gprs_subscribers) == 1 +llist_count(gprs_subscribers) == 2 +llist_count(gprs_subscribers) == 3 +llist_count(gprs_subscribers) == 2 +llist_count(gprs_subscribers) == 1 +llist_count(gprs_subscribers) == 0 Testing authentication triplet handling Testing subscriber GSUP handling Testing GMM detach -- To view, visit https://gerrit.osmocom.org/1684 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia8b391ee009c8545763cba04505be3947835120e Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Jan 26 08:21:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 26 Jan 2017 08:21:05 +0000 Subject: osmo-pcu[master]: BTS: accept also relative frame numbers with rach requst In-Reply-To: References: Message-ID: Patch Set 6: Code-Review-1 this breaks the test results. Let's try to handle this without reducing/breaking the log output. If you must, always use 'make check' before submitting the patch to ensure it passes unit tests. -- To view, visit https://gerrit.osmocom.org/1205 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iaa182d8d29c6a0f5fa06064c2eb48b21b1ba2775 Gerrit-PatchSet: 6 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 26 09:01:27 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 26 Jan 2017 09:01:27 +0000 Subject: [PATCH] openbsc[master]: debian: Require libgtp1-dev after the SO version bump In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1658 to look at the new patch set (#2). debian: Require libgtp1-dev after the SO version bump The ABI of libgtp changed and we require a new library now. In the future we might consider to drop the SO_VERSION from the -dev name. Change-Id: Ib301b27e2c08fda827b55820389247e27e5e8fc7 --- M debian/control 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/58/1658/2 diff --git a/debian/control b/debian/control index 144e649..87b6f07 100644 --- a/debian/control +++ b/debian/control @@ -6,7 +6,7 @@ autotools-dev, autoconf-archive, pkg-config, - libgtp0-dev, + libgtp-dev, libosmocore-dev, libosmo-sccp-dev, libdbi0-dev, -- To view, visit https://gerrit.osmocom.org/1658 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib301b27e2c08fda827b55820389247e27e5e8fc7 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Thu Jan 26 09:02:05 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 26 Jan 2017 09:02:05 +0000 Subject: [PATCH] openbsc[master]: debian: Require libgtp-dev after the SO version bump In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1658 to look at the new patch set (#3). debian: Require libgtp-dev after the SO version bump The ABI of libgtp changed and we require a new library now. Drop the SO_VERSION from the library name and just depend on libgtp-dev. Change-Id: Ib301b27e2c08fda827b55820389247e27e5e8fc7 --- M debian/control 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/58/1658/3 diff --git a/debian/control b/debian/control index 144e649..87b6f07 100644 --- a/debian/control +++ b/debian/control @@ -6,7 +6,7 @@ autotools-dev, autoconf-archive, pkg-config, - libgtp0-dev, + libgtp-dev, libosmocore-dev, libosmo-sccp-dev, libdbi0-dev, -- To view, visit https://gerrit.osmocom.org/1658 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib301b27e2c08fda827b55820389247e27e5e8fc7 Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Thu Jan 26 09:41:24 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 26 Jan 2017 09:41:24 +0000 Subject: openbsc[master]: debian: Require libgtp-dev after the SO version bump In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1658 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib301b27e2c08fda827b55820389247e27e5e8fc7 Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 26 09:50:50 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 26 Jan 2017 09:50:50 +0000 Subject: openbsc[master]: debian: Require libgtp-dev after the SO version bump In-Reply-To: References: Message-ID: Patch Set 3: > A little correction - we do for some libs but not for others which > feels inconsistent. What's the reasoning behind this and what's > considered best practice? I don't know if that is the case but take a library GTK+ and its version 2, 3, 4. It could be perfectly valid to install gtk+-2-dev or gtk+-4-dev side to side (or one after another). -- To view, visit https://gerrit.osmocom.org/1658 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib301b27e2c08fda827b55820389247e27e5e8fc7 Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 26 09:54:00 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 26 Jan 2017 09:54:00 +0000 Subject: openbsc[master]: SGSN: Integrate basic support for UMTS AKA In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+1 (3 comments) https://gerrit.osmocom.org/#/c/1683/3/openbsc/src/gprs/gprs_gmm.c File openbsc/src/gprs/gprs_gmm.c: Line 556: } else purely cosmetic but you can drop else in here because you print ")\n" either way. Line 702: if (l > sizeof(res)-4) Another cosmetic: spaces around +- Line 714: LOGMMCTXP(LOGL_NOTICE, ctx, "Mismatch: expected SRES = %s\n", In spec the part we have called SRES, the part MS returned called RES - it's better to adhere to this terminology to avoid confusion. -- To view, visit https://gerrit.osmocom.org/1683 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie6a0cefba5e4e7f02cc2eaf6ec006ac07d5c1816 Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Jan 26 10:10:18 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 26 Jan 2017 10:10:18 +0000 Subject: [PATCH] openbsc[master]: sgsn: Fix deeply flawed copying logic for PDP context activa... Message-ID: Review at https://gerrit.osmocom.org/1686 sgsn: Fix deeply flawed copying logic for PDP context activation It is one of these changes that should have never worked but did for a long time. Only recently a corrupted GTP message was seen. The code in ccd2312d10e14747e8a4d26d8f72b052ffcfc282 tried to solve the right problem but was deeply flawed. * Make the code operate on the copied message and not the original one that is deleted by the underlaying layers on return * Add an out variable to determine if the msgb should be deleted and assume that by default it will be deleted. Change-Id: I564526e7cde2b8a2f0ce900492cd38fc23c176a7 --- M openbsc/src/gprs/gprs_gmm.c 1 file changed, 9 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/86/1686/1 diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c index 88be512..6471c2e 100644 --- a/openbsc/src/gprs/gprs_gmm.c +++ b/openbsc/src/gprs/gprs_gmm.c @@ -2169,6 +2169,7 @@ /* The context is gone while we made a request */ if (!lookup->mmctx) { + talloc_free(lookup->orig_msg); talloc_free(lookup); return; } @@ -2230,6 +2231,7 @@ lookup->sapi, &lookup->tp, 1); /* Now free it */ + talloc_free(lookup->orig_msg); talloc_free(lookup); return; @@ -2237,10 +2239,11 @@ gsm48_tx_gsm_act_pdp_rej(lookup->mmctx, lookup->ti, GMM_CAUSE_NET_FAIL, 0, NULL); lookup->mmctx->ggsn_lookup = NULL; + talloc_free(lookup->orig_msg); talloc_free(lookup); } -static int do_act_pdp_req(struct sgsn_mm_ctx *mmctx, struct msgb *msg) +static int do_act_pdp_req(struct sgsn_mm_ctx *mmctx, struct msgb *msg, int *delete) { struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_gmmh(msg); struct gsm48_act_pdp_ctx_req *act_req = (struct gsm48_act_pdp_ctx_req *) gh->data; @@ -2389,6 +2392,7 @@ LOGMMCTXP(LOGL_ERROR, mmctx, "Failed to start ares query.\n"); goto no_context; } + *delete = 0; return 0; @@ -2402,6 +2406,7 @@ static int gsm48_rx_gsm_act_pdp_req(struct sgsn_mm_ctx *mmctx, struct msgb *_msg) { + int delete = 1; struct msgb *msg; int rc; @@ -2428,8 +2433,9 @@ 0, NULL); } - rc = do_act_pdp_req(mmctx, _msg); - msgb_free(msg); + rc = do_act_pdp_req(mmctx, msg, &delete); + if (delete) + msgb_free(msg); return rc; } -- To view, visit https://gerrit.osmocom.org/1686 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I564526e7cde2b8a2f0ce900492cd38fc23c176a7 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Thu Jan 26 10:16:13 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 26 Jan 2017 10:16:13 +0000 Subject: [PATCH] openggsn[master]: abi/debian: Bump ABI version of libgtp after struct size change In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1657 to look at the new patch set (#2). abi/debian: Bump ABI version of libgtp after struct size change The gsn_t changed the size with the addition of the ctrl pointer. Bump the SO version to not break osmo-sgsn/ggsn on upgrade. Call the -dev package libgtp-dev to follow the rest of Osmocom and to ease making releases here. Change-Id: Iac4d6d2effde1a6b2f60b1e1b49c91513d5ca8c3 --- M debian/changelog M debian/control R debian/libgtp-dev.install R debian/libgtp1.install M gtp/Makefile.am 5 files changed, 11 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openggsn refs/changes/57/1657/2 diff --git a/debian/changelog b/debian/changelog index a00671b..5d52bfd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,9 @@ openggsn (0.93) UNRELEASED; urgency=medium * Bump version to ease upgrading from Debian SID. + * Bump libgtp SO version after ABI change. - -- Holger Hans Peter Freyther Tue, 24 May 2016 22:53:16 +0200 + -- Holger Hans Peter Freyther Tue, 24 Jan 2017 17:26:26 +0100 openggsn (0.92) precise; urgency=medium diff --git a/debian/control b/debian/control index 9306656..4e5b168 100644 --- a/debian/control +++ b/debian/control @@ -22,7 +22,7 @@ operators as the interface between the Internet and the rest of the mobile network infrastructure. -Package: libgtp0 +Package: libgtp1 Architecture: any Multi-Arch: same Section: libs @@ -36,12 +36,12 @@ This library is part of openggsn and implements the GTP protocol between SGSN (Serving GPRS support node) and GGSN. -Package: libgtp0-dev +Package: libgtp-dev Architecture: any Multi-Arch: same Section: libdevel Depends: ${misc:Depends}, - libgtp0 (= ${binary:Version}) + libgtp1 (= ${binary:Version}) Description: Development files for libgtp OpenGGSN is a Gateway GPRS Support Node (GGSN). It is used by mobile operators as the interface between the Internet and the rest of the @@ -54,6 +54,6 @@ Section: debug Architecture: any Priority: extra -Depends: ${shlibs:Depends}, ${misc:Depends}, libgtp0 (= ${binary:Version}), openggsn (= ${binary:Version}) +Depends: ${shlibs:Depends}, ${misc:Depends}, libgtp1 (= ${binary:Version}), openggsn (= ${binary:Version}) Multi-Arch: same Description: Debug symbols for OpenGGSN diff --git a/debian/libgtp0-dev.install b/debian/libgtp-dev.install similarity index 100% rename from debian/libgtp0-dev.install rename to debian/libgtp-dev.install diff --git a/debian/libgtp0.install b/debian/libgtp1.install similarity index 100% rename from debian/libgtp0.install rename to debian/libgtp1.install diff --git a/gtp/Makefile.am b/gtp/Makefile.am index 9586dfe..32025d6 100644 --- a/gtp/Makefile.am +++ b/gtp/Makefile.am @@ -1,3 +1,7 @@ +# This is _NOT_ the library release version, it's an API version. +# Please read chapter "Library interface versions" of the libtool documentation +# before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html +LIBVERSION=1:0:0 lib_LTLIBRARIES = libgtp.la include_HEADERS = gtp.h pdp.h gtpie.h @@ -5,6 +9,7 @@ AM_CFLAGS = -O2 -fno-builtin -Wall -DSBINDIR='"$(sbindir)"' -ggdb $(LIBOSMOCORE_CFLAGS) libgtp_la_SOURCES = gtp.c gtp.h gtpie.c gtpie.h pdp.c pdp.h lookupa.c lookupa.h queue.c queue.h +libgtp_la_LDFLAGS = -version-info $(LIBVERSION) -no-undefined libgtp_la_LIBADD = $(LIBOSMOCORE_LIBS) -- To view, visit https://gerrit.osmocom.org/1657 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iac4d6d2effde1a6b2f60b1e1b49c91513d5ca8c3 Gerrit-PatchSet: 2 Gerrit-Project: openggsn Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Thu Jan 26 10:18:08 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 26 Jan 2017 10:18:08 +0000 Subject: openggsn[master]: abi/debian: Bump ABI version of libgtp after struct size change In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1657 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iac4d6d2effde1a6b2f60b1e1b49c91513d5ca8c3 Gerrit-PatchSet: 2 Gerrit-Project: openggsn Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 26 10:20:31 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 26 Jan 2017 10:20:31 +0000 Subject: [PATCH] osmo-pcu[master]: BTS: accept also relative frame numbers with rach requst In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1205 to look at the new patch set (#7). BTS: accept also relative frame numbers with rach requst The rach request contains a relative frame number (Fn % 42432), while BTS::rcv_rach() accepts the full frame number only. Since the BTS is always aware of the full frame number this is not a problem. But for BSC co-located PCU schemes it is a problem since the rach request only contains the relative frame number as mentioned above. The pcu continusly receives frame number updates with the GSM time indication message. It is simple to re-calculate the full frame number from that information. This patch makes BTS::rcv_rach() compatible with relative frame numbers, while not breaking the compatibility for full frame numbers Change-Id: Iaa182d8d29c6a0f5fa06064c2eb48b21b1ba2775 --- M src/bts.cpp M tests/tbf/TbfTest.cpp 2 files changed, 19 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/05/1205/7 diff --git a/src/bts.cpp b/src/bts.cpp index 25cbc60..e1c6dcc 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -536,6 +536,21 @@ if (is_11bit) rach_frame_11bit(); + /* Note: If a BTS is sending in a rach request it will be fully aware + * of the frame number. If the PCU is used in a BSC-co-located setup. + * The BSC will forward the incoming RACH request. The RACH request + * only contains the relative frame number (Fn % 42432) in its request + * reference. This PCU implementation has to fit both secenarious, so + * we need to assume that Fn is a relative frame number. */ + + /* Ensure that all following calculations are performed with the + * relative frame number */ + Fn = Fn % 42432; + + /* Restore the full frame number + * (See also 3GPP TS 44.018, section 10.5.2.38) */ + Fn = Fn + m_cur_fn - m_cur_fn % 42432; + LOGP(DRLCMAC, LOGL_DEBUG, "MS requests UL TBF on RACH, " "so we provide one \n" "ra=0x%02x Fn=%u qta=%d is_11bit=%d:\n", ra, Fn, qta, is_11bit); diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index aec6ef8..e367ce6 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -42,6 +42,8 @@ #include +#define DUMMY_FN 2654167 + void *tall_pcu_ctx; int16_t spoof_mnc = 0, spoof_mcc = 0; @@ -166,6 +168,7 @@ trx = &bts->trx[0]; trx->pdch[ts_no].enable(); + the_bts->set_current_frame_number(DUMMY_FN); } static gprs_rlcmac_dl_tbf *create_dl_tbf(BTS *the_bts, uint8_t ms_class, @@ -1692,7 +1695,7 @@ { BTS the_bts; int ts_no = 7; - uint32_t fn = 2654167; /* 17,25,9 */ + uint32_t fn = DUMMY_FN; /* 17,25,9 */ uint32_t tlli = 0xf1223344; const char *imsi = "0011223344"; uint16_t qta = 31; -- To view, visit https://gerrit.osmocom.org/1205 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iaa182d8d29c6a0f5fa06064c2eb48b21b1ba2775 Gerrit-PatchSet: 7 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Jan 26 10:39:59 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 26 Jan 2017 10:39:59 +0000 Subject: openbsc[master]: sgsn: Fix deeply flawed copying logic for PDP context activa... In-Reply-To: References: Message-ID: Patch Set 1: (2 comments) https://gerrit.osmocom.org/#/c/1686/1/openbsc/src/gprs/gprs_gmm.c File openbsc/src/gprs/gprs_gmm.c: Line 2172: talloc_free(lookup->orig_msg); Why the need for explicit free? Wouldn't freeing lookup will also free it's members? Line 2395: *delete = 0; Why such a complexity? Can't we just return smth like -EBLAHBLAH, check for it and free msg? -- To view, visit https://gerrit.osmocom.org/1686 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I564526e7cde2b8a2f0ce900492cd38fc23c176a7 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Jan 26 10:42:03 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 26 Jan 2017 10:42:03 +0000 Subject: [PATCH] osmo-pcu[master]: cosmetic: Fix log output Message-ID: Review at https://gerrit.osmocom.org/1687 cosmetic: Fix log output In BTS::rcv_rach() the log output is messed up because of a stray "\n". This commit removes that. Change-Id: I40d01c71982ad83589f070cf0047a4ae04695411 --- M src/bts.cpp M tests/tbf/TbfTest.err 2 files changed, 32 insertions(+), 62 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/87/1687/1 diff --git a/src/bts.cpp b/src/bts.cpp index 25cbc60..8256f02 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -537,8 +537,8 @@ rach_frame_11bit(); LOGP(DRLCMAC, LOGL_DEBUG, "MS requests UL TBF on RACH, " - "so we provide one \n" - "ra=0x%02x Fn=%u qta=%d is_11bit=%d:\n", ra, Fn, qta, is_11bit); + "so we provide one: ra=0x%02x Fn=%u qta=%d is_11bit=%d:\n", + ra, Fn, qta, is_11bit); sb = is_single_block(ra, burst_type, is_11bit, &ms_class, &priority); diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index 575b7fb..3412bde 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -1510,8 +1510,7 @@ MSG = 07 01 04 4d 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 Searching for first unallocated TFI: TRX=0 Found TFI=0. -MS requests UL TBF on RACH, so we provide one -ra=0x03 Fn=2654167 qta=31 is_11bit=0: +MS requests UL TBF on RACH, so we provide one: ra=0x03 Fn=2654167 qta=31 is_11bit=0: ********** TBF starts here ********** Allocating UL TBF: MS_CLASS=0/0 Creating MS object, TLLI = 0x00000000 @@ -1585,8 +1584,7 @@ Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=33 34 34 2d 06 3f 30 0f 00 00 7d 80 00 07 00 df 12 23 34 48 00 23 2b 2b 2b 2b TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) append Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654218 block=8 data=47 94 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b -MS requests UL TBF on RACH, so we provide one -ra=0x73 Fn=2654167 qta=31 is_11bit=0: +MS requests UL TBF on RACH, so we provide one: ra=0x73 Fn=2654167 qta=31 is_11bit=0: MS requests single block allocation RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x73, Fn=2654167 (17,25,9), SBFn=2654270 TX: Immediate Assignment Uplink (AGCH) @@ -1671,8 +1669,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer 0. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) append Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654218 block=8 data=47 94 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b -MS requests UL TBF on RACH, so we provide one -ra=0x73 Fn=2654167 qta=31 is_11bit=0: +MS requests UL TBF on RACH, so we provide one: ra=0x73 Fn=2654167 qta=31 is_11bit=0: MS requests single block allocation RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x73, Fn=2654167 (17,25,9), SBFn=2654270 TX: Immediate Assignment Uplink (AGCH) @@ -1806,8 +1803,7 @@ - Copying data unit 0 (BSN 0) msg block (BSN 0, CS-4): 07 01 00 29 52 41 55 5f 41 43 43 45 50 54 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 00 Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654283 block=11 data=00 01 00 29 52 41 55 5f 41 43 43 45 50 54 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 00 -MS requests UL TBF on RACH, so we provide one -ra=0x73 Fn=2654232 qta=31 is_11bit=0: +MS requests UL TBF on RACH, so we provide one: ra=0x73 Fn=2654232 qta=31 is_11bit=0: MS requests single block allocation RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x73, Fn=2654232 (17,39,22), SBFn=2654335 TX: Immediate Assignment Uplink (AGCH) @@ -1883,8 +1879,7 @@ Modifying MS object, TLLI: 0xf5667788 confirmed New MS: TLLI = 0xf5667788, TA = 7, IMSI = 0011223344, LLC = 1 Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654218 block=8 data=47 94 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b -MS requests UL TBF on RACH, so we provide one -ra=0x73 Fn=2654167 qta=31 is_11bit=0: +MS requests UL TBF on RACH, so we provide one: ra=0x73 Fn=2654167 qta=31 is_11bit=0: MS requests single block allocation RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x73, Fn=2654167 (17,25,9), SBFn=2654270 TX: Immediate Assignment Uplink (AGCH) @@ -1977,8 +1972,7 @@ Detaching TBF from MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) ********** TBF ends here ********** Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654275 block=9 data=47 94 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b -MS requests UL TBF on RACH, so we provide one -ra=0x73 Fn=2654224 qta=31 is_11bit=0: +MS requests UL TBF on RACH, so we provide one: ra=0x73 Fn=2654224 qta=31 is_11bit=0: MS requests single block allocation RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x73, Fn=2654224 (17,31,14), SBFn=2654327 TX: Immediate Assignment Uplink (AGCH) @@ -2062,8 +2056,7 @@ - No gaps in received block, last block: BSN=0 CV=15 New MS: TLLI = 0xf1223344, TA = 7, IMSI = 0011223344, LLC = 2 Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654218 block=8 data=47 94 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b -MS requests UL TBF on RACH, so we provide one -ra=0x73 Fn=2654167 qta=31 is_11bit=0: +MS requests UL TBF on RACH, so we provide one: ra=0x73 Fn=2654167 qta=31 is_11bit=0: MS requests single block allocation RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x73, Fn=2654167 (17,25,9), SBFn=2654270 TX: Immediate Assignment Uplink (AGCH) @@ -2157,8 +2150,7 @@ ********** TBF ends here ********** Searching for first unallocated TFI: TRX=0 Found TFI=0. -MS requests UL TBF on RACH, so we provide one -ra=0x03 Fn=2654275 qta=31 is_11bit=0: +MS requests UL TBF on RACH, so we provide one: ra=0x03 Fn=2654275 qta=31 is_11bit=0: ********** TBF starts here ********** Allocating UL TBF: MS_CLASS=0/0 Creating MS object, TLLI = 0x00000000 @@ -2218,8 +2210,7 @@ - Scheduling Ack/Nack, because last block has CV==0. New MS: TLLI = 0xf1223344, TA = 7, IMSI = 0011223344, LLC = 2 Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654218 block=8 data=47 94 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b -MS requests UL TBF on RACH, so we provide one -ra=0x73 Fn=2654167 qta=31 is_11bit=0: +MS requests UL TBF on RACH, so we provide one: ra=0x73 Fn=2654167 qta=31 is_11bit=0: MS requests single block allocation RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x73, Fn=2654167 (17,25,9), SBFn=2654270 TX: Immediate Assignment Uplink (AGCH) @@ -3354,8 +3345,7 @@ Destroying MS object, TLLI = 0x00000000 ********** TBF ends here ********** Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654218 block=8 data=47 94 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b -MS requests UL TBF on RACH, so we provide one -ra=0x73 Fn=2654167 qta=31 is_11bit=0: +MS requests UL TBF on RACH, so we provide one: ra=0x73 Fn=2654167 qta=31 is_11bit=0: MS requests single block allocation RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x73, Fn=2654167 (17,25,9), SBFn=2654270 TX: Immediate Assignment Uplink (AGCH) @@ -3450,8 +3440,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) starting timer 0. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) append Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654218 block=8 data=47 94 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b -MS requests UL TBF on RACH, so we provide one -ra=0x73 Fn=2654167 qta=31 is_11bit=0: +MS requests UL TBF on RACH, so we provide one: ra=0x73 Fn=2654167 qta=31 is_11bit=0: MS requests single block allocation RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x73, Fn=2654167 (17,25,9), SBFn=2654270 TX: Immediate Assignment Uplink (AGCH) @@ -6236,8 +6225,7 @@ Destroying MS object, TLLI = 0xffeeddcc ********** TBF ends here ********** Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654218 block=8 data=47 94 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b -MS requests UL TBF on RACH, so we provide one -ra=0x73 Fn=2654167 qta=31 is_11bit=0: +MS requests UL TBF on RACH, so we provide one: ra=0x73 Fn=2654167 qta=31 is_11bit=0: MS requests single block allocation RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x73, Fn=2654167 (17,25,9), SBFn=2654270 TX: Immediate Assignment Uplink (AGCH) @@ -6414,8 +6402,7 @@ Destroying MS object, TLLI = 0x00000000 ********** TBF ends here ********** Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654218 block=8 data=47 94 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b -MS requests UL TBF on RACH, so we provide one -ra=0x73 Fn=2654167 qta=31 is_11bit=0: +MS requests UL TBF on RACH, so we provide one: ra=0x73 Fn=2654167 qta=31 is_11bit=0: MS requests single block allocation RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x73, Fn=2654167 (17,25,9), SBFn=2654270 TX: Immediate Assignment Uplink (AGCH) @@ -6678,8 +6665,7 @@ Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc ********** TBF ends here ********** -MS requests UL TBF on RACH, so we provide one -ra=0x78 Fn=2654167 qta=31 is_11bit=0: +MS requests UL TBF on RACH, so we provide one: ra=0x78 Fn=2654167 qta=31 is_11bit=0: ********** TBF starts here ********** Allocating UL TBF: MS_CLASS=0/0 Creating MS object, TLLI = 0x00000000 @@ -6704,8 +6690,7 @@ TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=0 USF=0 Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 78 8b 29 07 00 c8 00 70 0b 2b 2b 2b 2b 2b 2b 2b -MS requests UL TBF on RACH, so we provide one -ra=0x79 Fn=2654167 qta=31 is_11bit=0: +MS requests UL TBF on RACH, so we provide one: ra=0x79 Fn=2654167 qta=31 is_11bit=0: ********** TBF starts here ********** Allocating UL TBF: MS_CLASS=0/0 Creating MS object, TLLI = 0x00000000 @@ -6730,8 +6715,7 @@ TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=1 USF=1 Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 79 8b 29 07 00 c8 42 70 0b 2b 2b 2b 2b 2b 2b 2b -MS requests UL TBF on RACH, so we provide one -ra=0x7a Fn=2654167 qta=31 is_11bit=0: +MS requests UL TBF on RACH, so we provide one: ra=0x7a Fn=2654167 qta=31 is_11bit=0: ********** TBF starts here ********** Allocating UL TBF: MS_CLASS=0/0 Creating MS object, TLLI = 0x00000000 @@ -6756,8 +6740,7 @@ TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=2 USF=2 Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 7a 8b 29 07 00 c8 84 70 0b 2b 2b 2b 2b 2b 2b 2b -MS requests UL TBF on RACH, so we provide one -ra=0x7b Fn=2654167 qta=31 is_11bit=0: +MS requests UL TBF on RACH, so we provide one: ra=0x7b Fn=2654167 qta=31 is_11bit=0: ********** TBF starts here ********** Allocating UL TBF: MS_CLASS=0/0 Creating MS object, TLLI = 0x00000000 @@ -6782,8 +6765,7 @@ TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=3 USF=3 Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 7b 8b 29 07 00 c8 c6 70 0b 2b 2b 2b 2b 2b 2b 2b -MS requests UL TBF on RACH, so we provide one -ra=0x7c Fn=2654167 qta=31 is_11bit=0: +MS requests UL TBF on RACH, so we provide one: ra=0x7c Fn=2654167 qta=31 is_11bit=0: ********** TBF starts here ********** Allocating UL TBF: MS_CLASS=0/0 Creating MS object, TLLI = 0x00000000 @@ -6808,8 +6790,7 @@ TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=4 USF=4 Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 7c 8b 29 07 00 c9 08 70 0b 2b 2b 2b 2b 2b 2b 2b -MS requests UL TBF on RACH, so we provide one -ra=0x7d Fn=2654167 qta=31 is_11bit=0: +MS requests UL TBF on RACH, so we provide one: ra=0x7d Fn=2654167 qta=31 is_11bit=0: ********** TBF starts here ********** Allocating UL TBF: MS_CLASS=0/0 Creating MS object, TLLI = 0x00000000 @@ -6834,8 +6815,7 @@ TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=5 USF=5 Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 7d 8b 29 07 00 c9 4a 70 0b 2b 2b 2b 2b 2b 2b 2b -MS requests UL TBF on RACH, so we provide one -ra=0x7e Fn=2654167 qta=31 is_11bit=0: +MS requests UL TBF on RACH, so we provide one: ra=0x7e Fn=2654167 qta=31 is_11bit=0: ********** TBF starts here ********** Allocating UL TBF: MS_CLASS=0/0 Creating MS object, TLLI = 0x00000000 @@ -6860,8 +6840,7 @@ TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=6 USF=6 Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 7e 8b 29 07 00 c9 8c 70 0b 2b 2b 2b 2b 2b 2b 2b -MS requests UL TBF on RACH, so we provide one -ra=0x7f Fn=2654167 qta=31 is_11bit=0: +MS requests UL TBF on RACH, so we provide one: ra=0x7f Fn=2654167 qta=31 is_11bit=0: ********** TBF starts here ********** Allocating UL TBF: MS_CLASS=0/0 Creating MS object, TLLI = 0x00000000 @@ -6878,15 +6857,13 @@ No PDCH resource sending Immediate Assignment Uplink (AGCH) reject Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=4d 06 3a 10 7f 8b 29 14 7f 8b 29 14 7f 8b 29 14 7f 8b 29 14 0b 2b 2b Destroying MS object, TLLI = 0x00000000 -MS requests UL TBF on RACH, so we provide one -ra=0x70 Fn=2654167 qta=31 is_11bit=0: +MS requests UL TBF on RACH, so we provide one: ra=0x70 Fn=2654167 qta=31 is_11bit=0: MS requests single block allocation No PDCH available. No PDCH resource for single block allocation.sending Immediate Assignment Uplink (AGCH) reject Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=4d 06 3a 10 70 8b 29 14 70 8b 29 14 70 8b 29 14 70 8b 29 14 0b 2b 2b Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654218 block=8 data=47 94 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b -MS requests UL TBF on RACH, so we provide one -ra=0x73 Fn=2654167 qta=31 is_11bit=0: +MS requests UL TBF on RACH, so we provide one: ra=0x73 Fn=2654167 qta=31 is_11bit=0: MS requests single block allocation RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x73, Fn=2654167 (17,25,9), SBFn=2654270 TX: Immediate Assignment Uplink (AGCH) @@ -8873,8 +8850,7 @@ TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL) changes state from NULL to FLOW The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) append -MS requests UL TBF on RACH, so we provide one -ra=0x78 Fn=2654167 qta=31 is_11bit=0: +MS requests UL TBF on RACH, so we provide one: ra=0x78 Fn=2654167 qta=31 is_11bit=0: ********** TBF starts here ********** Allocating UL TBF: MS_CLASS=0/0 Creating MS object, TLLI = 0x00000000 @@ -8899,8 +8875,7 @@ TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=0 USF=0 Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 78 8b 29 07 00 c8 00 70 0b 2b 2b 2b 2b 2b 2b 2b -MS requests UL TBF on RACH, so we provide one -ra=0x79 Fn=2654167 qta=31 is_11bit=0: +MS requests UL TBF on RACH, so we provide one: ra=0x79 Fn=2654167 qta=31 is_11bit=0: ********** TBF starts here ********** Allocating UL TBF: MS_CLASS=0/0 Creating MS object, TLLI = 0x00000000 @@ -8925,8 +8900,7 @@ TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=1 USF=1 Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 79 8b 29 07 00 c8 42 70 0b 2b 2b 2b 2b 2b 2b 2b -MS requests UL TBF on RACH, so we provide one -ra=0x7a Fn=2654167 qta=31 is_11bit=0: +MS requests UL TBF on RACH, so we provide one: ra=0x7a Fn=2654167 qta=31 is_11bit=0: ********** TBF starts here ********** Allocating UL TBF: MS_CLASS=0/0 Creating MS object, TLLI = 0x00000000 @@ -8951,8 +8925,7 @@ TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=2 USF=2 Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 7a 8b 29 07 00 c8 84 70 0b 2b 2b 2b 2b 2b 2b 2b -MS requests UL TBF on RACH, so we provide one -ra=0x7b Fn=2654167 qta=31 is_11bit=0: +MS requests UL TBF on RACH, so we provide one: ra=0x7b Fn=2654167 qta=31 is_11bit=0: ********** TBF starts here ********** Allocating UL TBF: MS_CLASS=0/0 Creating MS object, TLLI = 0x00000000 @@ -8977,8 +8950,7 @@ TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=3 USF=3 Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 7b 8b 29 07 00 c8 c6 70 0b 2b 2b 2b 2b 2b 2b 2b -MS requests UL TBF on RACH, so we provide one -ra=0x7c Fn=2654167 qta=31 is_11bit=0: +MS requests UL TBF on RACH, so we provide one: ra=0x7c Fn=2654167 qta=31 is_11bit=0: ********** TBF starts here ********** Allocating UL TBF: MS_CLASS=0/0 Creating MS object, TLLI = 0x00000000 @@ -9003,8 +8975,7 @@ TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=4 USF=4 Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 7c 8b 29 07 00 c9 08 70 0b 2b 2b 2b 2b 2b 2b 2b -MS requests UL TBF on RACH, so we provide one -ra=0x7d Fn=2654167 qta=31 is_11bit=0: +MS requests UL TBF on RACH, so we provide one: ra=0x7d Fn=2654167 qta=31 is_11bit=0: ********** TBF starts here ********** Allocating UL TBF: MS_CLASS=0/0 Creating MS object, TLLI = 0x00000000 @@ -9029,8 +9000,7 @@ TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=5 USF=5 Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 7d 8b 29 07 00 c9 4a 70 0b 2b 2b 2b 2b 2b 2b 2b -MS requests UL TBF on RACH, so we provide one -ra=0x7e Fn=2654167 qta=31 is_11bit=0: +MS requests UL TBF on RACH, so we provide one: ra=0x7e Fn=2654167 qta=31 is_11bit=0: ********** TBF starts here ********** Allocating UL TBF: MS_CLASS=0/0 Creating MS object, TLLI = 0x00000000 -- To view, visit https://gerrit.osmocom.org/1687 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I40d01c71982ad83589f070cf0047a4ae04695411 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Thu Jan 26 11:02:45 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 26 Jan 2017 11:02:45 +0000 Subject: openbsc[master]: sgsn: Fix deeply flawed copying logic for PDP context activa... In-Reply-To: References: Message-ID: Patch Set 1: (2 comments) https://gerrit.osmocom.org/#/c/1686/1/openbsc/src/gprs/gprs_gmm.c File openbsc/src/gprs/gprs_gmm.c: Line 2172: talloc_free(lookup->orig_msg); > Why the need for explicit free? Wouldn't freeing lookup will also free it's Because it is not a member. The msgb is cloned before if it is clear if an async GGSN look-up will be made. One could argue to use a talloc_steal to change the hierarchy but the project opinion is to delete all "members" by hand anyway. Line 2395: *delete = 0; > Why such a complexity? Can't we just return smth like -EBLAHBLAH, check for There are too many returns in that method and returns by calling other methods. An out parameter seems better suited. -- To view, visit https://gerrit.osmocom.org/1686 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I564526e7cde2b8a2f0ce900492cd38fc23c176a7 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Jan 26 12:42:45 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 26 Jan 2017 12:42:45 +0000 Subject: osmo-pcu[master]: cosmetic: Fix log output In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1687 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I40d01c71982ad83589f070cf0047a4ae04695411 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 26 12:53:49 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 26 Jan 2017 12:53:49 +0000 Subject: [PATCH] libosmocore[master]: Expand and expose ctrl connection allocation In-Reply-To: References: Message-ID: Hello Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1629 to look at the new patch set (#3). Expand and expose ctrl connection allocation Add function for allocating CTRL connection to public headers and replace call to previous static function with it. Add doxygen docs for this function. Change-Id: I522ed809cbebfd3d7dd08b4ed9137b39ff192e32 --- M include/osmocom/ctrl/control_if.h M src/ctrl/control_if.c 2 files changed, 45 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/29/1629/3 diff --git a/include/osmocom/ctrl/control_if.h b/include/osmocom/ctrl/control_if.h index 512ae10..f2af1db 100644 --- a/include/osmocom/ctrl/control_if.h +++ b/include/osmocom/ctrl/control_if.h @@ -27,5 +27,5 @@ const char *bind_addr, uint16_t port, ctrl_cmd_lookup lookup); - +struct ctrl_connection *osmo_ctrl_conn_alloc(void *ctx, void *data); int ctrl_cmd_handle(struct ctrl_handle *ctrl, struct ctrl_cmd *cmd, void *data); diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index df39486..2178248 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -357,7 +357,7 @@ return ret; } -static int control_write_cb(struct osmo_fd *bfd, struct msgb *msg) +int control_write_cb(struct osmo_fd *bfd, struct msgb *msg) { int rc; @@ -368,7 +368,14 @@ return rc; } -static struct ctrl_connection *ctrl_connection_alloc(void *ctx) +/*! \brief Allocate CTRL connection + * \param[in] ctx Context from which talloc should allocate it + * \param[in] data caller's private data parameter which should assigned to + write queue's file descriptor data parameter, if NULL than + allocated context itself is assigned. + * \return Allocated CTRL connection structure or NULL in case of errors + */ +struct ctrl_connection *osmo_ctrl_conn_alloc(void *ctx, void *data) { struct ctrl_connection *ccon = talloc_zero(ctx, struct ctrl_connection); if (!ccon) @@ -379,6 +386,9 @@ INIT_LLIST_HEAD(&ccon->cmds); INIT_LLIST_HEAD(&ccon->def_cmds); + + ccon->write_queue.bfd.data = data ? data : ccon; + ccon->write_queue.write_cb = control_write_cb; return ccon; } @@ -412,19 +422,17 @@ return ret; } #endif - ccon = ctrl_connection_alloc(listen_bfd->data); + ctrl = listen_bfd->data; + ccon = osmo_ctrl_conn_alloc(listen_bfd->data, ctrl); if (!ccon) { LOGP(DLCTRL, LOGL_ERROR, "Failed to allocate.\n"); close(fd); return -1; } - ctrl = listen_bfd->data; - ccon->write_queue.bfd.data = ctrl; ccon->write_queue.bfd.fd = fd; ccon->write_queue.bfd.when = BSC_FD_READ; ccon->write_queue.read_cb = handle_control_read; - ccon->write_queue.write_cb = control_write_cb; ret = osmo_fd_register(&ccon->write_queue.bfd); if (ret < 0) { @@ -654,6 +662,36 @@ return ctrl_interface_setup_dynip(data, "127.0.0.1", port, lookup); } +struct ctrl_handle *ctrl_interface_connect(void *data, const char *addr, + uint16_t port, + ctrl_cmd_lookup lookup) +{ + int ret; + struct ctrl_handle *ctrl; + + ctrl = talloc_zero(data, struct ctrl_handle); + if (!ctrl) + return NULL; + + INIT_LLIST_HEAD(&ctrl->ccon_list); + + ctrl->data = data; + ctrl->lookup = lookup; + + ctrl->listen_fd.cb = NULL; + ctrl->listen_fd.data = ctrl; + ret = osmo_sock_init_ifd(&ctrl->listen_fd, AF_INET, SOCK_STREAM, + IPPROTO_TCP, addr, port, OSMO_SOCK_F_CONNECT); + if (ret < 0) { + LOGP(DLCTRL, LOGL_ERROR, "Cannot connect to CTRL at %s:%u\n", + addr, port); + talloc_free(ctrl); + return NULL; + } + LOGP(DLCTRL, LOGL_NOTICE, "CTRL connected to %s:%u\n", addr, port); + return ctrl; +} + struct ctrl_handle *ctrl_interface_setup_dynip(void *data, const char *bind_addr, uint16_t port, -- To view, visit https://gerrit.osmocom.org/1629 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I522ed809cbebfd3d7dd08b4ed9137b39ff192e32 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Thu Jan 26 13:17:24 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 26 Jan 2017 13:17:24 +0000 Subject: osmo-bts[master]: LC15: Implementation of major BTS alarms In-Reply-To: References: Message-ID: Patch Set 1: Note: that's partially superseded by recently merged OML alarms patches. -- To view, visit https://gerrit.osmocom.org/809 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic4e088a3af115d3d5a124b61c1e92eed277d3469 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 26 14:26:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 26 Jan 2017 14:26:27 +0000 Subject: [PATCH] openbsc[master]: sgsn: Add GTP information to "show pdp-context" Message-ID: Review at https://gerrit.osmocom.org/1688 sgsn: Add GTP information to "show pdp-context" When displaying the PDP context, it is quite useful to also show IP address and TEI information about the GTP side of that PDP context. Change-Id: I56ea530240c15b26729e7a42e539020cb1e233e5 --- M openbsc/src/gprs/sgsn_vty.c 1 file changed, 21 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/88/1688/1 diff --git a/openbsc/src/gprs/sgsn_vty.c b/openbsc/src/gprs/sgsn_vty.c index 21c865b..4a97687 100644 --- a/openbsc/src/gprs/sgsn_vty.c +++ b/openbsc/src/gprs/sgsn_vty.c @@ -442,18 +442,37 @@ { 0, NULL } }; +static char *gtp_ntoa(struct ul16_t *ul) +{ + if (ul->l == 4) { + struct in_addr *ia = (struct in_addr *) ul; + return inet_ntoa(*ia); + } else { + return "UNKNOWN"; + } +} + static void vty_dump_pdp(struct vty *vty, const char *pfx, struct sgsn_pdp_ctx *pdp) { const char *imsi = pdp->mm ? pdp->mm->imsi : "(detaching)"; - vty_out(vty, "%sPDP Context IMSI: %s, SAPI: %u, NSAPI: %u%s", - pfx, imsi, pdp->sapi, pdp->nsapi, VTY_NEWLINE); + vty_out(vty, "%sPDP Context IMSI: %s, SAPI: %u, NSAPI: %u, TI: %u%s", + pfx, imsi, pdp->sapi, pdp->nsapi, pdp->ti, VTY_NEWLINE); vty_out(vty, "%s APN: %s%s", pfx, gprs_apn2str(pdp->lib->apn_use.v, pdp->lib->apn_use.l), VTY_NEWLINE); vty_out(vty, "%s PDP Address: %s%s", pfx, gprs_pdpaddr2str(pdp->lib->eua.v, pdp->lib->eua.l), VTY_NEWLINE); + vty_out(vty, "%s GTP Local Control(%s / TEIC: 0x%08x) ", pfx, + gtp_ntoa(&pdp->lib->gsnlc), pdp->lib->teic_own); + vty_out(vty, "Data(%s / TEID: 0x%08x)%s", + gtp_ntoa(&pdp->lib->gsnlu), pdp->lib->teid_own, VTY_NEWLINE); + vty_out(vty, "%s GTP Remote Control(%s / TEIC: 0x%08x) ", pfx, + gtp_ntoa(&pdp->lib->gsnrc), pdp->lib->teic_gn); + vty_out(vty, "Data(%s / TEID: 0x%08x)%s", + gtp_ntoa(&pdp->lib->gsnru), pdp->lib->teid_gn, VTY_NEWLINE); + vty_out_rate_ctr_group(vty, " ", pdp->ctrg); } -- To view, visit https://gerrit.osmocom.org/1688 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I56ea530240c15b26729e7a42e539020cb1e233e5 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Thu Jan 26 14:26:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 26 Jan 2017 14:26:27 +0000 Subject: [PATCH] openbsc[master]: remove unused struct members of 'struct sgsn_pdp_ctx' Message-ID: Review at https://gerrit.osmocom.org/1689 remove unused struct members of 'struct sgsn_pdp_ctx' There were some members that we neither set nor read, so let's shrink the struct size and remove those unused members. Change-Id: I02136e3aa91e58b2afc923c09c8693095497fdd7 --- M openbsc/include/openbsc/gprs_sgsn.h 1 file changed, 0 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/89/1689/1 diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h index 24e286c..dc165d3 100644 --- a/openbsc/include/openbsc/gprs_sgsn.h +++ b/openbsc/include/openbsc/gprs_sgsn.h @@ -295,12 +295,7 @@ //uint32_t qos_profile_req; //uint32_t qos_profile_neg; uint8_t radio_prio; - uint32_t tx_npdu_nr; - uint32_t rx_npdu_nr; - uint32_t tx_gtp_snd; - uint32_t rx_gtp_snu; //uint32_t charging_id; - int reordering_reqd; struct osmo_timer_list timer; unsigned int T; /* Txxxx number */ -- To view, visit https://gerrit.osmocom.org/1689 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I02136e3aa91e58b2afc923c09c8693095497fdd7 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Thu Jan 26 14:26:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 26 Jan 2017 14:26:28 +0000 Subject: [PATCH] openbsc[master]: Implement VTY configuration to control Early Classmark Sending Message-ID: Review at https://gerrit.osmocom.org/1690 Implement VTY configuration to control Early Classmark Sending The SI3 rest octests contain a flag that indicates if early classmark sending is allowed in this cell or not. So far we always set this to one, now it is configurable using the 'early-classmark-sending' command at the VTY node. Change-Id: Ia0b1cc5ab45673f3da70c59ae8917eba343f9862 --- M openbsc/include/openbsc/gsm_data_shared.h M openbsc/src/libbsc/bsc_vty.c M openbsc/src/libbsc/system_information.c 3 files changed, 27 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/90/1690/1 diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h index 9407b82..5b05016 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -803,6 +803,7 @@ uint16_t scramble_list[MAX_EARFCN_LIST]; } data; } si_common; + bool early_classmark_allowed; /* do we use static (user-defined) system information messages? (bitmask) */ uint32_t si_mode_static; diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c index 01ee4df..b28d4de 100644 --- a/openbsc/src/libbsc/bsc_vty.c +++ b/openbsc/src/libbsc/bsc_vty.c @@ -274,6 +274,9 @@ bts->si_common.chan_desc.bs_ag_blks_res, VTY_NEWLINE); vty_out(vty, "System Information present: 0x%08x, static: 0x%08x%s", bts->si_valid, bts->si_mode_static, VTY_NEWLINE); + vty_out(vty, "Early Classmark Sending: %s%s", + bts->early_classmark_allowed ? "allowed" : "forbidden", + VTY_NEWLINE); if (is_ipaccess_bts(bts)) vty_out(vty, " Unit ID: %u/%u/0, OML Stream ID 0x%02x%s", bts->ip_access.site_id, bts->ip_access.bts_id, @@ -641,6 +644,8 @@ VTY_NEWLINE); } } + vty_out(vty, " early-classmark-sending %s%s", + bts->early_classmark_allowed ? "allowed" : "forbidden", VTY_NEWLINE); switch (bts->type) { case GSM_BTS_TYPE_NANOBTS: case GSM_BTS_TYPE_OSMO_SYSMO: @@ -2674,6 +2679,23 @@ return CMD_SUCCESS; } +DEFUN(cfg_bts_early_cm, cfg_bts_early_cm_cmd, + "early-classmark-sending (allowed|forbidden)", + "Early Classmark Sending\n" + "Early Classmark Sending is allowed\n" + "Early Classmark Sending is forbidden\n") +{ + struct gsm_bts *bts = vty->index; + int rc, type; + + if (!strcmp(argv[0], "allowed")) + bts->early_classmark_allowed = true; + else + bts->early_classmark_allowed = false; + + return CMD_SUCCESS; +} + DEFUN(cfg_bts_neigh_mode, cfg_bts_neigh_mode_cmd, "neighbor-list mode (automatic|manual|manual-si5)", "Neighbor List\n" "Mode of Neighbor List generation\n" @@ -3955,6 +3977,7 @@ install_element(BTS_NODE, &cfg_bts_pag_free_cmd); install_element(BTS_NODE, &cfg_bts_si_mode_cmd); install_element(BTS_NODE, &cfg_bts_si_static_cmd); + install_element(BTS_NODE, &cfg_bts_early_cm_cmd); install_element(BTS_NODE, &cfg_bts_neigh_mode_cmd); install_element(BTS_NODE, &cfg_bts_neigh_cmd); install_element(BTS_NODE, &cfg_bts_si5_neigh_cmd); @@ -4029,6 +4052,7 @@ abis_nm_vty_init(); abis_om2k_vty_init(); e1inp_vty_init(); + osmo_fsm_vty_add_cmds(); bsc_vty_init_extra(); diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c index e71490e..a2dd827 100644 --- a/openbsc/src/libbsc/system_information.c +++ b/openbsc/src/libbsc/system_information.c @@ -764,6 +764,8 @@ } else { si_info.si2quater_indicator = 0; } + si_info.early_cm_ctrl = bts->early_classmark_allowed; + /* SI3 Rest Octets (10.5.2.34), containing CBQ, CELL_RESELECT_OFFSET, TEMPORARY_OFFSET, PENALTY_TIME Power Offset, 2ter Indicator, Early Classmark Sending, -- To view, visit https://gerrit.osmocom.org/1690 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia0b1cc5ab45673f3da70c59ae8917eba343f9862 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Thu Jan 26 14:49:07 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 26 Jan 2017 14:49:07 +0000 Subject: [PATCH] osmo-trx[master]: Fix building against sqlite3 Message-ID: Review at https://gerrit.osmocom.org/1691 Fix building against sqlite3 * Explicitly check for sqlite3 at configure stage, remove old include dir, fix header inclusion. * Use configure results for linking instead of hardcoded linker option for sqlite. * Add dependency on -dev package for .deb Change-Id: I6d7f697d67651f02ceb77fc4da4317b64fa47f9e Related: OS#1928 --- M CommonLibs/Makefile.am M CommonLibs/sqlite3util.cpp M Makefile.am M Makefile.common M Transceiver52M/Makefile.am M configure.ac M debian/control 7 files changed, 12 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/91/1691/1 diff --git a/CommonLibs/Makefile.am b/CommonLibs/Makefile.am index 26a55ed..ed9cf29 100644 --- a/CommonLibs/Makefile.am +++ b/CommonLibs/Makefile.am @@ -78,7 +78,7 @@ URLEncodeTest_LDADD = libcommon.la BitVectorTest_SOURCES = BitVectorTest.cpp -BitVectorTest_LDADD = libcommon.la $(SQLITE_LA) +BitVectorTest_LDADD = libcommon.la $(SQLITE3_LIBS) InterthreadTest_SOURCES = InterthreadTest.cpp InterthreadTest_LDADD = libcommon.la @@ -92,19 +92,19 @@ TimevalTest_LDADD = libcommon.la VectorTest_SOURCES = VectorTest.cpp -VectorTest_LDADD = libcommon.la $(SQLITE_LA) +VectorTest_LDADD = libcommon.la $(SQLITE3_LIBS) RegexpTest_SOURCES = RegexpTest.cpp RegexpTest_LDADD = libcommon.la ConfigurationTest_SOURCES = ConfigurationTest.cpp -ConfigurationTest_LDADD = libcommon.la $(SQLITE_LA) +ConfigurationTest_LDADD = libcommon.la $(SQLITE3_LIBS) # ReportingTest_SOURCES = ReportingTest.cpp # ReportingTest_LDADD = libcommon.la $(SQLITE_LA) LogTest_SOURCES = LogTest.cpp -LogTest_LDADD = libcommon.la $(SQLITE_LA) +LogTest_LDADD = libcommon.la $(SQLITE3_LIBS) F16Test_SOURCES = F16Test.cpp diff --git a/CommonLibs/sqlite3util.cpp b/CommonLibs/sqlite3util.cpp index 036ef2c..2b19ee6 100644 --- a/CommonLibs/sqlite3util.cpp +++ b/CommonLibs/sqlite3util.cpp @@ -4,7 +4,7 @@ */ -#include "sqlite3.h" +#include #include "sqlite3util.h" #include diff --git a/Makefile.am b/Makefile.am index f9f5a5c..56cb4ba 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,7 +21,7 @@ include $(top_srcdir)/Makefile.common ACLOCAL_AMFLAGS = -I config -AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(USB_INCLUDES) $(WITH_INCLUDES) +AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(USB_INCLUDES) $(WITH_INCLUDES) $(SQLITE3_CFLAGS) AM_CXXFLAGS = -Wall -pthread -ldl #AM_CXXFLAGS = -Wall -O2 -NDEBUG -pthread -ldl #AM_CFLAGS = -Wall -O2 -NDEBUG -pthread -ldl diff --git a/Makefile.common b/Makefile.common index d7927a5..c0fc850 100644 --- a/Makefile.common +++ b/Makefile.common @@ -23,16 +23,13 @@ COMMON_INCLUDEDIR = $(top_srcdir)/CommonLibs GSM_INCLUDEDIR = $(top_srcdir)/GSM -SQLITE_INCLUDEDIR = $(top_srcdir)/sqlite3 STD_DEFINES_AND_INCLUDES = \ $(SVNDEV) \ -I$(COMMON_INCLUDEDIR) \ - -I$(GSM_INCLUDEDIR) \ - -I$(SQLITE_INCLUDEDIR) + -I$(GSM_INCLUDEDIR) COMMON_LA = $(top_builddir)/CommonLibs/libcommon.la GSM_LA = $(top_builddir)/GSM/libGSM.la -SQLITE_LA = -lsqlite3 MOSTLYCLEANFILES = *~ diff --git a/Transceiver52M/Makefile.am b/Transceiver52M/Makefile.am index 667217f..68cdf74 100644 --- a/Transceiver52M/Makefile.am +++ b/Transceiver52M/Makefile.am @@ -98,7 +98,7 @@ libtransceiver.la \ $(ARCH_LA) \ $(GSM_LA) \ - $(COMMON_LA) $(SQLITE_LA) + $(COMMON_LA) $(SQLITE3_LIBS) if USRP1 libtransceiver_la_SOURCES += USRPDevice.cpp diff --git a/configure.ac b/configure.ac index 0cf3cc5..649bb0e 100644 --- a/configure.ac +++ b/configure.ac @@ -118,7 +118,10 @@ AM_CONDITIONAL(ARCH_ARM, [test "x$with_neon" = "xyes" || test "x$with_neon_vfpv4" = "xyes"]) AM_CONDITIONAL(ARCH_ARM_A15, [test "x$with_neon_vfpv4" = "xyes"]) +AC_CHECK_LIB(sqlite3, sqlite3_open, , AC_MSG_ERROR(sqlite3 is not available)) + PKG_CHECK_MODULES(LIBUSB, libusb-1.0) +PKG_CHECK_MODULES(SQLITE3, sqlite3) AC_CHECK_HEADER([boost/config.hpp],[], [AC_MSG_ERROR([boost/config.hpp not found, install e.g. libboost-dev])]) diff --git a/debian/control b/debian/control index beb6f6a..d016afa 100644 --- a/debian/control +++ b/debian/control @@ -5,6 +5,7 @@ Build-Depends: debhelper (>= 9), autotools-dev, libdbd-sqlite3, + libsqlite3-dev, pkg-config, dh-autoreconf, libuhd-dev, -- To view, visit https://gerrit.osmocom.org/1691 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6d7f697d67651f02ceb77fc4da4317b64fa47f9e Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Jan 26 15:08:03 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 26 Jan 2017 15:08:03 +0000 Subject: [PATCH] openbsc[master]: Attempt to fix OE build Message-ID: Review at https://gerrit.osmocom.org/1692 Attempt to fix OE build Older OpenEmbedded versions do not have autoconf-archive recipe. Provide local copy of necessary m4 files to fix build. Change-Id: Iacc1958b471ec3fc65307259039e1d496845f528 --- M openbsc/configure.ac A openbsc/m4tmp/README A openbsc/m4tmp/ax_check_compile_flag.m4 3 files changed, 81 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/92/1692/1 diff --git a/openbsc/configure.ac b/openbsc/configure.ac index 7e244bc..3fe5e3d 100644 --- a/openbsc/configure.ac +++ b/openbsc/configure.ac @@ -9,6 +9,9 @@ AM_INIT_AUTOMAKE([dist-bzip2]) AC_CONFIG_TESTDIR(tests) +dnl FIXME: Remove this once we do not need local macro copies anymore (after upgrade to newer OE?) +AC_CONFIG_MACRO_DIRS([m4tmp]) + dnl kernel style compile messages m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) diff --git a/openbsc/m4tmp/README b/openbsc/m4tmp/README new file mode 100644 index 0000000..fb93b7b --- /dev/null +++ b/openbsc/m4tmp/README @@ -0,0 +1,4 @@ +We have problems with OE builds due to absence of autoconf-archive [1] recipe. +This directory provide local copy as a quick temporary fix until this is resolved. + +[1] https://layers.openembedded.org/layerindex/recipe/931/ diff --git a/openbsc/m4tmp/ax_check_compile_flag.m4 b/openbsc/m4tmp/ax_check_compile_flag.m4 new file mode 100644 index 0000000..ca36397 --- /dev/null +++ b/openbsc/m4tmp/ax_check_compile_flag.m4 @@ -0,0 +1,74 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) +# +# DESCRIPTION +# +# Check whether the given FLAG works with the current language's compiler +# or gives an error. (Warnings, however, are ignored) +# +# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on +# success/failure. +# +# If EXTRA-FLAGS is defined, it is added to the current language's default +# flags (e.g. CFLAGS) when the check is done. The check is thus made with +# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to +# force the compiler to issue an error when a bad flag is given. +# +# INPUT gives an alternative input source to AC_COMPILE_IFELSE. +# +# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this +# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. +# +# LICENSE +# +# Copyright (c) 2008 Guido U. Draheim +# Copyright (c) 2011 Maarten Bosmans +# +# 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, see . +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 4 + +AC_DEFUN([AX_CHECK_COMPILE_FLAG], +[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF +AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl +AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ + ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS + _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" + AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], + [AS_VAR_SET(CACHEVAR,[yes])], + [AS_VAR_SET(CACHEVAR,[no])]) + _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) +AS_VAR_IF(CACHEVAR,yes, + [m4_default([$2], :)], + [m4_default([$3], :)]) +AS_VAR_POPDEF([CACHEVAR])dnl +])dnl AX_CHECK_COMPILE_FLAGS -- To view, visit https://gerrit.osmocom.org/1692 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iacc1958b471ec3fc65307259039e1d496845f528 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Jan 26 15:25:17 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 26 Jan 2017 15:25:17 +0000 Subject: openbsc[master]: remove unused struct members of 'struct sgsn_pdp_ctx' In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/1689/1/openbsc/include/openbsc/gprs_sgsn.h File openbsc/include/openbsc/gprs_sgsn.h: Line 295: //uint32_t qos_profile_req; Maybe drop commented members too? -- To view, visit https://gerrit.osmocom.org/1689 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I02136e3aa91e58b2afc923c09c8693095497fdd7 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Jan 26 16:06:31 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 26 Jan 2017 16:06:31 +0000 Subject: [PATCH] osmo-trx[master]: Fix building against sqlite3 In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1691 to look at the new patch set (#2). Fix building against sqlite3 * Explicitly check for sqlite3 at configure stage, remove old include dir, fix header inclusion. * Use configure results for linking instead of hardcoded linker option for sqlite. * Add dependency on -dev package for .deb Change-Id: I6d7f697d67651f02ceb77fc4da4317b64fa47f9e Fixes: OS#1928 --- M CommonLibs/Makefile.am M CommonLibs/sqlite3util.cpp M Makefile.am M Makefile.common M Transceiver52M/Makefile.am M configure.ac M debian/control 7 files changed, 12 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/91/1691/2 diff --git a/CommonLibs/Makefile.am b/CommonLibs/Makefile.am index 26a55ed..ed9cf29 100644 --- a/CommonLibs/Makefile.am +++ b/CommonLibs/Makefile.am @@ -78,7 +78,7 @@ URLEncodeTest_LDADD = libcommon.la BitVectorTest_SOURCES = BitVectorTest.cpp -BitVectorTest_LDADD = libcommon.la $(SQLITE_LA) +BitVectorTest_LDADD = libcommon.la $(SQLITE3_LIBS) InterthreadTest_SOURCES = InterthreadTest.cpp InterthreadTest_LDADD = libcommon.la @@ -92,19 +92,19 @@ TimevalTest_LDADD = libcommon.la VectorTest_SOURCES = VectorTest.cpp -VectorTest_LDADD = libcommon.la $(SQLITE_LA) +VectorTest_LDADD = libcommon.la $(SQLITE3_LIBS) RegexpTest_SOURCES = RegexpTest.cpp RegexpTest_LDADD = libcommon.la ConfigurationTest_SOURCES = ConfigurationTest.cpp -ConfigurationTest_LDADD = libcommon.la $(SQLITE_LA) +ConfigurationTest_LDADD = libcommon.la $(SQLITE3_LIBS) # ReportingTest_SOURCES = ReportingTest.cpp # ReportingTest_LDADD = libcommon.la $(SQLITE_LA) LogTest_SOURCES = LogTest.cpp -LogTest_LDADD = libcommon.la $(SQLITE_LA) +LogTest_LDADD = libcommon.la $(SQLITE3_LIBS) F16Test_SOURCES = F16Test.cpp diff --git a/CommonLibs/sqlite3util.cpp b/CommonLibs/sqlite3util.cpp index 036ef2c..2b19ee6 100644 --- a/CommonLibs/sqlite3util.cpp +++ b/CommonLibs/sqlite3util.cpp @@ -4,7 +4,7 @@ */ -#include "sqlite3.h" +#include #include "sqlite3util.h" #include diff --git a/Makefile.am b/Makefile.am index f9f5a5c..56cb4ba 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,7 +21,7 @@ include $(top_srcdir)/Makefile.common ACLOCAL_AMFLAGS = -I config -AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(USB_INCLUDES) $(WITH_INCLUDES) +AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(USB_INCLUDES) $(WITH_INCLUDES) $(SQLITE3_CFLAGS) AM_CXXFLAGS = -Wall -pthread -ldl #AM_CXXFLAGS = -Wall -O2 -NDEBUG -pthread -ldl #AM_CFLAGS = -Wall -O2 -NDEBUG -pthread -ldl diff --git a/Makefile.common b/Makefile.common index d7927a5..c0fc850 100644 --- a/Makefile.common +++ b/Makefile.common @@ -23,16 +23,13 @@ COMMON_INCLUDEDIR = $(top_srcdir)/CommonLibs GSM_INCLUDEDIR = $(top_srcdir)/GSM -SQLITE_INCLUDEDIR = $(top_srcdir)/sqlite3 STD_DEFINES_AND_INCLUDES = \ $(SVNDEV) \ -I$(COMMON_INCLUDEDIR) \ - -I$(GSM_INCLUDEDIR) \ - -I$(SQLITE_INCLUDEDIR) + -I$(GSM_INCLUDEDIR) COMMON_LA = $(top_builddir)/CommonLibs/libcommon.la GSM_LA = $(top_builddir)/GSM/libGSM.la -SQLITE_LA = -lsqlite3 MOSTLYCLEANFILES = *~ diff --git a/Transceiver52M/Makefile.am b/Transceiver52M/Makefile.am index 667217f..68cdf74 100644 --- a/Transceiver52M/Makefile.am +++ b/Transceiver52M/Makefile.am @@ -98,7 +98,7 @@ libtransceiver.la \ $(ARCH_LA) \ $(GSM_LA) \ - $(COMMON_LA) $(SQLITE_LA) + $(COMMON_LA) $(SQLITE3_LIBS) if USRP1 libtransceiver_la_SOURCES += USRPDevice.cpp diff --git a/configure.ac b/configure.ac index 0cf3cc5..649bb0e 100644 --- a/configure.ac +++ b/configure.ac @@ -118,7 +118,10 @@ AM_CONDITIONAL(ARCH_ARM, [test "x$with_neon" = "xyes" || test "x$with_neon_vfpv4" = "xyes"]) AM_CONDITIONAL(ARCH_ARM_A15, [test "x$with_neon_vfpv4" = "xyes"]) +AC_CHECK_LIB(sqlite3, sqlite3_open, , AC_MSG_ERROR(sqlite3 is not available)) + PKG_CHECK_MODULES(LIBUSB, libusb-1.0) +PKG_CHECK_MODULES(SQLITE3, sqlite3) AC_CHECK_HEADER([boost/config.hpp],[], [AC_MSG_ERROR([boost/config.hpp not found, install e.g. libboost-dev])]) diff --git a/debian/control b/debian/control index beb6f6a..d016afa 100644 --- a/debian/control +++ b/debian/control @@ -5,6 +5,7 @@ Build-Depends: debhelper (>= 9), autotools-dev, libdbd-sqlite3, + libsqlite3-dev, pkg-config, dh-autoreconf, libuhd-dev, -- To view, visit https://gerrit.osmocom.org/1691 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I6d7f697d67651f02ceb77fc4da4317b64fa47f9e Gerrit-PatchSet: 2 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Tom Tsou From gerrit-no-reply at lists.osmocom.org Thu Jan 26 16:07:50 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 26 Jan 2017 16:07:50 +0000 Subject: openbsc[master]: add struct gprs_sub, separating gprs from gsm_subscriber In-Reply-To: References: Message-ID: Patch Set 3: > http://jenkins.osmocom.org/jenkins/job/OpenBSC-gerrit/1736/ : > FAILURE This build failure makes absolutely no sense to me. ../../../src/gprs/gprs_gmm.c:67:37: fatal error: openbsc/gprs_subscriber.h: No such file or directory #include 1. the almost similar patch set 2 built without this error 2. the file is there, marked A in this patch. I've read it 20 times, there is no typo. Retriggering in the hope that it's some weird freak accident. -- To view, visit https://gerrit.osmocom.org/1684 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia8b391ee009c8545763cba04505be3947835120e Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 26 16:13:10 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 26 Jan 2017 16:13:10 +0000 Subject: osmo-bts[master]: Fixes memory leak at each call placed. In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 (1 comment) Yes, we can merge this, but preferably also handle the 'default:' case as indicated, and also fix l1_if.c in sysmobts in the same way. https://gerrit.osmocom.org/#/c/1656/1/src/osmo-bts-litecell15/l1_if.c File src/osmo-bts-litecell15/l1_if.c: Line 1111: default: This case would still leak a msgb silently, right? Of course we probably don't expect this to hit, but since there is no log message here either, we can't be sure about that. -- To view, visit https://gerrit.osmocom.org/1656 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ife1293e3238cfda16eac9c28e7e81ffe5595e031 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: jfdionne Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Jan 26 16:20:02 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 26 Jan 2017 16:20:02 +0000 Subject: osmo-bts[master]: Fixes memory leak at each call placed. In-Reply-To: References: Message-ID: Patch Set 1: Sysmobts fix is int 1660. You're probably right about default case. -- To view, visit https://gerrit.osmocom.org/1656 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ife1293e3238cfda16eac9c28e7e81ffe5595e031 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: jfdionne Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 26 16:21:37 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 26 Jan 2017 16:21:37 +0000 Subject: osmo-bts[master]: Fixes AMR HR DTX FSM logic. In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/1659/1//COMMIT_MSG Commit Message: Line 7: Fixes AMR HR DTX FSM logic. (for the future: better would be, to match our commit log style "Fix AMR...", not "Fixes". Just saying because I saw this twice now.) -- To view, visit https://gerrit.osmocom.org/1659 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia811305e15541f2376005df736bd610e8b0d2f69 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: jfdionne Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Jan 26 16:22:35 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 26 Jan 2017 16:22:35 +0000 Subject: osmo-bts[master]: Fixes memory leak on each call In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 ah, here is the second one. Let's just have these in the same patch, or otherwise mark both explicitly as lc15 and sysmo, and refer to each other in the commit log msg -- To view, visit https://gerrit.osmocom.org/1660 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6eaf16892ea0048338798d0ba5a5088f0c158344 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 26 16:23:32 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 26 Jan 2017 16:23:32 +0000 Subject: osmo-bts[master]: Fixes memory leak at each call placed. In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 merge with #1660 or clearly mark lc15 and refer to #1660's change-id here -- To view, visit https://gerrit.osmocom.org/1656 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ife1293e3238cfda16eac9c28e7e81ffe5595e031 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: jfdionne Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 26 16:27:06 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 26 Jan 2017 16:27:06 +0000 Subject: [PATCH] osmo-bts[master]: Fixes memory leak at each call placed. In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1656 to look at the new patch set (#2). Fixes memory leak at each call placed. Max's note: added same fix for default case and ported it to sysmobts. Change-Id: Ife1293e3238cfda16eac9c28e7e81ffe5595e031 --- M src/osmo-bts-litecell15/l1_if.c M src/osmo-bts-sysmo/l1_if.c 2 files changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/56/1656/2 diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index c70bd9e..0c5ef6b 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -1093,8 +1093,10 @@ rc = handle_mph_time_ind(fl1, &l1p->u.mphTimeInd, msg); break; case GsmL1_PrimId_MphSyncInd: + msgb_free(msg); break; case GsmL1_PrimId_PhConnectInd: + msgb_free(msg); break; case GsmL1_PrimId_PhReadyToSendInd: rc = handle_ph_readytosend_ind(fl1, &l1p->u.phReadyToSendInd, @@ -1107,7 +1109,7 @@ rc = handle_ph_ra_ind(fl1, &l1p->u.phRaInd, msg); break; default: - break; + msgb_free(msg); } return rc; diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 82db8d7..490264f 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -1081,8 +1081,10 @@ rc = handle_mph_time_ind(fl1, &l1p->u.mphTimeInd, msg); break; case GsmL1_PrimId_MphSyncInd: + msgb_free(msg); break; case GsmL1_PrimId_PhConnectInd: + msgb_free(msg); break; case GsmL1_PrimId_PhReadyToSendInd: rc = handle_ph_readytosend_ind(fl1, &l1p->u.phReadyToSendInd, @@ -1095,7 +1097,7 @@ rc = handle_ph_ra_ind(fl1, &l1p->u.phRaInd, msg); break; default: - break; + msgb_free(msg); } return rc; -- To view, visit https://gerrit.osmocom.org/1656 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ife1293e3238cfda16eac9c28e7e81ffe5595e031 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: jfdionne Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Jan 26 16:27:34 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 26 Jan 2017 16:27:34 +0000 Subject: osmo-pcu[master]: tbf.cpp: use new tlli instead of old tlli In-Reply-To: References: Message-ID: Patch Set 1: looks like you need to adjust the tbf test expectations -- To view, visit https://gerrit.osmocom.org/1663 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2fd6fec022506e203d05e91c36ccd9e020ff816c Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 26 16:27:59 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 26 Jan 2017 16:27:59 +0000 Subject: [ABANDON] osmo-bts[master]: Fixes memory leak on each call In-Reply-To: References: Message-ID: Max has abandoned this change. Change subject: Fixes memory leak on each call ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/1660 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I6eaf16892ea0048338798d0ba5a5088f0c158344 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Jan 26 16:34:45 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 26 Jan 2017 16:34:45 +0000 Subject: openbsc[master]: sgsn: Fix deeply flawed copying logic for PDP context activa... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/1686/1/openbsc/src/gprs/gprs_gmm.c File openbsc/src/gprs/gprs_gmm.c: Line 2409: int delete = 1; (my impression is that we recently tend to use bool instead... at least I do.) -- To view, visit https://gerrit.osmocom.org/1686 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I564526e7cde2b8a2f0ce900492cd38fc23c176a7 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Jan 26 16:36:03 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 26 Jan 2017 16:36:03 +0000 Subject: osmo-pcu[master]: cosmetic: Fix log output In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1687 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I40d01c71982ad83589f070cf0047a4ae04695411 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 26 16:42:39 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 26 Jan 2017 16:42:39 +0000 Subject: osmo-trx[master]: Fix building against sqlite3 In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1691 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6d7f697d67651f02ceb77fc4da4317b64fa47f9e Gerrit-PatchSet: 2 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Tom Tsou Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 26 17:00:49 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 26 Jan 2017 17:00:49 +0000 Subject: [PATCH] openbsc[master]: sgsn: Fix deeply flawed copying logic for PDP context activa... In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1686 to look at the new patch set (#2). sgsn: Fix deeply flawed copying logic for PDP context activation It is one of these changes that should have never worked but did for a long time. Only recently a corrupted GTP message was seen. The code in ccd2312d10e14747e8a4d26d8f72b052ffcfc282 tried to solve the right problem but was deeply flawed. * Make the code operate on the copied message and not the original one that is deleted by the underlaying layers on return * Add an out variable to determine if the msgb should be deleted and assume that by default it will be deleted. Change-Id: I564526e7cde2b8a2f0ce900492cd38fc23c176a7 --- M openbsc/src/gprs/gprs_gmm.c 1 file changed, 9 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/86/1686/2 diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c index 88be512..ac61e93 100644 --- a/openbsc/src/gprs/gprs_gmm.c +++ b/openbsc/src/gprs/gprs_gmm.c @@ -2169,6 +2169,7 @@ /* The context is gone while we made a request */ if (!lookup->mmctx) { + talloc_free(lookup->orig_msg); talloc_free(lookup); return; } @@ -2230,6 +2231,7 @@ lookup->sapi, &lookup->tp, 1); /* Now free it */ + talloc_free(lookup->orig_msg); talloc_free(lookup); return; @@ -2237,10 +2239,11 @@ gsm48_tx_gsm_act_pdp_rej(lookup->mmctx, lookup->ti, GMM_CAUSE_NET_FAIL, 0, NULL); lookup->mmctx->ggsn_lookup = NULL; + talloc_free(lookup->orig_msg); talloc_free(lookup); } -static int do_act_pdp_req(struct sgsn_mm_ctx *mmctx, struct msgb *msg) +static int do_act_pdp_req(struct sgsn_mm_ctx *mmctx, struct msgb *msg, bool *delete) { struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_gmmh(msg); struct gsm48_act_pdp_ctx_req *act_req = (struct gsm48_act_pdp_ctx_req *) gh->data; @@ -2389,6 +2392,7 @@ LOGMMCTXP(LOGL_ERROR, mmctx, "Failed to start ares query.\n"); goto no_context; } + *delete = 0; return 0; @@ -2402,6 +2406,7 @@ static int gsm48_rx_gsm_act_pdp_req(struct sgsn_mm_ctx *mmctx, struct msgb *_msg) { + bool delete = 1; struct msgb *msg; int rc; @@ -2428,8 +2433,9 @@ 0, NULL); } - rc = do_act_pdp_req(mmctx, _msg); - msgb_free(msg); + rc = do_act_pdp_req(mmctx, msg, &delete); + if (delete) + msgb_free(msg); return rc; } -- To view, visit https://gerrit.osmocom.org/1686 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I564526e7cde2b8a2f0ce900492cd38fc23c176a7 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Jan 26 18:17:19 2017 From: gerrit-no-reply at lists.osmocom.org (jfdionne) Date: Thu, 26 Jan 2017 18:17:19 +0000 Subject: osmo-bts[master]: Fixes memory leak at each call placed. In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1656 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ife1293e3238cfda16eac9c28e7e81ffe5595e031 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: jfdionne Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: jfdionne Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 26 18:55:58 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 26 Jan 2017 18:55:58 +0000 Subject: osmo-pcu[master]: BTS: accept also relative frame numbers with rach requst In-Reply-To: References: Message-ID: Patch Set 7: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1205 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iaa182d8d29c6a0f5fa06064c2eb48b21b1ba2775 Gerrit-PatchSet: 7 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 26 18:55:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 26 Jan 2017 18:55:59 +0000 Subject: [MERGED] osmo-pcu[master]: BTS: accept also relative frame numbers with rach requst In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: BTS: accept also relative frame numbers with rach requst ...................................................................... BTS: accept also relative frame numbers with rach requst The rach request contains a relative frame number (Fn % 42432), while BTS::rcv_rach() accepts the full frame number only. Since the BTS is always aware of the full frame number this is not a problem. But for BSC co-located PCU schemes it is a problem since the rach request only contains the relative frame number as mentioned above. The pcu continusly receives frame number updates with the GSM time indication message. It is simple to re-calculate the full frame number from that information. This patch makes BTS::rcv_rach() compatible with relative frame numbers, while not breaking the compatibility for full frame numbers Change-Id: Iaa182d8d29c6a0f5fa06064c2eb48b21b1ba2775 --- M src/bts.cpp M tests/tbf/TbfTest.cpp 2 files changed, 19 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/bts.cpp b/src/bts.cpp index 25cbc60..e1c6dcc 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -536,6 +536,21 @@ if (is_11bit) rach_frame_11bit(); + /* Note: If a BTS is sending in a rach request it will be fully aware + * of the frame number. If the PCU is used in a BSC-co-located setup. + * The BSC will forward the incoming RACH request. The RACH request + * only contains the relative frame number (Fn % 42432) in its request + * reference. This PCU implementation has to fit both secenarious, so + * we need to assume that Fn is a relative frame number. */ + + /* Ensure that all following calculations are performed with the + * relative frame number */ + Fn = Fn % 42432; + + /* Restore the full frame number + * (See also 3GPP TS 44.018, section 10.5.2.38) */ + Fn = Fn + m_cur_fn - m_cur_fn % 42432; + LOGP(DRLCMAC, LOGL_DEBUG, "MS requests UL TBF on RACH, " "so we provide one \n" "ra=0x%02x Fn=%u qta=%d is_11bit=%d:\n", ra, Fn, qta, is_11bit); diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index aec6ef8..e367ce6 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -42,6 +42,8 @@ #include +#define DUMMY_FN 2654167 + void *tall_pcu_ctx; int16_t spoof_mnc = 0, spoof_mcc = 0; @@ -166,6 +168,7 @@ trx = &bts->trx[0]; trx->pdch[ts_no].enable(); + the_bts->set_current_frame_number(DUMMY_FN); } static gprs_rlcmac_dl_tbf *create_dl_tbf(BTS *the_bts, uint8_t ms_class, @@ -1692,7 +1695,7 @@ { BTS the_bts; int ts_no = 7; - uint32_t fn = 2654167; /* 17,25,9 */ + uint32_t fn = DUMMY_FN; /* 17,25,9 */ uint32_t tlli = 0xf1223344; const char *imsi = "0011223344"; uint16_t qta = 31; -- To view, visit https://gerrit.osmocom.org/1205 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaa182d8d29c6a0f5fa06064c2eb48b21b1ba2775 Gerrit-PatchSet: 7 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Jan 26 18:56:13 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 26 Jan 2017 18:56:13 +0000 Subject: openbsc[master]: Implement VTY configuration to control Early Classmark Sending In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1690 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia0b1cc5ab45673f3da70c59ae8917eba343f9862 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 26 18:56:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 26 Jan 2017 18:56:20 +0000 Subject: openbsc[master]: remove unused struct members of 'struct sgsn_pdp_ctx' In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1689 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I02136e3aa91e58b2afc923c09c8693095497fdd7 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 26 18:56:48 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 26 Jan 2017 18:56:48 +0000 Subject: openbsc[master]: remove unused struct members of 'struct sgsn_pdp_ctx' In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/1689/1/openbsc/include/openbsc/gprs_sgsn.h File openbsc/include/openbsc/gprs_sgsn.h: Line 295: //uint32_t qos_profile_req; > Maybe drop commented members too? can be done in follow-up patch. -- To view, visit https://gerrit.osmocom.org/1689 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I02136e3aa91e58b2afc923c09c8693095497fdd7 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Jan 26 18:56:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 26 Jan 2017 18:56:52 +0000 Subject: openbsc[master]: sgsn: Add GTP information to "show pdp-context" In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1688 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I56ea530240c15b26729e7a42e539020cb1e233e5 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 26 18:56:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 26 Jan 2017 18:56:56 +0000 Subject: [MERGED] openbsc[master]: sgsn: Add GTP information to "show pdp-context" In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: sgsn: Add GTP information to "show pdp-context" ...................................................................... sgsn: Add GTP information to "show pdp-context" When displaying the PDP context, it is quite useful to also show IP address and TEI information about the GTP side of that PDP context. Change-Id: I56ea530240c15b26729e7a42e539020cb1e233e5 --- M openbsc/src/gprs/sgsn_vty.c 1 file changed, 21 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/src/gprs/sgsn_vty.c b/openbsc/src/gprs/sgsn_vty.c index 21c865b..4a97687 100644 --- a/openbsc/src/gprs/sgsn_vty.c +++ b/openbsc/src/gprs/sgsn_vty.c @@ -442,18 +442,37 @@ { 0, NULL } }; +static char *gtp_ntoa(struct ul16_t *ul) +{ + if (ul->l == 4) { + struct in_addr *ia = (struct in_addr *) ul; + return inet_ntoa(*ia); + } else { + return "UNKNOWN"; + } +} + static void vty_dump_pdp(struct vty *vty, const char *pfx, struct sgsn_pdp_ctx *pdp) { const char *imsi = pdp->mm ? pdp->mm->imsi : "(detaching)"; - vty_out(vty, "%sPDP Context IMSI: %s, SAPI: %u, NSAPI: %u%s", - pfx, imsi, pdp->sapi, pdp->nsapi, VTY_NEWLINE); + vty_out(vty, "%sPDP Context IMSI: %s, SAPI: %u, NSAPI: %u, TI: %u%s", + pfx, imsi, pdp->sapi, pdp->nsapi, pdp->ti, VTY_NEWLINE); vty_out(vty, "%s APN: %s%s", pfx, gprs_apn2str(pdp->lib->apn_use.v, pdp->lib->apn_use.l), VTY_NEWLINE); vty_out(vty, "%s PDP Address: %s%s", pfx, gprs_pdpaddr2str(pdp->lib->eua.v, pdp->lib->eua.l), VTY_NEWLINE); + vty_out(vty, "%s GTP Local Control(%s / TEIC: 0x%08x) ", pfx, + gtp_ntoa(&pdp->lib->gsnlc), pdp->lib->teic_own); + vty_out(vty, "Data(%s / TEID: 0x%08x)%s", + gtp_ntoa(&pdp->lib->gsnlu), pdp->lib->teid_own, VTY_NEWLINE); + vty_out(vty, "%s GTP Remote Control(%s / TEIC: 0x%08x) ", pfx, + gtp_ntoa(&pdp->lib->gsnrc), pdp->lib->teic_gn); + vty_out(vty, "Data(%s / TEID: 0x%08x)%s", + gtp_ntoa(&pdp->lib->gsnru), pdp->lib->teid_gn, VTY_NEWLINE); + vty_out_rate_ctr_group(vty, " ", pdp->ctrg); } -- To view, visit https://gerrit.osmocom.org/1688 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I56ea530240c15b26729e7a42e539020cb1e233e5 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Jan 26 18:56:58 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 26 Jan 2017 18:56:58 +0000 Subject: [MERGED] openbsc[master]: remove unused struct members of 'struct sgsn_pdp_ctx' In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: remove unused struct members of 'struct sgsn_pdp_ctx' ...................................................................... remove unused struct members of 'struct sgsn_pdp_ctx' There were some members that we neither set nor read, so let's shrink the struct size and remove those unused members. Change-Id: I02136e3aa91e58b2afc923c09c8693095497fdd7 --- M openbsc/include/openbsc/gprs_sgsn.h 1 file changed, 0 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h index 24e286c..dc165d3 100644 --- a/openbsc/include/openbsc/gprs_sgsn.h +++ b/openbsc/include/openbsc/gprs_sgsn.h @@ -295,12 +295,7 @@ //uint32_t qos_profile_req; //uint32_t qos_profile_neg; uint8_t radio_prio; - uint32_t tx_npdu_nr; - uint32_t rx_npdu_nr; - uint32_t tx_gtp_snd; - uint32_t rx_gtp_snu; //uint32_t charging_id; - int reordering_reqd; struct osmo_timer_list timer; unsigned int T; /* Txxxx number */ -- To view, visit https://gerrit.osmocom.org/1689 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I02136e3aa91e58b2afc923c09c8693095497fdd7 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Thu Jan 26 18:56:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 26 Jan 2017 18:56:59 +0000 Subject: [MERGED] openbsc[master]: Implement VTY configuration to control Early Classmark Sending In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Implement VTY configuration to control Early Classmark Sending ...................................................................... Implement VTY configuration to control Early Classmark Sending The SI3 rest octests contain a flag that indicates if early classmark sending is allowed in this cell or not. So far we always set this to one, now it is configurable using the 'early-classmark-sending' command at the VTY node. Change-Id: Ia0b1cc5ab45673f3da70c59ae8917eba343f9862 --- M openbsc/include/openbsc/gsm_data_shared.h M openbsc/src/libbsc/bsc_vty.c M openbsc/src/libbsc/system_information.c 3 files changed, 27 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h index 9407b82..5b05016 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -803,6 +803,7 @@ uint16_t scramble_list[MAX_EARFCN_LIST]; } data; } si_common; + bool early_classmark_allowed; /* do we use static (user-defined) system information messages? (bitmask) */ uint32_t si_mode_static; diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c index 01ee4df..b28d4de 100644 --- a/openbsc/src/libbsc/bsc_vty.c +++ b/openbsc/src/libbsc/bsc_vty.c @@ -274,6 +274,9 @@ bts->si_common.chan_desc.bs_ag_blks_res, VTY_NEWLINE); vty_out(vty, "System Information present: 0x%08x, static: 0x%08x%s", bts->si_valid, bts->si_mode_static, VTY_NEWLINE); + vty_out(vty, "Early Classmark Sending: %s%s", + bts->early_classmark_allowed ? "allowed" : "forbidden", + VTY_NEWLINE); if (is_ipaccess_bts(bts)) vty_out(vty, " Unit ID: %u/%u/0, OML Stream ID 0x%02x%s", bts->ip_access.site_id, bts->ip_access.bts_id, @@ -641,6 +644,8 @@ VTY_NEWLINE); } } + vty_out(vty, " early-classmark-sending %s%s", + bts->early_classmark_allowed ? "allowed" : "forbidden", VTY_NEWLINE); switch (bts->type) { case GSM_BTS_TYPE_NANOBTS: case GSM_BTS_TYPE_OSMO_SYSMO: @@ -2674,6 +2679,23 @@ return CMD_SUCCESS; } +DEFUN(cfg_bts_early_cm, cfg_bts_early_cm_cmd, + "early-classmark-sending (allowed|forbidden)", + "Early Classmark Sending\n" + "Early Classmark Sending is allowed\n" + "Early Classmark Sending is forbidden\n") +{ + struct gsm_bts *bts = vty->index; + int rc, type; + + if (!strcmp(argv[0], "allowed")) + bts->early_classmark_allowed = true; + else + bts->early_classmark_allowed = false; + + return CMD_SUCCESS; +} + DEFUN(cfg_bts_neigh_mode, cfg_bts_neigh_mode_cmd, "neighbor-list mode (automatic|manual|manual-si5)", "Neighbor List\n" "Mode of Neighbor List generation\n" @@ -3955,6 +3977,7 @@ install_element(BTS_NODE, &cfg_bts_pag_free_cmd); install_element(BTS_NODE, &cfg_bts_si_mode_cmd); install_element(BTS_NODE, &cfg_bts_si_static_cmd); + install_element(BTS_NODE, &cfg_bts_early_cm_cmd); install_element(BTS_NODE, &cfg_bts_neigh_mode_cmd); install_element(BTS_NODE, &cfg_bts_neigh_cmd); install_element(BTS_NODE, &cfg_bts_si5_neigh_cmd); @@ -4029,6 +4052,7 @@ abis_nm_vty_init(); abis_om2k_vty_init(); e1inp_vty_init(); + osmo_fsm_vty_add_cmds(); bsc_vty_init_extra(); diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c index e71490e..a2dd827 100644 --- a/openbsc/src/libbsc/system_information.c +++ b/openbsc/src/libbsc/system_information.c @@ -764,6 +764,8 @@ } else { si_info.si2quater_indicator = 0; } + si_info.early_cm_ctrl = bts->early_classmark_allowed; + /* SI3 Rest Octets (10.5.2.34), containing CBQ, CELL_RESELECT_OFFSET, TEMPORARY_OFFSET, PENALTY_TIME Power Offset, 2ter Indicator, Early Classmark Sending, -- To view, visit https://gerrit.osmocom.org/1690 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia0b1cc5ab45673f3da70c59ae8917eba343f9862 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Jan 26 19:32:36 2017 From: gerrit-no-reply at lists.osmocom.org (Tom Tsou) Date: Thu, 26 Jan 2017 19:32:36 +0000 Subject: osmo-trx[master]: Fix building against sqlite3 In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1691 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6d7f697d67651f02ceb77fc4da4317b64fa47f9e Gerrit-PatchSet: 2 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Tom Tsou Gerrit-HasComments: No From admin at opensuse.org Thu Jan 26 19:57:44 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 26 Jan 2017 19:57:44 +0000 Subject: Build failure of network:osmocom:nightly/osmo-trx in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <588a54d738b41_6d0651c101573b0@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/Debian_8.0/x86_64 Package network:osmocom:nightly/osmo-trx failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-trx Last lines of build log: [ 127s] In file included from Reporting.h:29:0, [ 127s] from Reporting.cpp:26: [ 127s] ./sqlite3util.h:4:21: fatal error: sqlite3.h: No such file or directory [ 127s] #include [ 127s] ^ [ 127s] compilation terminated. [ 127s] Makefile:634: recipe for target 'Reporting.lo' failed [ 127s] make[3]: *** [Reporting.lo] Error 1 [ 127s] make[3]: Leaving directory '/usr/src/packages/BUILD/CommonLibs' [ 127s] Makefile:487: recipe for target 'all-recursive' failed [ 127s] make[2]: *** [all-recursive] Error 1 [ 127s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 127s] Makefile:417: recipe for target 'all' failed [ 127s] make[1]: *** [all] Error 2 [ 127s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 127s] dh_auto_build: make -j1 returned exit code 2 [ 127s] debian/rules:6: recipe for target 'build' failed [ 127s] make: *** [build] Error 2 [ 127s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 127s] [ 127s] lamb19 failed "build osmo-trx_0.1.9.20170126.dsc" at Thu Jan 26 19:57:39 UTC 2017. [ 127s] [ 127s] ### VM INTERACTION START ### [ 128s] Powering off. [ 128s] [ 113.800195] reboot: Power down [ 128s] ### VM INTERACTION END ### [ 128s] [ 128s] lamb19 failed "build osmo-trx_0.1.9.20170126.dsc" at Thu Jan 26 19:57:41 UTC 2017. [ 128s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Jan 26 19:58:37 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 26 Jan 2017 19:58:37 +0000 Subject: Build failure of network:osmocom:nightly/osmo-trx in Debian_8.0/i586 In-Reply-To: References: Message-ID: <588a553b7f265_6d0651c101574f1@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/Debian_8.0/i586 Package network:osmocom:nightly/osmo-trx failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-trx Last lines of build log: [ 166s] #define HAVE_INTTYPES_H 1 [ 166s] #define HAVE_STDINT_H 1 [ 166s] #define HAVE_UNISTD_H 1 [ 166s] #define HAVE_DLFCN_H 1 [ 166s] #define LT_OBJDIR ".libs/" [ 166s] #define STDC_HEADERS 1 [ 166s] #define HAVE_BYTESWAP_H 1 [ 166s] #define TIME_WITH_SYS_TIME 1 [ 166s] #define USE_UHD 1 [ 166s] [ 166s] configure: exit 1 [ 166s] dh_auto_configure: ./configure --build=i586-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --libdir=${prefix}/lib/i386-linux-gnu --libexecdir=${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 166s] debian/rules:6: recipe for target 'build' failed [ 166s] make: *** [build] Error 255 [ 166s] [ 110.804332] serial8250: too much work for irq4 [ 166s] [ 110.892158] serial8250: too much work for irq4 [ 166s] [ 110.976105] serial8250: too much work for irq4 [ 166s] [ 111.064185] serial8250: too much work for irq4 [ 166s] [ 111.152317] serial8250: too much work for irq4 [ 166s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 166s] [ 166s] lamb73 failed "build osmo-trx_0.1.9.20170126.dsc" at Thu Jan 26 19:58:35 UTC 2017. [ 166s] [ 166s] ### VM INTERACTION START ### [ 167s] Powering off. [ 167s] ### VM INTERACTION END ### [ 167s] [ 167s] lamb73 failed "build osmo-trx_0.1.9.20170126.dsc" at Thu Jan 26 19:58:36 UTC 2017. [ 167s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Jan 26 19:59:53 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 26 Jan 2017 19:59:53 +0000 Subject: Build failure of network:osmocom:nightly/osmo-trx in xUbuntu_16.04/i586 In-Reply-To: References: Message-ID: <588a55421b684_6c4651c101665db@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/xUbuntu_16.04/i586 Package network:osmocom:nightly/osmo-trx failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-trx Last lines of build log: [ 145s] libtool: compile: g++ -DHAVE_CONFIG_H -I. -I/usr/src/packages/BUILD -I/usr/src/packages/BUILD/CommonLibs -I/usr/src/packages/BUILD/GSM -I/usr/src/packages/BUILD/sqlite3 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -O3 -g -ldl -lpthread -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c Timeval.cpp -fPIC -DPIC -o .libs/Timeval.o [ 146s] /bin/bash /usr/src/packages/BUILD/libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I/usr/src/packages/BUILD -I/usr/src/packages/BUILD/CommonLibs -I/usr/src/packages/BUILD/GSM -I/usr/src/packages/BUILD/sqlite3 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -O3 -g -ldl -lpthread -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -c -o Reporting.lo Reporting.cpp [ 146s] libtool: compile: g++ -DHAVE_CONFIG_H -I. -I/usr/src/packages/BUILD -I/usr/src/packages/BUILD/CommonLibs -I/usr/src/packages/BUILD/GSM -I/usr/src/packages/BUILD/sqlite3 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -O3 -g -ldl -lpthread -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c Reporting.cpp -fPIC -DPIC -o .libs/Reporting.o [ 146s] In file included from Reporting.h:29:0, [ 146s] from Reporting.cpp:26: [ 146s] ./sqlite3util.h:4:21: fatal error: sqlite3.h: No such file or directory [ 146s] compilation terminated. [ 146s] Makefile:647: recipe for target 'Reporting.lo' failed [ 146s] make[3]: *** [Reporting.lo] Error 1 [ 146s] make[3]: Leaving directory '/usr/src/packages/BUILD/CommonLibs' [ 146s] Makefile:499: recipe for target 'all-recursive' failed [ 146s] make[2]: *** [all-recursive] Error 1 [ 146s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 146s] Makefile:430: recipe for target 'all' failed [ 146s] make[1]: *** [all] Error 2 [ 146s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 146s] dh_auto_build: make -j1 returned exit code 2 [ 146s] debian/rules:6: recipe for target 'build' failed [ 146s] make: *** [build] Error 2 [ 146s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 146s] [ 146s] lamb03 failed "build osmo-trx_0.1.9.20170126.dsc" at Thu Jan 26 19:59:43 UTC 2017. [ 146s] [ 146s] ### VM INTERACTION START ### [ 149s] [ 135.739787] reboot: Power down [ 149s] ### VM INTERACTION END ### [ 149s] [ 149s] lamb03 failed "build osmo-trx_0.1.9.20170126.dsc" at Thu Jan 26 19:59:47 UTC 2017. [ 149s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Jan 26 20:00:06 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 26 Jan 2017 20:00:06 +0000 Subject: Build failure of network:osmocom:nightly/osmo-trx in xUbuntu_16.10/x86_64 In-Reply-To: References: Message-ID: <588a555bbc18c_6d0651c101576f3@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/xUbuntu_16.10/x86_64 Package network:osmocom:nightly/osmo-trx failed to build in xUbuntu_16.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-trx Last lines of build log: [ 112s] libtool: compile: g++ -DHAVE_CONFIG_H -I. -I/usr/src/packages/BUILD -I/usr/src/packages/BUILD/CommonLibs -I/usr/src/packages/BUILD/GSM -I/usr/src/packages/BUILD/sqlite3 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -O3 -g -ldl -lpthread -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -c Reporting.cpp -fPIC -DPIC -o .libs/Reporting.o [ 112s] In file included from Reporting.h:29:0, [ 112s] from Reporting.cpp:26: [ 112s] ./sqlite3util.h:4:21: fatal error: sqlite3.h: No such file or directory [ 112s] #include [ 112s] ^ [ 112s] compilation terminated. [ 112s] Makefile:647: recipe for target 'Reporting.lo' failed [ 112s] make[3]: *** [Reporting.lo] Error 1 [ 112s] make[3]: Leaving directory '/usr/src/packages/BUILD/CommonLibs' [ 112s] Makefile:499: recipe for target 'all-recursive' failed [ 112s] make[2]: *** [all-recursive] Error 1 [ 112s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 112s] Makefile:430: recipe for target 'all' failed [ 112s] make[1]: *** [all] Error 2 [ 112s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 112s] dh_auto_build: make -j1 returned exit code 2 [ 112s] debian/rules:6: recipe for target 'build' failed [ 112s] make: *** [build] Error 2 [ 112s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 112s] [ 112s] lamb09 failed "build osmo-trx_0.1.9.20170126.dsc" at Thu Jan 26 19:59:51 UTC 2017. [ 112s] [ 112s] ### VM INTERACTION START ### [ 115s] [ 101.451556] reboot: Power down [ 115s] ### VM INTERACTION END ### [ 115s] [ 115s] lamb09 failed "build osmo-trx_0.1.9.20170126.dsc" at Thu Jan 26 19:59:54 UTC 2017. [ 115s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Jan 26 20:00:23 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 26 Jan 2017 20:00:23 +0000 Subject: Build failure of network:osmocom:nightly/osmo-trx in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <588a5577f03ad_6c4651c10166677@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/osmo-trx failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-trx Last lines of build log: [ 131s] libtool: compile: g++ -DHAVE_CONFIG_H -I. -I/usr/src/packages/BUILD -I/usr/src/packages/BUILD/CommonLibs -I/usr/src/packages/BUILD/GSM -I/usr/src/packages/BUILD/sqlite3 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -O3 -g -ldl -lpthread -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c Timeval.cpp -fPIC -DPIC -o .libs/Timeval.o [ 132s] /bin/bash /usr/src/packages/BUILD/libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I/usr/src/packages/BUILD -I/usr/src/packages/BUILD/CommonLibs -I/usr/src/packages/BUILD/GSM -I/usr/src/packages/BUILD/sqlite3 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -O3 -g -ldl -lpthread -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -c -o Reporting.lo Reporting.cpp [ 132s] libtool: compile: g++ -DHAVE_CONFIG_H -I. -I/usr/src/packages/BUILD -I/usr/src/packages/BUILD/CommonLibs -I/usr/src/packages/BUILD/GSM -I/usr/src/packages/BUILD/sqlite3 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -O3 -g -ldl -lpthread -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c Reporting.cpp -fPIC -DPIC -o .libs/Reporting.o [ 132s] In file included from Reporting.h:29:0, [ 132s] from Reporting.cpp:26: [ 132s] ./sqlite3util.h:4:21: fatal error: sqlite3.h: No such file or directory [ 132s] compilation terminated. [ 132s] Makefile:647: recipe for target 'Reporting.lo' failed [ 132s] make[3]: *** [Reporting.lo] Error 1 [ 132s] make[3]: Leaving directory '/usr/src/packages/BUILD/CommonLibs' [ 132s] Makefile:499: recipe for target 'all-recursive' failed [ 132s] make[2]: *** [all-recursive] Error 1 [ 132s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 132s] Makefile:430: recipe for target 'all' failed [ 132s] make[1]: *** [all] Error 2 [ 132s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 132s] dh_auto_build: make -j1 returned exit code 2 [ 132s] debian/rules:6: recipe for target 'build' failed [ 132s] make: *** [build] Error 2 [ 132s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 132s] [ 132s] lamb15 failed "build osmo-trx_0.1.9.20170126.dsc" at Thu Jan 26 20:00:07 UTC 2017. [ 132s] [ 132s] ### VM INTERACTION START ### [ 135s] [ 120.817247] reboot: Power down [ 135s] ### VM INTERACTION END ### [ 135s] [ 135s] lamb15 failed "build osmo-trx_0.1.9.20170126.dsc" at Thu Jan 26 20:00:11 UTC 2017. [ 135s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Jan 26 20:00:23 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 26 Jan 2017 20:00:23 +0000 Subject: Build failure of network:osmocom:nightly/osmo-trx in xUbuntu_16.10/i586 In-Reply-To: References: Message-ID: <588a5578cdab0_6c4651c10166799@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/xUbuntu_16.10/i586 Package network:osmocom:nightly/osmo-trx failed to build in xUbuntu_16.10/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-trx Last lines of build log: [ 119s] libtool: compile: g++ -DHAVE_CONFIG_H -I. -I/usr/src/packages/BUILD -I/usr/src/packages/BUILD/CommonLibs -I/usr/src/packages/BUILD/GSM -I/usr/src/packages/BUILD/sqlite3 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -O3 -g -ldl -lpthread -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -c Reporting.cpp -fPIC -DPIC -o .libs/Reporting.o [ 119s] In file included from Reporting.h:29:0, [ 119s] from Reporting.cpp:26: [ 119s] ./sqlite3util.h:4:21: fatal error: sqlite3.h: No such file or directory [ 119s] #include [ 119s] ^ [ 119s] compilation terminated. [ 119s] Makefile:647: recipe for target 'Reporting.lo' failed [ 119s] make[3]: *** [Reporting.lo] Error 1 [ 119s] make[3]: Leaving directory '/usr/src/packages/BUILD/CommonLibs' [ 119s] Makefile:499: recipe for target 'all-recursive' failed [ 119s] make[2]: *** [all-recursive] Error 1 [ 119s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 119s] Makefile:430: recipe for target 'all' failed [ 119s] make[1]: *** [all] Error 2 [ 119s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 119s] dh_auto_build: make -j1 returned exit code 2 [ 119s] debian/rules:6: recipe for target 'build' failed [ 119s] make: *** [build] Error 2 [ 119s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 119s] [ 119s] lamb19 failed "build osmo-trx_0.1.9.20170126.dsc" at Thu Jan 26 20:00:10 UTC 2017. [ 119s] [ 119s] ### VM INTERACTION START ### [ 122s] [ 108.877730] reboot: Power down [ 122s] ### VM INTERACTION END ### [ 122s] [ 122s] lamb19 failed "build osmo-trx_0.1.9.20170126.dsc" at Thu Jan 26 20:00:13 UTC 2017. [ 122s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Thu Jan 26 21:45:04 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 26 Jan 2017 21:45:04 +0000 Subject: openbsc[master]: add struct gprs_sub, separating gprs from gsm_subscriber In-Reply-To: References: Message-ID: Patch Set 3: ah, of course! it's from 'make distcheck', duh -- To view, visit https://gerrit.osmocom.org/1684 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia8b391ee009c8545763cba04505be3947835120e Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Jan 26 21:50:56 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 26 Jan 2017 21:50:56 +0000 Subject: [PATCH] openbsc[master]: add struct gprs_sub, separating gprs from gsm_subscriber In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1684 to look at the new patch set (#4). add struct gprs_sub, separating gprs from gsm_subscriber Prepare for replacing gsm_subscriber with vlr_subscriber. vlr_subscriber will not make sense to be used in gprs, so have a dedicated GPRS subscriber struct. (Could change if the gprs code were to use libvlr; is currently independent). Change-Id: Ia8b391ee009c8545763cba04505be3947835120e Related: #1592 --- M openbsc/include/openbsc/Makefile.am M openbsc/include/openbsc/gprs_sgsn.h A openbsc/include/openbsc/gprs_subscriber.h M openbsc/include/openbsc/gsm_data.h M openbsc/include/openbsc/gsm_subscriber.h M openbsc/src/gprs/gprs_gmm.c M openbsc/src/gprs/gprs_sgsn.c M openbsc/src/gprs/gprs_subscriber.c M openbsc/src/gprs/sgsn_auth.c M openbsc/src/gprs/sgsn_libgtp.c M openbsc/src/gprs/sgsn_vty.c M openbsc/tests/sgsn/sgsn_test.c M openbsc/tests/sgsn/sgsn_test.ok 13 files changed, 264 insertions(+), 150 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/84/1684/4 diff --git a/openbsc/include/openbsc/Makefile.am b/openbsc/include/openbsc/Makefile.am index 16693d7..0895096 100644 --- a/openbsc/include/openbsc/Makefile.am +++ b/openbsc/include/openbsc/Makefile.am @@ -32,6 +32,7 @@ gprs_sndcp_dcomp.h \ gprs_sndcp_pcomp.h \ gprs_sndcp_xid.h \ + gprs_subscriber.h \ gprs_utils.h \ gsm_04_08.h \ gsm_04_11.h \ diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h index dc165d3..accfe3c 100644 --- a/openbsc/include/openbsc/gprs_sgsn.h +++ b/openbsc/include/openbsc/gprs_sgsn.h @@ -18,7 +18,7 @@ struct gprs_llc_lle; struct ctrl_handle; -struct gsm_subscriber; +struct gprs_sub; enum gsm48_gsm_cause; @@ -225,7 +225,7 @@ /* the current GGSN look-up operation */ struct sgsn_ggsn_lookup *ggsn_lookup; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; }; #define LOGMMCTXP(level, mm, fmt, args...) \ @@ -433,6 +433,7 @@ /* * GPRS subscriber data */ +#define GPRS_SUBSCRIBER_FIRST_CONTACT 0x00000001 #define GPRS_SUBSCRIBER_UPDATE_AUTH_INFO_PENDING (1 << 16) #define GPRS_SUBSCRIBER_UPDATE_LOCATION_PENDING (1 << 17) #define GPRS_SUBSCRIBER_CANCELLED (1 << 18) @@ -446,13 +447,13 @@ int gprs_subscr_init(struct sgsn_instance *sgi); int gprs_subscr_request_update_location(struct sgsn_mm_ctx *mmctx); int gprs_subscr_request_auth_info(struct sgsn_mm_ctx *mmctx); -void gprs_subscr_cleanup(struct gsm_subscriber *subscr); -struct gsm_subscriber *gprs_subscr_get_or_create(const char *imsi); -struct gsm_subscriber *gprs_subscr_get_or_create_by_mmctx( struct sgsn_mm_ctx *mmctx); -struct gsm_subscriber *gprs_subscr_get_by_imsi(const char *imsi); -void gprs_subscr_cancel(struct gsm_subscriber *subscr); -void gprs_subscr_update(struct gsm_subscriber *subscr); -void gprs_subscr_update_auth_info(struct gsm_subscriber *subscr); +void gprs_subscr_cleanup(struct gprs_sub *subscr); +struct gprs_sub *gprs_subscr_get_or_create(const char *imsi); +struct gprs_sub *gprs_subscr_get_or_create_by_mmctx( struct sgsn_mm_ctx *mmctx); +struct gprs_sub *gprs_subscr_get_by_imsi(const char *imsi); +void gprs_subscr_cancel(struct gprs_sub *subscr); +void gprs_subscr_update(struct gprs_sub *subscr); +void gprs_subscr_update_auth_info(struct gprs_sub *subscr); int gprs_subscr_rx_gsup_message(struct msgb *msg); /* Called on subscriber data updates */ diff --git a/openbsc/include/openbsc/gprs_subscriber.h b/openbsc/include/openbsc/gprs_subscriber.h new file mode 100644 index 0000000..668402a --- /dev/null +++ b/openbsc/include/openbsc/gprs_subscriber.h @@ -0,0 +1,29 @@ +/* GPRS subscriber details for use in SGSN land */ +#pragma once + +#include + +#include +#include + +extern struct llist_head * const gprs_subscribers; + +struct gprs_sub { + struct llist_head entry; + int use_count; + + char imsi[GSM23003_IMSI_MAX_DIGITS+1]; + uint32_t tmsi; + char imei[GSM23003_IMEISV_NUM_DIGITS+1]; + bool authorized; + bool keep_in_ram; + uint32_t flags; + uint16_t lac; + + struct sgsn_subscriber_data *sgsn_data; +}; + +struct gprs_sub *_gprs_sub_get(struct gprs_sub *gsub, const char *file, int line); +struct gprs_sub *_gprs_sub_put(struct gprs_sub *gsub, const char *file, int line); +#define gprs_sub_get(gsub) _gprs_sub_get(gsub, __BASE_FILE__, __LINE__) +#define gprs_sub_put(gsub) _gprs_sub_put(gsub, __BASE_FILE__, __LINE__) diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index 9cb46a4..8e9fa03 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -27,6 +27,8 @@ #define OBSC_LINKID_CB(__msgb) (__msgb)->cb[3] +#define tmsi_from_string(str) strtoul(str, NULL, 10) + enum gsm_security_event { GSM_SECURITY_NOAVAIL, GSM_SECURITY_AUTH_FAILED, diff --git a/openbsc/include/openbsc/gsm_subscriber.h b/openbsc/include/openbsc/gsm_subscriber.h index 314d619..7e65614 100644 --- a/openbsc/include/openbsc/gsm_subscriber.h +++ b/openbsc/include/openbsc/gsm_subscriber.h @@ -16,7 +16,6 @@ #define GSM_SUBSCRIBER_FIRST_CONTACT 0x00000001 /* gprs_sgsn.h defines additional flags including and above bit 16 (0x10000) */ -#define tmsi_from_string(str) strtoul(str, NULL, 10) #define GSM_SUBSCRIBER_NO_EXPIRATION 0x0 diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c index 6471f22..32d6587 100644 --- a/openbsc/src/gprs/gprs_gmm.c +++ b/openbsc/src/gprs/gprs_gmm.c @@ -64,6 +64,7 @@ #include #include #include +#include #include #include #include diff --git a/openbsc/src/gprs/gprs_sgsn.c b/openbsc/src/gprs/gprs_sgsn.c index e85e1a9..4ef33dd 100644 --- a/openbsc/src/gprs/gprs_sgsn.c +++ b/openbsc/src/gprs/gprs_sgsn.c @@ -31,7 +31,7 @@ #include #include -#include +#include #include #include #include @@ -320,9 +320,9 @@ /* Detach from subscriber which is possibly freed then */ if (mm->subscr) { - struct gsm_subscriber *subscr = subscr_get(mm->subscr); + struct gprs_sub *subscr = gprs_sub_get(mm->subscr); gprs_subscr_cleanup(subscr); - subscr_put(subscr); + gprs_sub_put(subscr); } sgsn_mm_ctx_free(mm); diff --git a/openbsc/src/gprs/gprs_subscriber.c b/openbsc/src/gprs/gprs_subscriber.c index d3e2ea7..865e092 100644 --- a/openbsc/src/gprs/gprs_subscriber.c +++ b/openbsc/src/gprs/gprs_subscriber.c @@ -23,7 +23,8 @@ #include #include #include -#include +#include +#include #include #include @@ -35,6 +36,7 @@ #include #include +#include #define SGSN_SUBSCR_MAX_RETRIES 3 #define SGSN_SUBSCR_RETRY_INTERVAL 10 @@ -45,6 +47,9 @@ ## args) extern void *tall_bsc_ctx; + +LLIST_HEAD(_gprs_subscribers); +struct llist_head * const gprs_subscribers = &_gprs_subscribers; static int gsup_read_cb(struct gsup_client *gsupc, struct msgb *msg); @@ -86,7 +91,7 @@ return rc; } -int gprs_subscr_purge(struct gsm_subscriber *subscr); +int gprs_subscr_purge(struct gprs_sub *subscr); static struct sgsn_subscriber_data *sgsn_subscriber_data_alloc(void *ctx) { @@ -117,28 +122,53 @@ return pdata; } -struct gsm_subscriber *gprs_subscr_get_or_create(const char *imsi) +struct gprs_sub *gprs_subscr_get_by_imsi(const char *imsi) { - struct gsm_subscriber *subscr; + struct gprs_sub *gsub; - subscr = subscr_get_or_create(NULL, imsi); - if (!subscr) + if (!imsi || !*imsi) return NULL; - if (!subscr->sgsn_data) - subscr->sgsn_data = sgsn_subscriber_data_alloc(subscr); - return subscr; + llist_for_each_entry(gsub, gprs_subscribers, entry) { + if (!strcmp(gsub->imsi, imsi)) + return gprs_sub_get(gsub); + } + return NULL; } -struct gsm_subscriber *gprs_subscr_get_by_imsi(const char *imsi) +static struct gprs_sub *gprs_subscr_alloc(void) { - return subscr_active_by_imsi(NULL, imsi); + struct gprs_sub *gsub; + gsub = talloc_zero(tall_bsc_ctx, struct gprs_sub); + if (!gsub) + return NULL; + llist_add_tail(&gsub->entry, gprs_subscribers); + gsub->use_count = 1; + gsub->tmsi = GSM_RESERVED_TMSI; + return gsub; } -void gprs_subscr_cleanup(struct gsm_subscriber *subscr) +struct gprs_sub *gprs_subscr_get_or_create(const char *imsi) +{ + struct gprs_sub *gsub; + + gsub = gprs_subscr_get_by_imsi(imsi); + if (!gsub) { + gsub = gprs_subscr_alloc(); + if (!gsub) + return NULL; + strncpy(gsub->imsi, imsi, sizeof(gsub->imsi)); + } + + if (!gsub->sgsn_data) + gsub->sgsn_data = sgsn_subscriber_data_alloc(gsub); + return gsub; +} + +void gprs_subscr_cleanup(struct gprs_sub *subscr) { if (subscr->sgsn_data->mm) { - subscr_put(subscr->sgsn_data->mm->subscr); + gprs_sub_put(subscr->sgsn_data->mm->subscr); subscr->sgsn_data->mm->subscr = NULL; subscr->sgsn_data->mm = NULL; } @@ -149,7 +179,7 @@ } } -void gprs_subscr_cancel(struct gsm_subscriber *subscr) +void gprs_subscr_cancel(struct gprs_sub *subscr) { subscr->authorized = 0; subscr->flags |= GPRS_SUBSCRIBER_CANCELLED; @@ -159,7 +189,7 @@ gprs_subscr_cleanup(subscr); } -static int gprs_subscr_tx_gsup_message(struct gsm_subscriber *subscr, +static int gprs_subscr_tx_gsup_message(struct gprs_sub *subscr, struct osmo_gsup_message *gsup_msg) { struct msgb *msg = gsup_client_msgb_alloc(); @@ -181,7 +211,7 @@ return gsup_client_send(sgsn->gsup_client, msg); } -static int gprs_subscr_tx_gsup_error_reply(struct gsm_subscriber *subscr, +static int gprs_subscr_tx_gsup_error_reply(struct gprs_sub *subscr, struct osmo_gsup_message *gsup_orig, enum gsm48_gmm_cause cause) { @@ -196,7 +226,7 @@ return gprs_subscr_tx_gsup_message(subscr, &gsup_reply); } -static int gprs_subscr_handle_gsup_auth_res(struct gsm_subscriber *subscr, +static int gprs_subscr_handle_gsup_auth_res(struct gprs_sub *subscr, struct osmo_gsup_message *gsup_msg) { unsigned idx; @@ -235,7 +265,7 @@ return 0; } -static int gprs_subscr_pdp_data_clear(struct gsm_subscriber *subscr) +static int gprs_subscr_pdp_data_clear(struct gprs_sub *subscr) { struct sgsn_subscriber_pdp_data *pdp, *pdp2; int count = 0; @@ -250,7 +280,7 @@ } static struct sgsn_subscriber_pdp_data *gprs_subscr_pdp_data_get_by_id( - struct gsm_subscriber *subscr, unsigned context_id) + struct gprs_sub *subscr, unsigned context_id) { struct sgsn_subscriber_pdp_data *pdp; @@ -263,7 +293,7 @@ } -static void gprs_subscr_gsup_insert_data(struct gsm_subscriber *subscr, +static void gprs_subscr_gsup_insert_data(struct gprs_sub *subscr, struct osmo_gsup_message *gsup_msg) { struct sgsn_subscriber_data *sdata = subscr->sgsn_data; @@ -340,7 +370,7 @@ } } -static int gprs_subscr_handle_gsup_upd_loc_res(struct gsm_subscriber *subscr, +static int gprs_subscr_handle_gsup_upd_loc_res(struct gprs_sub *subscr, struct osmo_gsup_message *gsup_msg) { /* contrary to MAP, we allow piggy-backing subscriber data onto @@ -357,7 +387,7 @@ return 0; } -static int gprs_subscr_handle_gsup_isd_req(struct gsm_subscriber *subscr, +static int gprs_subscr_handle_gsup_isd_req(struct gprs_sub *subscr, struct osmo_gsup_message *gsup_msg) { struct osmo_gsup_message gsup_reply = {0}; @@ -389,7 +419,7 @@ } } -static int gprs_subscr_handle_gsup_auth_err(struct gsm_subscriber *subscr, +static int gprs_subscr_handle_gsup_auth_err(struct gprs_sub *subscr, struct osmo_gsup_message *gsup_msg) { unsigned idx; @@ -442,7 +472,7 @@ return -gsup_msg->cause; } -static int gprs_subscr_handle_gsup_upd_loc_err(struct gsm_subscriber *subscr, +static int gprs_subscr_handle_gsup_upd_loc_err(struct gprs_sub *subscr, struct osmo_gsup_message *gsup_msg) { int cause_err; @@ -503,7 +533,7 @@ return 0; } -static int gprs_subscr_handle_gsup_purge_res(struct gsm_subscriber *subscr, +static int gprs_subscr_handle_gsup_purge_res(struct gprs_sub *subscr, struct osmo_gsup_message *gsup_msg) { LOGGSUBSCRP(LOGL_INFO, subscr, "Completing purge MS\n"); @@ -515,7 +545,7 @@ return 0; } -static int gprs_subscr_handle_gsup_purge_err(struct gsm_subscriber *subscr, +static int gprs_subscr_handle_gsup_purge_err(struct gprs_sub *subscr, struct osmo_gsup_message *gsup_msg) { LOGGSUBSCRP(LOGL_NOTICE, subscr, @@ -548,7 +578,7 @@ return -gsup_msg->cause; } -static int gprs_subscr_handle_loc_cancel_req(struct gsm_subscriber *subscr, +static int gprs_subscr_handle_loc_cancel_req(struct gprs_sub *subscr, struct osmo_gsup_message *gsup_msg) { struct osmo_gsup_message gsup_reply = {0}; @@ -609,7 +639,7 @@ int rc = 0; struct osmo_gsup_message gsup_msg = {0}; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; rc = osmo_gsup_decode(data, data_len, &gsup_msg); if (rc < 0) { @@ -699,12 +729,12 @@ break; }; - subscr_put(subscr); + gprs_sub_put(subscr); return rc; } -int gprs_subscr_purge(struct gsm_subscriber *subscr) +int gprs_subscr_purge(struct gprs_sub *subscr) { struct sgsn_subscriber_data *sdata = subscr->sgsn_data; struct osmo_gsup_message gsup_msg = {0}; @@ -720,7 +750,7 @@ return gprs_subscr_tx_gsup_message(subscr, &gsup_msg); } -int gprs_subscr_query_auth_info(struct gsm_subscriber *subscr) +int gprs_subscr_query_auth_info(struct gprs_sub *subscr) { struct osmo_gsup_message gsup_msg = {0}; @@ -731,7 +761,7 @@ return gprs_subscr_tx_gsup_message(subscr, &gsup_msg); } -int gprs_subscr_location_update(struct gsm_subscriber *subscr) +int gprs_subscr_location_update(struct gprs_sub *subscr) { struct osmo_gsup_message gsup_msg = {0}; @@ -742,60 +772,59 @@ return gprs_subscr_tx_gsup_message(subscr, &gsup_msg); } -void gprs_subscr_update(struct gsm_subscriber *subscr) +void gprs_subscr_update(struct gprs_sub *subscr) { LOGGSUBSCRP(LOGL_DEBUG, subscr, "Updating subscriber data\n"); subscr->flags &= ~GPRS_SUBSCRIBER_UPDATE_LOCATION_PENDING; - subscr->flags &= ~GSM_SUBSCRIBER_FIRST_CONTACT; + subscr->flags &= ~GPRS_SUBSCRIBER_FIRST_CONTACT; if (subscr->sgsn_data->mm) sgsn_update_subscriber_data(subscr->sgsn_data->mm); } -void gprs_subscr_update_auth_info(struct gsm_subscriber *subscr) +void gprs_subscr_update_auth_info(struct gprs_sub *subscr) { LOGGSUBSCRP(LOGL_DEBUG, subscr, "Updating subscriber authentication info\n"); subscr->flags &= ~GPRS_SUBSCRIBER_UPDATE_AUTH_INFO_PENDING; - subscr->flags &= ~GSM_SUBSCRIBER_FIRST_CONTACT; + subscr->flags &= ~GPRS_SUBSCRIBER_FIRST_CONTACT; if (subscr->sgsn_data->mm) sgsn_update_subscriber_data(subscr->sgsn_data->mm); } -struct gsm_subscriber *gprs_subscr_get_or_create_by_mmctx(struct sgsn_mm_ctx *mmctx) +struct gprs_sub *gprs_subscr_get_or_create_by_mmctx(struct sgsn_mm_ctx *mmctx) { - struct gsm_subscriber *subscr = NULL; + struct gprs_sub *subscr = NULL; if (mmctx->subscr) - return subscr_get(mmctx->subscr); + return gprs_sub_get(mmctx->subscr); if (mmctx->imsi[0]) subscr = gprs_subscr_get_by_imsi(mmctx->imsi); if (!subscr) { subscr = gprs_subscr_get_or_create(mmctx->imsi); - subscr->flags |= GSM_SUBSCRIBER_FIRST_CONTACT; + subscr->flags |= GPRS_SUBSCRIBER_FIRST_CONTACT; subscr->flags &= ~GPRS_SUBSCRIBER_ENABLE_PURGE; } - osmo_strlcpy(subscr->equipment.imei, mmctx->imei, - sizeof(subscr->equipment.imei)); + osmo_strlcpy(subscr->imei, mmctx->imei, sizeof(subscr->imei)); if (subscr->lac != mmctx->ra.lac) subscr->lac = mmctx->ra.lac; subscr->sgsn_data->mm = mmctx; - mmctx->subscr = subscr_get(subscr); + mmctx->subscr = gprs_sub_get(subscr); return subscr; } int gprs_subscr_request_update_location(struct sgsn_mm_ctx *mmctx) { - struct gsm_subscriber *subscr = NULL; + struct gprs_sub *subscr = NULL; int rc; LOGMMCTXP(LOGL_DEBUG, mmctx, "Requesting subscriber data update\n"); @@ -805,13 +834,13 @@ subscr->flags |= GPRS_SUBSCRIBER_UPDATE_LOCATION_PENDING; rc = gprs_subscr_location_update(subscr); - subscr_put(subscr); + gprs_sub_put(subscr); return rc; } int gprs_subscr_request_auth_info(struct sgsn_mm_ctx *mmctx) { - struct gsm_subscriber *subscr = NULL; + struct gprs_sub *subscr = NULL; int rc; LOGMMCTXP(LOGL_DEBUG, mmctx, "Requesting subscriber authentication info\n"); @@ -821,6 +850,38 @@ subscr->flags |= GPRS_SUBSCRIBER_UPDATE_AUTH_INFO_PENDING; rc = gprs_subscr_query_auth_info(subscr); - subscr_put(subscr); + gprs_sub_put(subscr); return rc; } + +static void gprs_sub_free(struct gprs_sub *gsub) +{ + llist_del(&gsub->entry); + talloc_free(gsub); +} + +struct gprs_sub *_gprs_sub_get(struct gprs_sub *gsub, const char *file, int line) +{ + OSMO_ASSERT(gsub->use_count < INT_MAX); + gsub->use_count++; + LOGPSRC(DREF, LOGL_DEBUG, file, line, + "subscr %s usage increases to: %d\n", + gsub->imsi, gsub->use_count); + return gsub; +} + +struct gprs_sub *_gprs_sub_put(struct gprs_sub *gsub, const char *file, int line) +{ + gsub->use_count--; + LOGPSRC(DREF, gsub->use_count >= 0? LOGL_DEBUG : LOGL_ERROR, + file, line, + "subscr %s usage decreases to: %d%s\n", + gsub->imsi, gsub->use_count, + gsub->keep_in_ram? ", keep-in-ram flag is set" : ""); + if (gsub->use_count > 0) + return gsub; + if (gsub->keep_in_ram) + return gsub; + gprs_sub_free(gsub); + return NULL; +} diff --git a/openbsc/src/gprs/sgsn_auth.c b/openbsc/src/gprs/sgsn_auth.c index 1fa7fc4..8a11e95 100644 --- a/openbsc/src/gprs/sgsn_auth.c +++ b/openbsc/src/gprs/sgsn_auth.c @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include const struct value_string auth_state_names[] = { @@ -151,7 +151,7 @@ */ int sgsn_auth_request(struct sgsn_mm_ctx *mmctx) { - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; struct gsm_auth_tuple *at; int need_update_location; int rc; @@ -169,7 +169,7 @@ /* This has the side effect of registering the subscr with the mmctx */ subscr = gprs_subscr_get_or_create_by_mmctx(mmctx); - subscr_put(subscr); + gprs_sub_put(subscr); OSMO_ASSERT(mmctx->subscr != NULL); @@ -207,7 +207,7 @@ void sgsn_auth_update(struct sgsn_mm_ctx *mmctx) { enum sgsn_auth_state auth_state; - struct gsm_subscriber *subscr = mmctx->subscr; + struct gprs_sub *subscr = mmctx->subscr; struct gsm_auth_tuple *at; int gmm_cause; diff --git a/openbsc/src/gprs/sgsn_libgtp.c b/openbsc/src/gprs/sgsn_libgtp.c index 072b9ba..d408615 100644 --- a/openbsc/src/gprs/sgsn_libgtp.c +++ b/openbsc/src/gprs/sgsn_libgtp.c @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include #ifdef BUILD_IU diff --git a/openbsc/src/gprs/sgsn_vty.c b/openbsc/src/gprs/sgsn_vty.c index 4a97687..d2326a9 100644 --- a/openbsc/src/gprs/sgsn_vty.c +++ b/openbsc/src/gprs/sgsn_vty.c @@ -657,40 +657,37 @@ } /* Subscriber */ -#include +#include -static void subscr_dump_full_vty(struct vty *vty, struct gsm_subscriber *subscr, int pending) +static void subscr_dump_full_vty(struct vty *vty, struct gprs_sub *gsub, int pending) { +#if 0 char expire_time[200]; +#endif struct gsm_auth_tuple *at; int at_idx; struct sgsn_subscriber_pdp_data *pdp; - vty_out(vty, " ID: %llu, Authorized: %d%s", subscr->id, - subscr->authorized, VTY_NEWLINE); - if (strlen(subscr->name)) - vty_out(vty, " Name: '%s'%s", subscr->name, VTY_NEWLINE); - if (strlen(subscr->extension)) - vty_out(vty, " Extension: %s%s", subscr->extension, - VTY_NEWLINE); + vty_out(vty, " Authorized: %d%s", + gsub->authorized, VTY_NEWLINE); vty_out(vty, " LAC: %d/0x%x%s", - subscr->lac, subscr->lac, VTY_NEWLINE); - vty_out(vty, " IMSI: %s%s", subscr->imsi, VTY_NEWLINE); - if (subscr->tmsi != GSM_RESERVED_TMSI) - vty_out(vty, " TMSI: %08X%s", subscr->tmsi, + gsub->lac, gsub->lac, VTY_NEWLINE); + vty_out(vty, " IMSI: %s%s", gsub->imsi, VTY_NEWLINE); + if (gsub->tmsi != GSM_RESERVED_TMSI) + vty_out(vty, " TMSI: %08X%s", gsub->tmsi, VTY_NEWLINE); - if (subscr->sgsn_data->msisdn_len > 0) + if (gsub->sgsn_data->msisdn_len > 0) vty_out(vty, " MSISDN (BCD): %s%s", - osmo_hexdump(subscr->sgsn_data->msisdn, - subscr->sgsn_data->msisdn_len), + osmo_hexdump(gsub->sgsn_data->msisdn, + gsub->sgsn_data->msisdn_len), VTY_NEWLINE); - if (strlen(subscr->equipment.imei) > 0) - vty_out(vty, " IMEI: %s%s", subscr->equipment.imei, VTY_NEWLINE); + if (strlen(gsub->imei) > 0) + vty_out(vty, " IMEI: %s%s", gsub->imei, VTY_NEWLINE); - for (at_idx = 0; at_idx < ARRAY_SIZE(subscr->sgsn_data->auth_triplets); + for (at_idx = 0; at_idx < ARRAY_SIZE(gsub->sgsn_data->auth_triplets); at_idx++) { - at = &subscr->sgsn_data->auth_triplets[at_idx]; + at = &gsub->sgsn_data->auth_triplets[at_idx]; if (at->key_seq == GSM_KEY_SEQ_INVAL) continue; @@ -707,36 +704,38 @@ VTY_NEWLINE); } - llist_for_each_entry(pdp, &subscr->sgsn_data->pdp_list, list) { + llist_for_each_entry(pdp, &gsub->sgsn_data->pdp_list, list) { vty_out(vty, " PDP info: Id: %d, Type: 0x%04x, APN: '%s' QoS: %s%s", pdp->context_id, pdp->pdp_type, pdp->apn_str, osmo_hexdump(pdp->qos_subscribed, pdp->qos_subscribed_len), VTY_NEWLINE); } +#if 0 /* print the expiration time of a subscriber */ - if (subscr->expire_lu) { + if (gsub->expire_lu) { strftime(expire_time, sizeof(expire_time), - "%a, %d %b %Y %T %z", localtime(&subscr->expire_lu)); + "%a, %d %b %Y %T %z", localtime(&gsub->expire_lu)); expire_time[sizeof(expire_time) - 1] = '\0'; vty_out(vty, " Expiration Time: %s%s", expire_time, VTY_NEWLINE); } +#endif - if (subscr->flags) + if (gsub->flags) vty_out(vty, " Flags: %s%s%s%s%s%s", - subscr->flags & GSM_SUBSCRIBER_FIRST_CONTACT ? + gsub->flags & GPRS_SUBSCRIBER_FIRST_CONTACT ? "FIRST_CONTACT " : "", - subscr->flags & GPRS_SUBSCRIBER_CANCELLED ? + gsub->flags & GPRS_SUBSCRIBER_CANCELLED ? "CANCELLED " : "", - subscr->flags & GPRS_SUBSCRIBER_UPDATE_LOCATION_PENDING ? + gsub->flags & GPRS_SUBSCRIBER_UPDATE_LOCATION_PENDING ? "UPDATE_LOCATION_PENDING " : "", - subscr->flags & GPRS_SUBSCRIBER_UPDATE_AUTH_INFO_PENDING ? + gsub->flags & GPRS_SUBSCRIBER_UPDATE_AUTH_INFO_PENDING ? "AUTH_INFO_PENDING " : "", - subscr->flags & GPRS_SUBSCRIBER_ENABLE_PURGE ? + gsub->flags & GPRS_SUBSCRIBER_ENABLE_PURGE ? "ENABLE_PURGE " : "", VTY_NEWLINE); - vty_out(vty, " Use count: %u%s", subscr->use_count, VTY_NEWLINE); + vty_out(vty, " Use count: %u%s", gsub->use_count, VTY_NEWLINE); } DEFUN(show_subscr_cache, @@ -745,9 +744,9 @@ SHOW_STR "Show information about subscribers\n" "Display contents of subscriber cache\n") { - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; - llist_for_each_entry(subscr, &active_subscribers, entry) { + llist_for_each_entry(subscr, gprs_subscribers, entry) { vty_out(vty, " Subscriber:%s", VTY_NEWLINE); subscr_dump_full_vty(vty, subscr, 0); } @@ -779,7 +778,7 @@ const char *kc_str = argv[4]; struct gsm_auth_tuple at = {0,}; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; subscr = gprs_subscr_get_by_imsi(imsi); if (!subscr) { @@ -810,12 +809,12 @@ subscr->sgsn_data->auth_triplets[cksn] = at; subscr->sgsn_data->auth_triplets_updated = 1; - subscr_put(subscr); + gprs_sub_put(subscr); return CMD_SUCCESS; failed: - subscr_put(subscr); + gprs_sub_put(subscr); return CMD_SUCCESS; } @@ -829,7 +828,7 @@ const char *imsi = argv[0]; const char *cancel_type = argv[1]; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; subscr = gprs_subscr_get_by_imsi(imsi); if (!subscr) { @@ -844,7 +843,7 @@ subscr->sgsn_data->error_cause = GMM_CAUSE_IMPL_DETACHED; gprs_subscr_cancel(subscr); - subscr_put(subscr); + gprs_sub_put(subscr); return CMD_SUCCESS; } @@ -856,7 +855,7 @@ { const char *imsi = argv[0]; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; subscr = gprs_subscr_get_by_imsi(imsi); if (subscr) { @@ -867,7 +866,7 @@ subscr = gprs_subscr_get_or_create(imsi); subscr->keep_in_ram = 1; - subscr_put(subscr); + gprs_sub_put(subscr); return CMD_SUCCESS; } @@ -879,7 +878,7 @@ { const char *imsi = argv[0]; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; subscr = gprs_subscr_get_by_imsi(imsi); if (!subscr) { @@ -894,7 +893,7 @@ if (subscr->use_count > 1) vty_out(vty, "%% subscriber is still in use%s", VTY_NEWLINE); - subscr_put(subscr); + gprs_sub_put(subscr); return CMD_SUCCESS; } @@ -919,7 +918,7 @@ const char *imsi = argv[0]; const char *ret_code_str = argv[1]; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; const struct value_string cause_mapping[] = { { GMM_CAUSE_NET_FAIL, "system-failure" }, @@ -948,7 +947,7 @@ gprs_subscr_update(subscr); - subscr_put(subscr); + gprs_sub_put(subscr); return CMD_SUCCESS; } @@ -960,7 +959,7 @@ { const char *imsi = argv[0]; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; subscr = gprs_subscr_get_by_imsi(imsi); if (!subscr) { @@ -971,7 +970,7 @@ gprs_subscr_update_auth_info(subscr); - subscr_put(subscr); + gprs_sub_put(subscr); return CMD_SUCCESS; } diff --git a/openbsc/tests/sgsn/sgsn_test.c b/openbsc/tests/sgsn/sgsn_test.c index e1fd2e7..5659b4e 100644 --- a/openbsc/tests/sgsn/sgsn_test.c +++ b/openbsc/tests/sgsn/sgsn_test.c @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include @@ -248,7 +248,7 @@ cleanup_test(); } -struct gsm_subscriber *last_updated_subscr = NULL; +struct gprs_sub *last_updated_subscr = NULL; void my_dummy_sgsn_update_subscriber_data(struct sgsn_mm_ctx *mmctx) { OSMO_ASSERT(mmctx); @@ -257,23 +257,23 @@ last_updated_subscr = mmctx->subscr; } -static void assert_subscr(const struct gsm_subscriber *subscr, const char *imsi) +static void assert_subscr(const struct gprs_sub *subscr, const char *imsi) { - struct gsm_subscriber *sfound; + struct gprs_sub *sfound; OSMO_ASSERT(subscr); OSMO_ASSERT(strcmp(subscr->imsi, imsi) == 0); sfound = gprs_subscr_get_by_imsi(imsi); OSMO_ASSERT(sfound == subscr); - subscr_put(sfound); + gprs_sub_put(sfound); } static void show_subscrs(FILE *out) { - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; - llist_for_each_entry(subscr, &active_subscribers, entry) { + llist_for_each_entry(subscr, gprs_subscribers, entry) { fprintf(out, " Subscriber: %s, " "use count: %d\n", subscr->imsi, subscr->use_count); @@ -284,12 +284,18 @@ { show_subscrs(stdout); fflush(stdout); - OSMO_ASSERT(llist_empty(&active_subscribers)); + OSMO_ASSERT(llist_empty(gprs_subscribers)); } + +#define VERBOSE_ASSERT(val, expect_op, fmt) \ + do { \ + printf(#val " == " fmt "\n", (val)); \ + OSMO_ASSERT((val) expect_op); \ + } while (0); static void test_subscriber(void) { - struct gsm_subscriber *s1, *s2, *s3, *sfound; + struct gprs_sub *s1, *s2, *s3; const char *imsi1 = "1234567890"; const char *imsi2 = "9876543210"; const char *imsi3 = "5656565656"; @@ -302,19 +308,24 @@ OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi1) == NULL); OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi2) == NULL); OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi3) == NULL); + VERBOSE_ASSERT(llist_count(gprs_subscribers), == 0, "%d"); /* Allocate entry 1 */ s1 = gprs_subscr_get_or_create(imsi1); - s1->flags |= GSM_SUBSCRIBER_FIRST_CONTACT; + VERBOSE_ASSERT(llist_count(gprs_subscribers), == 1, "%d"); + s1->flags |= GPRS_SUBSCRIBER_FIRST_CONTACT; assert_subscr(s1, imsi1); + VERBOSE_ASSERT(llist_count(gprs_subscribers), == 1, "%d"); OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi2) == NULL); /* Allocate entry 2 */ s2 = gprs_subscr_get_or_create(imsi2); - s2->flags |= GSM_SUBSCRIBER_FIRST_CONTACT; + VERBOSE_ASSERT(llist_count(gprs_subscribers), == 2, "%d"); + s2->flags |= GPRS_SUBSCRIBER_FIRST_CONTACT; /* Allocate entry 3 */ s3 = gprs_subscr_get_or_create(imsi3); + VERBOSE_ASSERT(llist_count(gprs_subscribers), == 3, "%d"); /* Check entries */ assert_subscr(s1, imsi1); @@ -326,33 +337,35 @@ gprs_subscr_update(s1); OSMO_ASSERT(last_updated_subscr == NULL); OSMO_ASSERT(s1->sgsn_data->mm == NULL); - OSMO_ASSERT((s1->flags & GSM_SUBSCRIBER_FIRST_CONTACT) == 0); + OSMO_ASSERT((s1->flags & GPRS_SUBSCRIBER_FIRST_CONTACT) == 0); /* There is no subscriber cache. Verify it */ gprs_subscr_cleanup(s1); - subscr_put(s1); + gprs_sub_put(s1); s1 = NULL; - sfound = gprs_subscr_get_by_imsi(imsi1); - OSMO_ASSERT(sfound == NULL); + VERBOSE_ASSERT(llist_count(gprs_subscribers), == 2, "%d"); + OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi1) == NULL); assert_subscr(s2, imsi2); assert_subscr(s3, imsi3); - /* Free entry 2 (GSM_SUBSCRIBER_FIRST_CONTACT is set) */ + /* Free entry 2 (GPRS_SUBSCRIBER_FIRST_CONTACT is set) */ gprs_subscr_cleanup(s2); - subscr_put(s2); + gprs_sub_put(s2); s2 = NULL; + VERBOSE_ASSERT(llist_count(gprs_subscribers), == 1, "%d"); OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi1) == NULL); OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi2) == NULL); assert_subscr(s3, imsi3); /* Try to delete entry 3 */ gprs_subscr_cleanup(s3); - subscr_put(s3); + gprs_sub_put(s3); s3 = NULL; + VERBOSE_ASSERT(llist_count(gprs_subscribers), == 0, "%d"); OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi3) == NULL); - OSMO_ASSERT(llist_empty(&active_subscribers)); + OSMO_ASSERT(llist_empty(gprs_subscribers)); update_subscriber_data_cb = __real_sgsn_update_subscriber_data; @@ -361,7 +374,7 @@ static void test_auth_triplets(void) { - struct gsm_subscriber *s1, *s1found; + struct gprs_sub *s1, *s1found; const char *imsi1 = "1234567890"; struct gsm_auth_tuple *at; struct sgsn_mm_ctx *ctx; @@ -375,17 +388,17 @@ /* Allocate entry 1 */ s1 = gprs_subscr_get_or_create(imsi1); - s1->flags |= GSM_SUBSCRIBER_FIRST_CONTACT; + s1->flags |= GPRS_SUBSCRIBER_FIRST_CONTACT; s1found = gprs_subscr_get_by_imsi(imsi1); OSMO_ASSERT(s1found == s1); - subscr_put(s1found); + gprs_sub_put(s1found); /* Create a context */ OSMO_ASSERT(count(gprs_llme_list()) == 0); ctx = alloc_mm_ctx(local_tlli, &raid); /* Attach s1 to ctx */ - ctx->subscr = subscr_get(s1); + ctx->subscr = gprs_sub_get(s1); ctx->subscr->sgsn_data->mm = ctx; /* Try to get auth tuple */ @@ -414,7 +427,7 @@ OSMO_ASSERT(at == NULL); /* Free MM context and subscriber */ - subscr_put(s1); + gprs_sub_put(s1); sgsn_mm_ctx_cleanup_free(ctx); s1found = gprs_subscr_get_by_imsi(imsi1); OSMO_ASSERT(s1found == NULL); @@ -441,7 +454,7 @@ static void test_subscriber_gsup(void) { - struct gsm_subscriber *s1, *s1found; + struct gprs_sub *s1, *s1found; const char *imsi1 = "1234567890"; struct sgsn_mm_ctx *ctx; struct gprs_ra_id raid = { 0, }; @@ -563,17 +576,17 @@ /* Allocate entry 1 */ s1 = gprs_subscr_get_or_create(imsi1); - s1->flags |= GSM_SUBSCRIBER_FIRST_CONTACT; + s1->flags |= GPRS_SUBSCRIBER_FIRST_CONTACT; s1found = gprs_subscr_get_by_imsi(imsi1); OSMO_ASSERT(s1found == s1); - subscr_put(s1found); + gprs_sub_put(s1found); /* Create a context */ OSMO_ASSERT(count(gprs_llme_list()) == 0); ctx = alloc_mm_ctx(local_tlli, &raid); /* Attach s1 to ctx */ - ctx->subscr = subscr_get(s1); + ctx->subscr = gprs_sub_get(s1); ctx->subscr->sgsn_data->mm = ctx; /* Inject SendAuthInfoReq GSUP message */ @@ -674,7 +687,7 @@ /* Free MM context and subscriber */ OSMO_ASSERT(ctx->subscr == NULL); sgsn_mm_ctx_cleanup_free(ctx); - subscr_put(s1); + gprs_sub_put(s1); s1found = gprs_subscr_get_by_imsi(imsi1); OSMO_ASSERT(s1found == NULL); @@ -1089,7 +1102,7 @@ static void test_gmm_attach_subscr(void) { const enum sgsn_auth_policy saved_auth_policy = sgsn->cfg.auth_policy; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; sgsn_inst.cfg.auth_policy = SGSN_AUTH_POLICY_REMOTE; subscr_request_update_location_cb = my_subscr_request_update_location; @@ -1100,7 +1113,7 @@ printf("Auth policy 'remote': "); test_gmm_attach(0); - subscr_put(subscr); + gprs_sub_put(subscr); assert_no_subscrs(); sgsn->cfg.auth_policy = saved_auth_policy; @@ -1123,7 +1136,7 @@ static void test_gmm_attach_subscr_fake_auth(void) { const enum sgsn_auth_policy saved_auth_policy = sgsn->cfg.auth_policy; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; sgsn_inst.cfg.auth_policy = SGSN_AUTH_POLICY_REMOTE; subscr_request_update_location_cb = my_subscr_request_update_location; @@ -1136,7 +1149,7 @@ printf("Auth policy 'remote', auth faked: "); test_gmm_attach(0); - subscr_put(subscr); + gprs_sub_put(subscr); assert_no_subscrs(); sgsn->cfg.auth_policy = saved_auth_policy; @@ -1165,7 +1178,7 @@ static void test_gmm_attach_subscr_real_auth(void) { const enum sgsn_auth_policy saved_auth_policy = sgsn->cfg.auth_policy; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; sgsn_inst.cfg.auth_policy = SGSN_AUTH_POLICY_REMOTE; subscr_request_update_location_cb = my_subscr_request_update_location; @@ -1179,7 +1192,7 @@ printf("Auth policy 'remote', triplet based auth: "); test_gmm_attach(0); - subscr_put(subscr); + gprs_sub_put(subscr); assert_no_subscrs(); sgsn->cfg.auth_policy = saved_auth_policy; @@ -1253,7 +1266,7 @@ static void test_gmm_attach_subscr_gsup_auth(int retry) { const enum sgsn_auth_policy saved_auth_policy = sgsn->cfg.auth_policy; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; sgsn_inst.cfg.auth_policy = SGSN_AUTH_POLICY_REMOTE; subscr_request_update_location_cb = my_subscr_request_update_gsup_auth; @@ -1267,7 +1280,7 @@ subscr->authorized = 1; sgsn->cfg.require_authentication = 1; sgsn->cfg.require_update_location = 1; - subscr_put(subscr); + gprs_sub_put(subscr); printf("Auth policy 'remote', GSUP based auth: "); test_gmm_attach(retry); @@ -1336,7 +1349,7 @@ static void test_gmm_attach_subscr_real_gsup_auth(int retry) { const enum sgsn_auth_policy saved_auth_policy = sgsn->cfg.auth_policy; - struct gsm_subscriber *subscr; + struct gprs_sub *subscr; sgsn_inst.cfg.auth_policy = SGSN_AUTH_POLICY_REMOTE; gsup_client_send_cb = my_gsup_client_send; @@ -2227,7 +2240,7 @@ { struct apn_ctx *actxs[4]; struct sgsn_ggsn_ctx *ggc, *ggcs[3]; - struct gsm_subscriber *s1; + struct gprs_sub *s1; const char *imsi1 = "1234567890"; struct sgsn_mm_ctx *ctx; struct gprs_ra_id raid = { 0, }; @@ -2346,7 +2359,7 @@ /* Cleanup */ - subscr_put(s1); + gprs_sub_put(s1); sgsn_mm_ctx_cleanup_free(ctx); assert_no_subscrs(); diff --git a/openbsc/tests/sgsn/sgsn_test.ok b/openbsc/tests/sgsn/sgsn_test.ok index c7a53b9..f38d730 100644 --- a/openbsc/tests/sgsn/sgsn_test.ok +++ b/openbsc/tests/sgsn/sgsn_test.ok @@ -1,5 +1,13 @@ Testing LLME allocations Testing core subscriber data API +llist_count(gprs_subscribers) == 0 +llist_count(gprs_subscribers) == 1 +llist_count(gprs_subscribers) == 1 +llist_count(gprs_subscribers) == 2 +llist_count(gprs_subscribers) == 3 +llist_count(gprs_subscribers) == 2 +llist_count(gprs_subscribers) == 1 +llist_count(gprs_subscribers) == 0 Testing authentication triplet handling Testing subscriber GSUP handling Testing GMM detach -- To view, visit https://gerrit.osmocom.org/1684 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia8b391ee009c8545763cba04505be3947835120e Gerrit-PatchSet: 4 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Jan 26 22:05:09 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 26 Jan 2017 22:05:09 +0000 Subject: [PATCH] openbsc[master]: vty tests: attempt to get at sporadic 'Broken Pipe' error Message-ID: Review at https://gerrit.osmocom.org/1693 vty tests: attempt to get at sporadic 'Broken Pipe' error Add verbose logging as well as three retries around the place that often fails on our build server with a 'Broken Pipe' error. Change-Id: I8851b76b2d7b87dd500ae40f47e6bea716ef3fc4 --- M openbsc/tests/vty_test_runner.py 1 file changed, 14 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/93/1693/1 diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py index 89b7a19..dd60859 100644 --- a/openbsc/tests/vty_test_runner.py +++ b/openbsc/tests/vty_test_runner.py @@ -1257,7 +1257,20 @@ def ipa_handle_resp(x, tk, verbose = False): s = data2str(x.recv(38)) if "0023fe040108010701020103010401050101010011" in s: - x.send(IPA().id_resp(IPA().identity(name = tk.encode('utf-8')))) + retries = 3 + while True: + print "\tsending IPA identity at", time.strftime("%T") + try: + x.send(IPA().id_resp(IPA().identity(name = tk.encode('utf-8')))) + print "\tdone sending IPA identity at", time.strftime("%T") + break + except: + print "\tfailed sending IPA identity at", time.strftime("%T") + if retries < 1: + print "\tgiving up" + raise + print "\tretrying (%d attempts left)" % retries + retries -= 1 else: if (verbose): print "\tBSC <- NAT: ", s -- To view, visit https://gerrit.osmocom.org/1693 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8851b76b2d7b87dd500ae40f47e6bea716ef3fc4 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 27 00:47:25 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 27 Jan 2017 00:47:25 +0000 Subject: [PATCH] openbsc[master]: vty tests: attempt to get at sporadic 'Broken Pipe' error In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1693 to look at the new patch set (#2). vty tests: attempt to get at sporadic 'Broken Pipe' error Add verbose logging as well as three retries around the place that often fails on our build server with a 'Broken Pipe' error. Change-Id: I8851b76b2d7b87dd500ae40f47e6bea716ef3fc4 --- M openbsc/tests/vty_test_runner.py 1 file changed, 15 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/93/1693/2 diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py index 89b7a19..7b25d10 100644 --- a/openbsc/tests/vty_test_runner.py +++ b/openbsc/tests/vty_test_runner.py @@ -1257,7 +1257,21 @@ def ipa_handle_resp(x, tk, verbose = False): s = data2str(x.recv(38)) if "0023fe040108010701020103010401050101010011" in s: - x.send(IPA().id_resp(IPA().identity(name = tk.encode('utf-8')))) + retries = 3 + while True: + print "\tsending IPA identity(%s) at %s" % (tk, time.strftime("%T")) + try: + x.send(IPA().id_resp(IPA().identity(name = tk.encode('utf-8')))) + print "\tdone sending IPA identity(%s) at %s" % (tk, + time.strftime("%T")) + break + except: + print "\tfailed sending IPA identity at", time.strftime("%T") + if retries < 1: + print "\tgiving up" + raise + print "\tretrying (%d attempts left)" % retries + retries -= 1 else: if (verbose): print "\tBSC <- NAT: ", s -- To view, visit https://gerrit.osmocom.org/1693 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I8851b76b2d7b87dd500ae40f47e6bea716ef3fc4 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Jan 27 00:50:58 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 27 Jan 2017 00:50:58 +0000 Subject: [PATCH] openbsc[master]: VTY: Print 3G auth tuples, not just 2G auth tuples Message-ID: Review at https://gerrit.osmocom.org/1694 VTY: Print 3G auth tuples, not just 2G auth tuples Change-Id: I277e4347ee1486a39e6dc4e2363a593f328f9e3b Related: OS#1592 --- M openbsc/src/gprs/sgsn_vty.c 1 file changed, 24 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/94/1694/1 diff --git a/openbsc/src/gprs/sgsn_vty.c b/openbsc/src/gprs/sgsn_vty.c index d2326a9..aae4fa3 100644 --- a/openbsc/src/gprs/sgsn_vty.c +++ b/openbsc/src/gprs/sgsn_vty.c @@ -1,5 +1,5 @@ /* - * (C) 2010-2013 by Harald Welte + * (C) 2010-2016 by Harald Welte * (C) 2010 by On-Waves * (C) 2015 by Holger Hans Peter Freyther * All Rights Reserved @@ -693,15 +693,30 @@ vty_out(vty, " A3A8 tuple (used %d times): ", at->use_count); - vty_out(vty, " seq # : %d, ", + vty_out(vty, " CKSN: %d, ", at->key_seq); - vty_out(vty, " RAND : %s, ", - osmo_hexdump(at->vec.rand, sizeof(at->vec.rand))); - vty_out(vty, " SRES : %s, ", - osmo_hexdump(at->vec.sres, sizeof(at->vec.sres))); - vty_out(vty, " Kc : %s%s", - osmo_hexdump(at->vec.kc, sizeof(at->vec.kc)), - VTY_NEWLINE); + if (at->vec.auth_types & OSMO_AUTH_TYPE_GSM) { + vty_out(vty, "RAND: %s, ", + osmo_hexdump(at->vec.rand, + sizeof(at->vec.rand))); + vty_out(vty, "SRES: %s, ", + osmo_hexdump(at->vec.sres, + sizeof(at->vec.sres))); + vty_out(vty, "Kc: %s%s", + osmo_hexdump(at->vec.kc, + sizeof(at->vec.kc)), VTY_NEWLINE); + } + if (at->vec.auth_types & OSMO_AUTH_TYPE_UMTS) { + vty_out(vty, " AUTN: %s, ", + osmo_hexdump(at->vec.autn, + sizeof(at->vec.autn))); + vty_out(vty, "RES: %s, ", + osmo_hexdump(at->vec.res, at->vec.res_len)); + vty_out(vty, "IK: %s, ", + osmo_hexdump(at->vec.ik, sizeof(at->vec.ik))); + vty_out(vty, "CK: %s, ", + osmo_hexdump(at->vec.ck, sizeof(at->vec.ck))); + } } llist_for_each_entry(pdp, &gsub->sgsn_data->pdp_list, list) { -- To view, visit https://gerrit.osmocom.org/1694 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I277e4347ee1486a39e6dc4e2363a593f328f9e3b Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 27 00:50:58 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 27 Jan 2017 00:50:58 +0000 Subject: [PATCH] openbsc[master]: gsm48_tx_mm_auth_req(): support UMTS AUTN Message-ID: Review at https://gerrit.osmocom.org/1695 gsm48_tx_mm_auth_req(): support UMTS AUTN To be able to do R99 UMTS authentication, we need to send along AUTN bytes in the Authentication Request. Add autn parameter to gsm48_tx_mm_auth_req() and conditionally append the R99 AUTN TLV to the Authentication Request message. Change-Id: I0d644559088706aa06b42b9bfe1f8c21ca6fa4da --- M openbsc/include/openbsc/gsm_04_08.h M openbsc/src/libmsc/gsm_04_08.c M openbsc/src/libmsc/token_auth.c 3 files changed, 24 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/95/1695/1 diff --git a/openbsc/include/openbsc/gsm_04_08.h b/openbsc/include/openbsc/gsm_04_08.h index c515569..95d456f 100644 --- a/openbsc/include/openbsc/gsm_04_08.h +++ b/openbsc/include/openbsc/gsm_04_08.h @@ -54,7 +54,8 @@ void gsm_net_update_ctype(struct gsm_network *net); int gsm48_tx_mm_info(struct gsm_subscriber_connection *conn); -int gsm48_tx_mm_auth_req(struct gsm_subscriber_connection *conn, uint8_t *rand, int key_seq); +int gsm48_tx_mm_auth_req(struct gsm_subscriber_connection *conn, uint8_t *rand, + uint8_t *autn, int key_seq); int gsm48_tx_mm_auth_rej(struct gsm_subscriber_connection *conn); int gsm48_tx_mm_serv_ack(struct gsm_subscriber_connection *conn); int gsm48_tx_mm_serv_rej(struct gsm_subscriber_connection *conn, diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index b37ef60..83d71c6 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -240,7 +240,8 @@ /* Then do whatever is needed ... */ if (rc == AUTH_DO_AUTH_THEN_CIPH) { /* Start authentication */ - return gsm48_tx_mm_auth_req(conn, op->atuple.vec.rand, op->atuple.key_seq); + return gsm48_tx_mm_auth_req(conn, op->atuple.vec.rand, NULL, + op->atuple.key_seq); } else if (rc == AUTH_DO_CIPH) { /* Start ciphering directly */ return gsm0808_cipher_mode(conn, net->a5_encryption, @@ -878,14 +879,24 @@ return gsm48_conn_sendmsg(msg, conn, NULL); } -/* Section 9.2.2 */ -int gsm48_tx_mm_auth_req(struct gsm_subscriber_connection *conn, uint8_t *rand, int key_seq) +/*! Send an Authentication Request to MS on the given subscriber connection + * according to 3GPP/ETSI TS 24.008, Section 9.2.2. + * \param[in] conn Subscriber connection to send on. + * \param[in] rand Random challenge token to send, must be 16 bytes long. + * \param[in] autn r99: In case of UMTS mutual authentication, AUTN token to + * send; must be 16 bytes long, or pass NULL for plain GSM auth. + * \param[in] key_seq auth tuple's sequence number. + */ +int gsm48_tx_mm_auth_req(struct gsm_subscriber_connection *conn, uint8_t *rand, + uint8_t *autn, int key_seq) { struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 AUTH REQ"); struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); struct gsm48_auth_req *ar = (struct gsm48_auth_req *) msgb_put(msg, sizeof(*ar)); DEBUGP(DMM, "-> AUTH REQ (rand = %s)\n", osmo_hexdump(rand, 16)); + if (autn) + DEBUGP(DMM, " AUTH REQ (autn = %s)\n", osmo_hexdump(autn, 16)); msg->lchan = conn->lchan; gh->proto_discr = GSM48_PDISC_MM; @@ -894,9 +905,15 @@ ar->key_seq = key_seq; /* 16 bytes RAND parameters */ + osmo_static_assert(sizeof(ar->rand) == 16, sizeof_auth_req_r99_rand); if (rand) memcpy(ar->rand, rand, 16); + + /* 16 bytes AUTN */ + if (autn) + msgb_tlv_put(msg, GSM48_IE_AUTN, 16, autn); + return gsm48_conn_sendmsg(msg, conn, NULL); } diff --git a/openbsc/src/libmsc/token_auth.c b/openbsc/src/libmsc/token_auth.c index 95fd9b3..5af1e98 100644 --- a/openbsc/src/libmsc/token_auth.c +++ b/openbsc/src/libmsc/token_auth.c @@ -106,7 +106,7 @@ if (conn) { uint8_t auth_rand[16]; /* kick the subscriber off the network */ - gsm48_tx_mm_auth_req(conn, auth_rand, 0); + gsm48_tx_mm_auth_req(conn, auth_rand, NULL, 0); gsm48_tx_mm_auth_rej(conn); /* FIXME: close the channel early ?*/ //gsm48_send_rr_Release(lchan); @@ -143,7 +143,7 @@ conn = connection_for_subscr(sms->receiver); if (conn) { /* kick the subscriber off the network */ - gsm48_tx_mm_auth_req(conn, auth_rand, 0); + gsm48_tx_mm_auth_req(conn, auth_rand, NULL, 0); gsm48_tx_mm_auth_rej(conn); /* FIXME: close the channel early ?*/ //gsm48_send_rr_Release(lchan); -- To view, visit https://gerrit.osmocom.org/1695 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0d644559088706aa06b42b9bfe1f8c21ca6fa4da Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 27 09:00:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 09:00:05 +0000 Subject: [PATCH] libosmo-sccp[master]: allow user to give private data to osmo_sua_user_create() In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1665 to look at the new patch set (#2). allow user to give private data to osmo_sua_user_create() ... which can be resolved from the primitive call back prim_cb() by calling osmo_sccp_link_get_user_priv(). Change-Id: If4c0f96f0621fb2adf4c78dc5994d3398431d92f --- M include/osmocom/sigtran/sua.h M src/sua.c M tests/sigtran/sua_client_test.c M tests/sigtran/sua_server_test.c 4 files changed, 14 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/65/1665/2 diff --git a/include/osmocom/sigtran/sua.h b/include/osmocom/sigtran/sua.h index 935a4c0..766b488 100644 --- a/include/osmocom/sigtran/sua.h +++ b/include/osmocom/sigtran/sua.h @@ -8,7 +8,8 @@ void osmo_sua_set_log_area(int area); -struct osmo_sccp_user *osmo_sua_user_create(void *ctx, osmo_prim_cb prim_cb); +struct osmo_sccp_user *osmo_sua_user_create(void *ctx, osmo_prim_cb prim_cb, + void *priv); void osmo_sua_user_destroy(struct osmo_sccp_user *user); int osmo_sua_server_listen(struct osmo_sccp_user *user, const char *hostname, uint16_t port); @@ -19,3 +20,4 @@ /* user hands us a SCCP-USER SAP primitive down into the stack */ int osmo_sua_user_link_down(struct osmo_sccp_link *link, struct osmo_prim_hdr *oph); +void *osmo_sccp_link_get_user_priv(struct osmo_sccp_link *slink); diff --git a/src/sua.c b/src/sua.c index 442b2a0..5af8c18 100644 --- a/src/sua.c +++ b/src/sua.c @@ -59,6 +59,7 @@ struct llist_head links; /* user call-back function in case of incoming primitives */ osmo_prim_cb prim_cb; + void *priv; }; struct osmo_sccp_link { @@ -1401,11 +1402,13 @@ static LLIST_HEAD(sua_users); -struct osmo_sccp_user *osmo_sua_user_create(void *ctx, osmo_prim_cb prim_cb) +struct osmo_sccp_user *osmo_sua_user_create(void *ctx, osmo_prim_cb prim_cb, + void *priv) { struct osmo_sccp_user *user = talloc_zero(ctx, struct osmo_sccp_user); user->prim_cb = prim_cb; + user->priv = priv; INIT_LLIST_HEAD(&user->links); llist_add_tail(&user->list, &sua_users); @@ -1413,6 +1416,11 @@ return user; } +void *osmo_sccp_link_get_user_priv(struct osmo_sccp_link *slink) +{ + return slink->user->priv; +} + void osmo_sua_user_destroy(struct osmo_sccp_user *user) { struct osmo_sccp_link *link; diff --git a/tests/sigtran/sua_client_test.c b/tests/sigtran/sua_client_test.c index 5ea7714..3cbd937 100644 --- a/tests/sigtran/sua_client_test.c +++ b/tests/sigtran/sua_client_test.c @@ -36,7 +36,7 @@ osmo_init_logging(&test_log_info); - g_user = osmo_sua_user_create(ctx, sccp_sap_up); + g_user = osmo_sua_user_create(ctx, sccp_sap_up, NULL); rc = osmo_sua_client_connect(g_user, "127.0.0.1", 2342); if (rc < 0) { diff --git a/tests/sigtran/sua_server_test.c b/tests/sigtran/sua_server_test.c index 0e8d9ca..97b2baf 100644 --- a/tests/sigtran/sua_server_test.c +++ b/tests/sigtran/sua_server_test.c @@ -65,7 +65,7 @@ osmo_init_logging(&test_log_info); - user = osmo_sua_user_create(ctx, sccp_sap_up); + user = osmo_sua_user_create(ctx, sccp_sap_up, NULL); rc = osmo_sua_server_listen(user, "127.0.0.1", 2342); if (rc < 0) { -- To view, visit https://gerrit.osmocom.org/1665 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If4c0f96f0621fb2adf4c78dc5994d3398431d92f Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Jan 27 09:00:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 09:00:05 +0000 Subject: [PATCH] libosmo-sccp[master]: sua: Fix typo in log message In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1666 to look at the new patch set (#2). sua: Fix typo in log message Change-Id: I13bb0e2f4ec688fefd9b98d6d2389562e2a2dad7 --- M src/sua.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/66/1666/2 diff --git a/src/sua.c b/src/sua.c index 5af8c18..294dc6a 100644 --- a/src/sua.c +++ b/src/sua.c @@ -526,7 +526,7 @@ /* resolve reference of connection */ conn = conn_find_by_id(link, par->conn_id); if (!conn) { - LOGP(DSUA, LOGL_ERROR, "N-DISCONNECT.resp for unknown " + LOGP(DSUA, LOGL_ERROR, "N-DISCONNECT.req for unknown " "connection ID %u\n", par->conn_id); /* FIXME: Send primitive to user */ return -ENODEV; -- To view, visit https://gerrit.osmocom.org/1666 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I13bb0e2f4ec688fefd9b98d6d2389562e2a2dad7 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Jan 27 09:00:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 09:00:05 +0000 Subject: [PATCH] libosmo-sccp[master]: sua: call conn_disconnect() in sua_disconnect_req() In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1667 to look at the new patch set (#2). sua: call conn_disconnect() in sua_disconnect_req() disconnect is not a class3/4 operation. We simply generate + send the DISCONNECT.ind message to the remote side and drop all local state about the connection. Change-Id: I4e336f9dfd4ebd0122cd9e5a70db3d05e9dc1764 --- M src/sua.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/67/1667/2 diff --git a/src/sua.c b/src/sua.c index 294dc6a..ad8385d 100644 --- a/src/sua.c +++ b/src/sua.c @@ -548,6 +548,7 @@ xua_msg_free(xua); conn_state_set(conn, S_DISCONN_PEND); + conn_destroy(conn); return sua_link_send(link, outmsg); } -- To view, visit https://gerrit.osmocom.org/1667 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I4e336f9dfd4ebd0122cd9e5a70db3d05e9dc1764 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Jan 27 09:00:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 09:00:05 +0000 Subject: [PATCH] libosmo-sccp[master]: sua: Ensure that a SUA client will continuously try to recon... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1668 to look at the new patch set (#2). sua: Ensure that a SUA client will continuously try to reconnect Change-Id: Ic05a2b78e29e4ede214a3395430ef54bacd84e60 --- M src/sua.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/68/1668/2 diff --git a/src/sua.c b/src/sua.c index ad8385d..110f1e5 100644 --- a/src/sua.c +++ b/src/sua.c @@ -1385,7 +1385,7 @@ sual->data = cli; osmo_stream_cli_set_data(cli, sual); - rc = osmo_stream_cli_open(cli); + rc = osmo_stream_cli_open2(cli, 1); if (rc < 0) { sua_link_destroy(sual); osmo_stream_cli_destroy(cli); -- To view, visit https://gerrit.osmocom.org/1668 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic05a2b78e29e4ede214a3395430ef54bacd84e60 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Jan 27 09:00:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 09:00:05 +0000 Subject: [PATCH] libosmo-sccp[master]: SUA COIT: send dest ref nr, not dest addr In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1669 to look at the new patch set (#2). SUA COIT: send dest ref nr, not dest addr See RFC 3868 3.3.11 https://tools.ietf.org/html/rfc3868#section-3.3.11 Change-Id: I083384876d4a8d7fa9c03409fbdc9e00e3c8f416 --- M src/sua.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/69/1669/2 diff --git a/src/sua.c b/src/sua.c index 110f1e5..5ae5f76 100644 --- a/src/sua.c +++ b/src/sua.c @@ -272,7 +272,7 @@ xua_msg_add_u32(xua, SUA_IEI_ROUTE_CTX, 0); /* FIXME */ xua_msg_add_u32(xua, SUA_IEI_PROTO_CLASS, 2); xua_msg_add_u32(xua, SUA_IEI_SRC_REF, conn->conn_id); - xua_msg_add_sccp_addr(xua, SUA_IEI_DEST_ADDR, &conn->called_addr); + xua_msg_add_u32(xua, SUA_IEI_DEST_REF, conn->remote_ref); /* optional: sequence number; credit (both class 3 only) */ outmsg = xua_to_msg(1, xua); -- To view, visit https://gerrit.osmocom.org/1669 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I083384876d4a8d7fa9c03409fbdc9e00e3c8f416 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 27 09:00:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 09:00:05 +0000 Subject: [PATCH] libosmo-sccp[master]: add comment (meaning of COIT) In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1670 to look at the new patch set (#2). add comment (meaning of COIT) Change-Id: I63276ca2bfd6282676618e50268ed2234025b7bb --- M include/osmocom/sigtran/protocol/sua.h 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/70/1670/2 diff --git a/include/osmocom/sigtran/protocol/sua.h b/include/osmocom/sigtran/protocol/sua.h index 864a2df..d61c85a 100644 --- a/include/osmocom/sigtran/protocol/sua.h +++ b/include/osmocom/sigtran/protocol/sua.h @@ -74,7 +74,7 @@ #define SUA_CO_CODT 8 #define SUA_CO_CODA 9 #define SUA_CO_COERR 10 -#define SUA_CO_COIT 11 +#define SUA_CO_COIT 11 /* Connection Oriented Inactiviy Test */ #define SUA_IEI_ROUTE_CTX 0x0006 #define SUA_IEI_CORR_ID 0x0013 -- To view, visit https://gerrit.osmocom.org/1670 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I63276ca2bfd6282676618e50268ed2234025b7bb Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 27 09:00:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 09:00:05 +0000 Subject: [PATCH] libosmo-sccp[master]: add RFC 3868 (SUA) spec in HTML In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1671 to look at the new patch set (#2). add RFC 3868 (SUA) spec in HTML Change-Id: Ieab0212157381f7b71f0196925e94c88e9b5938e --- A specs/RFC_3868__Signalling_Connection_Control_Part_User_Adaptation_Layer_SUA.html 1 file changed, 7,535 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/71/1671/2 -- To view, visit https://gerrit.osmocom.org/1671 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ieab0212157381f7b71f0196925e94c88e9b5938e Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 27 09:00:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 09:00:05 +0000 Subject: [PATCH] libosmo-sccp[master]: cosmetic: add comments for GT, PC, SSN to help noobs finding... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1672 to look at the new patch set (#2). cosmetic: add comments for GT, PC, SSN to help noobs finding their way Change-Id: I8f47f855c2718f4922b36229a388fa719c628bf6 --- M include/osmocom/sigtran/sccp_sap.h 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/72/1672/2 diff --git a/include/osmocom/sigtran/sccp_sap.h b/include/osmocom/sigtran/sccp_sap.h index a155de5..0aa565a 100644 --- a/include/osmocom/sigtran/sccp_sap.h +++ b/include/osmocom/sigtran/sccp_sap.h @@ -46,9 +46,9 @@ OSMO_SCU_PRIM_N_PCSTATE, }; -#define OSMO_SCCP_ADDR_T_GT 0x0001 -#define OSMO_SCCP_ADDR_T_PC 0x0002 -#define OSMO_SCCP_ADDR_T_SSN 0x0004 +#define OSMO_SCCP_ADDR_T_GT 0x0001 /* global title */ +#define OSMO_SCCP_ADDR_T_PC 0x0002 /* signalling point code */ +#define OSMO_SCCP_ADDR_T_SSN 0x0004 /* subsystem number */ #define OSMO_SCCP_ADDR_T_IPv4 0x0008 #define OSMO_SCCP_ADDR_T_IPv6 0x0010 -- To view, visit https://gerrit.osmocom.org/1672 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I8f47f855c2718f4922b36229a388fa719c628bf6 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 27 09:00:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 09:00:05 +0000 Subject: [PATCH] libosmo-sccp[master]: remove two compiler warnings for unused variables In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1673 to look at the new patch set (#2). remove two compiler warnings for unused variables Change-Id: I173dc67050d907f9b09b99265af9dee9d142ace3 --- M src/sua.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/73/1673/2 diff --git a/src/sua.c b/src/sua.c index 5ae5f76..f790a52 100644 --- a/src/sua.c +++ b/src/sua.c @@ -927,7 +927,8 @@ memcpy(¶m->calling_addr, &conn->calling_addr, sizeof(param->calling_addr)); //param->in_sequence_control; - cause = xua_msg_get_u32(xua, SUA_IEI_CAUSE); + /* TODO evaluate cause: + * cause = xua_msg_get_u32(xua, SUA_IEI_CAUSE); */ /* optional: src addr */ /* optional: dest addr */ param->importance = xua_msg_get_u32(xua, SUA_IEI_IMPORTANCE); -- To view, visit https://gerrit.osmocom.org/1673 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I173dc67050d907f9b09b99265af9dee9d142ace3 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 27 09:00:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 09:00:05 +0000 Subject: [PATCH] libosmo-sccp[master]: parse SCCP src+dst addresses In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1674 to look at the new patch set (#2). parse SCCP src+dst addresses In order to receive a Paging command with a valid RANAP SSN, decode the SCCP source and destination address IEs. This is used by hnbgw to forward a Paging from CN to RNC. This may be done more generally as soon as more IEs need parsing of their sub parts. For now, iterate the higher level IE's data chunk and obtain the address sub part IEs without storing sub part locations. Change-Id: I03d0c2a9003fda59c5b88c8738df009c30fbc11c --- M src/sua.c 1 file changed, 85 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/74/1674/2 diff --git a/src/sua.c b/src/sua.c index f790a52..b8e0c09 100644 --- a/src/sua.c +++ b/src/sua.c @@ -177,7 +177,7 @@ if (!tmp) return -ENOMEM; - msgb_put_u16(tmp, 2); /* route on SSN + PC */ + msgb_put_u16(tmp, SUA_RI_SSN_PC); /* route on SSN + PC */ msgb_put_u16(tmp, 7); /* always put all addresses on SCCP side */ if (addr->presence & OSMO_SCCP_ADDR_T_GT) { @@ -726,12 +726,95 @@ uint16_t iei) { const struct xua_msg_part *param = xua_msg_find_tag(xua, iei); + const struct xua_parameter_hdr *par; + uint16_t ri; + uint16_t ai; + uint16_t pos; + uint16_t par_tag, par_len, par_datalen; + uint32_t *p32; if (!param) return -ENODEV; - /* FIXME */ + LOGP(DSUA, LOGL_DEBUG, "sua_parse_addr(IEI=%d) (%d) %s\n", + iei, param->len, + osmo_hexdump(param->dat, param->len)); + + if (param->len < 4) { + LOGP(DSUA, LOGL_ERROR, "SUA IEI %d: invalid address length: %d\n", + iei, param->len); + return -EINVAL; + } + + pos = 0; + ri = ntohs(*(uint16_t*) ¶m->dat[pos]); + pos += 2; + ai = ntohs(*(uint16_t*) ¶m->dat[pos]); + pos += 2; + + if (ri != SUA_RI_SSN_PC) { + LOGP(DSUA, LOGL_ERROR, "SUA IEI %d: Routing Indicator not supported yet: %d\n", + iei, ri); + return -ENOTSUP; + } + + if (ai != 7) { + LOGP(DSUA, LOGL_ERROR, "SUA IEI %d: Address Indicator not supported yet: %x\n", + iei, ai); + return -ENOTSUP; + } + + /* + * FIXME: this parses the encapsulated T16L16V IEs on the go. We + * probably want to have a separate general parsing function storing + * the subparts in xua_msg_part. But before we do, we should find more + * users of this subpart parsing and be aware of the performance + * tradeoff. + */ + + while (pos + sizeof(*par) < param->len) { + par = (struct xua_parameter_hdr *) ¶m->dat[pos]; + par_tag = ntohs(par->tag); + par_len = ntohs(par->len); + par_datalen = par_len - sizeof(*par); + + LOGP(DSUA, LOGL_DEBUG, "SUA IEI %hu pos %hu/%hu: subpart tag %hu, len %hu\n", + iei, pos, param->len, par->tag, par->len); + + switch (par_tag) { + case SUA_IEI_PC: + if (par_datalen != 4) + goto subpar_fail; + p32 = (uint32_t*)par->data; + out->pc = ntohl(*p32); + out->presence |= OSMO_SCCP_ADDR_T_PC; + break; + case SUA_IEI_SSN: + if (par_datalen != 4) + goto subpar_fail; + /* 24 zero bits, then 8 bits SSN */ + out->ssn = par->data[3]; + out->presence |= OSMO_SCCP_ADDR_T_SSN; + break; + case SUA_IEI_GT: + /* TODO */ + out->presence |= OSMO_SCCP_ADDR_T_GT; + break; + default: + LOGP(DSUA, LOGL_ERROR, "SUA IEI %d: Unknown subpart tag %hd\n", + iei, par_tag); + goto subpar_fail; + } + + pos += par_len; + } + return 0; + +subpar_fail: + LOGP(DSUA, LOGL_ERROR, "Failed to parse subparts of address IEI=%d\n", + iei); + return -EINVAL; } static int sua_rx_cldt(struct osmo_sccp_link *link, struct xua_msg *xua) -- To view, visit https://gerrit.osmocom.org/1674 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I03d0c2a9003fda59c5b88c8738df009c30fbc11c Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 27 09:00:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 09:00:05 +0000 Subject: [PATCH] libosmo-sccp[master]: cosmetic: sua.c: comments In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1675 to look at the new patch set (#2). cosmetic: sua.c: comments Add some human readable names. Change-Id: If4aa15aae8b03c764a45b866a751eb3fbabebec1 --- M src/sua.c 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/75/1675/2 diff --git a/src/sua.c b/src/sua.c index b8e0c09..c363cdb 100644 --- a/src/sua.c +++ b/src/sua.c @@ -870,7 +870,7 @@ return rc; } -/* RFC 3868 3.3.3 / SCCP CR */ +/* RFC 3868 3.3.3 / SCCP CR (Connection Request) */ static int sua_rx_core(struct osmo_sccp_link *link, struct xua_msg *xua) { struct osmo_scu_prim *prim; @@ -915,7 +915,7 @@ return 0; } -/* RFC 3868 3.3.4 / SCCP CC */ +/* RFC 3868 3.3.4 / SCCP CC (Connection Confirm) */ static int sua_rx_coak(struct osmo_sccp_link *link, struct xua_msg *xua) { struct osmo_scu_prim *prim; @@ -976,7 +976,7 @@ return 0; } -/* RFC 3868 3.3.5 / SCCP CREF */ +/* RFC 3868 3.3.5 / SCCP CREF (Connection Refused) */ static int sua_rx_coref(struct osmo_sccp_link *link, struct xua_msg *xua) { struct osmo_scu_prim *prim; @@ -1030,7 +1030,7 @@ return 0; } -/* RFC 3868 3.3.6 / SCCP RLSD */ +/* RFC 3868 3.3.6 / SCCP RLSD (Released) */ static int sua_rx_relre(struct osmo_sccp_link *link, struct xua_msg *xua) { struct osmo_scu_prim *prim; @@ -1082,7 +1082,7 @@ return 0; } -/* RFC 3868 3.3.7 / SCCP RLC */ +/* RFC 3868 3.3.7 / SCCP RLC (Release Complete)*/ static int sua_rx_relco(struct osmo_sccp_link *link, struct xua_msg *xua) { struct osmo_scu_prim *prim; @@ -1127,7 +1127,7 @@ } -/* RFC3868 3.3.1 / SCCP DT1 */ +/* RFC3868 3.3.1 / SCCP DT1 (Data Form 1) */ static int sua_rx_codt(struct osmo_sccp_link *link, struct xua_msg *xua) { struct osmo_scu_prim *prim; -- To view, visit https://gerrit.osmocom.org/1675 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If4aa15aae8b03c764a45b866a751eb3fbabebec1 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 27 09:00:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 09:00:05 +0000 Subject: [PATCH] libosmo-sccp[master]: fix: use proper disconnect prim param type In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1676 to look at the new patch set (#2). fix: use proper disconnect prim param type For the N-DISCONNECT prim, parse CREF, RLC and RLSD from the proper parameter struct type: osmo_scu_disconn_param instead of osmo_scu_connect_param. Before this, the conn_id ended up in the wrong place and the other side always received a zero conn_id. Tested only for the RLSD case, which fixes Iu-Release message evaluation for all except the very first SUA conn received by the CN components. In all three cases, set: * param->responding_addr to conn->called_addr. * param->originator to OSMO_SCCP_ORIG_UNDEFINED. Change-Id: I446f2fe57cc3b7c52723f3ab82836513a5d37752 --- M src/sua.c 1 file changed, 12 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/76/1676/2 diff --git a/src/sua.c b/src/sua.c index c363cdb..2b4c64e 100644 --- a/src/sua.c +++ b/src/sua.c @@ -981,7 +981,7 @@ { struct osmo_scu_prim *prim; struct sua_connection *conn; - struct osmo_scu_connect_param *param; + struct osmo_scu_disconn_param *param; struct xua_msg_part *data_ie = xua_msg_find_tag(xua, SUA_IEI_DATA); struct msgb *upmsg; uint32_t conn_id = xua_msg_get_u32(xua, SUA_IEI_DEST_REF); @@ -1000,15 +1000,13 @@ /* fill primitive */ upmsg = sua_msgb_alloc(); prim = (struct osmo_scu_prim *) msgb_put(upmsg, sizeof(*prim)); - param = &prim->u.connect; + param = &prim->u.disconnect; osmo_prim_init(&prim->oph, SCCP_SAP_USER, OSMO_SCU_PRIM_N_DISCONNECT, PRIM_OP_INDICATION, upmsg); param->conn_id = conn_id; - memcpy(¶m->called_addr, &conn->called_addr, - sizeof(param->called_addr)); - memcpy(¶m->calling_addr, &conn->calling_addr, - sizeof(param->calling_addr)); + param->responding_addr = conn->called_addr; + param->originator = OSMO_SCCP_ORIG_UNDEFINED; //param->in_sequence_control; /* TODO evaluate cause: * cause = xua_msg_get_u32(xua, SUA_IEI_CAUSE); */ @@ -1035,7 +1033,7 @@ { struct osmo_scu_prim *prim; struct sua_connection *conn; - struct osmo_scu_connect_param *param; + struct osmo_scu_disconn_param *param; struct xua_msg_part *data_ie = xua_msg_find_tag(xua, SUA_IEI_DATA); struct msgb *upmsg; uint32_t conn_id = xua_msg_get_u32(xua, SUA_IEI_DEST_REF); @@ -1053,7 +1051,7 @@ /* fill primitive */ upmsg = sua_msgb_alloc(); prim = (struct osmo_scu_prim *) msgb_put(upmsg, sizeof(*prim)); - param = &prim->u.connect; + param = &prim->u.disconnect; osmo_prim_init(&prim->oph, SCCP_SAP_USER, OSMO_SCU_PRIM_N_DISCONNECT, PRIM_OP_INDICATION, upmsg); /* what primitive? */ @@ -1068,10 +1066,8 @@ memcpy(upmsg->l2h, data_ie->dat, data_ie->len); } - memcpy(¶m->called_addr, &conn->called_addr, - sizeof(param->called_addr)); - memcpy(¶m->calling_addr, &conn->calling_addr, - sizeof(param->calling_addr)); + param->responding_addr = conn->called_addr; + param->originator = OSMO_SCCP_ORIG_UNDEFINED; /* send to user SAP */ link->user->prim_cb(&prim->oph, link); @@ -1087,7 +1083,7 @@ { struct osmo_scu_prim *prim; struct sua_connection *conn; - struct osmo_scu_connect_param *param; + struct osmo_scu_disconn_param *param; struct msgb *upmsg; uint32_t conn_id = xua_msg_get_u32(xua, SUA_IEI_DEST_REF); @@ -1104,7 +1100,7 @@ /* fill primitive */ upmsg = sua_msgb_alloc(); prim = (struct osmo_scu_prim *) msgb_put(upmsg, sizeof(*prim)); - param = &prim->u.connect; + param = &prim->u.disconnect; osmo_prim_init(&prim->oph, SCCP_SAP_USER, OSMO_SCU_PRIM_N_DISCONNECT, PRIM_OP_CONFIRM, upmsg); /* what primitive? */ @@ -1113,10 +1109,8 @@ /* source reference */ param->importance = xua_msg_get_u32(xua, SUA_IEI_IMPORTANCE); - memcpy(¶m->called_addr, &conn->called_addr, - sizeof(param->called_addr)); - memcpy(¶m->calling_addr, &conn->calling_addr, - sizeof(param->calling_addr)); + param->responding_addr = conn->called_addr; + param->originator = OSMO_SCCP_ORIG_UNDEFINED; /* send to user SAP */ link->user->prim_cb(&prim->oph, link); -- To view, visit https://gerrit.osmocom.org/1676 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I446f2fe57cc3b7c52723f3ab82836513a5d37752 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 27 09:00:07 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 09:00:07 +0000 Subject: [PATCH] libosmo-sccp[master]: Start to log + handle SCTP notifications Message-ID: Review at https://gerrit.osmocom.org/1696 Start to log + handle SCTP notifications Change-Id: Ie00c4fc65c66e55262e2db084826084dcaf34b91 --- M src/sua.c 1 file changed, 116 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/96/1696/1 diff --git a/src/sua.c b/src/sua.c index 2b4c64e..39afef0 100644 --- a/src/sua.c +++ b/src/sua.c @@ -1,6 +1,6 @@ /* Minimal implementation of RFC 3868 - SCCP User Adaptation Layer */ -/* (C) 2015 by Harald Welte +/* (C) 2015-2017 by Harald Welte * All Rights Reserved * * This program is free software; you can redistribute it and/or modify @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -241,6 +242,8 @@ static int sua_link_send(struct osmo_sccp_link *link, struct msgb *msg) { msgb_sctp_ppid(msg) = SUA_PPID; + + DEBUGP(DSUA, "sua_link_send(%s)\n", osmo_hexdump(msg->data, msgb_length(msg))); if (link->is_server) osmo_stream_srv_send(link->data, msg); @@ -550,6 +553,7 @@ conn_state_set(conn, S_DISCONN_PEND); conn_destroy(conn); + LOGP(DSUA, LOGL_NOTICE, "About to send the SUA RELRE\n"); return sua_link_send(link, outmsg); } @@ -1256,6 +1260,85 @@ #include #include +static const struct value_string sctp_assoc_chg_vals[] = { + { SCTP_COMM_UP, "COMM_UP" }, + { SCTP_COMM_LOST, "COMM_LOST" }, + { SCTP_RESTART, "RESTART" }, + { SCTP_SHUTDOWN_COMP, "SHUTDOWN_COMP" }, + { SCTP_CANT_STR_ASSOC, "CANT_STR_ASSOC" }, + { 0, NULL } +}; + +static const struct value_string sctp_sn_type_vals[] = { + { SCTP_ASSOC_CHANGE, "ASSOC_CHANGE" }, + { SCTP_PEER_ADDR_CHANGE, "PEER_ADDR_CHANGE" }, + { SCTP_SHUTDOWN_EVENT, "SHUTDOWN_EVENT" }, + { SCTP_SEND_FAILED, "SEND_FAILED" }, + { SCTP_REMOTE_ERROR, "REMOTE_ERROR" }, + { SCTP_PARTIAL_DELIVERY_EVENT, "PARTIAL_DELIVERY_EVENT" }, + { SCTP_ADAPTATION_INDICATION, "ADAPTATION_INDICATION" }, +#ifdef SCTP_AUTHENTICATION_INDICATION + { SCTP_AUTHENTICATION_INDICATION, "UTHENTICATION_INDICATION" }, +#endif +#ifdef SCTP_SENDER_DRY_EVENT + { SCTP_SENDER_DRY_EVENT, "SENDER_DRY_EVENT" }, +#endif + { 0, NULL } +}; + +static int get_logevel_by_sn_type(int sn_type) +{ + switch (sn_type) { + case SCTP_ADAPTATION_INDICATION: + case SCTP_PEER_ADDR_CHANGE: +#ifdef SCTP_AUTHENTICATION_INDICATION + case SCTP_AUTHENTICATION_INDICATION: +#endif +#ifdef SCTP_SENDER_DRY_EVENT + case SCTP_SENDER_DRY_EVENT: +#endif + return LOGL_INFO; + case SCTP_ASSOC_CHANGE: + return LOGL_NOTICE; + case SCTP_SHUTDOWN_EVENT: + case SCTP_PARTIAL_DELIVERY_EVENT: + return LOGL_NOTICE; + case SCTP_SEND_FAILED: + case SCTP_REMOTE_ERROR: + return LOGL_ERROR; + default: + return LOGL_NOTICE; + } +} + +static void log_sctp_notification(int fd, const char *pfx, + union sctp_notification *notif) +{ + int log_level; + char *conn_id = osmo_sock_get_name(NULL, fd); + + LOGP(DSUA, LOGL_INFO, "%s %s SCTP NOTIFICATION %u flags=0x%0x\n", + conn_id, pfx, notif->sn_header.sn_type, + notif->sn_header.sn_flags); + + log_level = get_logevel_by_sn_type(notif->sn_header.sn_type); + + switch (notif->sn_header.sn_type) { + case SCTP_ASSOC_CHANGE: + LOGP(DSUA, log_level, "%s %s SCTP_ASSOC_CHANGE: %s\n", + conn_id, pfx, get_value_string(sctp_assoc_chg_vals, + notif->sn_assoc_change.sac_state)); + break; + default: + LOGP(DSUA, log_level, "%s %s %s\n", + conn_id, pfx, get_value_string(sctp_sn_type_vals, + notif->sn_header.sn_type)); + break; + } + + talloc_free(conn_id); +} + /* netif code tells us we can read something from the socket */ static int sua_srv_conn_cb(struct osmo_stream_srv *conn) { @@ -1273,6 +1356,8 @@ /* read SUA message from socket and process it */ rc = sctp_recvmsg(ofd->fd, msgb_data(msg), msgb_tailroom(msg), NULL, NULL, &sinfo, &flags); + LOGP(DSUA, LOGL_DEBUG, "sua_srv_conn_cb(): sctp_recvmsg() returned %d\n", + rc); if (rc < 0) { close(ofd->fd); osmo_fd_unregister(ofd); @@ -1287,6 +1372,19 @@ } if (flags & MSG_NOTIFICATION) { + union sctp_notification *notif = (union sctp_notification *) msgb_data(msg); + + log_sctp_notification(ofd->fd, "SUA SRV", notif); + + switch (notif->sn_header.sn_type) { + case SCTP_SHUTDOWN_EVENT: + close(ofd->fd); + osmo_fd_unregister(ofd); + ofd->fd = -1; + break; + default: + break; + } msgb_free(msg); return 0; } @@ -1385,7 +1483,7 @@ } /* netif code tells us we can read something from the socket */ -static int sua_cli_conn_cb(struct osmo_stream_cli *conn) +static int sua_cli_read_cb(struct osmo_stream_cli *conn) { struct osmo_fd *ofd = osmo_stream_cli_get_ofd(conn); struct osmo_sccp_link *link = osmo_stream_cli_get_data(conn); @@ -1394,6 +1492,8 @@ unsigned int ppid; int flags = 0; int rc; + + LOGP(DSUA, LOGL_DEBUG, "sua_cli_read_cb() rx\n"); if (!msg) return -ENOMEM; @@ -1415,6 +1515,19 @@ } if (flags & MSG_NOTIFICATION) { + union sctp_notification *notif = (union sctp_notification *) msgb_data(msg); + + log_sctp_notification(ofd->fd, "SUA CLNT", notif); + + switch (notif->sn_header.sn_type) { + case SCTP_SHUTDOWN_EVENT: + close(ofd->fd); + osmo_fd_unregister(ofd); + ofd->fd = -1; + break; + default: + break; + } msgb_free(msg); return 0; } @@ -1452,7 +1565,7 @@ osmo_stream_cli_set_port(cli, port); osmo_stream_cli_set_proto(cli, IPPROTO_SCTP); osmo_stream_cli_set_reconnect_timeout(cli, 5); - osmo_stream_cli_set_read_cb(cli, sua_cli_conn_cb); + osmo_stream_cli_set_read_cb(cli, sua_cli_read_cb); /* create SUA link and associate it with stream_cli */ sual = sua_link_new(user, 0); -- To view, visit https://gerrit.osmocom.org/1696 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie00c4fc65c66e55262e2db084826084dcaf34b91 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Jan 27 09:07:37 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 27 Jan 2017 09:07:37 +0000 Subject: [MERGED] osmo-trx[master]: Fix building against sqlite3 In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Fix building against sqlite3 ...................................................................... Fix building against sqlite3 * Explicitly check for sqlite3 at configure stage, remove old include dir, fix header inclusion. * Use configure results for linking instead of hardcoded linker option for sqlite. * Add dependency on -dev package for .deb Change-Id: I6d7f697d67651f02ceb77fc4da4317b64fa47f9e Fixes: OS#1928 --- M CommonLibs/Makefile.am M CommonLibs/sqlite3util.cpp M Makefile.am M Makefile.common M Transceiver52M/Makefile.am M configure.ac M debian/control 7 files changed, 12 insertions(+), 11 deletions(-) Approvals: Tom Tsou: Looks good to me, approved Neels Hofmeyr: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/CommonLibs/Makefile.am b/CommonLibs/Makefile.am index 26a55ed..ed9cf29 100644 --- a/CommonLibs/Makefile.am +++ b/CommonLibs/Makefile.am @@ -78,7 +78,7 @@ URLEncodeTest_LDADD = libcommon.la BitVectorTest_SOURCES = BitVectorTest.cpp -BitVectorTest_LDADD = libcommon.la $(SQLITE_LA) +BitVectorTest_LDADD = libcommon.la $(SQLITE3_LIBS) InterthreadTest_SOURCES = InterthreadTest.cpp InterthreadTest_LDADD = libcommon.la @@ -92,19 +92,19 @@ TimevalTest_LDADD = libcommon.la VectorTest_SOURCES = VectorTest.cpp -VectorTest_LDADD = libcommon.la $(SQLITE_LA) +VectorTest_LDADD = libcommon.la $(SQLITE3_LIBS) RegexpTest_SOURCES = RegexpTest.cpp RegexpTest_LDADD = libcommon.la ConfigurationTest_SOURCES = ConfigurationTest.cpp -ConfigurationTest_LDADD = libcommon.la $(SQLITE_LA) +ConfigurationTest_LDADD = libcommon.la $(SQLITE3_LIBS) # ReportingTest_SOURCES = ReportingTest.cpp # ReportingTest_LDADD = libcommon.la $(SQLITE_LA) LogTest_SOURCES = LogTest.cpp -LogTest_LDADD = libcommon.la $(SQLITE_LA) +LogTest_LDADD = libcommon.la $(SQLITE3_LIBS) F16Test_SOURCES = F16Test.cpp diff --git a/CommonLibs/sqlite3util.cpp b/CommonLibs/sqlite3util.cpp index 036ef2c..2b19ee6 100644 --- a/CommonLibs/sqlite3util.cpp +++ b/CommonLibs/sqlite3util.cpp @@ -4,7 +4,7 @@ */ -#include "sqlite3.h" +#include #include "sqlite3util.h" #include diff --git a/Makefile.am b/Makefile.am index f9f5a5c..56cb4ba 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,7 +21,7 @@ include $(top_srcdir)/Makefile.common ACLOCAL_AMFLAGS = -I config -AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(USB_INCLUDES) $(WITH_INCLUDES) +AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(USB_INCLUDES) $(WITH_INCLUDES) $(SQLITE3_CFLAGS) AM_CXXFLAGS = -Wall -pthread -ldl #AM_CXXFLAGS = -Wall -O2 -NDEBUG -pthread -ldl #AM_CFLAGS = -Wall -O2 -NDEBUG -pthread -ldl diff --git a/Makefile.common b/Makefile.common index d7927a5..c0fc850 100644 --- a/Makefile.common +++ b/Makefile.common @@ -23,16 +23,13 @@ COMMON_INCLUDEDIR = $(top_srcdir)/CommonLibs GSM_INCLUDEDIR = $(top_srcdir)/GSM -SQLITE_INCLUDEDIR = $(top_srcdir)/sqlite3 STD_DEFINES_AND_INCLUDES = \ $(SVNDEV) \ -I$(COMMON_INCLUDEDIR) \ - -I$(GSM_INCLUDEDIR) \ - -I$(SQLITE_INCLUDEDIR) + -I$(GSM_INCLUDEDIR) COMMON_LA = $(top_builddir)/CommonLibs/libcommon.la GSM_LA = $(top_builddir)/GSM/libGSM.la -SQLITE_LA = -lsqlite3 MOSTLYCLEANFILES = *~ diff --git a/Transceiver52M/Makefile.am b/Transceiver52M/Makefile.am index 667217f..68cdf74 100644 --- a/Transceiver52M/Makefile.am +++ b/Transceiver52M/Makefile.am @@ -98,7 +98,7 @@ libtransceiver.la \ $(ARCH_LA) \ $(GSM_LA) \ - $(COMMON_LA) $(SQLITE_LA) + $(COMMON_LA) $(SQLITE3_LIBS) if USRP1 libtransceiver_la_SOURCES += USRPDevice.cpp diff --git a/configure.ac b/configure.ac index 0cf3cc5..649bb0e 100644 --- a/configure.ac +++ b/configure.ac @@ -118,7 +118,10 @@ AM_CONDITIONAL(ARCH_ARM, [test "x$with_neon" = "xyes" || test "x$with_neon_vfpv4" = "xyes"]) AM_CONDITIONAL(ARCH_ARM_A15, [test "x$with_neon_vfpv4" = "xyes"]) +AC_CHECK_LIB(sqlite3, sqlite3_open, , AC_MSG_ERROR(sqlite3 is not available)) + PKG_CHECK_MODULES(LIBUSB, libusb-1.0) +PKG_CHECK_MODULES(SQLITE3, sqlite3) AC_CHECK_HEADER([boost/config.hpp],[], [AC_MSG_ERROR([boost/config.hpp not found, install e.g. libboost-dev])]) diff --git a/debian/control b/debian/control index beb6f6a..d016afa 100644 --- a/debian/control +++ b/debian/control @@ -5,6 +5,7 @@ Build-Depends: debhelper (>= 9), autotools-dev, libdbd-sqlite3, + libsqlite3-dev, pkg-config, dh-autoreconf, libuhd-dev, -- To view, visit https://gerrit.osmocom.org/1691 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6d7f697d67651f02ceb77fc4da4317b64fa47f9e Gerrit-PatchSet: 2 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Tom Tsou From gerrit-no-reply at lists.osmocom.org Fri Jan 27 09:18:04 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 27 Jan 2017 09:18:04 +0000 Subject: openbsc[master]: SGSN: Integrate basic support for UMTS AKA In-Reply-To: References: Message-ID: Patch Set 4: -Code-Review (1 comment) https://gerrit.osmocom.org/#/c/1683/4/openbsc/src/gprs/gprs_gmm.c File openbsc/src/gprs/gprs_gmm.c: Line 714: LOGMMCTXP(LOGL_NOTICE, ctx, "Mismatch: expected SRES = %s\n", I think we print both things we compare to aid troubleshooting. -- To view, visit https://gerrit.osmocom.org/1683 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie6a0cefba5e4e7f02cc2eaf6ec006ac07d5c1816 Gerrit-PatchSet: 4 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Jan 27 09:27:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 09:27:32 +0000 Subject: libosmo-sccp[master]: allow user to give private data to osmo_sua_user_create() In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1665 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If4c0f96f0621fb2adf4c78dc5994d3398431d92f Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 27 09:27:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 09:27:36 +0000 Subject: [MERGED] libosmo-sccp[master]: allow user to give private data to osmo_sua_user_create() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: allow user to give private data to osmo_sua_user_create() ...................................................................... allow user to give private data to osmo_sua_user_create() ... which can be resolved from the primitive call back prim_cb() by calling osmo_sccp_link_get_user_priv(). Change-Id: If4c0f96f0621fb2adf4c78dc5994d3398431d92f --- M include/osmocom/sigtran/sua.h M src/sua.c M tests/sigtran/sua_client_test.c M tests/sigtran/sua_server_test.c 4 files changed, 14 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/sigtran/sua.h b/include/osmocom/sigtran/sua.h index 935a4c0..766b488 100644 --- a/include/osmocom/sigtran/sua.h +++ b/include/osmocom/sigtran/sua.h @@ -8,7 +8,8 @@ void osmo_sua_set_log_area(int area); -struct osmo_sccp_user *osmo_sua_user_create(void *ctx, osmo_prim_cb prim_cb); +struct osmo_sccp_user *osmo_sua_user_create(void *ctx, osmo_prim_cb prim_cb, + void *priv); void osmo_sua_user_destroy(struct osmo_sccp_user *user); int osmo_sua_server_listen(struct osmo_sccp_user *user, const char *hostname, uint16_t port); @@ -19,3 +20,4 @@ /* user hands us a SCCP-USER SAP primitive down into the stack */ int osmo_sua_user_link_down(struct osmo_sccp_link *link, struct osmo_prim_hdr *oph); +void *osmo_sccp_link_get_user_priv(struct osmo_sccp_link *slink); diff --git a/src/sua.c b/src/sua.c index 442b2a0..5af8c18 100644 --- a/src/sua.c +++ b/src/sua.c @@ -59,6 +59,7 @@ struct llist_head links; /* user call-back function in case of incoming primitives */ osmo_prim_cb prim_cb; + void *priv; }; struct osmo_sccp_link { @@ -1401,11 +1402,13 @@ static LLIST_HEAD(sua_users); -struct osmo_sccp_user *osmo_sua_user_create(void *ctx, osmo_prim_cb prim_cb) +struct osmo_sccp_user *osmo_sua_user_create(void *ctx, osmo_prim_cb prim_cb, + void *priv) { struct osmo_sccp_user *user = talloc_zero(ctx, struct osmo_sccp_user); user->prim_cb = prim_cb; + user->priv = priv; INIT_LLIST_HEAD(&user->links); llist_add_tail(&user->list, &sua_users); @@ -1413,6 +1416,11 @@ return user; } +void *osmo_sccp_link_get_user_priv(struct osmo_sccp_link *slink) +{ + return slink->user->priv; +} + void osmo_sua_user_destroy(struct osmo_sccp_user *user) { struct osmo_sccp_link *link; diff --git a/tests/sigtran/sua_client_test.c b/tests/sigtran/sua_client_test.c index 5ea7714..3cbd937 100644 --- a/tests/sigtran/sua_client_test.c +++ b/tests/sigtran/sua_client_test.c @@ -36,7 +36,7 @@ osmo_init_logging(&test_log_info); - g_user = osmo_sua_user_create(ctx, sccp_sap_up); + g_user = osmo_sua_user_create(ctx, sccp_sap_up, NULL); rc = osmo_sua_client_connect(g_user, "127.0.0.1", 2342); if (rc < 0) { diff --git a/tests/sigtran/sua_server_test.c b/tests/sigtran/sua_server_test.c index 0e8d9ca..97b2baf 100644 --- a/tests/sigtran/sua_server_test.c +++ b/tests/sigtran/sua_server_test.c @@ -65,7 +65,7 @@ osmo_init_logging(&test_log_info); - user = osmo_sua_user_create(ctx, sccp_sap_up); + user = osmo_sua_user_create(ctx, sccp_sap_up, NULL); rc = osmo_sua_server_listen(user, "127.0.0.1", 2342); if (rc < 0) { -- To view, visit https://gerrit.osmocom.org/1665 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If4c0f96f0621fb2adf4c78dc5994d3398431d92f Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Jan 27 09:27:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 09:27:36 +0000 Subject: [MERGED] libosmo-sccp[master]: cosmetic: sua.c: comments In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: sua.c: comments ...................................................................... cosmetic: sua.c: comments Add some human readable names. Change-Id: If4aa15aae8b03c764a45b866a751eb3fbabebec1 --- M src/sua.c 1 file changed, 6 insertions(+), 6 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/sua.c b/src/sua.c index b8e0c09..c363cdb 100644 --- a/src/sua.c +++ b/src/sua.c @@ -870,7 +870,7 @@ return rc; } -/* RFC 3868 3.3.3 / SCCP CR */ +/* RFC 3868 3.3.3 / SCCP CR (Connection Request) */ static int sua_rx_core(struct osmo_sccp_link *link, struct xua_msg *xua) { struct osmo_scu_prim *prim; @@ -915,7 +915,7 @@ return 0; } -/* RFC 3868 3.3.4 / SCCP CC */ +/* RFC 3868 3.3.4 / SCCP CC (Connection Confirm) */ static int sua_rx_coak(struct osmo_sccp_link *link, struct xua_msg *xua) { struct osmo_scu_prim *prim; @@ -976,7 +976,7 @@ return 0; } -/* RFC 3868 3.3.5 / SCCP CREF */ +/* RFC 3868 3.3.5 / SCCP CREF (Connection Refused) */ static int sua_rx_coref(struct osmo_sccp_link *link, struct xua_msg *xua) { struct osmo_scu_prim *prim; @@ -1030,7 +1030,7 @@ return 0; } -/* RFC 3868 3.3.6 / SCCP RLSD */ +/* RFC 3868 3.3.6 / SCCP RLSD (Released) */ static int sua_rx_relre(struct osmo_sccp_link *link, struct xua_msg *xua) { struct osmo_scu_prim *prim; @@ -1082,7 +1082,7 @@ return 0; } -/* RFC 3868 3.3.7 / SCCP RLC */ +/* RFC 3868 3.3.7 / SCCP RLC (Release Complete)*/ static int sua_rx_relco(struct osmo_sccp_link *link, struct xua_msg *xua) { struct osmo_scu_prim *prim; @@ -1127,7 +1127,7 @@ } -/* RFC3868 3.3.1 / SCCP DT1 */ +/* RFC3868 3.3.1 / SCCP DT1 (Data Form 1) */ static int sua_rx_codt(struct osmo_sccp_link *link, struct xua_msg *xua) { struct osmo_scu_prim *prim; -- To view, visit https://gerrit.osmocom.org/1675 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If4aa15aae8b03c764a45b866a751eb3fbabebec1 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 27 09:27:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 09:27:37 +0000 Subject: [MERGED] libosmo-sccp[master]: fix: use proper disconnect prim param type In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: fix: use proper disconnect prim param type ...................................................................... fix: use proper disconnect prim param type For the N-DISCONNECT prim, parse CREF, RLC and RLSD from the proper parameter struct type: osmo_scu_disconn_param instead of osmo_scu_connect_param. Before this, the conn_id ended up in the wrong place and the other side always received a zero conn_id. Tested only for the RLSD case, which fixes Iu-Release message evaluation for all except the very first SUA conn received by the CN components. In all three cases, set: * param->responding_addr to conn->called_addr. * param->originator to OSMO_SCCP_ORIG_UNDEFINED. Change-Id: I446f2fe57cc3b7c52723f3ab82836513a5d37752 --- M src/sua.c 1 file changed, 12 insertions(+), 18 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/sua.c b/src/sua.c index c363cdb..2b4c64e 100644 --- a/src/sua.c +++ b/src/sua.c @@ -981,7 +981,7 @@ { struct osmo_scu_prim *prim; struct sua_connection *conn; - struct osmo_scu_connect_param *param; + struct osmo_scu_disconn_param *param; struct xua_msg_part *data_ie = xua_msg_find_tag(xua, SUA_IEI_DATA); struct msgb *upmsg; uint32_t conn_id = xua_msg_get_u32(xua, SUA_IEI_DEST_REF); @@ -1000,15 +1000,13 @@ /* fill primitive */ upmsg = sua_msgb_alloc(); prim = (struct osmo_scu_prim *) msgb_put(upmsg, sizeof(*prim)); - param = &prim->u.connect; + param = &prim->u.disconnect; osmo_prim_init(&prim->oph, SCCP_SAP_USER, OSMO_SCU_PRIM_N_DISCONNECT, PRIM_OP_INDICATION, upmsg); param->conn_id = conn_id; - memcpy(¶m->called_addr, &conn->called_addr, - sizeof(param->called_addr)); - memcpy(¶m->calling_addr, &conn->calling_addr, - sizeof(param->calling_addr)); + param->responding_addr = conn->called_addr; + param->originator = OSMO_SCCP_ORIG_UNDEFINED; //param->in_sequence_control; /* TODO evaluate cause: * cause = xua_msg_get_u32(xua, SUA_IEI_CAUSE); */ @@ -1035,7 +1033,7 @@ { struct osmo_scu_prim *prim; struct sua_connection *conn; - struct osmo_scu_connect_param *param; + struct osmo_scu_disconn_param *param; struct xua_msg_part *data_ie = xua_msg_find_tag(xua, SUA_IEI_DATA); struct msgb *upmsg; uint32_t conn_id = xua_msg_get_u32(xua, SUA_IEI_DEST_REF); @@ -1053,7 +1051,7 @@ /* fill primitive */ upmsg = sua_msgb_alloc(); prim = (struct osmo_scu_prim *) msgb_put(upmsg, sizeof(*prim)); - param = &prim->u.connect; + param = &prim->u.disconnect; osmo_prim_init(&prim->oph, SCCP_SAP_USER, OSMO_SCU_PRIM_N_DISCONNECT, PRIM_OP_INDICATION, upmsg); /* what primitive? */ @@ -1068,10 +1066,8 @@ memcpy(upmsg->l2h, data_ie->dat, data_ie->len); } - memcpy(¶m->called_addr, &conn->called_addr, - sizeof(param->called_addr)); - memcpy(¶m->calling_addr, &conn->calling_addr, - sizeof(param->calling_addr)); + param->responding_addr = conn->called_addr; + param->originator = OSMO_SCCP_ORIG_UNDEFINED; /* send to user SAP */ link->user->prim_cb(&prim->oph, link); @@ -1087,7 +1083,7 @@ { struct osmo_scu_prim *prim; struct sua_connection *conn; - struct osmo_scu_connect_param *param; + struct osmo_scu_disconn_param *param; struct msgb *upmsg; uint32_t conn_id = xua_msg_get_u32(xua, SUA_IEI_DEST_REF); @@ -1104,7 +1100,7 @@ /* fill primitive */ upmsg = sua_msgb_alloc(); prim = (struct osmo_scu_prim *) msgb_put(upmsg, sizeof(*prim)); - param = &prim->u.connect; + param = &prim->u.disconnect; osmo_prim_init(&prim->oph, SCCP_SAP_USER, OSMO_SCU_PRIM_N_DISCONNECT, PRIM_OP_CONFIRM, upmsg); /* what primitive? */ @@ -1113,10 +1109,8 @@ /* source reference */ param->importance = xua_msg_get_u32(xua, SUA_IEI_IMPORTANCE); - memcpy(¶m->called_addr, &conn->called_addr, - sizeof(param->called_addr)); - memcpy(¶m->calling_addr, &conn->calling_addr, - sizeof(param->calling_addr)); + param->responding_addr = conn->called_addr; + param->originator = OSMO_SCCP_ORIG_UNDEFINED; /* send to user SAP */ link->user->prim_cb(&prim->oph, link); -- To view, visit https://gerrit.osmocom.org/1676 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I446f2fe57cc3b7c52723f3ab82836513a5d37752 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 27 09:27:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 09:27:37 +0000 Subject: [MERGED] libosmo-sccp[master]: parse SCCP src+dst addresses In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: parse SCCP src+dst addresses ...................................................................... parse SCCP src+dst addresses In order to receive a Paging command with a valid RANAP SSN, decode the SCCP source and destination address IEs. This is used by hnbgw to forward a Paging from CN to RNC. This may be done more generally as soon as more IEs need parsing of their sub parts. For now, iterate the higher level IE's data chunk and obtain the address sub part IEs without storing sub part locations. Change-Id: I03d0c2a9003fda59c5b88c8738df009c30fbc11c --- M src/sua.c 1 file changed, 85 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/sua.c b/src/sua.c index f790a52..b8e0c09 100644 --- a/src/sua.c +++ b/src/sua.c @@ -177,7 +177,7 @@ if (!tmp) return -ENOMEM; - msgb_put_u16(tmp, 2); /* route on SSN + PC */ + msgb_put_u16(tmp, SUA_RI_SSN_PC); /* route on SSN + PC */ msgb_put_u16(tmp, 7); /* always put all addresses on SCCP side */ if (addr->presence & OSMO_SCCP_ADDR_T_GT) { @@ -726,12 +726,95 @@ uint16_t iei) { const struct xua_msg_part *param = xua_msg_find_tag(xua, iei); + const struct xua_parameter_hdr *par; + uint16_t ri; + uint16_t ai; + uint16_t pos; + uint16_t par_tag, par_len, par_datalen; + uint32_t *p32; if (!param) return -ENODEV; - /* FIXME */ + LOGP(DSUA, LOGL_DEBUG, "sua_parse_addr(IEI=%d) (%d) %s\n", + iei, param->len, + osmo_hexdump(param->dat, param->len)); + + if (param->len < 4) { + LOGP(DSUA, LOGL_ERROR, "SUA IEI %d: invalid address length: %d\n", + iei, param->len); + return -EINVAL; + } + + pos = 0; + ri = ntohs(*(uint16_t*) ¶m->dat[pos]); + pos += 2; + ai = ntohs(*(uint16_t*) ¶m->dat[pos]); + pos += 2; + + if (ri != SUA_RI_SSN_PC) { + LOGP(DSUA, LOGL_ERROR, "SUA IEI %d: Routing Indicator not supported yet: %d\n", + iei, ri); + return -ENOTSUP; + } + + if (ai != 7) { + LOGP(DSUA, LOGL_ERROR, "SUA IEI %d: Address Indicator not supported yet: %x\n", + iei, ai); + return -ENOTSUP; + } + + /* + * FIXME: this parses the encapsulated T16L16V IEs on the go. We + * probably want to have a separate general parsing function storing + * the subparts in xua_msg_part. But before we do, we should find more + * users of this subpart parsing and be aware of the performance + * tradeoff. + */ + + while (pos + sizeof(*par) < param->len) { + par = (struct xua_parameter_hdr *) ¶m->dat[pos]; + par_tag = ntohs(par->tag); + par_len = ntohs(par->len); + par_datalen = par_len - sizeof(*par); + + LOGP(DSUA, LOGL_DEBUG, "SUA IEI %hu pos %hu/%hu: subpart tag %hu, len %hu\n", + iei, pos, param->len, par->tag, par->len); + + switch (par_tag) { + case SUA_IEI_PC: + if (par_datalen != 4) + goto subpar_fail; + p32 = (uint32_t*)par->data; + out->pc = ntohl(*p32); + out->presence |= OSMO_SCCP_ADDR_T_PC; + break; + case SUA_IEI_SSN: + if (par_datalen != 4) + goto subpar_fail; + /* 24 zero bits, then 8 bits SSN */ + out->ssn = par->data[3]; + out->presence |= OSMO_SCCP_ADDR_T_SSN; + break; + case SUA_IEI_GT: + /* TODO */ + out->presence |= OSMO_SCCP_ADDR_T_GT; + break; + default: + LOGP(DSUA, LOGL_ERROR, "SUA IEI %d: Unknown subpart tag %hd\n", + iei, par_tag); + goto subpar_fail; + } + + pos += par_len; + } + return 0; + +subpar_fail: + LOGP(DSUA, LOGL_ERROR, "Failed to parse subparts of address IEI=%d\n", + iei); + return -EINVAL; } static int sua_rx_cldt(struct osmo_sccp_link *link, struct xua_msg *xua) -- To view, visit https://gerrit.osmocom.org/1674 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I03d0c2a9003fda59c5b88c8738df009c30fbc11c Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 27 09:27:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 09:27:37 +0000 Subject: [MERGED] libosmo-sccp[master]: remove two compiler warnings for unused variables In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: remove two compiler warnings for unused variables ...................................................................... remove two compiler warnings for unused variables Change-Id: I173dc67050d907f9b09b99265af9dee9d142ace3 --- M src/sua.c 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/sua.c b/src/sua.c index 5ae5f76..f790a52 100644 --- a/src/sua.c +++ b/src/sua.c @@ -927,7 +927,8 @@ memcpy(¶m->calling_addr, &conn->calling_addr, sizeof(param->calling_addr)); //param->in_sequence_control; - cause = xua_msg_get_u32(xua, SUA_IEI_CAUSE); + /* TODO evaluate cause: + * cause = xua_msg_get_u32(xua, SUA_IEI_CAUSE); */ /* optional: src addr */ /* optional: dest addr */ param->importance = xua_msg_get_u32(xua, SUA_IEI_IMPORTANCE); -- To view, visit https://gerrit.osmocom.org/1673 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I173dc67050d907f9b09b99265af9dee9d142ace3 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 27 09:27:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 09:27:37 +0000 Subject: [MERGED] libosmo-sccp[master]: add RFC 3868 (SUA) spec in HTML In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: add RFC 3868 (SUA) spec in HTML ...................................................................... add RFC 3868 (SUA) spec in HTML Change-Id: Ieab0212157381f7b71f0196925e94c88e9b5938e --- A specs/RFC_3868__Signalling_Connection_Control_Part_User_Adaptation_Layer_SUA.html 1 file changed, 7,535 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified -- To view, visit https://gerrit.osmocom.org/1671 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ieab0212157381f7b71f0196925e94c88e9b5938e Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 27 09:27:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 09:27:37 +0000 Subject: [MERGED] libosmo-sccp[master]: cosmetic: add comments for GT, PC, SSN to help noobs finding... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: add comments for GT, PC, SSN to help noobs finding their way ...................................................................... cosmetic: add comments for GT, PC, SSN to help noobs finding their way Change-Id: I8f47f855c2718f4922b36229a388fa719c628bf6 --- M include/osmocom/sigtran/sccp_sap.h 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/sigtran/sccp_sap.h b/include/osmocom/sigtran/sccp_sap.h index a155de5..0aa565a 100644 --- a/include/osmocom/sigtran/sccp_sap.h +++ b/include/osmocom/sigtran/sccp_sap.h @@ -46,9 +46,9 @@ OSMO_SCU_PRIM_N_PCSTATE, }; -#define OSMO_SCCP_ADDR_T_GT 0x0001 -#define OSMO_SCCP_ADDR_T_PC 0x0002 -#define OSMO_SCCP_ADDR_T_SSN 0x0004 +#define OSMO_SCCP_ADDR_T_GT 0x0001 /* global title */ +#define OSMO_SCCP_ADDR_T_PC 0x0002 /* signalling point code */ +#define OSMO_SCCP_ADDR_T_SSN 0x0004 /* subsystem number */ #define OSMO_SCCP_ADDR_T_IPv4 0x0008 #define OSMO_SCCP_ADDR_T_IPv6 0x0010 -- To view, visit https://gerrit.osmocom.org/1672 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8f47f855c2718f4922b36229a388fa719c628bf6 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 27 09:27:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 09:27:37 +0000 Subject: [MERGED] libosmo-sccp[master]: add comment (meaning of COIT) In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: add comment (meaning of COIT) ...................................................................... add comment (meaning of COIT) Change-Id: I63276ca2bfd6282676618e50268ed2234025b7bb --- M include/osmocom/sigtran/protocol/sua.h 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/sigtran/protocol/sua.h b/include/osmocom/sigtran/protocol/sua.h index 864a2df..d61c85a 100644 --- a/include/osmocom/sigtran/protocol/sua.h +++ b/include/osmocom/sigtran/protocol/sua.h @@ -74,7 +74,7 @@ #define SUA_CO_CODT 8 #define SUA_CO_CODA 9 #define SUA_CO_COERR 10 -#define SUA_CO_COIT 11 +#define SUA_CO_COIT 11 /* Connection Oriented Inactiviy Test */ #define SUA_IEI_ROUTE_CTX 0x0006 #define SUA_IEI_CORR_ID 0x0013 -- To view, visit https://gerrit.osmocom.org/1670 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I63276ca2bfd6282676618e50268ed2234025b7bb Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 27 09:27:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 09:27:38 +0000 Subject: [MERGED] libosmo-sccp[master]: SUA COIT: send dest ref nr, not dest addr In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: SUA COIT: send dest ref nr, not dest addr ...................................................................... SUA COIT: send dest ref nr, not dest addr See RFC 3868 3.3.11 https://tools.ietf.org/html/rfc3868#section-3.3.11 Change-Id: I083384876d4a8d7fa9c03409fbdc9e00e3c8f416 --- M src/sua.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/sua.c b/src/sua.c index 110f1e5..5ae5f76 100644 --- a/src/sua.c +++ b/src/sua.c @@ -272,7 +272,7 @@ xua_msg_add_u32(xua, SUA_IEI_ROUTE_CTX, 0); /* FIXME */ xua_msg_add_u32(xua, SUA_IEI_PROTO_CLASS, 2); xua_msg_add_u32(xua, SUA_IEI_SRC_REF, conn->conn_id); - xua_msg_add_sccp_addr(xua, SUA_IEI_DEST_ADDR, &conn->called_addr); + xua_msg_add_u32(xua, SUA_IEI_DEST_REF, conn->remote_ref); /* optional: sequence number; credit (both class 3 only) */ outmsg = xua_to_msg(1, xua); -- To view, visit https://gerrit.osmocom.org/1669 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I083384876d4a8d7fa9c03409fbdc9e00e3c8f416 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 27 09:27:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 09:27:38 +0000 Subject: [MERGED] libosmo-sccp[master]: sua: call conn_disconnect() in sua_disconnect_req() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: sua: call conn_disconnect() in sua_disconnect_req() ...................................................................... sua: call conn_disconnect() in sua_disconnect_req() disconnect is not a class3/4 operation. We simply generate + send the DISCONNECT.ind message to the remote side and drop all local state about the connection. Change-Id: I4e336f9dfd4ebd0122cd9e5a70db3d05e9dc1764 --- M src/sua.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/sua.c b/src/sua.c index 294dc6a..ad8385d 100644 --- a/src/sua.c +++ b/src/sua.c @@ -548,6 +548,7 @@ xua_msg_free(xua); conn_state_set(conn, S_DISCONN_PEND); + conn_destroy(conn); return sua_link_send(link, outmsg); } -- To view, visit https://gerrit.osmocom.org/1667 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4e336f9dfd4ebd0122cd9e5a70db3d05e9dc1764 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Jan 27 09:27:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 09:27:38 +0000 Subject: [MERGED] libosmo-sccp[master]: sua: Fix typo in log message In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: sua: Fix typo in log message ...................................................................... sua: Fix typo in log message Change-Id: I13bb0e2f4ec688fefd9b98d6d2389562e2a2dad7 --- M src/sua.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/sua.c b/src/sua.c index 5af8c18..294dc6a 100644 --- a/src/sua.c +++ b/src/sua.c @@ -526,7 +526,7 @@ /* resolve reference of connection */ conn = conn_find_by_id(link, par->conn_id); if (!conn) { - LOGP(DSUA, LOGL_ERROR, "N-DISCONNECT.resp for unknown " + LOGP(DSUA, LOGL_ERROR, "N-DISCONNECT.req for unknown " "connection ID %u\n", par->conn_id); /* FIXME: Send primitive to user */ return -ENODEV; -- To view, visit https://gerrit.osmocom.org/1666 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I13bb0e2f4ec688fefd9b98d6d2389562e2a2dad7 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Jan 27 09:27:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 09:27:38 +0000 Subject: [MERGED] libosmo-sccp[master]: sua: Ensure that a SUA client will continuously try to recon... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: sua: Ensure that a SUA client will continuously try to reconnect ...................................................................... sua: Ensure that a SUA client will continuously try to reconnect Change-Id: Ic05a2b78e29e4ede214a3395430ef54bacd84e60 --- M src/sua.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/sua.c b/src/sua.c index ad8385d..110f1e5 100644 --- a/src/sua.c +++ b/src/sua.c @@ -1385,7 +1385,7 @@ sual->data = cli; osmo_stream_cli_set_data(cli, sual); - rc = osmo_stream_cli_open(cli); + rc = osmo_stream_cli_open2(cli, 1); if (rc < 0) { sua_link_destroy(sual); osmo_stream_cli_destroy(cli); -- To view, visit https://gerrit.osmocom.org/1668 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic05a2b78e29e4ede214a3395430ef54bacd84e60 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Jan 27 09:30:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 09:30:29 +0000 Subject: [PATCH] libosmocore[master]: socket: Introduce function to obtain socket name Message-ID: Review at https://gerrit.osmocom.org/1697 socket: Introduce function to obtain socket name Using this function, one can obtain a human-readable string identifying the host and port names of the socket. Change-Id: Ib5de5c7b9effe1b0a363e4473a7be7fa38ca6ef3 --- M TODO-RELEASE M include/osmocom/core/socket.h M src/socket.c 3 files changed, 46 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/97/1697/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index fb0bfea..5c6bfa3 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,3 +7,4 @@ # If any interfaces have been added since the last public release: c:r:a + 1. # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line +libosmocore new function osmo_sock_get_name() diff --git a/include/osmocom/core/socket.h b/include/osmocom/core/socket.h index 6ef0912..4f00e30 100644 --- a/include/osmocom/core/socket.h +++ b/include/osmocom/core/socket.h @@ -38,4 +38,6 @@ int osmo_sock_unix_init_ofd(struct osmo_fd *ofd, uint16_t type, uint8_t proto, const char *socket_path, unsigned int flags); +char *osmo_sock_get_name(void *ctx, int fd); + /*! @} */ diff --git a/src/socket.c b/src/socket.c index cdafadd..3c5548f 100644 --- a/src/socket.c +++ b/src/socket.c @@ -1,5 +1,5 @@ /* - * (C) 2011 by Harald Welte + * (C) 2011-2017 by Harald Welte * * All Rights Reserved * @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -393,6 +394,47 @@ return osmo_fd_init_ofd(ofd, osmo_sock_unix_init(type, proto, socket_path, flags)); } +/*! \brief Get address/port information on soocket in dyn-alloc string + * \param[in] ctx talloc context from which to allocate string buffer + * \param[in] fd file descriptor of socket + * \returns string identifying the connection of this socket + */ +char *osmo_sock_get_name(void *ctx, int fd) +{ + struct sockaddr sa_l, sa_r; + socklen_t sa_len_l = sizeof(sa_l); + socklen_t sa_len_r = sizeof(sa_r); + char hostbuf_l[64], hostbuf_r[64]; + char portbuf_l[16], portbuf_r[16]; + int rc; + + rc = getsockname(fd, &sa_l, &sa_len_l); + if (rc < 0) + return NULL; + + rc = getnameinfo(&sa_l, sa_len_l, hostbuf_l, sizeof(hostbuf_l), + portbuf_l, sizeof(portbuf_l), + NI_NUMERICHOST | NI_NUMERICSERV); + if (rc < 0) + return NULL; + + rc = getpeername(fd, &sa_r, &sa_len_r); + if (rc < 0) + goto local_only; + + rc = getnameinfo(&sa_r, sa_len_r, hostbuf_r, sizeof(hostbuf_r), + portbuf_r, sizeof(portbuf_r), + NI_NUMERICHOST | NI_NUMERICSERV); + if (rc < 0) + goto local_only; + + return talloc_asprintf(ctx, "(%s:%s<->%s:%s)", hostbuf_r, portbuf_r, + hostbuf_l, portbuf_l); + +local_only: + return talloc_asprintf(ctx, "(NULL<->%s:%s)", hostbuf_l, portbuf_l); +} + #endif /* HAVE_SYS_SOCKET_H */ /*! @} */ -- To view, visit https://gerrit.osmocom.org/1697 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib5de5c7b9effe1b0a363e4473a7be7fa38ca6ef3 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Jan 27 09:30:30 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 09:30:30 +0000 Subject: [PATCH] libosmocore[master]: Add minimal testing of socket.c helper functions Message-ID: Review at https://gerrit.osmocom.org/1698 Add minimal testing of socket.c helper functions Change-Id: I2773b3859a206f96fb8fa095d50a653d9eeb8d79 --- M .gitignore M tests/Makefile.am A tests/socket/socket_test.c A tests/socket/socket_test.err A tests/socket/socket_test.ok M tests/testsuite.at 6 files changed, 92 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/98/1698/1 diff --git a/.gitignore b/.gitignore index fb159c3..ad8354e 100644 --- a/.gitignore +++ b/.gitignore @@ -98,6 +98,7 @@ tests/fsm/fsm_test tests/write_queue/wqueue_test tests/oap/oap_test +tests/socket/socket_test utils/osmo-arfcn utils/osmo-auc-gen diff --git a/tests/Makefile.am b/tests/Makefile.am index b9eb8f2..5731bf8 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -14,7 +14,7 @@ smscb/gsm0341_test stats/stats_test \ bitvec/bitvec_test msgb/msgb_test bits/bitcomp_test \ tlv/tlv_test gsup/gsup_test oap/oap_test fsm/fsm_test \ - write_queue/wqueue_test + write_queue/wqueue_test socket/socket_test if ENABLE_MSGFILE check_PROGRAMS += msgfile/msgfile_test @@ -140,6 +140,9 @@ write_queue_wqueue_test_SOURCES = write_queue/wqueue_test.c write_queue_wqueue_test_LDADD = $(top_builddir)/src/libosmocore.la +socket_socket_test_SOURCES = socket/socket_test.c +socket_socket_test_LDADD = $(top_builddir)/src/libosmocore.la + # The `:;' works around a Bash 3.2 bug when the output is not writeable. $(srcdir)/package.m4: $(top_srcdir)/configure.ac :;{ \ @@ -176,7 +179,8 @@ bitvec/bitvec_test.ok msgb/msgb_test.ok bits/bitcomp_test.ok \ sim/sim_test.ok tlv/tlv_test.ok gsup/gsup_test.ok \ oap/oap_test.ok fsm/fsm_test.ok fsm/fsm_test.err \ - write_queue/wqueue_test.ok + write_queue/wqueue_test.ok socket/socket_test.ok \ + socket/socket_test.err DISTCLEANFILES = atconfig atlocal diff --git a/tests/socket/socket_test.c b/tests/socket/socket_test.c new file mode 100644 index 0000000..ad28d02 --- /dev/null +++ b/tests/socket/socket_test.c @@ -0,0 +1,73 @@ +/* + * (C) 2017 by Harald Welte + * 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 2 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. + * + */ + +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include "../config.h" + +static int test_sockinit(void) +{ + int fd, rc; + char *name; + + printf("Checking osmo_sock_init() with bind to a random local UDP port\n"); + fd = osmo_sock_init(AF_INET, SOCK_DGRAM, IPPROTO_UDP, + "0.0.0.0", 0, OSMO_SOCK_F_BIND); + OSMO_ASSERT(fd >= 0); + name = osmo_sock_get_name(NULL, fd); + /* expect it to be not connected, and bound to INADDR_ANY */ + OSMO_ASSERT(!strncmp(name, "(NULL<->0.0.0.0:", 16)); + talloc_free(name); + /* expect it to be blocking */ + rc = fcntl(fd, F_GETFL); + OSMO_ASSERT(!(rc & O_NONBLOCK)); + close(fd); + + printf("Checking for OSMO_SOCK_F_NONBLOCK\n"); + fd = osmo_sock_init(AF_INET, SOCK_DGRAM, IPPROTO_UDP, + "0.0.0.0", 0, OSMO_SOCK_F_BIND|OSMO_SOCK_F_NONBLOCK); + OSMO_ASSERT(fd >= 0); + /* expect it to be blocking */ + rc = fcntl(fd, F_GETFL); + OSMO_ASSERT(rc & O_NONBLOCK); + close(fd); + + printf("Checking for invalid flags\n"); + fd = osmo_sock_init(AF_INET, SOCK_DGRAM, IPPROTO_UDP, + "0.0.0.0", 0, OSMO_SOCK_F_BIND|OSMO_SOCK_F_CONNECT); + OSMO_ASSERT(fd < 0); + + return 0; +} + +int main(int argc, char *argv[]) +{ + test_sockinit(); + return 0; +} diff --git a/tests/socket/socket_test.err b/tests/socket/socket_test.err new file mode 100644 index 0000000..5367239 --- /dev/null +++ b/tests/socket/socket_test.err @@ -0,0 +1 @@ +invalid: both bind and connect flags set: 0.0.0.0:0 diff --git a/tests/socket/socket_test.ok b/tests/socket/socket_test.ok new file mode 100644 index 0000000..d6ec40e --- /dev/null +++ b/tests/socket/socket_test.ok @@ -0,0 +1,3 @@ +Checking osmo_sock_init() with bind to a random local UDP port +Checking for OSMO_SOCK_F_NONBLOCK +Checking for invalid flags diff --git a/tests/testsuite.at b/tests/testsuite.at index 426c74c..d6181c9 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -228,3 +228,11 @@ touch experr AT_CHECK([$abs_top_builddir/tests/oap/oap_test], [0], [expout], [experr]) AT_CLEANUP + +AT_SETUP([socket]) +AT_KEYWORDS([socket]) +cat $abs_srcdir/socket/socket_test.ok > expout +cat $abs_srcdir/socket/socket_test.err > experr +touch experr +AT_CHECK([$abs_top_builddir/tests/socket/socket_test], [0], [expout], [experr]) +AT_CLEANUP -- To view, visit https://gerrit.osmocom.org/1698 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2773b3859a206f96fb8fa095d50a653d9eeb8d79 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Jan 27 09:32:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 09:32:08 +0000 Subject: libosmocore[master]: socket: Introduce function to obtain socket name In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1697 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib5de5c7b9effe1b0a363e4473a7be7fa38ca6ef3 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 27 09:32:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 09:32:21 +0000 Subject: libosmocore[master]: Add minimal testing of socket.c helper functions In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1698 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2773b3859a206f96fb8fa095d50a653d9eeb8d79 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 27 09:44:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 09:44:50 +0000 Subject: [MERGED] libosmocore[master]: socket: Introduce function to obtain socket name In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: socket: Introduce function to obtain socket name ...................................................................... socket: Introduce function to obtain socket name Using this function, one can obtain a human-readable string identifying the host and port names of the socket. Change-Id: Ib5de5c7b9effe1b0a363e4473a7be7fa38ca6ef3 --- M TODO-RELEASE M include/osmocom/core/socket.h M src/socket.c 3 files changed, 46 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/TODO-RELEASE b/TODO-RELEASE index fb0bfea..5c6bfa3 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,3 +7,4 @@ # If any interfaces have been added since the last public release: c:r:a + 1. # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line +libosmocore new function osmo_sock_get_name() diff --git a/include/osmocom/core/socket.h b/include/osmocom/core/socket.h index 6ef0912..4f00e30 100644 --- a/include/osmocom/core/socket.h +++ b/include/osmocom/core/socket.h @@ -38,4 +38,6 @@ int osmo_sock_unix_init_ofd(struct osmo_fd *ofd, uint16_t type, uint8_t proto, const char *socket_path, unsigned int flags); +char *osmo_sock_get_name(void *ctx, int fd); + /*! @} */ diff --git a/src/socket.c b/src/socket.c index cdafadd..3c5548f 100644 --- a/src/socket.c +++ b/src/socket.c @@ -1,5 +1,5 @@ /* - * (C) 2011 by Harald Welte + * (C) 2011-2017 by Harald Welte * * All Rights Reserved * @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -393,6 +394,47 @@ return osmo_fd_init_ofd(ofd, osmo_sock_unix_init(type, proto, socket_path, flags)); } +/*! \brief Get address/port information on soocket in dyn-alloc string + * \param[in] ctx talloc context from which to allocate string buffer + * \param[in] fd file descriptor of socket + * \returns string identifying the connection of this socket + */ +char *osmo_sock_get_name(void *ctx, int fd) +{ + struct sockaddr sa_l, sa_r; + socklen_t sa_len_l = sizeof(sa_l); + socklen_t sa_len_r = sizeof(sa_r); + char hostbuf_l[64], hostbuf_r[64]; + char portbuf_l[16], portbuf_r[16]; + int rc; + + rc = getsockname(fd, &sa_l, &sa_len_l); + if (rc < 0) + return NULL; + + rc = getnameinfo(&sa_l, sa_len_l, hostbuf_l, sizeof(hostbuf_l), + portbuf_l, sizeof(portbuf_l), + NI_NUMERICHOST | NI_NUMERICSERV); + if (rc < 0) + return NULL; + + rc = getpeername(fd, &sa_r, &sa_len_r); + if (rc < 0) + goto local_only; + + rc = getnameinfo(&sa_r, sa_len_r, hostbuf_r, sizeof(hostbuf_r), + portbuf_r, sizeof(portbuf_r), + NI_NUMERICHOST | NI_NUMERICSERV); + if (rc < 0) + goto local_only; + + return talloc_asprintf(ctx, "(%s:%s<->%s:%s)", hostbuf_r, portbuf_r, + hostbuf_l, portbuf_l); + +local_only: + return talloc_asprintf(ctx, "(NULL<->%s:%s)", hostbuf_l, portbuf_l); +} + #endif /* HAVE_SYS_SOCKET_H */ /*! @} */ -- To view, visit https://gerrit.osmocom.org/1697 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib5de5c7b9effe1b0a363e4473a7be7fa38ca6ef3 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Jan 27 09:46:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 09:46:32 +0000 Subject: [PATCH] libosmocore[master]: Add minimal testing of socket.c helper functions In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1698 to look at the new patch set (#2). Add minimal testing of socket.c helper functions Change-Id: I2773b3859a206f96fb8fa095d50a653d9eeb8d79 --- M .gitignore M tests/Makefile.am A tests/socket/socket_test.c A tests/socket/socket_test.err A tests/socket/socket_test.ok M tests/testsuite.at 6 files changed, 93 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/98/1698/2 diff --git a/.gitignore b/.gitignore index fb159c3..ad8354e 100644 --- a/.gitignore +++ b/.gitignore @@ -98,6 +98,7 @@ tests/fsm/fsm_test tests/write_queue/wqueue_test tests/oap/oap_test +tests/socket/socket_test utils/osmo-arfcn utils/osmo-auc-gen diff --git a/tests/Makefile.am b/tests/Makefile.am index b9eb8f2..5731bf8 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -14,7 +14,7 @@ smscb/gsm0341_test stats/stats_test \ bitvec/bitvec_test msgb/msgb_test bits/bitcomp_test \ tlv/tlv_test gsup/gsup_test oap/oap_test fsm/fsm_test \ - write_queue/wqueue_test + write_queue/wqueue_test socket/socket_test if ENABLE_MSGFILE check_PROGRAMS += msgfile/msgfile_test @@ -140,6 +140,9 @@ write_queue_wqueue_test_SOURCES = write_queue/wqueue_test.c write_queue_wqueue_test_LDADD = $(top_builddir)/src/libosmocore.la +socket_socket_test_SOURCES = socket/socket_test.c +socket_socket_test_LDADD = $(top_builddir)/src/libosmocore.la + # The `:;' works around a Bash 3.2 bug when the output is not writeable. $(srcdir)/package.m4: $(top_srcdir)/configure.ac :;{ \ @@ -176,7 +179,8 @@ bitvec/bitvec_test.ok msgb/msgb_test.ok bits/bitcomp_test.ok \ sim/sim_test.ok tlv/tlv_test.ok gsup/gsup_test.ok \ oap/oap_test.ok fsm/fsm_test.ok fsm/fsm_test.err \ - write_queue/wqueue_test.ok + write_queue/wqueue_test.ok socket/socket_test.ok \ + socket/socket_test.err DISTCLEANFILES = atconfig atlocal diff --git a/tests/socket/socket_test.c b/tests/socket/socket_test.c new file mode 100644 index 0000000..d1c952e --- /dev/null +++ b/tests/socket/socket_test.c @@ -0,0 +1,74 @@ +/* + * (C) 2017 by Harald Welte + * 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 2 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. + * + */ + +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include "../config.h" + +static int test_sockinit(void) +{ + int fd, rc; + char *name; + + printf("Checking osmo_sock_init() with bind to a random local UDP port\n"); + fd = osmo_sock_init(AF_INET, SOCK_DGRAM, IPPROTO_UDP, + "0.0.0.0", 0, OSMO_SOCK_F_BIND); + OSMO_ASSERT(fd >= 0); + name = osmo_sock_get_name(NULL, fd); + /* expect it to be not connected, and bound to INADDR_ANY */ + OSMO_ASSERT(!strncmp(name, "(NULL<->0.0.0.0:", 16)); + talloc_free(name); + /* expect it to be blocking */ + rc = fcntl(fd, F_GETFL); + OSMO_ASSERT(!(rc & O_NONBLOCK)); + close(fd); + + printf("Checking for OSMO_SOCK_F_NONBLOCK\n"); + fd = osmo_sock_init(AF_INET, SOCK_DGRAM, IPPROTO_UDP, + "0.0.0.0", 0, OSMO_SOCK_F_BIND|OSMO_SOCK_F_NONBLOCK); + OSMO_ASSERT(fd >= 0); + /* expect it to be blocking */ + rc = fcntl(fd, F_GETFL); + OSMO_ASSERT(rc & O_NONBLOCK); + close(fd); + + printf("Checking for invalid flags\n"); + fd = osmo_sock_init(AF_INET, SOCK_DGRAM, IPPROTO_UDP, + "0.0.0.0", 0, OSMO_SOCK_F_BIND|OSMO_SOCK_F_CONNECT); + OSMO_ASSERT(fd < 0); + + return 0; +} + +int main(int argc, char *argv[]) +{ + test_sockinit(); + return 0; +} diff --git a/tests/socket/socket_test.err b/tests/socket/socket_test.err new file mode 100644 index 0000000..5367239 --- /dev/null +++ b/tests/socket/socket_test.err @@ -0,0 +1 @@ +invalid: both bind and connect flags set: 0.0.0.0:0 diff --git a/tests/socket/socket_test.ok b/tests/socket/socket_test.ok new file mode 100644 index 0000000..d6ec40e --- /dev/null +++ b/tests/socket/socket_test.ok @@ -0,0 +1,3 @@ +Checking osmo_sock_init() with bind to a random local UDP port +Checking for OSMO_SOCK_F_NONBLOCK +Checking for invalid flags diff --git a/tests/testsuite.at b/tests/testsuite.at index 426c74c..d6181c9 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -228,3 +228,11 @@ touch experr AT_CHECK([$abs_top_builddir/tests/oap/oap_test], [0], [expout], [experr]) AT_CLEANUP + +AT_SETUP([socket]) +AT_KEYWORDS([socket]) +cat $abs_srcdir/socket/socket_test.ok > expout +cat $abs_srcdir/socket/socket_test.err > experr +touch experr +AT_CHECK([$abs_top_builddir/tests/socket/socket_test], [0], [expout], [experr]) +AT_CLEANUP -- To view, visit https://gerrit.osmocom.org/1698 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2773b3859a206f96fb8fa095d50a653d9eeb8d79 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From admin at opensuse.org Fri Jan 27 10:07:03 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 27 Jan 2017 10:07:03 +0000 Subject: Build failure of network:osmocom:nightly/osmo-trx in Debian_8.0/i586 In-Reply-To: References: Message-ID: <588b1d31cf3c6_6d0651c10191019@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/Debian_8.0/i586 Package network:osmocom:nightly/osmo-trx failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-trx Last lines of build log: [ 171s] #define HAVE_STDLIB_H 1 [ 171s] #define HAVE_STRING_H 1 [ 171s] #define HAVE_MEMORY_H 1 [ 171s] #define HAVE_STRINGS_H 1 [ 171s] #define HAVE_INTTYPES_H 1 [ 171s] #define HAVE_STDINT_H 1 [ 171s] #define HAVE_UNISTD_H 1 [ 171s] #define HAVE_DLFCN_H 1 [ 171s] #define LT_OBJDIR ".libs/" [ 171s] #define STDC_HEADERS 1 [ 171s] #define HAVE_BYTESWAP_H 1 [ 171s] #define TIME_WITH_SYS_TIME 1 [ 171s] #define USE_UHD 1 [ 171s] [ 171s] configure: exit 1 [ 171s] dh_auto_configure: ./configure --build=i586-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --libdir=${prefix}/lib/i386-linux-gnu --libexecdir=${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 171s] debian/rules:6: recipe for target 'build' failed [ 171s] make: *** [build] Error 255 [ 171s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 171s] [ 171s] cloud121 failed "build osmo-trx_0.1.9.20170127.dsc" at Fri Jan 27 10:06:52 UTC 2017. [ 171s] [ 171s] ### VM INTERACTION START ### [ 172s] Powering off. [ 172s] [ 143.694248] reboot: Power down [ 173s] ### VM INTERACTION END ### [ 173s] [ 173s] cloud121 failed "build osmo-trx_0.1.9.20170127.dsc" at Fri Jan 27 10:06:54 UTC 2017. [ 173s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Fri Jan 27 13:33:57 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 27 Jan 2017 13:33:57 +0000 Subject: openbsc[master]: vty tests: attempt to get at sporadic 'Broken Pipe' error In-Reply-To: References: Message-ID: Patch Set 2: hhmm, I put a try..except around the place that throws a Broken Pipe, but the exception is not caught by it. -- To view, visit https://gerrit.osmocom.org/1693 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8851b76b2d7b87dd500ae40f47e6bea716ef3fc4 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 27 18:45:29 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 27 Jan 2017 18:45:29 +0000 Subject: [PATCH] openbsc[master]: Add MS time. offset to gsm_lchan Message-ID: Review at https://gerrit.osmocom.org/1699 Add MS time. offset to gsm_lchan Add MS TIMING OFFSET (3GPP TS 48.058 ? 8.4.8) and P offset (3GPP TS 45.010 ? 1.2) which can be used to compute it from known TA. Change-Id: I8bda57c8d6c15bbb803eca708931556dae118a00 Related: OS#1574 --- M openbsc/include/openbsc/gsm_data_shared.h 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/99/1699/1 diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h index 9407b82..88a4f6c 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -327,6 +327,13 @@ uint8_t last_cmr; uint32_t last_fn; } tch; + + /* 3GPP TS 45.010 ? 1.2 MS TIMING OFFSET related data */ + uint8_t ms_t_offs; + bool ms_t_offs_valid; + uint8_t p_offs; + bool p_offs_valid; + /* BTS-side ciphering state (rx only, bi-directional, ...) */ uint8_t ciph_state; uint8_t ciph_ns; -- To view, visit https://gerrit.osmocom.org/1699 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8bda57c8d6c15bbb803eca708931556dae118a00 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Jan 27 18:45:58 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 27 Jan 2017 18:45:58 +0000 Subject: [PATCH] osmo-bts[master]: Add MS TO to RSL measurements Message-ID: Review at https://gerrit.osmocom.org/1700 Add MS TO to RSL measurements Add optional MS timing offset (3GPP TS 45.010 ? 1.2) to RSL MEASUREMENT RESULT (3GPP TS 48.058 ? 8.4.8). The value is calculated either directly from corresponding BTS measurement or from 3GPP TS 48.058 ? 9.3.17 Access Delay (for known TA) and invalidated after RSL report is sent until new measurement indication or RACH is received. Change-Id: I4dfe5c48834a083e757d5de3236a02e15a238b28 Related: OS#1574 --- M src/common/l1sap.c M src/common/rsl.c 2 files changed, 35 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/00/1700/1 diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 9116e23..e1bb264 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -431,6 +431,22 @@ return 0; } + +static void set_ms_to_data(struct gsm_lchan *lchan, uint8_t data, bool set_ms_to) +{ + if (!lchan) + return; + if (set_ms_to) { + lchan->ms_t_offs = data; + lchan->ms_t_offs_valid = true; + lchan->p_offs_valid = false; + } else { + lchan->p_offs = data; + lchan->p_offs_valid = true; + lchan->ms_t_offs_valid = false; + } +} + /* measurement information received from bts model */ static int l1sap_info_meas_ind(struct gsm_bts_trx *trx, struct osmo_phsap_prim *l1sap, @@ -455,6 +471,8 @@ ulm.ta_offs_qbits = info_meas_ind->ta_offs_qbits; ulm.ber10k = info_meas_ind->ber10k; ulm.inv_rssi = info_meas_ind->inv_rssi; + /* we assume that symbol period is 1 bit: */ + set_ms_to_data(lchan, info_meas_ind->ta_offs_qbits / 4, true); lchan_new_ul_meas(lchan, &ulm); @@ -997,6 +1015,7 @@ struct gsm_bts *bts = trx->bts; struct gsm_bts_role_bts *btsb = bts->role; struct lapdm_channel *lc; + struct gsm_lchan *lchan = get_lchan_by_chan_nr(trx, rach_ind->chan_nr); uint8_t acc_delay; DEBUGP(DL1P, "Rx PH-RA.ind"); @@ -1010,6 +1029,10 @@ return 0; } + /* According to 3GPP TS 48.058 ? 9.3.17 Access Delay is expressed same + way as TA (number of symbols) */ + set_ms_to_data(lchan, acc_delay, false); + /* check for handover rach */ if (!L1SAP_IS_CHAN_RACH(rach_ind->chan_nr)) return l1sap_handover_rach(trx, l1sap, rach_ind); diff --git a/src/common/rsl.c b/src/common/rsl.c index a34c455..1c8966d 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -2219,7 +2219,8 @@ } /* 8.4.8 MEASUREMENT RESult */ -static int rsl_tx_meas_res(struct gsm_lchan *lchan, uint8_t *l3, int l3_len) +static int rsl_tx_meas_res(struct gsm_lchan *lchan, uint8_t *l3, int l3_len, + uint8_t ms_to, bool use_ms_to) { struct msgb *msg; uint8_t meas_res[16]; @@ -2251,7 +2252,11 @@ lchan->meas.flags &= ~LC_UL_M_F_L1_VALID; } msgb_tl16v_put(msg, RSL_IE_L3_INFO, l3_len, l3); - //msgb_tv_put(msg, RSL_IE_MS_TIMING_OFFSET, FIXME); + if (use_ms_to) { + msgb_tv_put(msg, RSL_IE_MS_TIMING_OFFSET, ms_to); + lchan->ms_t_offs_valid = false; + lchan->p_offs_valid = false; + } rsl_dch_push_hdr(msg, RSL_MT_MEAS_RES, chan_nr); msg->trx = lchan->ts->trx; @@ -2264,8 +2269,6 @@ { struct gsm_lchan *lchan = ctx; struct abis_rsl_common_hdr *rh; - - /* NOTE: Parameter lapdm_entity *le is ignored */ OSMO_ASSERT(msg); rh = msgb_l2(msg); @@ -2286,7 +2289,11 @@ LOGP(DRSL, LOGL_INFO, "%s Handing RLL msg %s from LAPDm to MEAS REP\n", gsm_lchan_name(lchan), rsl_msg_name(rh->msg_type)); - rc = rsl_tx_meas_res(lchan, msgb_l3(msg), msgb_l3len(msg)); + rc = rsl_tx_meas_res(lchan, msgb_l3(msg), msgb_l3len(msg), + lchan->ms_t_offs_valid ? lchan->ms_t_offs : + (lchan->p_offs - le->ta), + lchan->ms_t_offs_valid || + lchan->p_offs_valid); msgb_free(msg); return rc; } else { -- To view, visit https://gerrit.osmocom.org/1700 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4dfe5c48834a083e757d5de3236a02e15a238b28 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Jan 27 18:47:07 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 27 Jan 2017 18:47:07 +0000 Subject: openbsc[master]: Add MS time. offset to gsm_lchan In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 RFC, not for merge yet - see comments in related ticket. -- To view, visit https://gerrit.osmocom.org/1699 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8bda57c8d6c15bbb803eca708931556dae118a00 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 27 18:47:17 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 27 Jan 2017 18:47:17 +0000 Subject: osmo-bts[master]: Add MS TO to RSL measurements In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 RFC, not for merge yet - see comments in related ticket. -- To view, visit https://gerrit.osmocom.org/1700 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4dfe5c48834a083e757d5de3236a02e15a238b28 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 27 22:14:10 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 22:14:10 +0000 Subject: [PATCH] libosmocore[master]: Add minimal testing of socket.c helper functions In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1698 to look at the new patch set (#3). Add minimal testing of socket.c helper functions Change-Id: I2773b3859a206f96fb8fa095d50a653d9eeb8d79 --- M .gitignore M tests/Makefile.am A tests/socket/socket_test.c A tests/socket/socket_test.err A tests/socket/socket_test.ok M tests/testsuite.at 6 files changed, 94 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/98/1698/3 diff --git a/.gitignore b/.gitignore index fb159c3..ad8354e 100644 --- a/.gitignore +++ b/.gitignore @@ -98,6 +98,7 @@ tests/fsm/fsm_test tests/write_queue/wqueue_test tests/oap/oap_test +tests/socket/socket_test utils/osmo-arfcn utils/osmo-auc-gen diff --git a/tests/Makefile.am b/tests/Makefile.am index b9eb8f2..5731bf8 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -14,7 +14,7 @@ smscb/gsm0341_test stats/stats_test \ bitvec/bitvec_test msgb/msgb_test bits/bitcomp_test \ tlv/tlv_test gsup/gsup_test oap/oap_test fsm/fsm_test \ - write_queue/wqueue_test + write_queue/wqueue_test socket/socket_test if ENABLE_MSGFILE check_PROGRAMS += msgfile/msgfile_test @@ -140,6 +140,9 @@ write_queue_wqueue_test_SOURCES = write_queue/wqueue_test.c write_queue_wqueue_test_LDADD = $(top_builddir)/src/libosmocore.la +socket_socket_test_SOURCES = socket/socket_test.c +socket_socket_test_LDADD = $(top_builddir)/src/libosmocore.la + # The `:;' works around a Bash 3.2 bug when the output is not writeable. $(srcdir)/package.m4: $(top_srcdir)/configure.ac :;{ \ @@ -176,7 +179,8 @@ bitvec/bitvec_test.ok msgb/msgb_test.ok bits/bitcomp_test.ok \ sim/sim_test.ok tlv/tlv_test.ok gsup/gsup_test.ok \ oap/oap_test.ok fsm/fsm_test.ok fsm/fsm_test.err \ - write_queue/wqueue_test.ok + write_queue/wqueue_test.ok socket/socket_test.ok \ + socket/socket_test.err DISTCLEANFILES = atconfig atlocal diff --git a/tests/socket/socket_test.c b/tests/socket/socket_test.c new file mode 100644 index 0000000..0f5f9d1 --- /dev/null +++ b/tests/socket/socket_test.c @@ -0,0 +1,75 @@ +/* + * (C) 2017 by Harald Welte + * 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 2 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. + * + */ + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include "../config.h" + +static int test_sockinit(void) +{ + int fd, rc; + char *name; + + printf("Checking osmo_sock_init() with bind to a random local UDP port\n"); + fd = osmo_sock_init(AF_INET, SOCK_DGRAM, IPPROTO_UDP, + "0.0.0.0", 0, OSMO_SOCK_F_BIND); + OSMO_ASSERT(fd >= 0); + name = osmo_sock_get_name(NULL, fd); + /* expect it to be not connected, and bound to INADDR_ANY */ + OSMO_ASSERT(!strncmp(name, "(NULL<->0.0.0.0:", 16)); + talloc_free(name); + /* expect it to be blocking */ + rc = fcntl(fd, F_GETFL); + OSMO_ASSERT(!(rc & O_NONBLOCK)); + close(fd); + + printf("Checking for OSMO_SOCK_F_NONBLOCK\n"); + fd = osmo_sock_init(AF_INET, SOCK_DGRAM, IPPROTO_UDP, + "0.0.0.0", 0, OSMO_SOCK_F_BIND|OSMO_SOCK_F_NONBLOCK); + OSMO_ASSERT(fd >= 0); + /* expect it to be blocking */ + rc = fcntl(fd, F_GETFL); + OSMO_ASSERT(rc & O_NONBLOCK); + close(fd); + + printf("Checking for invalid flags\n"); + fd = osmo_sock_init(AF_INET, SOCK_DGRAM, IPPROTO_UDP, + "0.0.0.0", 0, OSMO_SOCK_F_BIND|OSMO_SOCK_F_CONNECT); + OSMO_ASSERT(fd < 0); + + return 0; +} + +int main(int argc, char *argv[]) +{ + test_sockinit(); + return 0; +} diff --git a/tests/socket/socket_test.err b/tests/socket/socket_test.err new file mode 100644 index 0000000..5367239 --- /dev/null +++ b/tests/socket/socket_test.err @@ -0,0 +1 @@ +invalid: both bind and connect flags set: 0.0.0.0:0 diff --git a/tests/socket/socket_test.ok b/tests/socket/socket_test.ok new file mode 100644 index 0000000..d6ec40e --- /dev/null +++ b/tests/socket/socket_test.ok @@ -0,0 +1,3 @@ +Checking osmo_sock_init() with bind to a random local UDP port +Checking for OSMO_SOCK_F_NONBLOCK +Checking for invalid flags diff --git a/tests/testsuite.at b/tests/testsuite.at index 426c74c..d6181c9 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -228,3 +228,11 @@ touch experr AT_CHECK([$abs_top_builddir/tests/oap/oap_test], [0], [expout], [experr]) AT_CLEANUP + +AT_SETUP([socket]) +AT_KEYWORDS([socket]) +cat $abs_srcdir/socket/socket_test.ok > expout +cat $abs_srcdir/socket/socket_test.err > experr +touch experr +AT_CHECK([$abs_top_builddir/tests/socket/socket_test], [0], [expout], [experr]) +AT_CLEANUP -- To view, visit https://gerrit.osmocom.org/1698 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2773b3859a206f96fb8fa095d50a653d9eeb8d79 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Jan 27 22:14:54 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 22:14:54 +0000 Subject: openbsc[master]: Attempt to fix OE build In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1692 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iacc1958b471ec3fc65307259039e1d496845f528 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 27 22:17:07 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 22:17:07 +0000 Subject: openbsc[master]: Attempt to fix OE build In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 I don't like this to be classified as a temporary hack. If we use non-standard autoconf macros (such as those from autoconf-archive, which is apparently not present everywhere), it should make sense to have those macros locally in our repo. I mean, it's not like there's much of a side effect, other than not getting updated version of that macro, which is probably not a primary concern? What do others say? -- To view, visit https://gerrit.osmocom.org/1692 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iacc1958b471ec3fc65307259039e1d496845f528 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Jan 27 22:17:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 27 Jan 2017 22:17:23 +0000 Subject: [MERGED] openbsc[master]: rsl: Fix dropping of LAPDm UA message. In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: rsl: Fix dropping of LAPDm UA message. ...................................................................... rsl: Fix dropping of LAPDm UA message. In some cases, when successive mobile originated calls are made, the LAPDm UA message gets lost because the channel is relased to early. Too overcome the problem we do not send release indications immediately. Instead a flag will be set and the message stored and sent on the next TCH-RTS-IND. This commit adds the required flag and the msg-buffer to struct gsm_lchan. See also coresponding change in osmo-bts.git: Change-Id Ie4f70c75f0137b4bd72d579b3a32575bac2fca38 This patch is is a slightly improved/reformatted version of: https://gitlab.com/nrw_noa/osmo-bts/commit/95d1f15ad108c1c1869c1965144acd64c1395d8c Change-Id: I15fc1ef8e9e83f009bde96de9a8e95702cffbce6 --- M openbsc/include/openbsc/gsm_data_shared.h 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h index 5b05016..91bdfce 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -350,6 +350,8 @@ uint8_t current; uint8_t fixed; } ms_power_ctrl; + + struct msgb *pending_rel_ind_msg; #endif }; -- To view, visit https://gerrit.osmocom.org/1625 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I15fc1ef8e9e83f009bde96de9a8e95702cffbce6 Gerrit-PatchSet: 9 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Jan 27 22:53:22 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 27 Jan 2017 22:53:22 +0000 Subject: openbsc[master]: add struct bsc_sub, separating libbsc from gsm_subscriber In-Reply-To: References: Message-ID: Patch Set 4: Code-Review-2 according to https://osmocom.org/issues/1927#note-3 this doesn't work (it works in connection with the later vlr changes, but not on its own like this.) I'll fix it and then remove the -2. -- To view, visit https://gerrit.osmocom.org/1682 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia61cc00e8bb186b976939a4fc8f7cf9ce6aa3d8e Gerrit-PatchSet: 4 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Jan 28 03:05:02 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 28 Jan 2017 03:05:02 +0000 Subject: [PATCH] libosmocore[master]: vty/ports.h: reserve port 4258 for OsmoHLR VTY Message-ID: Review at https://gerrit.osmocom.org/1701 vty/ports.h: reserve port 4258 for OsmoHLR VTY Change-Id: I08cb52d9399a27e6876e45da36f434708c4fddef --- M include/osmocom/vty/ports.h 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/01/1701/1 diff --git a/include/osmocom/vty/ports.h b/include/osmocom/vty/ports.h index c5e396b..e43b53f 100644 --- a/include/osmocom/vty/ports.h +++ b/include/osmocom/vty/ports.h @@ -24,3 +24,4 @@ /* 4255 used by control interface */ #define OSMO_VTY_PORT_MNCC_SIP 4256 /* 4257 used by control interface */ +#define OSMO_VTY_PORT_HLR 4258 -- To view, visit https://gerrit.osmocom.org/1701 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I08cb52d9399a27e6876e45da36f434708c4fddef Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Jan 28 09:02:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 28 Jan 2017 09:02:25 +0000 Subject: libosmo-sccp[master]: Start to log + handle SCTP notifications In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1696 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie00c4fc65c66e55262e2db084826084dcaf34b91 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Jan 28 09:02:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 28 Jan 2017 09:02:28 +0000 Subject: [MERGED] libosmo-sccp[master]: Start to log + handle SCTP notifications In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Start to log + handle SCTP notifications ...................................................................... Start to log + handle SCTP notifications Change-Id: Ie00c4fc65c66e55262e2db084826084dcaf34b91 --- M src/sua.c 1 file changed, 116 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/sua.c b/src/sua.c index 2b4c64e..39afef0 100644 --- a/src/sua.c +++ b/src/sua.c @@ -1,6 +1,6 @@ /* Minimal implementation of RFC 3868 - SCCP User Adaptation Layer */ -/* (C) 2015 by Harald Welte +/* (C) 2015-2017 by Harald Welte * All Rights Reserved * * This program is free software; you can redistribute it and/or modify @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -241,6 +242,8 @@ static int sua_link_send(struct osmo_sccp_link *link, struct msgb *msg) { msgb_sctp_ppid(msg) = SUA_PPID; + + DEBUGP(DSUA, "sua_link_send(%s)\n", osmo_hexdump(msg->data, msgb_length(msg))); if (link->is_server) osmo_stream_srv_send(link->data, msg); @@ -550,6 +553,7 @@ conn_state_set(conn, S_DISCONN_PEND); conn_destroy(conn); + LOGP(DSUA, LOGL_NOTICE, "About to send the SUA RELRE\n"); return sua_link_send(link, outmsg); } @@ -1256,6 +1260,85 @@ #include #include +static const struct value_string sctp_assoc_chg_vals[] = { + { SCTP_COMM_UP, "COMM_UP" }, + { SCTP_COMM_LOST, "COMM_LOST" }, + { SCTP_RESTART, "RESTART" }, + { SCTP_SHUTDOWN_COMP, "SHUTDOWN_COMP" }, + { SCTP_CANT_STR_ASSOC, "CANT_STR_ASSOC" }, + { 0, NULL } +}; + +static const struct value_string sctp_sn_type_vals[] = { + { SCTP_ASSOC_CHANGE, "ASSOC_CHANGE" }, + { SCTP_PEER_ADDR_CHANGE, "PEER_ADDR_CHANGE" }, + { SCTP_SHUTDOWN_EVENT, "SHUTDOWN_EVENT" }, + { SCTP_SEND_FAILED, "SEND_FAILED" }, + { SCTP_REMOTE_ERROR, "REMOTE_ERROR" }, + { SCTP_PARTIAL_DELIVERY_EVENT, "PARTIAL_DELIVERY_EVENT" }, + { SCTP_ADAPTATION_INDICATION, "ADAPTATION_INDICATION" }, +#ifdef SCTP_AUTHENTICATION_INDICATION + { SCTP_AUTHENTICATION_INDICATION, "UTHENTICATION_INDICATION" }, +#endif +#ifdef SCTP_SENDER_DRY_EVENT + { SCTP_SENDER_DRY_EVENT, "SENDER_DRY_EVENT" }, +#endif + { 0, NULL } +}; + +static int get_logevel_by_sn_type(int sn_type) +{ + switch (sn_type) { + case SCTP_ADAPTATION_INDICATION: + case SCTP_PEER_ADDR_CHANGE: +#ifdef SCTP_AUTHENTICATION_INDICATION + case SCTP_AUTHENTICATION_INDICATION: +#endif +#ifdef SCTP_SENDER_DRY_EVENT + case SCTP_SENDER_DRY_EVENT: +#endif + return LOGL_INFO; + case SCTP_ASSOC_CHANGE: + return LOGL_NOTICE; + case SCTP_SHUTDOWN_EVENT: + case SCTP_PARTIAL_DELIVERY_EVENT: + return LOGL_NOTICE; + case SCTP_SEND_FAILED: + case SCTP_REMOTE_ERROR: + return LOGL_ERROR; + default: + return LOGL_NOTICE; + } +} + +static void log_sctp_notification(int fd, const char *pfx, + union sctp_notification *notif) +{ + int log_level; + char *conn_id = osmo_sock_get_name(NULL, fd); + + LOGP(DSUA, LOGL_INFO, "%s %s SCTP NOTIFICATION %u flags=0x%0x\n", + conn_id, pfx, notif->sn_header.sn_type, + notif->sn_header.sn_flags); + + log_level = get_logevel_by_sn_type(notif->sn_header.sn_type); + + switch (notif->sn_header.sn_type) { + case SCTP_ASSOC_CHANGE: + LOGP(DSUA, log_level, "%s %s SCTP_ASSOC_CHANGE: %s\n", + conn_id, pfx, get_value_string(sctp_assoc_chg_vals, + notif->sn_assoc_change.sac_state)); + break; + default: + LOGP(DSUA, log_level, "%s %s %s\n", + conn_id, pfx, get_value_string(sctp_sn_type_vals, + notif->sn_header.sn_type)); + break; + } + + talloc_free(conn_id); +} + /* netif code tells us we can read something from the socket */ static int sua_srv_conn_cb(struct osmo_stream_srv *conn) { @@ -1273,6 +1356,8 @@ /* read SUA message from socket and process it */ rc = sctp_recvmsg(ofd->fd, msgb_data(msg), msgb_tailroom(msg), NULL, NULL, &sinfo, &flags); + LOGP(DSUA, LOGL_DEBUG, "sua_srv_conn_cb(): sctp_recvmsg() returned %d\n", + rc); if (rc < 0) { close(ofd->fd); osmo_fd_unregister(ofd); @@ -1287,6 +1372,19 @@ } if (flags & MSG_NOTIFICATION) { + union sctp_notification *notif = (union sctp_notification *) msgb_data(msg); + + log_sctp_notification(ofd->fd, "SUA SRV", notif); + + switch (notif->sn_header.sn_type) { + case SCTP_SHUTDOWN_EVENT: + close(ofd->fd); + osmo_fd_unregister(ofd); + ofd->fd = -1; + break; + default: + break; + } msgb_free(msg); return 0; } @@ -1385,7 +1483,7 @@ } /* netif code tells us we can read something from the socket */ -static int sua_cli_conn_cb(struct osmo_stream_cli *conn) +static int sua_cli_read_cb(struct osmo_stream_cli *conn) { struct osmo_fd *ofd = osmo_stream_cli_get_ofd(conn); struct osmo_sccp_link *link = osmo_stream_cli_get_data(conn); @@ -1394,6 +1492,8 @@ unsigned int ppid; int flags = 0; int rc; + + LOGP(DSUA, LOGL_DEBUG, "sua_cli_read_cb() rx\n"); if (!msg) return -ENOMEM; @@ -1415,6 +1515,19 @@ } if (flags & MSG_NOTIFICATION) { + union sctp_notification *notif = (union sctp_notification *) msgb_data(msg); + + log_sctp_notification(ofd->fd, "SUA CLNT", notif); + + switch (notif->sn_header.sn_type) { + case SCTP_SHUTDOWN_EVENT: + close(ofd->fd); + osmo_fd_unregister(ofd); + ofd->fd = -1; + break; + default: + break; + } msgb_free(msg); return 0; } @@ -1452,7 +1565,7 @@ osmo_stream_cli_set_port(cli, port); osmo_stream_cli_set_proto(cli, IPPROTO_SCTP); osmo_stream_cli_set_reconnect_timeout(cli, 5); - osmo_stream_cli_set_read_cb(cli, sua_cli_conn_cb); + osmo_stream_cli_set_read_cb(cli, sua_cli_read_cb); /* create SUA link and associate it with stream_cli */ sual = sua_link_new(user, 0); -- To view, visit https://gerrit.osmocom.org/1696 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie00c4fc65c66e55262e2db084826084dcaf34b91 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Jan 30 00:08:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 30 Jan 2017 00:08:25 +0000 Subject: [MERGED] openbsc[master]: gprs: Fix compiler warning about uninitalized cause code In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gprs: Fix compiler warning about uninitalized cause code ...................................................................... gprs: Fix compiler warning about uninitalized cause code in gprs_gmm.c:gsm48_rx_gmm_ra_upd_req the variable reject_cause is not initalized, which is ok, since it gets initalized before the jump into the "rejected" path. However, the compiler still throws a warning. This commit fixes the problem by preinitalizing the reject_cause to GMM_CAUSE_PROTO_ERR_UNSPEC Change-Id: I84cffb631e4cad3d4748512b47e3876208f53727 --- M openbsc/src/gprs/gprs_gmm.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c index 88be512..dc73693 100644 --- a/openbsc/src/gprs/gprs_gmm.c +++ b/openbsc/src/gprs/gprs_gmm.c @@ -1415,7 +1415,7 @@ struct gprs_ra_id old_ra_id; struct tlv_parsed tp; uint8_t upd_type; - enum gsm48_gmm_cause reject_cause; + enum gsm48_gmm_cause reject_cause = GMM_CAUSE_PROTO_ERR_UNSPEC; int rc; /* TODO: In iu mode - handle follow-on request */ -- To view, visit https://gerrit.osmocom.org/1661 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I84cffb631e4cad3d4748512b47e3876208f53727 Gerrit-PatchSet: 4 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Jan 30 00:08:47 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 30 Jan 2017 00:08:47 +0000 Subject: libosmocore[master]: vty/ports.h: reserve port 4258 for OsmoHLR VTY In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1701 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I08cb52d9399a27e6876e45da36f434708c4fddef Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 30 00:09:13 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 30 Jan 2017 00:09:13 +0000 Subject: libosmocore[master]: vty/ports.h: reserve port 4258 for OsmoHLR VTY In-Reply-To: References: Message-ID: Patch Set 1: please make sure to also add it to the list of VTY ports in osmo-gsm-manuals.git, and/or even add a comment here in the ports.h header as a future reminder. -- To view, visit https://gerrit.osmocom.org/1701 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I08cb52d9399a27e6876e45da36f434708c4fddef Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 30 09:53:30 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 30 Jan 2017 09:53:30 +0000 Subject: openggsn[master]: abi/debian: Bump ABI version of libgtp after struct size change In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1657 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iac4d6d2effde1a6b2f60b1e1b49c91513d5ca8c3 Gerrit-PatchSet: 2 Gerrit-Project: openggsn Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 30 09:53:32 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 30 Jan 2017 09:53:32 +0000 Subject: [MERGED] openggsn[master]: abi/debian: Bump ABI version of libgtp after struct size change In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: abi/debian: Bump ABI version of libgtp after struct size change ...................................................................... abi/debian: Bump ABI version of libgtp after struct size change The gsn_t changed the size with the addition of the ctrl pointer. Bump the SO version to not break osmo-sgsn/ggsn on upgrade. Call the -dev package libgtp-dev to follow the rest of Osmocom and to ease making releases here. Change-Id: Iac4d6d2effde1a6b2f60b1e1b49c91513d5ca8c3 --- M debian/changelog M debian/control R debian/libgtp-dev.install R debian/libgtp1.install M gtp/Makefile.am 5 files changed, 11 insertions(+), 5 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/debian/changelog b/debian/changelog index a00671b..5d52bfd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,9 @@ openggsn (0.93) UNRELEASED; urgency=medium * Bump version to ease upgrading from Debian SID. + * Bump libgtp SO version after ABI change. - -- Holger Hans Peter Freyther Tue, 24 May 2016 22:53:16 +0200 + -- Holger Hans Peter Freyther Tue, 24 Jan 2017 17:26:26 +0100 openggsn (0.92) precise; urgency=medium diff --git a/debian/control b/debian/control index 9306656..4e5b168 100644 --- a/debian/control +++ b/debian/control @@ -22,7 +22,7 @@ operators as the interface between the Internet and the rest of the mobile network infrastructure. -Package: libgtp0 +Package: libgtp1 Architecture: any Multi-Arch: same Section: libs @@ -36,12 +36,12 @@ This library is part of openggsn and implements the GTP protocol between SGSN (Serving GPRS support node) and GGSN. -Package: libgtp0-dev +Package: libgtp-dev Architecture: any Multi-Arch: same Section: libdevel Depends: ${misc:Depends}, - libgtp0 (= ${binary:Version}) + libgtp1 (= ${binary:Version}) Description: Development files for libgtp OpenGGSN is a Gateway GPRS Support Node (GGSN). It is used by mobile operators as the interface between the Internet and the rest of the @@ -54,6 +54,6 @@ Section: debug Architecture: any Priority: extra -Depends: ${shlibs:Depends}, ${misc:Depends}, libgtp0 (= ${binary:Version}), openggsn (= ${binary:Version}) +Depends: ${shlibs:Depends}, ${misc:Depends}, libgtp1 (= ${binary:Version}), openggsn (= ${binary:Version}) Multi-Arch: same Description: Debug symbols for OpenGGSN diff --git a/debian/libgtp0-dev.install b/debian/libgtp-dev.install similarity index 100% rename from debian/libgtp0-dev.install rename to debian/libgtp-dev.install diff --git a/debian/libgtp0.install b/debian/libgtp1.install similarity index 100% rename from debian/libgtp0.install rename to debian/libgtp1.install diff --git a/gtp/Makefile.am b/gtp/Makefile.am index 9586dfe..32025d6 100644 --- a/gtp/Makefile.am +++ b/gtp/Makefile.am @@ -1,3 +1,7 @@ +# This is _NOT_ the library release version, it's an API version. +# Please read chapter "Library interface versions" of the libtool documentation +# before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html +LIBVERSION=1:0:0 lib_LTLIBRARIES = libgtp.la include_HEADERS = gtp.h pdp.h gtpie.h @@ -5,6 +9,7 @@ AM_CFLAGS = -O2 -fno-builtin -Wall -DSBINDIR='"$(sbindir)"' -ggdb $(LIBOSMOCORE_CFLAGS) libgtp_la_SOURCES = gtp.c gtp.h gtpie.c gtpie.h pdp.c pdp.h lookupa.c lookupa.h queue.c queue.h +libgtp_la_LDFLAGS = -version-info $(LIBVERSION) -no-undefined libgtp_la_LIBADD = $(LIBOSMOCORE_LIBS) -- To view, visit https://gerrit.osmocom.org/1657 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iac4d6d2effde1a6b2f60b1e1b49c91513d5ca8c3 Gerrit-PatchSet: 2 Gerrit-Project: openggsn Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Mon Jan 30 09:53:45 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 30 Jan 2017 09:53:45 +0000 Subject: libosmo-abis[master]: misc: Fix build failure/warning when building on alpine linux In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1641 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I997e45a456faedb5f370fd02ded300c1e36b791b Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 30 09:53:47 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 30 Jan 2017 09:53:47 +0000 Subject: [MERGED] libosmo-abis[master]: misc: Fix build failure/warning when building on alpine linux In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: misc: Fix build failure/warning when building on alpine linux ...................................................................... misc: Fix build failure/warning when building on alpine linux alpine linux is using the musl libc and this triggered some minor compilation issues. Remove unused mISDN include and defines from the general E1 input handling and address the other warnings and errors. /usr/include/sys/fcntl.h:1:2: warning: #warning redirecting incorrect #include to [-Wcpp] #warning redirecting incorrect #include to ^~~~~~~ In file included from input/misdn.c:48:0: ../include/mISDNif.h:286:2: error: unknown type name 'u_int' u_int id; ^~~~~ Change-Id: I997e45a456faedb5f370fd02ded300c1e36b791b --- M src/e1_input.c M src/input/ipaccess.c M src/input/misdn.c 3 files changed, 3 insertions(+), 11 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, but someone else must approve Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/e1_input.c b/src/e1_input.c index 2c8a541..09fea59 100644 --- a/src/e1_input.c +++ b/src/e1_input.c @@ -28,20 +28,12 @@ #include #include #include -#include +#include #include #include #include -#include #include - -//#define AF_COMPATIBILITY_FUNC -//#include -#ifndef AF_ISDN -#define AF_ISDN 34 -#define PF_ISDN AF_ISDN -#endif #include #include diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c index 9e64471..ac84ffc 100644 --- a/src/input/ipaccess.c +++ b/src/input/ipaccess.c @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/input/misdn.c b/src/input/misdn.c index 9315e23..98a836f 100644 --- a/src/input/misdn.c +++ b/src/input/misdn.c @@ -41,8 +41,8 @@ #include #include #include -#include #include +#include #include #include #include -- To view, visit https://gerrit.osmocom.org/1641 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I997e45a456faedb5f370fd02ded300c1e36b791b Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Jan 30 09:54:05 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 30 Jan 2017 09:54:05 +0000 Subject: openbsc[master]: debian: Require libgtp-dev after the SO version bump In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1658 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib301b27e2c08fda827b55820389247e27e5e8fc7 Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 30 09:54:23 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 30 Jan 2017 09:54:23 +0000 Subject: [MERGED] openbsc[master]: debian: Require libgtp-dev after the SO version bump In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: debian: Require libgtp-dev after the SO version bump ...................................................................... debian: Require libgtp-dev after the SO version bump The ABI of libgtp changed and we require a new library now. Drop the SO_VERSION from the library name and just depend on libgtp-dev. Change-Id: Ib301b27e2c08fda827b55820389247e27e5e8fc7 --- M debian/control 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Max: Looks good to me, but someone else must approve Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/debian/control b/debian/control index 144e649..87b6f07 100644 --- a/debian/control +++ b/debian/control @@ -6,7 +6,7 @@ autotools-dev, autoconf-archive, pkg-config, - libgtp0-dev, + libgtp-dev, libosmocore-dev, libosmo-sccp-dev, libdbi0-dev, -- To view, visit https://gerrit.osmocom.org/1658 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib301b27e2c08fda827b55820389247e27e5e8fc7 Gerrit-PatchSet: 4 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Mon Jan 30 11:51:16 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 30 Jan 2017 11:51:16 +0000 Subject: libosmocore[master]: vty/ports.h: reserve port 4258 for OsmoHLR VTY In-Reply-To: References: Message-ID: Patch Set 1: thanks, I should have remembered to do so myself. -- To view, visit https://gerrit.osmocom.org/1701 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I08cb52d9399a27e6876e45da36f434708c4fddef Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 30 11:58:40 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 30 Jan 2017 11:58:40 +0000 Subject: [PATCH] libosmocore[master]: comment: ports.h: more visibly remind to keep docs+wiki synced Message-ID: Review at https://gerrit.osmocom.org/1702 comment: ports.h: more visibly remind to keep docs+wiki synced It is still too easy to forget syncing, so add another reminder at the end of the list. Change-Id: I95191906afa8e6ada31310d0e36de33e3fccf268 --- M include/osmocom/ctrl/ports.h M include/osmocom/vty/ports.h 2 files changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/02/1702/1 diff --git a/include/osmocom/ctrl/ports.h b/include/osmocom/ctrl/ports.h index 8bd8680..4bc2a24 100644 --- a/include/osmocom/ctrl/ports.h +++ b/include/osmocom/ctrl/ports.h @@ -16,3 +16,4 @@ #define OSMO_CTRL_PORT_CSCN 4255 /* 4256 used by VTY interface */ #define OSMO_CTRL_PORT_GGSN 4257 +/* When adding/changing port numbers, keep docs and wiki in sync. See above. */ diff --git a/include/osmocom/vty/ports.h b/include/osmocom/vty/ports.h index e43b53f..70dc69c 100644 --- a/include/osmocom/vty/ports.h +++ b/include/osmocom/vty/ports.h @@ -25,3 +25,4 @@ #define OSMO_VTY_PORT_MNCC_SIP 4256 /* 4257 used by control interface */ #define OSMO_VTY_PORT_HLR 4258 +/* When adding/changing port numbers, keep docs and wiki in sync. See above. */ -- To view, visit https://gerrit.osmocom.org/1702 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I95191906afa8e6ada31310d0e36de33e3fccf268 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Jan 30 12:09:18 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 30 Jan 2017 12:09:18 +0000 Subject: [MERGED] libosmocore[master]: vty/ports.h: reserve port 4258 for OsmoHLR VTY In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: vty/ports.h: reserve port 4258 for OsmoHLR VTY ...................................................................... vty/ports.h: reserve port 4258 for OsmoHLR VTY Change-Id: I08cb52d9399a27e6876e45da36f434708c4fddef --- M include/osmocom/vty/ports.h 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/vty/ports.h b/include/osmocom/vty/ports.h index c5e396b..e43b53f 100644 --- a/include/osmocom/vty/ports.h +++ b/include/osmocom/vty/ports.h @@ -24,3 +24,4 @@ /* 4255 used by control interface */ #define OSMO_VTY_PORT_MNCC_SIP 4256 /* 4257 used by control interface */ +#define OSMO_VTY_PORT_HLR 4258 -- To view, visit https://gerrit.osmocom.org/1701 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I08cb52d9399a27e6876e45da36f434708c4fddef Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Jan 30 12:09:46 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 30 Jan 2017 12:09:46 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: common/port_numbers: add osmo-hlr VTY port 4258 Message-ID: Review at https://gerrit.osmocom.org/1703 common/port_numbers: add osmo-hlr VTY port 4258 Change-Id: Ibf66a7c31d1b48b002c25bb55784c99f54dad3a0 --- M common/chapters/port_numbers.adoc 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/03/1703/1 diff --git a/common/chapters/port_numbers.adoc b/common/chapters/port_numbers.adoc index d59b3c5..bb1ad78 100644 --- a/common/chapters/port_numbers.adoc +++ b/common/chapters/port_numbers.adoc @@ -31,6 +31,7 @@ |TCP|4255|Control Interface|osmo-cscn |TCP|4256|telnet (VTY)|osmo-sip-connector |TCP|4257|Control Interface|ggsn (OpenGGSN) +|TCP|4258|telnet (VTY)|osmo-hlr |UDP|4729|GSMTAP|Almost every osmocom project |TCP|5000|A/IP|osmo-bsc, osmo-bsc_nat |UDP|2427|GSMTAP|osmo-pcu, osmo-bts -- To view, visit https://gerrit.osmocom.org/1703 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibf66a7c31d1b48b002c25bb55784c99f54dad3a0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Jan 30 12:09:47 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 30 Jan 2017 12:09:47 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: common/port_numbers: place comment remind of syncing ports l... Message-ID: Review at https://gerrit.osmocom.org/1704 common/port_numbers: place comment remind of syncing ports lists Change-Id: Ib99271bfb435ef59fcfc0a2ac198d26770199344 --- M common/chapters/port_numbers.adoc 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/04/1704/1 diff --git a/common/chapters/port_numbers.adoc b/common/chapters/port_numbers.adoc index bb1ad78..f70462c 100644 --- a/common/chapters/port_numbers.adoc +++ b/common/chapters/port_numbers.adoc @@ -37,3 +37,9 @@ |UDP|2427|GSMTAP|osmo-pcu, osmo-bts |UDP|23000|GPRS-NS over IP default port|osmo-pcu, osmo-sgsn, osmo-gbproxy |=============== +//// +ATTENTION: Keep this list in sync with all of: +https://osmocom.org/projects/cellular-infrastructure/wiki/PortNumbers +https://git.osmocom.org/libosmocore/tree/include/osmocom/vty/ports.h +https://git.osmocom.org/libosmocore/tree/include/osmocom/ctrl/ports.h +//// -- To view, visit https://gerrit.osmocom.org/1704 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib99271bfb435ef59fcfc0a2ac198d26770199344 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Jan 30 12:10:21 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 30 Jan 2017 12:10:21 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: common/port_numbers: place comment to remind of syncing port... In-Reply-To: References: Message-ID: common/port_numbers: place comment to remind of syncing ports lists Change-Id: Ib99271bfb435ef59fcfc0a2ac198d26770199344 --- M common/chapters/port_numbers.adoc 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/04/1704/2 diff --git a/common/chapters/port_numbers.adoc b/common/chapters/port_numbers.adoc index bb1ad78..f70462c 100644 --- a/common/chapters/port_numbers.adoc +++ b/common/chapters/port_numbers.adoc @@ -37,3 +37,9 @@ |UDP|2427|GSMTAP|osmo-pcu, osmo-bts |UDP|23000|GPRS-NS over IP default port|osmo-pcu, osmo-sgsn, osmo-gbproxy |=============== +//// +ATTENTION: Keep this list in sync with all of: +https://osmocom.org/projects/cellular-infrastructure/wiki/PortNumbers +https://git.osmocom.org/libosmocore/tree/include/osmocom/vty/ports.h +https://git.osmocom.org/libosmocore/tree/include/osmocom/ctrl/ports.h +//// -- To view, visit https://gerrit.osmocom.org/1704 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib99271bfb435ef59fcfc0a2ac198d26770199344 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Jan 30 12:11:04 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 30 Jan 2017 12:11:04 +0000 Subject: libosmocore[master]: comment: ports.h: more visibly remind to keep docs+wiki synced In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1702 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I95191906afa8e6ada31310d0e36de33e3fccf268 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 30 12:11:21 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 30 Jan 2017 12:11:21 +0000 Subject: [MERGED] libosmocore[master]: comment: ports.h: more visibly remind to keep docs+wiki synced In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: comment: ports.h: more visibly remind to keep docs+wiki synced ...................................................................... comment: ports.h: more visibly remind to keep docs+wiki synced It is still too easy to forget syncing, so add another reminder at the end of the list. Change-Id: I95191906afa8e6ada31310d0e36de33e3fccf268 --- M include/osmocom/ctrl/ports.h M include/osmocom/vty/ports.h 2 files changed, 2 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/ctrl/ports.h b/include/osmocom/ctrl/ports.h index 8bd8680..4bc2a24 100644 --- a/include/osmocom/ctrl/ports.h +++ b/include/osmocom/ctrl/ports.h @@ -16,3 +16,4 @@ #define OSMO_CTRL_PORT_CSCN 4255 /* 4256 used by VTY interface */ #define OSMO_CTRL_PORT_GGSN 4257 +/* When adding/changing port numbers, keep docs and wiki in sync. See above. */ diff --git a/include/osmocom/vty/ports.h b/include/osmocom/vty/ports.h index e43b53f..70dc69c 100644 --- a/include/osmocom/vty/ports.h +++ b/include/osmocom/vty/ports.h @@ -25,3 +25,4 @@ #define OSMO_VTY_PORT_MNCC_SIP 4256 /* 4257 used by control interface */ #define OSMO_VTY_PORT_HLR 4258 +/* When adding/changing port numbers, keep docs and wiki in sync. See above. */ -- To view, visit https://gerrit.osmocom.org/1702 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I95191906afa8e6ada31310d0e36de33e3fccf268 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Jan 30 12:44:56 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 30 Jan 2017 12:44:56 +0000 Subject: [PATCH] osmo-hlr[master]: main: add and use root talloc ctx Message-ID: Review at https://gerrit.osmocom.org/1705 main: add and use root talloc ctx Create hlr_ctx and pass on to DB and GSUP server code. Add call msgb_talloc_ctx_init(hlr_ctx). Instead of printing the entire talloc context on exit, just print the hlr_ctx upon SIGUSR1 (like our other binaries do). Otherwise we will get pages of talloc output on each program exit as soon as we add a VTY (next patch). Change-Id: I3c64cb4ad7a681b88c7409296ad3afeb8000e2a4 --- M src/hlr.c 1 file changed, 7 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/05/1705/1 diff --git a/src/hlr.c b/src/hlr.c index 674a58b..03c4435 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -516,6 +516,7 @@ return 0; } +void *hlr_ctx = NULL; static struct osmo_gsup_server *gs; static void signal_hdlr(int signal) @@ -526,11 +527,12 @@ osmo_gsup_server_destroy(gs); db_close(g_dbc); log_fini(); + talloc_report_full(hlr_ctx, stderr); exit(0); break; case SIGUSR1: LOGP(DMAIN, LOGL_DEBUG, "Talloc Report due to SIGUSR1\n"); - talloc_report_full(NULL, stderr); + talloc_report_full(hlr_ctx, stderr); break; } } @@ -539,7 +541,8 @@ { int rc; - talloc_enable_leak_report_full(); + hlr_ctx = talloc_named_const(NULL, 1, "OsmoHLR"); + msgb_talloc_ctx_init(hlr_ctx, 0); rc = osmo_init_logging(&hlr_log_info); if (rc < 0) { @@ -554,13 +557,13 @@ exit(1); } - g_dbc = db_open(NULL, "hlr.db"); + g_dbc = db_open(hlr_ctx, "hlr.db"); if (!g_dbc) { LOGP(DMAIN, LOGL_FATAL, "Error opening database\n"); exit(1); } - gs = osmo_gsup_server_create(NULL, NULL, 2222, read_cb); + gs = osmo_gsup_server_create(hlr_ctx, NULL, 2222, read_cb); if (!gs) { LOGP(DMAIN, LOGL_FATAL, "Error starting GSUP server\n"); exit(1); -- To view, visit https://gerrit.osmocom.org/1705 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3c64cb4ad7a681b88c7409296ad3afeb8000e2a4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Jan 30 12:44:57 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 30 Jan 2017 12:44:57 +0000 Subject: [PATCH] osmo-hlr[master]: main: add option parsing with db file and default options Message-ID: Review at https://gerrit.osmocom.org/1706 main: add option parsing with db file and default options Parse commandline options, supporting general Osmocom options as copied from osmo-nitb (bsc_hack.c): version, logging and daemonize options. Set the HLR database file from cmdline option, log the filename in db_open(). (VTY config file in next patch.) Change-Id: I279d517e1310e398b0a2382349e62be8e65364c1 --- M src/db.c M src/hlr.c 2 files changed, 104 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/06/1706/1 diff --git a/src/db.c b/src/db.c index 9d4e99e..1385502 100644 --- a/src/db.c +++ b/src/db.c @@ -75,6 +75,7 @@ unsigned int i; int rc; + LOGP(DDB, LOGL_NOTICE, "using database: %s\n", fname); LOGP(DDB, LOGL_INFO, "Compiled against SQLite3 lib version %s\n", SQLITE_VERSION); LOGP(DDB, LOGL_INFO, "Running with SQLite3 lib version %s\n", sqlite3_libversion()); diff --git a/src/hlr.c b/src/hlr.c index 03c4435..1d91c39 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -20,6 +20,9 @@ #include #include +#define _GNU_SOURCE +#include + #include #include #include @@ -516,6 +519,88 @@ return 0; } +static void print_usage() +{ + printf("Usage: osmo-hlr\n"); +} + +static void print_help() +{ + printf(" -h --help This text.\n"); + printf(" -l --database db-name The database to use.\n"); + printf(" -d option --debug=DRLL:DCC:DMM:DRR:DRSL:DNM Enable debugging.\n"); + printf(" -D --daemonize Fork the process into a background daemon.\n"); + printf(" -s --disable-color Do not print ANSI colors in the log\n"); + printf(" -T --timestamp Prefix every log line with a timestamp.\n"); + printf(" -e --log-level number Set a global loglevel.\n"); + printf(" -V --version Print the version of OsmoHLR.\n"); +} + +struct { + const char *db_file; + bool daemonize; +} cmdline_opts = { + .db_file = "hlr.db", + .daemonize = false, +}; + +static void handle_options(int argc, char **argv) +{ + while (1) { + int option_index = 0, c; + static struct option long_options[] = { + {"help", 0, 0, 'h'}, + {"database", 1, 0, 'l'}, + {"debug", 1, 0, 'd'}, + {"daemonize", 0, 0, 'D'}, + {"disable-color", 0, 0, 's'}, + {"log-level", 1, 0, 'e'}, + {"timestamp", 0, 0, 'T'}, + {"version", 0, 0, 'V' }, + {0, 0, 0, 0} + }; + + c = getopt_long(argc, argv, "hl:d:Dse:TV", + long_options, &option_index); + if (c == -1) + break; + + switch (c) { + case 'h': + print_usage(); + print_help(); + exit(0); + case 'l': + cmdline_opts.db_file = optarg; + break; + case 'd': + log_parse_category_mask(osmo_stderr_target, optarg); + break; + case 'D': + cmdline_opts.daemonize = 1; + break; + case 's': + log_set_use_color(osmo_stderr_target, 0); + break; + case 'e': + log_set_log_level(osmo_stderr_target, atoi(optarg)); + break; + case 'T': + log_set_print_timestamp(osmo_stderr_target, 1); + break; + case 'V': + print_version(1); + exit(0); + break; + default: + /* catch unknown options *as well as* missing arguments. */ + fprintf(stderr, "Error in command line options. Exiting.\n"); + exit(-1); + break; + } + } +} + void *hlr_ctx = NULL; static struct osmo_gsup_server *gs; @@ -537,6 +622,13 @@ } } +static struct vty_app_info vty_info = { + .name = "OsmoHLR", + .version = PACKAGE_VERSION, + .go_parent_cb = hlr_vty_go_parent, + .is_config_node = hlr_vty_is_config_node, +}; + int main(int argc, char **argv) { int rc; @@ -549,6 +641,9 @@ fprintf(stderr, "Error initializing logging\n"); exit(1); } + + handle_options(argc, argv); + LOGP(DMAIN, LOGL_NOTICE, "hlr starting\n"); rc = rand_init(); @@ -557,7 +652,7 @@ exit(1); } - g_dbc = db_open(hlr_ctx, "hlr.db"); + g_dbc = db_open(hlr_ctx, cmdline_opts.db_file); if (!g_dbc) { LOGP(DMAIN, LOGL_FATAL, "Error opening database\n"); exit(1); @@ -573,7 +668,13 @@ signal(SIGINT, &signal_hdlr); signal(SIGUSR1, &signal_hdlr); - //osmo_daemonize(); + if (cmdline_opts.daemonize) { + rc = osmo_daemonize(); + if (rc < 0) { + perror("Error during daemonize"); + exit(1); + } + } while (1) { osmo_select_main(0); -- To view, visit https://gerrit.osmocom.org/1706 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I279d517e1310e398b0a2382349e62be8e65364c1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Jan 30 12:44:57 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 30 Jan 2017 12:44:57 +0000 Subject: [PATCH] osmo-hlr[master]: main: add VTY and '-c config-file' option Message-ID: Review at https://gerrit.osmocom.org/1707 main: add VTY and '-c config-file' option Add config file, mainly for logging control. Open VTY on the OMSO_VTY_PORT_HLR added to libosmocore in commit 92fa18e6b800a27aa064a5fb8321cddd7383ae20 aka change-id I08cb52d9399a27e6876e45da36f434708c4fddef. Add hlr_vty.h/c for standard VTY setup. Add -c option to pass config file. Change-Id: Iedb884345a597371a337b0c67eb6013b7d5d1ce1 --- M src/Makefile.am M src/hlr.c A src/hlr_vty.c A src/hlr_vty.h 4 files changed, 121 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/07/1707/1 diff --git a/src/Makefile.am b/src/Makefile.am index 6c6c9e6..9bbc13e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -18,6 +18,7 @@ gsup_server.h \ logging.h \ rand.h \ + hlr_vty.h \ $(NULL) bin_PROGRAMS = \ @@ -38,6 +39,7 @@ hlr.c \ logging.c \ rand_urandom.c \ + hlr_vty.c \ $(NULL) osmo_hlr_LDADD = \ diff --git a/src/hlr.c b/src/hlr.c index 1d91c39..35ff10e 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -29,12 +29,17 @@ #include #include #include +#include +#include +#include +#include #include "db.h" #include "logging.h" #include "gsup_server.h" #include "gsup_router.h" #include "rand.h" +#include "hlr_vty.h" static struct db_context *g_dbc; @@ -527,6 +532,7 @@ static void print_help() { printf(" -h --help This text.\n"); + printf(" -c --config-file filename The config file to use.\n"); printf(" -l --database db-name The database to use.\n"); printf(" -d option --debug=DRLL:DCC:DMM:DRR:DRSL:DNM Enable debugging.\n"); printf(" -D --daemonize Fork the process into a background daemon.\n"); @@ -537,9 +543,11 @@ } struct { + const char *config_file; const char *db_file; bool daemonize; } cmdline_opts = { + .config_file = "osmo-hlr.cfg", .db_file = "hlr.db", .daemonize = false, }; @@ -550,6 +558,7 @@ int option_index = 0, c; static struct option long_options[] = { {"help", 0, 0, 'h'}, + {"config-file", 1, 0, 'c'}, {"database", 1, 0, 'l'}, {"debug", 1, 0, 'd'}, {"daemonize", 0, 0, 'D'}, @@ -560,7 +569,7 @@ {0, 0, 0, 0} }; - c = getopt_long(argc, argv, "hl:d:Dse:TV", + c = getopt_long(argc, argv, "hc:l:d:Dse:TV", long_options, &option_index); if (c == -1) break; @@ -570,6 +579,9 @@ print_usage(); print_help(); exit(0); + case 'c': + cmdline_opts.config_file = optarg; + break; case 'l': cmdline_opts.db_file = optarg; break; @@ -642,7 +654,23 @@ exit(1); } + vty_init(&vty_info); handle_options(argc, argv); + hlr_vty_init(&hlr_log_info); + + rc = vty_read_config_file(cmdline_opts.config_file, NULL); + if (rc < 0) { + LOGP(DMAIN, LOGL_FATAL, + "Failed to parse the config file: '%s'\n", + cmdline_opts.config_file); + return rc; + } + + /* start telnet after reading config for vty_get_bind_addr() */ + rc = telnet_init_dynif(hlr_ctx, NULL, vty_get_bind_addr(), + OSMO_VTY_PORT_HLR); + if (rc < 0) + return rc; LOGP(DMAIN, LOGL_NOTICE, "hlr starting\n"); diff --git a/src/hlr_vty.c b/src/hlr_vty.c new file mode 100644 index 0000000..4ac2d94 --- /dev/null +++ b/src/hlr_vty.c @@ -0,0 +1,60 @@ +/* OsmoHLR VTY implementation */ + +/* (C) 2016 sysmocom s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Neels Hofmeyr + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero 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 Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include +#include +#include + +#include "hlr_vty.h" + +int hlr_vty_go_parent(struct vty *vty) +{ + switch (vty->node) { + /* space for future nodes... */ + default: + if (hlr_vty_is_config_node(vty, vty->node)) + vty->node = CONFIG_NODE; + else + vty->node = ENABLE_NODE; + + vty->index = NULL; + } + + return vty->node; +} + +int hlr_vty_is_config_node(struct vty *vty, int node) +{ + switch (node) { + /* add items that are not config */ + case CONFIG_NODE: + return 0; + + default: + return 1; + } +} + +void hlr_vty_init(const struct log_info *cat) +{ + logging_vty_add_cmds(cat); +} diff --git a/src/hlr_vty.h b/src/hlr_vty.h new file mode 100644 index 0000000..16c633a --- /dev/null +++ b/src/hlr_vty.h @@ -0,0 +1,30 @@ +/* OsmoHLR VTY implementation */ + +/* (C) 2016 sysmocom s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Neels Hofmeyr + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero 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 Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#pragma once + +#include +#include + +int hlr_vty_go_parent(struct vty *vty); +int hlr_vty_is_config_node(struct vty *vty, int node); +void hlr_vty_init(const struct log_info *cat); -- To view, visit https://gerrit.osmocom.org/1707 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iedb884345a597371a337b0c67eb6013b7d5d1ce1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Jan 30 12:50:35 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 30 Jan 2017 12:50:35 +0000 Subject: [PATCH] osmo-hlr[master]: sql: fix 3g_auc's column K data type Message-ID: Review at https://gerrit.osmocom.org/1708 sql: fix 3g_auc's column K data type K is the SIM card's 128bit secret key, so the type should be VARCHAR like the other key columns. The db code already reads the column as text and parses as hex, so a VARCHAR column matches that. Change-Id: Iaa8d33e303760bd15dcb7dc8bb8b9b24bf6c8f14 --- M sql/hlr.sql 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/08/1708/1 diff --git a/sql/hlr.sql b/sql/hlr.sql index 5f0950c..ab9d173 100644 --- a/sql/hlr.sql +++ b/sql/hlr.sql @@ -60,7 +60,7 @@ CREATE TABLE auc_3g ( subscriber_id INTEGER PRIMARY KEY, -- subscriber.id algo_id_3g INTEGER NOT NULL, - k INTEGER NOT NULL, + k VARCHAR(32) NOT NULL, op VARCHAR, opc VARCHAR, sqn INTEGER -- To view, visit https://gerrit.osmocom.org/1708 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaa8d33e303760bd15dcb7dc8bb8b9b24bf6c8f14 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Jan 30 12:50:37 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 30 Jan 2017 12:50:37 +0000 Subject: [PATCH] osmo-hlr[master]: comment: sql: describe auc_2g and auc_3g columns Message-ID: Review at https://gerrit.osmocom.org/1709 comment: sql: describe auc_2g and auc_3g columns Change-Id: Ie4edc69ff11a83a4c0f79097f43a2cb206dfe405 --- M sql/hlr.sql 1 file changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/09/1709/1 diff --git a/sql/hlr.sql b/sql/hlr.sql index ab9d173..2055840 100644 --- a/sql/hlr.sql +++ b/sql/hlr.sql @@ -53,17 +53,17 @@ CREATE TABLE auc_2g ( subscriber_id INTEGER PRIMARY KEY, -- subscriber.id - algo_id_2g INTEGER NOT NULL, - ki VARCHAR NOT NULL + algo_id_2g INTEGER NOT NULL, -- enum osmo_auth_algo value + ki VARCHAR NOT NULL -- hex string: subscriber's secret key (128bit) ); CREATE TABLE auc_3g ( subscriber_id INTEGER PRIMARY KEY, -- subscriber.id - algo_id_3g INTEGER NOT NULL, - k VARCHAR(32) NOT NULL, - op VARCHAR, - opc VARCHAR, - sqn INTEGER + algo_id_3g INTEGER NOT NULL, -- enum osmo_auth_algo value + k VARCHAR(32) NOT NULL, -- hex string: subscriber's secret key (128bit) + op VARCHAR(32), -- hex string: operator's secret key (128bit) + opc VARCHAR(32), -- hex string: derived from OP and K (128bit) + sqn INTEGER NOT NULL DEFAULT 0 -- sequence number of key usage ); CREATE UNIQUE INDEX IF NOT EXISTS idx_subscr_imsi ON subscriber (imsi); -- To view, visit https://gerrit.osmocom.org/1709 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie4edc69ff11a83a4c0f79097f43a2cb206dfe405 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Jan 30 12:52:14 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 30 Jan 2017 12:52:14 +0000 Subject: libosmocore[master]: utils/conv_gen.py: improve application flexibility In-Reply-To: References: Message-ID: Patch Set 4: > Why use getopt and not argparse as max suggested ? > It's way more "pythonic". Well, I use the getopt habitually... Didn't use argparse so far... Is it mandatory? -- To view, visit https://gerrit.osmocom.org/1584 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0b476b00234c17f78b41d695cf3bfd13edb64c28 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Jan 30 18:06:25 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 30 Jan 2017 18:06:25 +0000 Subject: [PATCH] osmo-bts[master]: octphy: Fix vty write command Message-ID: Review at https://gerrit.osmocom.org/1710 octphy: Fix vty write command When issuing a write command via VTY, the generated configuration will be unreadable. The problem only affacts osmo-bts-octphy since the bug resides in octphy_vty.c only. Appeareantly the config file is generated in an out dated syntax. This patch upgrades the write functionality so that it can generate valid config files. Change-Id: Ib018e07e332aa8a6144fb2d87889032bd5fc2533 --- M src/osmo-bts-octphy/octphy_vty.c 1 file changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/10/1710/1 diff --git a/src/osmo-bts-octphy/octphy_vty.c b/src/osmo-bts-octphy/octphy_vty.c index e134fc5..d2dd8a6 100644 --- a/src/osmo-bts-octphy/octphy_vty.c +++ b/src/osmo-bts-octphy/octphy_vty.c @@ -200,10 +200,10 @@ void bts_model_config_write_phy(struct vty *vty, struct phy_link *plink) { if (plink->u.octphy.netdev_name) - vty_out(vty, " netdev %s%s", plink->u.octphy.netdev_name, - VTY_NEWLINE); + vty_out(vty, " octphy net-device %s%s", + plink->u.octphy.netdev_name, VTY_NEWLINE); - vty_out(vty, " hw-addr %02x:%02x:%02x:%02x:%02x:%02x%s", + vty_out(vty, " octphy hw-addr %02x:%02x:%02x:%02x:%02x:%02x%s", plink->u.octphy.phy_addr.sll_addr[0], plink->u.octphy.phy_addr.sll_addr[1], plink->u.octphy.phy_addr.sll_addr[2], @@ -211,16 +211,16 @@ plink->u.octphy.phy_addr.sll_addr[4], plink->u.octphy.phy_addr.sll_addr[5], VTY_NEWLINE); - vty_out(vty, " rx-gain %u%s", plink->u.octphy.rx_gain_db, + vty_out(vty, " octphy rx-gain %u%s", plink->u.octphy.rx_gain_db, VTY_NEWLINE); if (plink->u.octphy.tx_atten_flag) { - vty_out(vty, " tx-attenuation %u%s", + vty_out(vty, " octphy tx-attenuation %u%s", plink->u.octphy.tx_atten_db, VTY_NEWLINE); } else - vty_out(vty, " tx-attenuation oml%s", VTY_NEWLINE); + vty_out(vty, " octphy tx-attenuation oml%s", VTY_NEWLINE); - vty_out(vty, " rf-port-index %u%s", plink->u.octphy.rf_port_index, + vty_out(vty, " octphy rf-port-index %u%s", plink->u.octphy.rf_port_index, VTY_NEWLINE); } -- To view, visit https://gerrit.osmocom.org/1710 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib018e07e332aa8a6144fb2d87889032bd5fc2533 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Mon Jan 30 18:10:36 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 30 Jan 2017 18:10:36 +0000 Subject: [PATCH] osmo-bts[master]: octphy: Fix VTY commands Message-ID: Review at https://gerrit.osmocom.org/1711 octphy: Fix VTY commands The VTY commands show phy 0 rf-port-stats and show phy 0 clk-sync-stats do not output their results on the VTY console. If one of those commands is entered the user is prompted to view the logtext. This commit fixes the problem Change-Id: Iae5aa91fe2ebba7c2874eed88b15ed66e8c9cd61 --- M src/osmo-bts-octphy/octphy_hw_api.c M src/osmo-bts-octphy/octphy_hw_api.h M src/osmo-bts-octphy/octphy_vty.c 3 files changed, 120 insertions(+), 45 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/11/1711/1 diff --git a/src/osmo-bts-octphy/octphy_hw_api.c b/src/osmo-bts-octphy/octphy_hw_api.c index dc23676..6666f77 100644 --- a/src/osmo-bts-octphy/octphy_hw_api.c +++ b/src/osmo-bts-octphy/octphy_hw_api.c @@ -29,6 +29,7 @@ #include "l1_if.h" #include "l1_oml.h" #include "l1_utils.h" +#include "octphy_hw_api.h" #include #include @@ -105,18 +106,12 @@ return l1if_req_compl(fl1h, msg, rf_port_info_compl_cb, NULL); } -static const struct value_string radio_std_vals[] = { - { cOCTVC1_RADIO_STANDARD_ENUM_GSM, "GSM" }, - { cOCTVC1_RADIO_STANDARD_ENUM_UMTS, "UMTS" }, - { cOCTVC1_RADIO_STANDARD_ENUM_LTE, "LTE" }, - { cOCTVC1_RADIO_STANDARD_ENUM_INVALID, "INVALID" }, - { 0, NULL } -}; - /* Chapter 12.10 */ static int rf_port_stats_compl_cb(struct octphy_hdl *fl1, struct msgb *resp, void *data) { + struct octphy_hw_get_cb_data *get_cb_data; + tOCTVC1_HW_MSG_RF_PORT_STATS_RSP *psr = (tOCTVC1_HW_MSG_RF_PORT_STATS_RSP *) resp->l2h; @@ -136,12 +131,16 @@ psr->TxStats.ulTxAveragePeriodUs, psr->TxStats.ulFrequencyKhz); + get_cb_data = (struct octphy_hw_get_cb_data*) data; + get_cb_data->cb(resp,get_cb_data->data); + msgb_free(resp); return 0; } /* Chapter 12.10 */ -int octphy_hw_get_rf_port_stats(struct octphy_hdl *fl1h, uint32_t index) +int octphy_hw_get_rf_port_stats(struct octphy_hdl *fl1h, uint32_t index, + struct octphy_hw_get_cb_data *cb_data) { struct msgb *msg = l1p_msgb_alloc(); tOCTVC1_HW_MSG_RF_PORT_STATS_CMD *psc; @@ -156,7 +155,7 @@ mOCTVC1_HW_MSG_RF_PORT_STATS_CMD_SWAP(psc); - return l1if_req_compl(fl1h, msg, rf_port_stats_compl_cb, NULL); + return l1if_req_compl(fl1h, msg, rf_port_stats_compl_cb, cb_data); } static const struct value_string rx_gain_mode_vals[] = { @@ -276,28 +275,6 @@ { 0, NULL } }; -static const struct value_string clocksync_state_vals[] = { - { cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_UNINITIALIZE, - "Uninitialized" }, -/* Note: Octasic renamed cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_UNUSED to - * cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_IDLE. The following ifdef - * statement ensures that older headers still work. */ -#ifdef cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_UNUSED - { cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_UNUSED, "Unused" }, -#else - { cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_IDLE, "Idle" }, -#endif - { cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_NO_EXT_CLOCK, - "No External Clock" }, - { cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_LOCKED, "Locked" }, - { cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_UNLOCKED,"Unlocked" }, - { cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_ERROR, "Error" }, - { cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_DISABLE, "Disabled" }, - { cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_LOSS_EXT_CLOCK, - "Loss of Ext Clock" }, - { 0, NULL } -}; - /* Chapter 12.15 */ static int get_clock_sync_compl_cb(struct octphy_hdl *fl1, struct msgb *resp, void *data) @@ -336,6 +313,8 @@ static int get_clock_sync_stats_cb(struct octphy_hdl *fl1, struct msgb *resp, void *data) { + struct octphy_hw_get_cb_data *get_cb_data; + tOCTVC1_HW_MSG_CLOCK_SYNC_MGR_STATS_RSP *csr = (tOCTVC1_HW_MSG_CLOCK_SYNC_MGR_STATS_RSP *) resp->l2h; @@ -349,12 +328,16 @@ csr->ulPllFractionalFreqHz, csr->ulSlipCnt, csr->ulSyncLosseCnt, csr->ulSourceState, csr->ulDacValue); + get_cb_data = (struct octphy_hw_get_cb_data*) data; + get_cb_data->cb(resp,get_cb_data->data); + msgb_free(resp); return 0; } /* Chapter 12.16 */ -int octphy_hw_get_clock_sync_stats(struct octphy_hdl *fl1h) +int octphy_hw_get_clock_sync_stats(struct octphy_hdl *fl1h, + struct octphy_hw_get_cb_data *cb_data) { struct msgb *msg = l1p_msgb_alloc(); tOCTVC1_HW_MSG_CLOCK_SYNC_MGR_STATS_CMD *csc; @@ -366,6 +349,6 @@ mOCTVC1_HW_MSG_CLOCK_SYNC_MGR_STATS_CMD_SWAP(csc); - return l1if_req_compl(fl1h, msg, get_clock_sync_stats_cb, NULL); + return l1if_req_compl(fl1h, msg, get_clock_sync_stats_cb, cb_data); } diff --git a/src/osmo-bts-octphy/octphy_hw_api.h b/src/osmo-bts-octphy/octphy_hw_api.h index bc8ab68..78b7208 100644 --- a/src/osmo-bts-octphy/octphy_hw_api.h +++ b/src/osmo-bts-octphy/octphy_hw_api.h @@ -2,13 +2,53 @@ #include #include "l1_if.h" +#include + +static const struct value_string radio_std_vals[] = { + { cOCTVC1_RADIO_STANDARD_ENUM_GSM, "GSM" }, + { cOCTVC1_RADIO_STANDARD_ENUM_UMTS, "UMTS" }, + { cOCTVC1_RADIO_STANDARD_ENUM_LTE, "LTE" }, + { cOCTVC1_RADIO_STANDARD_ENUM_INVALID, "INVALID" }, + { 0, NULL } +}; + +static const struct value_string clocksync_state_vals[] = { + { cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_UNINITIALIZE, + "Uninitialized" }, +/* Note: Octasic renamed cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_UNUSED to + * cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_IDLE. The following ifdef + * statement ensures that older headers still work. */ +#ifdef cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_UNUSED + { cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_UNUSED, "Unused" }, +#else + { cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_IDLE, "Idle" }, +#endif + { cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_NO_EXT_CLOCK, + "No External Clock" }, + { cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_LOCKED, "Locked" }, + { cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_UNLOCKED,"Unlocked" }, + { cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_ERROR, "Error" }, + { cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_DISABLE, "Disabled" }, + { cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_LOSS_EXT_CLOCK, + "Loss of Ext Clock" }, + { 0, NULL } +}; + +typedef void octphy_hw_get_cb(struct msgb *resp, void *data); + +struct octphy_hw_get_cb_data { + octphy_hw_get_cb* cb; + void *data; +}; int octphy_hw_get_pcb_info(struct octphy_hdl *fl1h); int octphy_hw_get_rf_port_info(struct octphy_hdl *fl1h, uint32_t index); -int octphy_hw_get_rf_port_stats(struct octphy_hdl *fl1h, uint32_t index); +int octphy_hw_get_rf_port_stats(struct octphy_hdl *fl1h, uint32_t index, + struct octphy_hw_get_cb_data *cb_data); int octphy_hw_get_rf_ant_rx_config(struct octphy_hdl *fl1h, uint32_t port_idx, uint32_t ant_idx); int octphy_hw_get_rf_ant_tx_config(struct octphy_hdl *fl1h, uint32_t port_idx, uint32_t ant_idx); int octphy_hw_get_clock_sync_info(struct octphy_hdl *fl1h); -int octphy_hw_get_clock_sync_stats(struct octphy_hdl *fl1h); +int octphy_hw_get_clock_sync_stats(struct octphy_hdl *fl1h, + struct octphy_hw_get_cb_data *cb_data); diff --git a/src/osmo-bts-octphy/octphy_vty.c b/src/osmo-bts-octphy/octphy_vty.c index e134fc5..659ddef 100644 --- a/src/osmo-bts-octphy/octphy_vty.c +++ b/src/osmo-bts-octphy/octphy_vty.c @@ -164,6 +164,36 @@ return CMD_SUCCESS; } +void show_rf_port_stats_cb(struct msgb *resp, void *data) +{ + struct vty *vty = (struct vty*) data; + + tOCTVC1_HW_MSG_RF_PORT_STATS_RSP *psr = + (tOCTVC1_HW_MSG_RF_PORT_STATS_RSP *) resp->l2h; + + vty_out(vty,"%s", VTY_NEWLINE); + vty_out(vty,"RF-PORT-STATS:%s", VTY_NEWLINE); + vty_out(vty,"Idx=%d%s", psr->ulPortIndex, VTY_NEWLINE); + vty_out(vty,"RadioStandard=%s%s", + get_value_string(radio_std_vals, psr->ulRadioStandard), + VTY_NEWLINE); + vty_out(vty,"Rx Bytes=%u%s", psr->RxStats.ulRxByteCnt, VTY_NEWLINE); + vty_out(vty,"Rx Overflow=%u%s", psr->RxStats.ulRxOverflowCnt, VTY_NEWLINE); + vty_out(vty,"Rx AvgBps=%u%s", psr->RxStats.ulRxAverageBytePerSecond, + VTY_NEWLINE); + vty_out(vty,"Rx Period=%u%s", psr->RxStats.ulRxAveragePeriodUs, + VTY_NEWLINE); + vty_out(vty,"Rx Freq=%u%s", psr->RxStats.ulFrequencyKhz, VTY_NEWLINE); + vty_out(vty,"Tx Bytes=%u%s", psr->TxStats.ulTxByteCnt, VTY_NEWLINE); + vty_out(vty,"Tx Underflow=%u%s", psr->TxStats.ulTxUnderflowCnt, + VTY_NEWLINE); + vty_out(vty,"Tx AvgBps=%u%s", psr->TxStats.ulTxAverageBytePerSecond, + VTY_NEWLINE); + vty_out(vty,"Tx Period=%u%s", psr->TxStats.ulTxAveragePeriodUs, + VTY_NEWLINE); + vty_out(vty,"Tx Freq=%u%s", psr->TxStats.ulFrequencyKhz, VTY_NEWLINE); +} + DEFUN(show_rf_port_stats, show_rf_port_stats_cmd, "show phy <0-255> rf-port-stats <0-1>", "Show statistics for the RF Port\n" @@ -171,14 +201,37 @@ { int phy_nr = atoi(argv[0]); struct phy_link *plink = phy_link_by_num(phy_nr); + struct octphy_hw_get_cb_data cb_data; - octphy_hw_get_rf_port_stats(plink->u.octphy.hdl, atoi(argv[1])); + cb_data.cb = show_rf_port_stats_cb; + cb_data.data = vty; - /* FIXME: Actually print to VTY, not just log */ - vty_out(vty, "Please check the log file for the response%s", - VTY_NEWLINE); + octphy_hw_get_rf_port_stats(plink->u.octphy.hdl, atoi(argv[1]), + &cb_data); return CMD_SUCCESS; +} + +void show_clk_sync_stats_cb(struct msgb *resp, void *data) +{ + struct vty *vty = (struct vty*) data; + + tOCTVC1_HW_MSG_CLOCK_SYNC_MGR_STATS_RSP *csr = + (tOCTVC1_HW_MSG_CLOCK_SYNC_MGR_STATS_RSP *) resp->l2h; + + vty_out(vty,"%s", VTY_NEWLINE); + vty_out(vty,"CLOCK-SYNC-MGR-STATS:%s", VTY_NEWLINE); + vty_out(vty,"State=%s%s", + get_value_string(clocksync_state_vals, csr->ulState), + VTY_NEWLINE); + vty_out(vty,"ClockError=%d%s", csr->lClockError, VTY_NEWLINE); + vty_out(vty,"DroppedCycles=%d%s", csr->lDroppedCycles, VTY_NEWLINE); + vty_out(vty,"PllFreqHz=%u%s", csr->ulPllFreqHz, VTY_NEWLINE); + vty_out(vty,"PllFract=%u%s", csr->ulPllFractionalFreqHz, VTY_NEWLINE); + vty_out(vty,"SlipCnt=%u%s", csr->ulSlipCnt, VTY_NEWLINE); + vty_out(vty,"SyncLosses=%u%s", csr->ulSyncLosseCnt, VTY_NEWLINE); + vty_out(vty,"SourceState=%u%s", csr->ulSourceState, VTY_NEWLINE); + vty_out(vty,"DacValue=%u%s", csr->ulDacValue, VTY_NEWLINE); } DEFUN(show_clk_sync_stats, show_clk_sync_stats_cmd, @@ -187,13 +240,12 @@ { int phy_nr = atoi(argv[0]); struct phy_link *plink = phy_link_by_num(phy_nr); + struct octphy_hw_get_cb_data cb_data; - octphy_hw_get_clock_sync_stats(plink->u.octphy.hdl); + cb_data.cb = show_clk_sync_stats_cb; + cb_data.data = vty; - /* FIXME: Actually print to VTY, not just log */ - vty_out(vty, "Please check the log file for the response%s", - VTY_NEWLINE); - + octphy_hw_get_clock_sync_stats(plink->u.octphy.hdl, &cb_data); return CMD_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/1711 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iae5aa91fe2ebba7c2874eed88b15ed66e8c9cd61 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Mon Jan 30 18:13:53 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 30 Jan 2017 18:13:53 +0000 Subject: [PATCH] osmo-bts[master]: cosmetic: Remove stray newlines Message-ID: Review at https://gerrit.osmocom.org/1712 cosmetic: Remove stray newlines Remove straying newlines in octphy_vty.c Change-Id: I33f5c4a3f40c0299a7cdb9c62094f0f914edfc98 --- M src/osmo-bts-octphy/octphy_vty.c 1 file changed, 0 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/12/1712/1 diff --git a/src/osmo-bts-octphy/octphy_vty.c b/src/osmo-bts-octphy/octphy_vty.c index e134fc5..fce58a3 100644 --- a/src/osmo-bts-octphy/octphy_vty.c +++ b/src/osmo-bts-octphy/octphy_vty.c @@ -141,11 +141,6 @@ "Use tx-attenuation according to OML instructions from BSC\n" "Fixed tx-attenuation in quarter-dB\n") { - - - - - struct phy_link *plink = vty->index; if (plink->state != PHY_LINK_SHUTDOWN) { -- To view, visit https://gerrit.osmocom.org/1712 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I33f5c4a3f40c0299a7cdb9c62094f0f914edfc98 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Mon Jan 30 22:31:49 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 30 Jan 2017 22:31:49 +0000 Subject: [PATCH] osmo-hlr[master]: main: add option parsing with db file and default options In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1706 to look at the new patch set (#2). main: add option parsing with db file and default options Parse commandline options, supporting general Osmocom options as copied from osmo-nitb (bsc_hack.c): version, logging and daemonize options. Set the HLR database file from cmdline option, log the filename in db_open(). (VTY config file in next patch.) Change-Id: I279d517e1310e398b0a2382349e62be8e65364c1 --- M src/db.c M src/hlr.c 2 files changed, 91 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/06/1706/2 diff --git a/src/db.c b/src/db.c index 9d4e99e..1385502 100644 --- a/src/db.c +++ b/src/db.c @@ -75,6 +75,7 @@ unsigned int i; int rc; + LOGP(DDB, LOGL_NOTICE, "using database: %s\n", fname); LOGP(DDB, LOGL_INFO, "Compiled against SQLite3 lib version %s\n", SQLITE_VERSION); LOGP(DDB, LOGL_INFO, "Running with SQLite3 lib version %s\n", sqlite3_libversion()); diff --git a/src/hlr.c b/src/hlr.c index 03c4435..ad11758 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -20,6 +20,9 @@ #include #include +#define _GNU_SOURCE +#include + #include #include #include @@ -516,6 +519,82 @@ return 0; } +static void print_usage() +{ + printf("Usage: osmo-hlr\n"); +} + +static void print_help() +{ + printf(" -h --help This text.\n"); + printf(" -l --database db-name The database to use.\n"); + printf(" -d option --debug=DRLL:DCC:DMM:DRR:DRSL:DNM Enable debugging.\n"); + printf(" -D --daemonize Fork the process into a background daemon.\n"); + printf(" -s --disable-color Do not print ANSI colors in the log\n"); + printf(" -T --timestamp Prefix every log line with a timestamp.\n"); + printf(" -e --log-level number Set a global loglevel.\n"); +} + +struct { + const char *db_file; + bool daemonize; +} cmdline_opts = { + .db_file = "hlr.db", + .daemonize = false, +}; + +static void handle_options(int argc, char **argv) +{ + while (1) { + int option_index = 0, c; + static struct option long_options[] = { + {"help", 0, 0, 'h'}, + {"database", 1, 0, 'l'}, + {"debug", 1, 0, 'd'}, + {"daemonize", 0, 0, 'D'}, + {"disable-color", 0, 0, 's'}, + {"log-level", 1, 0, 'e'}, + {"timestamp", 0, 0, 'T'}, + {0, 0, 0, 0} + }; + + c = getopt_long(argc, argv, "hl:d:Dse:T", + long_options, &option_index); + if (c == -1) + break; + + switch (c) { + case 'h': + print_usage(); + print_help(); + exit(0); + case 'l': + cmdline_opts.db_file = optarg; + break; + case 'd': + log_parse_category_mask(osmo_stderr_target, optarg); + break; + case 'D': + cmdline_opts.daemonize = 1; + break; + case 's': + log_set_use_color(osmo_stderr_target, 0); + break; + case 'e': + log_set_log_level(osmo_stderr_target, atoi(optarg)); + break; + case 'T': + log_set_print_timestamp(osmo_stderr_target, 1); + break; + default: + /* catch unknown options *as well as* missing arguments. */ + fprintf(stderr, "Error in command line options. Exiting.\n"); + exit(-1); + break; + } + } +} + void *hlr_ctx = NULL; static struct osmo_gsup_server *gs; @@ -549,6 +628,9 @@ fprintf(stderr, "Error initializing logging\n"); exit(1); } + + handle_options(argc, argv); + LOGP(DMAIN, LOGL_NOTICE, "hlr starting\n"); rc = rand_init(); @@ -557,7 +639,7 @@ exit(1); } - g_dbc = db_open(hlr_ctx, "hlr.db"); + g_dbc = db_open(hlr_ctx, cmdline_opts.db_file); if (!g_dbc) { LOGP(DMAIN, LOGL_FATAL, "Error opening database\n"); exit(1); @@ -573,7 +655,13 @@ signal(SIGINT, &signal_hdlr); signal(SIGUSR1, &signal_hdlr); - //osmo_daemonize(); + if (cmdline_opts.daemonize) { + rc = osmo_daemonize(); + if (rc < 0) { + perror("Error during daemonize"); + exit(1); + } + } while (1) { osmo_select_main(0); -- To view, visit https://gerrit.osmocom.org/1706 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I279d517e1310e398b0a2382349e62be8e65364c1 Gerrit-PatchSet: 2 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Jan 30 22:31:49 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 30 Jan 2017 22:31:49 +0000 Subject: [PATCH] osmo-hlr[master]: main: add VTY and '-c config-file' option In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1707 to look at the new patch set (#2). main: add VTY and '-c config-file' option Add config file, mainly for logging control. Open VTY on the OMSO_VTY_PORT_HLR added to libosmocore in commit 92fa18e6b800a27aa064a5fb8321cddd7383ae20 aka change-id I08cb52d9399a27e6876e45da36f434708c4fddef. Add hlr_vty.h/c for standard VTY setup. Add -c option to pass config file. Add --version option. Change-Id: Iedb884345a597371a337b0c67eb6013b7d5d1ce1 --- M src/Makefile.am M src/hlr.c A src/hlr_vty.c A src/hlr_vty.h 4 files changed, 134 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/07/1707/2 diff --git a/src/Makefile.am b/src/Makefile.am index 6c6c9e6..9bbc13e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -18,6 +18,7 @@ gsup_server.h \ logging.h \ rand.h \ + hlr_vty.h \ $(NULL) bin_PROGRAMS = \ @@ -38,6 +39,7 @@ hlr.c \ logging.c \ rand_urandom.c \ + hlr_vty.c \ $(NULL) osmo_hlr_LDADD = \ diff --git a/src/hlr.c b/src/hlr.c index ad11758..35ff10e 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -29,12 +29,17 @@ #include #include #include +#include +#include +#include +#include #include "db.h" #include "logging.h" #include "gsup_server.h" #include "gsup_router.h" #include "rand.h" +#include "hlr_vty.h" static struct db_context *g_dbc; @@ -527,18 +532,22 @@ static void print_help() { printf(" -h --help This text.\n"); + printf(" -c --config-file filename The config file to use.\n"); printf(" -l --database db-name The database to use.\n"); printf(" -d option --debug=DRLL:DCC:DMM:DRR:DRSL:DNM Enable debugging.\n"); printf(" -D --daemonize Fork the process into a background daemon.\n"); printf(" -s --disable-color Do not print ANSI colors in the log\n"); printf(" -T --timestamp Prefix every log line with a timestamp.\n"); printf(" -e --log-level number Set a global loglevel.\n"); + printf(" -V --version Print the version of OsmoHLR.\n"); } struct { + const char *config_file; const char *db_file; bool daemonize; } cmdline_opts = { + .config_file = "osmo-hlr.cfg", .db_file = "hlr.db", .daemonize = false, }; @@ -549,16 +558,18 @@ int option_index = 0, c; static struct option long_options[] = { {"help", 0, 0, 'h'}, + {"config-file", 1, 0, 'c'}, {"database", 1, 0, 'l'}, {"debug", 1, 0, 'd'}, {"daemonize", 0, 0, 'D'}, {"disable-color", 0, 0, 's'}, {"log-level", 1, 0, 'e'}, {"timestamp", 0, 0, 'T'}, + {"version", 0, 0, 'V' }, {0, 0, 0, 0} }; - c = getopt_long(argc, argv, "hl:d:Dse:T", + c = getopt_long(argc, argv, "hc:l:d:Dse:TV", long_options, &option_index); if (c == -1) break; @@ -568,6 +579,9 @@ print_usage(); print_help(); exit(0); + case 'c': + cmdline_opts.config_file = optarg; + break; case 'l': cmdline_opts.db_file = optarg; break; @@ -585,6 +599,10 @@ break; case 'T': log_set_print_timestamp(osmo_stderr_target, 1); + break; + case 'V': + print_version(1); + exit(0); break; default: /* catch unknown options *as well as* missing arguments. */ @@ -616,6 +634,13 @@ } } +static struct vty_app_info vty_info = { + .name = "OsmoHLR", + .version = PACKAGE_VERSION, + .go_parent_cb = hlr_vty_go_parent, + .is_config_node = hlr_vty_is_config_node, +}; + int main(int argc, char **argv) { int rc; @@ -629,7 +654,23 @@ exit(1); } + vty_init(&vty_info); handle_options(argc, argv); + hlr_vty_init(&hlr_log_info); + + rc = vty_read_config_file(cmdline_opts.config_file, NULL); + if (rc < 0) { + LOGP(DMAIN, LOGL_FATAL, + "Failed to parse the config file: '%s'\n", + cmdline_opts.config_file); + return rc; + } + + /* start telnet after reading config for vty_get_bind_addr() */ + rc = telnet_init_dynif(hlr_ctx, NULL, vty_get_bind_addr(), + OSMO_VTY_PORT_HLR); + if (rc < 0) + return rc; LOGP(DMAIN, LOGL_NOTICE, "hlr starting\n"); diff --git a/src/hlr_vty.c b/src/hlr_vty.c new file mode 100644 index 0000000..4ac2d94 --- /dev/null +++ b/src/hlr_vty.c @@ -0,0 +1,60 @@ +/* OsmoHLR VTY implementation */ + +/* (C) 2016 sysmocom s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Neels Hofmeyr + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero 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 Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include +#include +#include + +#include "hlr_vty.h" + +int hlr_vty_go_parent(struct vty *vty) +{ + switch (vty->node) { + /* space for future nodes... */ + default: + if (hlr_vty_is_config_node(vty, vty->node)) + vty->node = CONFIG_NODE; + else + vty->node = ENABLE_NODE; + + vty->index = NULL; + } + + return vty->node; +} + +int hlr_vty_is_config_node(struct vty *vty, int node) +{ + switch (node) { + /* add items that are not config */ + case CONFIG_NODE: + return 0; + + default: + return 1; + } +} + +void hlr_vty_init(const struct log_info *cat) +{ + logging_vty_add_cmds(cat); +} diff --git a/src/hlr_vty.h b/src/hlr_vty.h new file mode 100644 index 0000000..16c633a --- /dev/null +++ b/src/hlr_vty.h @@ -0,0 +1,30 @@ +/* OsmoHLR VTY implementation */ + +/* (C) 2016 sysmocom s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Neels Hofmeyr + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero 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 Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#pragma once + +#include +#include + +int hlr_vty_go_parent(struct vty *vty); +int hlr_vty_is_config_node(struct vty *vty, int node); +void hlr_vty_init(const struct log_info *cat); -- To view, visit https://gerrit.osmocom.org/1707 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iedb884345a597371a337b0c67eb6013b7d5d1ce1 Gerrit-PatchSet: 2 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Jan 30 22:32:18 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 30 Jan 2017 22:32:18 +0000 Subject: [PATCH] osmo-hlr[master]: sql: fix 3g_auc's column K data type In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1708 to look at the new patch set (#2). sql: fix 3g_auc's column K data type K is the SIM card's 128bit secret key, so the type should be VARCHAR like the other key columns. The db code already reads the column as text and parses as hex, so a VARCHAR column matches that. Change-Id: Iaa8d33e303760bd15dcb7dc8bb8b9b24bf6c8f14 --- M sql/hlr.sql 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/08/1708/2 diff --git a/sql/hlr.sql b/sql/hlr.sql index 5f0950c..ab9d173 100644 --- a/sql/hlr.sql +++ b/sql/hlr.sql @@ -60,7 +60,7 @@ CREATE TABLE auc_3g ( subscriber_id INTEGER PRIMARY KEY, -- subscriber.id algo_id_3g INTEGER NOT NULL, - k INTEGER NOT NULL, + k VARCHAR(32) NOT NULL, op VARCHAR, opc VARCHAR, sqn INTEGER -- To view, visit https://gerrit.osmocom.org/1708 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iaa8d33e303760bd15dcb7dc8bb8b9b24bf6c8f14 Gerrit-PatchSet: 2 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Jan 30 22:32:18 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 30 Jan 2017 22:32:18 +0000 Subject: [PATCH] osmo-hlr[master]: comment: sql: describe auc_2g and auc_3g columns In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1709 to look at the new patch set (#2). comment: sql: describe auc_2g and auc_3g columns Change-Id: Ie4edc69ff11a83a4c0f79097f43a2cb206dfe405 --- M sql/hlr.sql 1 file changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/09/1709/2 diff --git a/sql/hlr.sql b/sql/hlr.sql index ab9d173..2055840 100644 --- a/sql/hlr.sql +++ b/sql/hlr.sql @@ -53,17 +53,17 @@ CREATE TABLE auc_2g ( subscriber_id INTEGER PRIMARY KEY, -- subscriber.id - algo_id_2g INTEGER NOT NULL, - ki VARCHAR NOT NULL + algo_id_2g INTEGER NOT NULL, -- enum osmo_auth_algo value + ki VARCHAR NOT NULL -- hex string: subscriber's secret key (128bit) ); CREATE TABLE auc_3g ( subscriber_id INTEGER PRIMARY KEY, -- subscriber.id - algo_id_3g INTEGER NOT NULL, - k VARCHAR(32) NOT NULL, - op VARCHAR, - opc VARCHAR, - sqn INTEGER + algo_id_3g INTEGER NOT NULL, -- enum osmo_auth_algo value + k VARCHAR(32) NOT NULL, -- hex string: subscriber's secret key (128bit) + op VARCHAR(32), -- hex string: operator's secret key (128bit) + opc VARCHAR(32), -- hex string: derived from OP and K (128bit) + sqn INTEGER NOT NULL DEFAULT 0 -- sequence number of key usage ); CREATE UNIQUE INDEX IF NOT EXISTS idx_subscr_imsi ON subscriber (imsi); -- To view, visit https://gerrit.osmocom.org/1709 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie4edc69ff11a83a4c0f79097f43a2cb206dfe405 Gerrit-PatchSet: 2 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Jan 31 10:38:55 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 31 Jan 2017 10:38:55 +0000 Subject: [PATCH] osmo-bts[master]: cosmetic: remove stray newline Message-ID: Review at https://gerrit.osmocom.org/1713 cosmetic: remove stray newline Remove straying newline in l1_oml.c Change-Id: I6b60e5ee03b9afe6595bf44c4a963d23d03a4eb7 --- M src/osmo-bts-octphy/l1_oml.c 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/13/1713/1 diff --git a/src/osmo-bts-octphy/l1_oml.c b/src/osmo-bts-octphy/l1_oml.c index da8ff03..08516ef 100644 --- a/src/osmo-bts-octphy/l1_oml.c +++ b/src/osmo-bts-octphy/l1_oml.c @@ -563,8 +563,7 @@ } static int mph_info_chan_confirm(struct gsm_lchan *lchan, - - enum osmo_mph_info_type type, uint8_t cause) + enum osmo_mph_info_type type, uint8_t cause) { struct osmo_phsap_prim l1sap; -- To view, visit https://gerrit.osmocom.org/1713 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6b60e5ee03b9afe6595bf44c4a963d23d03a4eb7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Tue Jan 31 10:39:30 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 Jan 2017 10:39:30 +0000 Subject: [PATCH] osmo-bts[master]: octphy VTY: fix vty write output for octphy's phy section In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1710 to look at the new patch set (#2). octphy VTY: fix vty write output for octphy's phy section Fix invalid configuration generated by VTY 'write' command for the 'phy' section of osmo-bts-octphy. The problem was introduced during refactoring commit d784e50747b8cf0ce505489e1451f75be5ccbd4b (Sat Jan 9 13:13:37 2016 +0100, "Introduce new phy_link and phy_instance abstraction") Change-Id: Ib018e07e332aa8a6144fb2d87889032bd5fc2533 --- M src/osmo-bts-octphy/octphy_vty.c 1 file changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/10/1710/2 diff --git a/src/osmo-bts-octphy/octphy_vty.c b/src/osmo-bts-octphy/octphy_vty.c index e134fc5..d2dd8a6 100644 --- a/src/osmo-bts-octphy/octphy_vty.c +++ b/src/osmo-bts-octphy/octphy_vty.c @@ -200,10 +200,10 @@ void bts_model_config_write_phy(struct vty *vty, struct phy_link *plink) { if (plink->u.octphy.netdev_name) - vty_out(vty, " netdev %s%s", plink->u.octphy.netdev_name, - VTY_NEWLINE); + vty_out(vty, " octphy net-device %s%s", + plink->u.octphy.netdev_name, VTY_NEWLINE); - vty_out(vty, " hw-addr %02x:%02x:%02x:%02x:%02x:%02x%s", + vty_out(vty, " octphy hw-addr %02x:%02x:%02x:%02x:%02x:%02x%s", plink->u.octphy.phy_addr.sll_addr[0], plink->u.octphy.phy_addr.sll_addr[1], plink->u.octphy.phy_addr.sll_addr[2], @@ -211,16 +211,16 @@ plink->u.octphy.phy_addr.sll_addr[4], plink->u.octphy.phy_addr.sll_addr[5], VTY_NEWLINE); - vty_out(vty, " rx-gain %u%s", plink->u.octphy.rx_gain_db, + vty_out(vty, " octphy rx-gain %u%s", plink->u.octphy.rx_gain_db, VTY_NEWLINE); if (plink->u.octphy.tx_atten_flag) { - vty_out(vty, " tx-attenuation %u%s", + vty_out(vty, " octphy tx-attenuation %u%s", plink->u.octphy.tx_atten_db, VTY_NEWLINE); } else - vty_out(vty, " tx-attenuation oml%s", VTY_NEWLINE); + vty_out(vty, " octphy tx-attenuation oml%s", VTY_NEWLINE); - vty_out(vty, " rf-port-index %u%s", plink->u.octphy.rf_port_index, + vty_out(vty, " octphy rf-port-index %u%s", plink->u.octphy.rf_port_index, VTY_NEWLINE); } -- To view, visit https://gerrit.osmocom.org/1710 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib018e07e332aa8a6144fb2d87889032bd5fc2533 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Jan 31 10:39:33 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 Jan 2017 10:39:33 +0000 Subject: osmo-bts[master]: octphy VTY: fix vty write output for octphy's phy section In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1710 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib018e07e332aa8a6144fb2d87889032bd5fc2533 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 31 10:39:58 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 Jan 2017 10:39:58 +0000 Subject: [MERGED] osmo-bts[master]: octphy VTY: fix vty write output for octphy's phy section In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: octphy VTY: fix vty write output for octphy's phy section ...................................................................... octphy VTY: fix vty write output for octphy's phy section Fix invalid configuration generated by VTY 'write' command for the 'phy' section of osmo-bts-octphy. The problem was introduced during refactoring commit d784e50747b8cf0ce505489e1451f75be5ccbd4b (Sat Jan 9 13:13:37 2016 +0100, "Introduce new phy_link and phy_instance abstraction") Change-Id: Ib018e07e332aa8a6144fb2d87889032bd5fc2533 --- M src/osmo-bts-octphy/octphy_vty.c 1 file changed, 7 insertions(+), 7 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bts-octphy/octphy_vty.c b/src/osmo-bts-octphy/octphy_vty.c index e134fc5..d2dd8a6 100644 --- a/src/osmo-bts-octphy/octphy_vty.c +++ b/src/osmo-bts-octphy/octphy_vty.c @@ -200,10 +200,10 @@ void bts_model_config_write_phy(struct vty *vty, struct phy_link *plink) { if (plink->u.octphy.netdev_name) - vty_out(vty, " netdev %s%s", plink->u.octphy.netdev_name, - VTY_NEWLINE); + vty_out(vty, " octphy net-device %s%s", + plink->u.octphy.netdev_name, VTY_NEWLINE); - vty_out(vty, " hw-addr %02x:%02x:%02x:%02x:%02x:%02x%s", + vty_out(vty, " octphy hw-addr %02x:%02x:%02x:%02x:%02x:%02x%s", plink->u.octphy.phy_addr.sll_addr[0], plink->u.octphy.phy_addr.sll_addr[1], plink->u.octphy.phy_addr.sll_addr[2], @@ -211,16 +211,16 @@ plink->u.octphy.phy_addr.sll_addr[4], plink->u.octphy.phy_addr.sll_addr[5], VTY_NEWLINE); - vty_out(vty, " rx-gain %u%s", plink->u.octphy.rx_gain_db, + vty_out(vty, " octphy rx-gain %u%s", plink->u.octphy.rx_gain_db, VTY_NEWLINE); if (plink->u.octphy.tx_atten_flag) { - vty_out(vty, " tx-attenuation %u%s", + vty_out(vty, " octphy tx-attenuation %u%s", plink->u.octphy.tx_atten_db, VTY_NEWLINE); } else - vty_out(vty, " tx-attenuation oml%s", VTY_NEWLINE); + vty_out(vty, " octphy tx-attenuation oml%s", VTY_NEWLINE); - vty_out(vty, " rf-port-index %u%s", plink->u.octphy.rf_port_index, + vty_out(vty, " octphy rf-port-index %u%s", plink->u.octphy.rf_port_index, VTY_NEWLINE); } -- To view, visit https://gerrit.osmocom.org/1710 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib018e07e332aa8a6144fb2d87889032bd5fc2533 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Jan 31 11:01:15 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 Jan 2017 11:01:15 +0000 Subject: osmo-bts[master]: octphy: Fix VTY commands In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (9 comments) https://gerrit.osmocom.org/#/c/1711/1//COMMIT_MSG Commit Message: Line 7: octphy: Fix VTY commands summary should mention the rough area, here e.g. "VTY: fix 'show phy'". But this is not really a fix but a first implementation? It's not clear from this patch whether the stats are also printed in the log and printing in the VTY is added on top, or whether the stats are so far not printed anywhere (so please clarify in this log msg). Line 12: the problem (put the vty commands in quotes) (don't say 'fixes' since it is a first implementation?) https://gerrit.osmocom.org/#/c/1711/1/src/osmo-bts-octphy/octphy_hw_api.c File src/osmo-bts-octphy/octphy_hw_api.c: Line 114 mention code moves and the reason (who needs it?) in the commit log for easier review https://gerrit.osmocom.org/#/c/1711/1/src/osmo-bts-octphy/octphy_vty.c File src/osmo-bts-octphy/octphy_vty.c: Line 172: (tOCTVC1_HW_MSG_RF_PORT_STATS_RSP *) resp->l2h; check for correct msgb size? Line 174: vty_out(vty,"%s", VTY_NEWLINE); (space after comma, ~30 times) Line 204: struct octphy_hw_get_cb_data cb_data; static struct (see below) Line 210: &cb_data); segfault due to lifetime: cb_data becomes deallocated as soon as this function exits, but is needed until the callback fires. Either allocate and deallocate or just make the struct static (collision with multiple calls is not harmful). Line 220: (tOCTVC1_HW_MSG_CLOCK_SYNC_MGR_STATS_RSP *) resp->l2h; check for correct msgb size? Line 243: struct octphy_hw_get_cb_data cb_data; static (same reason as above) -- To view, visit https://gerrit.osmocom.org/1711 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iae5aa91fe2ebba7c2874eed88b15ed66e8c9cd61 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Jan 31 11:01:40 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 Jan 2017 11:01:40 +0000 Subject: osmo-bts[master]: cosmetic: Remove stray newlines In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1712 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I33f5c4a3f40c0299a7cdb9c62094f0f914edfc98 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 31 11:02:33 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 Jan 2017 11:02:33 +0000 Subject: [PATCH] osmo-bts[master]: cosmetic: Remove stray newlines in octphy_vty.c In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1712 to look at the new patch set (#2). cosmetic: Remove stray newlines in octphy_vty.c Change-Id: I33f5c4a3f40c0299a7cdb9c62094f0f914edfc98 --- M src/osmo-bts-octphy/octphy_vty.c 1 file changed, 0 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/12/1712/2 diff --git a/src/osmo-bts-octphy/octphy_vty.c b/src/osmo-bts-octphy/octphy_vty.c index e134fc5..fce58a3 100644 --- a/src/osmo-bts-octphy/octphy_vty.c +++ b/src/osmo-bts-octphy/octphy_vty.c @@ -141,11 +141,6 @@ "Use tx-attenuation according to OML instructions from BSC\n" "Fixed tx-attenuation in quarter-dB\n") { - - - - - struct phy_link *plink = vty->index; if (plink->state != PHY_LINK_SHUTDOWN) { -- To view, visit https://gerrit.osmocom.org/1712 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I33f5c4a3f40c0299a7cdb9c62094f0f914edfc98 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Jan 31 11:02:36 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 Jan 2017 11:02:36 +0000 Subject: osmo-bts[master]: cosmetic: Remove stray newlines in octphy_vty.c In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1712 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I33f5c4a3f40c0299a7cdb9c62094f0f914edfc98 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 31 11:02:41 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 Jan 2017 11:02:41 +0000 Subject: [MERGED] osmo-bts[master]: cosmetic: Remove stray newlines in octphy_vty.c In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: cosmetic: Remove stray newlines in octphy_vty.c ...................................................................... cosmetic: Remove stray newlines in octphy_vty.c Change-Id: I33f5c4a3f40c0299a7cdb9c62094f0f914edfc98 --- M src/osmo-bts-octphy/octphy_vty.c 1 file changed, 0 insertions(+), 5 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bts-octphy/octphy_vty.c b/src/osmo-bts-octphy/octphy_vty.c index d2dd8a6..c2d1fbb 100644 --- a/src/osmo-bts-octphy/octphy_vty.c +++ b/src/osmo-bts-octphy/octphy_vty.c @@ -141,11 +141,6 @@ "Use tx-attenuation according to OML instructions from BSC\n" "Fixed tx-attenuation in quarter-dB\n") { - - - - - struct phy_link *plink = vty->index; if (plink->state != PHY_LINK_SHUTDOWN) { -- To view, visit https://gerrit.osmocom.org/1712 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I33f5c4a3f40c0299a7cdb9c62094f0f914edfc98 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Jan 31 11:03:42 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 Jan 2017 11:03:42 +0000 Subject: [PATCH] osmo-bts[master]: cosmetic: remove stray newline in octphy's l1_oml.c In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1713 to look at the new patch set (#2). cosmetic: remove stray newline in octphy's l1_oml.c Change-Id: I6b60e5ee03b9afe6595bf44c4a963d23d03a4eb7 --- M src/osmo-bts-octphy/l1_oml.c 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/13/1713/2 diff --git a/src/osmo-bts-octphy/l1_oml.c b/src/osmo-bts-octphy/l1_oml.c index da8ff03..08516ef 100644 --- a/src/osmo-bts-octphy/l1_oml.c +++ b/src/osmo-bts-octphy/l1_oml.c @@ -563,8 +563,7 @@ } static int mph_info_chan_confirm(struct gsm_lchan *lchan, - - enum osmo_mph_info_type type, uint8_t cause) + enum osmo_mph_info_type type, uint8_t cause) { struct osmo_phsap_prim l1sap; -- To view, visit https://gerrit.osmocom.org/1713 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I6b60e5ee03b9afe6595bf44c4a963d23d03a4eb7 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Jan 31 11:03:44 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 Jan 2017 11:03:44 +0000 Subject: osmo-bts[master]: cosmetic: remove stray newline in octphy's l1_oml.c In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1713 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6b60e5ee03b9afe6595bf44c4a963d23d03a4eb7 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 31 11:06:48 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 Jan 2017 11:06:48 +0000 Subject: [PATCH] osmo-bts[master]: sysmo, lc15: fix memory leak at each call placed In-Reply-To: References: Message-ID: Hello jfdionne, Max, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1656 to look at the new patch set (#3). sysmo,lc15: fix memory leak at each call placed Max's note: added same fix for default case and ported it to sysmobts. Change-Id: Ife1293e3238cfda16eac9c28e7e81ffe5595e031 --- M src/osmo-bts-litecell15/l1_if.c M src/osmo-bts-sysmo/l1_if.c 2 files changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/56/1656/3 diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index c70bd9e..0c5ef6b 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -1093,8 +1093,10 @@ rc = handle_mph_time_ind(fl1, &l1p->u.mphTimeInd, msg); break; case GsmL1_PrimId_MphSyncInd: + msgb_free(msg); break; case GsmL1_PrimId_PhConnectInd: + msgb_free(msg); break; case GsmL1_PrimId_PhReadyToSendInd: rc = handle_ph_readytosend_ind(fl1, &l1p->u.phReadyToSendInd, @@ -1107,7 +1109,7 @@ rc = handle_ph_ra_ind(fl1, &l1p->u.phRaInd, msg); break; default: - break; + msgb_free(msg); } return rc; diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 82db8d7..490264f 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -1081,8 +1081,10 @@ rc = handle_mph_time_ind(fl1, &l1p->u.mphTimeInd, msg); break; case GsmL1_PrimId_MphSyncInd: + msgb_free(msg); break; case GsmL1_PrimId_PhConnectInd: + msgb_free(msg); break; case GsmL1_PrimId_PhReadyToSendInd: rc = handle_ph_readytosend_ind(fl1, &l1p->u.phReadyToSendInd, @@ -1095,7 +1097,7 @@ rc = handle_ph_ra_ind(fl1, &l1p->u.phRaInd, msg); break; default: - break; + msgb_free(msg); } return rc; -- To view, visit https://gerrit.osmocom.org/1656 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ife1293e3238cfda16eac9c28e7e81ffe5595e031 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: jfdionne Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: jfdionne From gerrit-no-reply at lists.osmocom.org Tue Jan 31 11:06:51 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 Jan 2017 11:06:51 +0000 Subject: osmo-bts[master]: sysmo,lc15: fix memory leak at each call placed In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1656 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ife1293e3238cfda16eac9c28e7e81ffe5595e031 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: jfdionne Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: jfdionne Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 31 11:06:52 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 Jan 2017 11:06:52 +0000 Subject: [MERGED] osmo-bts[master]: sysmo, lc15: fix memory leak at each call placed In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: sysmo,lc15: fix memory leak at each call placed ...................................................................... sysmo,lc15: fix memory leak at each call placed Max's note: added same fix for default case and ported it to sysmobts. Change-Id: Ife1293e3238cfda16eac9c28e7e81ffe5595e031 --- M src/osmo-bts-litecell15/l1_if.c M src/osmo-bts-sysmo/l1_if.c 2 files changed, 6 insertions(+), 2 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index c70bd9e..0c5ef6b 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -1093,8 +1093,10 @@ rc = handle_mph_time_ind(fl1, &l1p->u.mphTimeInd, msg); break; case GsmL1_PrimId_MphSyncInd: + msgb_free(msg); break; case GsmL1_PrimId_PhConnectInd: + msgb_free(msg); break; case GsmL1_PrimId_PhReadyToSendInd: rc = handle_ph_readytosend_ind(fl1, &l1p->u.phReadyToSendInd, @@ -1107,7 +1109,7 @@ rc = handle_ph_ra_ind(fl1, &l1p->u.phRaInd, msg); break; default: - break; + msgb_free(msg); } return rc; diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 82db8d7..490264f 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -1081,8 +1081,10 @@ rc = handle_mph_time_ind(fl1, &l1p->u.mphTimeInd, msg); break; case GsmL1_PrimId_MphSyncInd: + msgb_free(msg); break; case GsmL1_PrimId_PhConnectInd: + msgb_free(msg); break; case GsmL1_PrimId_PhReadyToSendInd: rc = handle_ph_readytosend_ind(fl1, &l1p->u.phReadyToSendInd, @@ -1095,7 +1097,7 @@ rc = handle_ph_ra_ind(fl1, &l1p->u.phRaInd, msg); break; default: - break; + msgb_free(msg); } return rc; -- To view, visit https://gerrit.osmocom.org/1656 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ife1293e3238cfda16eac9c28e7e81ffe5595e031 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: jfdionne Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: jfdionne From gerrit-no-reply at lists.osmocom.org Tue Jan 31 11:14:49 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 Jan 2017 11:14:49 +0000 Subject: [MERGED] osmo-bts[master]: cosmetic: remove stray newline in octphy's l1_oml.c In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: cosmetic: remove stray newline in octphy's l1_oml.c ...................................................................... cosmetic: remove stray newline in octphy's l1_oml.c Change-Id: I6b60e5ee03b9afe6595bf44c4a963d23d03a4eb7 --- M src/osmo-bts-octphy/l1_oml.c 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bts-octphy/l1_oml.c b/src/osmo-bts-octphy/l1_oml.c index da8ff03..08516ef 100644 --- a/src/osmo-bts-octphy/l1_oml.c +++ b/src/osmo-bts-octphy/l1_oml.c @@ -563,8 +563,7 @@ } static int mph_info_chan_confirm(struct gsm_lchan *lchan, - - enum osmo_mph_info_type type, uint8_t cause) + enum osmo_mph_info_type type, uint8_t cause) { struct osmo_phsap_prim l1sap; -- To view, visit https://gerrit.osmocom.org/1713 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6b60e5ee03b9afe6595bf44c4a963d23d03a4eb7 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Jan 31 13:00:44 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 Jan 2017 13:00:44 +0000 Subject: osmo-hlr[master]: comment: sql: describe auc_2g and auc_3g columns In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/1709/2/sql/hlr.sql File sql/hlr.sql: Line 64: op VARCHAR(32), -- hex string: operator's secret key (128bit) Okay, if you put VARCHAR(num) here.. why not for the ki? -- To view, visit https://gerrit.osmocom.org/1709 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie4edc69ff11a83a4c0f79097f43a2cb206dfe405 Gerrit-PatchSet: 2 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Jan 31 13:01:08 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 Jan 2017 13:01:08 +0000 Subject: osmo-hlr[master]: sql: fix 3g_auc's column K data type In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1708 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iaa8d33e303760bd15dcb7dc8bb8b9b24bf6c8f14 Gerrit-PatchSet: 2 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 31 13:06:00 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 Jan 2017 13:06:00 +0000 Subject: osmo-hlr[master]: main: add VTY and '-c config-file' option In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/1707/2/src/hlr_vty.c File src/hlr_vty.c: Line 29: int hlr_vty_go_parent(struct vty *vty) Just skip it for the time being? And why the ENABLE_NODE? -- To view, visit https://gerrit.osmocom.org/1707 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iedb884345a597371a337b0c67eb6013b7d5d1ce1 Gerrit-PatchSet: 2 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Jan 31 13:07:07 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 Jan 2017 13:07:07 +0000 Subject: osmo-hlr[master]: main: add option parsing with db file and default options In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/1706/2/src/hlr.c File src/hlr.c: Line 23: #define _GNU_SOURCE You don't get a compiler warning here? -- To view, visit https://gerrit.osmocom.org/1706 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I279d517e1310e398b0a2382349e62be8e65364c1 Gerrit-PatchSet: 2 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Jan 31 13:09:15 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 Jan 2017 13:09:15 +0000 Subject: libosmocore[master]: utils/conv_gen.py: improve application flexibility In-Reply-To: References: Message-ID: Patch Set 4: Code-Review-1 -1 because of tnt's comment. Using a "native" python way to define commands.. will reduce code size, provide good help too. -- To view, visit https://gerrit.osmocom.org/1584 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0b476b00234c17f78b41d695cf3bfd13edb64c28 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 31 13:10:41 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 Jan 2017 13:10:41 +0000 Subject: osmo-hlr[master]: main: add and use root talloc ctx In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/1705/1/src/hlr.c File src/hlr.c: Line 519: void *hlr_ctx = NULL; Why not static here? It is not referenced outside of this file?! -- To view, visit https://gerrit.osmocom.org/1705 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3c64cb4ad7a681b88c7409296ad3afeb8000e2a4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Jan 31 13:11:28 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 Jan 2017 13:11:28 +0000 Subject: osmo-gsm-manuals[master]: common/port_numbers: place comment to remind of syncing port... In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1704 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib99271bfb435ef59fcfc0a2ac198d26770199344 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 31 13:11:51 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 Jan 2017 13:11:51 +0000 Subject: osmo-gsm-manuals[master]: common/port_numbers: add osmo-hlr VTY port 4258 In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1703 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibf66a7c31d1b48b002c25bb55784c99f54dad3a0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 31 13:12:52 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 Jan 2017 13:12:52 +0000 Subject: openbsc[master]: Add MS time. offset to gsm_lchan In-Reply-To: References: Message-ID: Patch Set 1: How will this be used? Please put such crucial information into the commit message. -- To view, visit https://gerrit.osmocom.org/1699 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8bda57c8d6c15bbb803eca708931556dae118a00 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 31 13:13:47 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 Jan 2017 13:13:47 +0000 Subject: openbsc[master]: vty tests: attempt to get at sporadic 'Broken Pipe' error In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1693 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8851b76b2d7b87dd500ae40f47e6bea716ef3fc4 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 31 13:14:20 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 Jan 2017 13:14:20 +0000 Subject: openbsc[master]: vty tests: attempt to get at sporadic 'Broken Pipe' error In-Reply-To: References: Message-ID: Patch Set 2: I asked on google plus if anyone knows.. how to see when the kernel enforces resource limits.. but it doesn't seem to be the case. :( -- To view, visit https://gerrit.osmocom.org/1693 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8851b76b2d7b87dd500ae40f47e6bea716ef3fc4 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 31 13:21:57 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 Jan 2017 13:21:57 +0000 Subject: openbsc[master]: add struct bsc_sub, separating libbsc from gsm_subscriber In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+1 (3 comments) https://gerrit.osmocom.org/#/c/1682/4/openbsc/src/libbsc/bsc_vty.c File openbsc/src/libbsc/bsc_vty.c: Line 1024: vty_out(vty, " Use count: %d%s", bsub->use_count, VTY_NEWLINE); ->name has some overlap.. shall we have tmsi != GSM_RESERVED_TMSI.. in the name sprintf code as well? https://gerrit.osmocom.org/#/c/1682/4/openbsc/src/libbsc/paging.c File openbsc/src/libbsc/paging.c: Line 80 no replacement for this? https://gerrit.osmocom.org/#/c/1682/4/openbsc/src/libcommon-cs/common_cs.c File openbsc/src/libcommon-cs/common_cs.c: Line 73: net->bsc_subscribers = talloc_zero(net, struct llist_head); only done to have a talloc context? -- To view, visit https://gerrit.osmocom.org/1682 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia61cc00e8bb186b976939a4fc8f7cf9ce6aa3d8e Gerrit-PatchSet: 4 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Jan 31 13:30:14 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 Jan 2017 13:30:14 +0000 Subject: openbsc[master]: Attempt to fix OE build In-Reply-To: References: Message-ID: Patch Set 1: I always thought these macros are copied. But what is the issue of shipping an autoconf-archive? https://layers.openembedded.org/layerindex/recipe/931/. Is it recent enough? -- To view, visit https://gerrit.osmocom.org/1692 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iacc1958b471ec3fc65307259039e1d496845f528 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 31 13:31:09 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 Jan 2017 13:31:09 +0000 Subject: libosmocore[master]: Add minimal testing of socket.c helper functions In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1698 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2773b3859a206f96fb8fa095d50a653d9eeb8d79 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 31 13:34:32 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 Jan 2017 13:34:32 +0000 Subject: openbsc[master]: SGSN: Integrate basic support for UMTS AKA In-Reply-To: References: Message-ID: Patch Set 4: Code-Review-1 (1 comment) What about the TODO? AUTS and GSUP for the authentication failure seem important? https://gerrit.osmocom.org/#/c/1683/4/openbsc/src/gprs/gprs_gmm.c File openbsc/src/gprs/gprs_gmm.c: Line 537: else Skip this else? -- To view, visit https://gerrit.osmocom.org/1683 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie6a0cefba5e4e7f02cc2eaf6ec006ac07d5c1816 Gerrit-PatchSet: 4 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Jan 31 13:35:19 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 Jan 2017 13:35:19 +0000 Subject: openbsc[master]: VTY: Print 3G auth tuples, not just 2G auth tuples In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1694 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I277e4347ee1486a39e6dc4e2363a593f328f9e3b Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 31 13:37:27 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 Jan 2017 13:37:27 +0000 Subject: openbsc[master]: paging.h: use '<>' include, not '""' In-Reply-To: References: Message-ID: Patch Set 3: why? -- To view, visit https://gerrit.osmocom.org/1679 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4da0cb32476202d06902531d07faed8004f689f9 Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 31 13:38:01 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 Jan 2017 13:38:01 +0000 Subject: openbsc[master]: osmo_bsc_grace.h: use '<>' include, not '""' In-Reply-To: References: Message-ID: Patch Set 3: why? we want the files relative to our directory even if /usr/include/openbsc exists. -- To view, visit https://gerrit.osmocom.org/1678 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2f22be93d1a5fd6f229b85305a1d2a2cf6a43ce2 Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 31 13:43:25 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 Jan 2017 13:43:25 +0000 Subject: osmo-pcu[master]: tbf.cpp: use new tlli instead of old tlli In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Maybe it dl_tbf->tlli and ul_tbf->tlli might be better.. but as the MS look-up is done by TLLI it looks fine. Please update test expectations -- To view, visit https://gerrit.osmocom.org/1663 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2fd6fec022506e203d05e91c36ccd9e020ff816c Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 31 13:45:24 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 Jan 2017 13:45:24 +0000 Subject: osmo-iuh[master]: cs RAB: add more SDU_FormatInformationParameter items In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1649 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I97e5c0b1e9ab9de00449b50a86d79a967af0d3f3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 31 13:45:53 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 Jan 2017 13:45:53 +0000 Subject: osmo-iuh[master]: ranap: make X.213 NSAP 160 bits long, zero padded In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1648 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I070bbfe887ab93d08322df30571050a381d082d5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 31 13:47:08 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 Jan 2017 13:47:08 +0000 Subject: osmo-iuh[master]: cs RAB: toggle Pre_emptionVulnerability In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 but maybe a why.. we toggle it :) -- To view, visit https://gerrit.osmocom.org/1646 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0f4d5a5e56bb6a3a3dfd6db8292d30f55fccdbc1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 31 13:47:18 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 Jan 2017 13:47:18 +0000 Subject: osmo-iuh[master]: cs RAB: toggle QueuingAllowed In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1647 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I39a541c193eed9c15b2ce8fda306bb226c70647f Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 31 13:48:10 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 Jan 2017 13:48:10 +0000 Subject: osmo-iuh[master]: cs RAB: tweak sDU_ErrorRatio In-Reply-To: References: Message-ID: Patch Set 1: In which way? What do they change? How where these found? -- To view, visit https://gerrit.osmocom.org/1644 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3169376bb182aba5926b7c974108bdc5fba04fa4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 31 13:48:34 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 Jan 2017 13:48:34 +0000 Subject: osmo-iuh[master]: cs RAB: lower guaranteedBitrate In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1643 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia7eecca43d62a6a020466e9b8dc8b566ca988f9f Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 31 13:48:58 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 Jan 2017 13:48:58 +0000 Subject: osmo-iuh[master]: cs RAB: set allocationOrRetentionPriority=lowest In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1645 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0d7dc32bc93fa0a4d316f8378b3735dc11e87071 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 31 13:49:15 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 Jan 2017 13:49:15 +0000 Subject: osmo-iuh[master]: cs RAB: add nAS_SynchronisationIndicator In-Reply-To: References: Message-ID: Patch Set 1: what does it do? -- To view, visit https://gerrit.osmocom.org/1642 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I14c22b0befb308bac2eded662fe13a58c8478743 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 31 14:34:43 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 Jan 2017 14:34:43 +0000 Subject: [PATCH] libosmocore[master]: libgsm crypt/auth.h: implement c3 function (3GPP TS 33.102) Message-ID: Review at https://gerrit.osmocom.org/1714 libgsm crypt/auth.h: implement c3 function (3GPP TS 33.102) Declare osmo_c3() in crypt/auth.h, implement in gsm/auth_core.c, all next to osmo_c4(). Publish in libosmogsm.map for use in VLR and HLR. Will be used for UMTS auth on GSM networks. Change-Id: I87855316749b0350774795c8e200fc82604dea59 --- M include/osmocom/crypt/auth.h M src/gsm/auth_core.c M src/gsm/libosmogsm.map 3 files changed, 17 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/14/1714/1 diff --git a/include/osmocom/crypt/auth.h b/include/osmocom/crypt/auth.h index 37b8a8a..58bd71e 100644 --- a/include/osmocom/crypt/auth.h +++ b/include/osmocom/crypt/auth.h @@ -91,6 +91,7 @@ int osmo_auth_load(const char *path); int osmo_auth_supported(enum osmo_auth_algo algo); +void osmo_c3(uint8_t *kc, const uint8_t *ck, const uint8_t *ik) void osmo_c4(uint8_t *ck, const uint8_t *kc); const char *osmo_auth_alg_name(enum osmo_auth_algo alg); enum osmo_auth_algo osmo_auth_alg_parse(const char *name); diff --git a/src/gsm/auth_core.c b/src/gsm/auth_core.c index 3aac069..6cb96ef 100644 --- a/src/gsm/auth_core.c +++ b/src/gsm/auth_core.c @@ -105,6 +105,21 @@ ik[i] = ik[i-12]; } +/*! \brief C3 function to derive GSM Kc from UMTS CK+IK + * (as defined in 3GPP TS 33.102 6.8.1.2). + * The c3 function converts UMTS key material to GSM keys to be able to use + * UMTS authentication on a GSM network. See 3GPP TS 33.102 6.8.1.1. + * \param kc[out] 8 byte buffer to return the derived GSM Kc. + * \param ck[in] 16 byte buffer holding UMTS CK. + * \param ik[in] 16 byte buffer holding UMTS IK. + */ +void osmo_c3(uint8_t *kc, const uint8_t *ck, const uint8_t *ik) +{ + unsigned int i; + for (i = 0; i < 8; i++) + kc[i] = ck[i] ^ ck[i + 8] ^ ik[i] ^ ik[i + 8]; +} + /* C4 function to derive UMTS CK from GSM Kc */ void osmo_c4(uint8_t *ck, const uint8_t *kc) { diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index e153d72..8add3ec 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -31,6 +31,7 @@ abis_nm_pcause_type_names; osmo_sitype_strs; +osmo_c3; osmo_c4; bitvec_add_range1024; comp128; -- To view, visit https://gerrit.osmocom.org/1714 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I87855316749b0350774795c8e200fc82604dea59 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Jan 31 14:40:02 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 Jan 2017 14:40:02 +0000 Subject: [ABANDON] libosmocore[master]: libgsm crypt/auth.h: implement c3 function (3GPP TS 33.102) In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: libgsm crypt/auth.h: implement c3 function (3GPP TS 33.102) ...................................................................... Abandoned actually already exists as part of gsm_milenage() -- To view, visit https://gerrit.osmocom.org/1714 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I87855316749b0350774795c8e200fc82604dea59 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Jan 31 15:32:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 31 Jan 2017 15:32:32 +0000 Subject: [PATCH] openbsc[master]: OM2000: use assoc_so *only* for TS objects Message-ID: Review at https://gerrit.osmocom.org/1715 OM2000: use assoc_so *only* for TS objects all other objects always use the MO instance. The existing code likely is due to copy+paste mistakes. Change-Id: Ie0a31cd93993da10f31eecf530a5a05773c11eb1 --- M openbsc/src/libbsc/abis_om2000.c 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/15/1715/1 diff --git a/openbsc/src/libbsc/abis_om2000.c b/openbsc/src/libbsc/abis_om2000.c index 6b334d4..6c987d8 100644 --- a/openbsc/src/libbsc/abis_om2000.c +++ b/openbsc/src/libbsc/abis_om2000.c @@ -803,7 +803,7 @@ switch (mo->class) { case OM2K_MO_CLS_TRXC: - trx = gsm_bts_trx_num(bts, mo->assoc_so); + trx = gsm_bts_trx_num(bts, mo->inst); if (!trx) return NULL; nm_state = &trx->mo.nm_state; @@ -832,12 +832,12 @@ nm_state = &bts->mo.nm_state; break; case OM2K_MO_CLS_TX: - trx = gsm_bts_trx_num(bts, mo->assoc_so); + trx = gsm_bts_trx_num(bts, mo->inst); if (!trx) return NULL; break; case OM2K_MO_CLS_RX: - trx = gsm_bts_trx_num(bts, mo->assoc_so); + trx = gsm_bts_trx_num(bts, mo->inst); if (!trx) return NULL; break; @@ -854,7 +854,7 @@ case OM2K_MO_CLS_TX: case OM2K_MO_CLS_RX: case OM2K_MO_CLS_TRXC: - return gsm_bts_trx_num(bts, mo->assoc_so); + return gsm_bts_trx_num(bts, mo->inst); case OM2K_MO_CLS_TS: trx = gsm_bts_trx_num(bts, mo->assoc_so); if (!trx) -- To view, visit https://gerrit.osmocom.org/1715 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie0a31cd93993da10f31eecf530a5a05773c11eb1 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Jan 31 15:35:41 2017 From: gerrit-no-reply at lists.osmocom.org (jfdionne) Date: Tue, 31 Jan 2017 15:35:41 +0000 Subject: osmo-bts[master]: Fixes AMR HR DTX FSM logic. In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 Verified+1 -- To view, visit https://gerrit.osmocom.org/1659 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia811305e15541f2376005df736bd610e8b0d2f69 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: jfdionne Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: jfdionne Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 31 18:49:57 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 31 Jan 2017 18:49:57 +0000 Subject: libosmo-abis[master]: add basic unixsocket support In-Reply-To: References: Message-ID: Patch Set 4: Code-Review-2 this won't be merged as long as there's a compiled-in non-modifieable socket /tmp/oml_rsl -- To view, visit https://gerrit.osmocom.org/1198 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia5723b09a5c68a0505829dc732def981e60a907a Gerrit-PatchSet: 4 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 31 18:55:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 31 Jan 2017 18:55:24 +0000 Subject: [PATCH] openbsc[master]: Remove dependency to autoconf-archive In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1692 to look at the new patch set (#2). Remove dependency to autoconf-archive It is generally not a good idea to add more and more external dependencies unless absolutely needed. autoconf-archive is a good example of that, as we need to update all build machines, and older OpenEmbedded versions do not appear to have (the right?) autoconf-archive recipe. Provide local copy of necessary m4 files to fix the build there. The dependency to autoconf-archive was introduced in Change-Id Ied9c950dafa65f324cf31298b13b590f56139700 Change-Id: Iacc1958b471ec3fc65307259039e1d496845f528 --- M openbsc/configure.ac A openbsc/m4/README A openbsc/m4/ax_check_compile_flag.m4 3 files changed, 80 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/92/1692/2 diff --git a/openbsc/configure.ac b/openbsc/configure.ac index 7e244bc..6d373a5 100644 --- a/openbsc/configure.ac +++ b/openbsc/configure.ac @@ -9,6 +9,9 @@ AM_INIT_AUTOMAKE([dist-bzip2]) AC_CONFIG_TESTDIR(tests) +dnl FIXME: Remove this once we do not need local macro copies anymore (after upgrade to newer OE?) +AC_CONFIG_MACRO_DIRS([m4]) + dnl kernel style compile messages m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) diff --git a/openbsc/m4/README b/openbsc/m4/README new file mode 100644 index 0000000..92eb30b --- /dev/null +++ b/openbsc/m4/README @@ -0,0 +1,3 @@ +We want to avoid creating too many external build-time dependencies +like this one to autoconf-archive. This directory provides a local +copy of required m4 rules. diff --git a/openbsc/m4/ax_check_compile_flag.m4 b/openbsc/m4/ax_check_compile_flag.m4 new file mode 100644 index 0000000..ca36397 --- /dev/null +++ b/openbsc/m4/ax_check_compile_flag.m4 @@ -0,0 +1,74 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) +# +# DESCRIPTION +# +# Check whether the given FLAG works with the current language's compiler +# or gives an error. (Warnings, however, are ignored) +# +# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on +# success/failure. +# +# If EXTRA-FLAGS is defined, it is added to the current language's default +# flags (e.g. CFLAGS) when the check is done. The check is thus made with +# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to +# force the compiler to issue an error when a bad flag is given. +# +# INPUT gives an alternative input source to AC_COMPILE_IFELSE. +# +# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this +# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. +# +# LICENSE +# +# Copyright (c) 2008 Guido U. Draheim +# Copyright (c) 2011 Maarten Bosmans +# +# 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, see . +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 4 + +AC_DEFUN([AX_CHECK_COMPILE_FLAG], +[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF +AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl +AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ + ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS + _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" + AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], + [AS_VAR_SET(CACHEVAR,[yes])], + [AS_VAR_SET(CACHEVAR,[no])]) + _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) +AS_VAR_IF(CACHEVAR,yes, + [m4_default([$2], :)], + [m4_default([$3], :)]) +AS_VAR_POPDEF([CACHEVAR])dnl +])dnl AX_CHECK_COMPILE_FLAGS -- To view, visit https://gerrit.osmocom.org/1692 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iacc1958b471ec3fc65307259039e1d496845f528 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel From gerrit-no-reply at lists.osmocom.org Tue Jan 31 18:55:40 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 31 Jan 2017 18:55:40 +0000 Subject: openbsc[master]: Remove dependency to autoconf-archive In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1692 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iacc1958b471ec3fc65307259039e1d496845f528 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Jan 31 19:07:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 31 Jan 2017 19:07:44 +0000 Subject: [MERGED] openbsc[master]: Remove dependency to autoconf-archive In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Remove dependency to autoconf-archive ...................................................................... Remove dependency to autoconf-archive It is generally not a good idea to add more and more external dependencies unless absolutely needed. autoconf-archive is a good example of that, as we need to update all build machines, and older OpenEmbedded versions do not appear to have (the right?) autoconf-archive recipe. Provide local copy of necessary m4 files to fix the build there. The dependency to autoconf-archive was introduced in Change-Id Ied9c950dafa65f324cf31298b13b590f56139700 Change-Id: Iacc1958b471ec3fc65307259039e1d496845f528 --- M openbsc/configure.ac A openbsc/m4/README A openbsc/m4/ax_check_compile_flag.m4 3 files changed, 80 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/configure.ac b/openbsc/configure.ac index 7e244bc..6d373a5 100644 --- a/openbsc/configure.ac +++ b/openbsc/configure.ac @@ -9,6 +9,9 @@ AM_INIT_AUTOMAKE([dist-bzip2]) AC_CONFIG_TESTDIR(tests) +dnl FIXME: Remove this once we do not need local macro copies anymore (after upgrade to newer OE?) +AC_CONFIG_MACRO_DIRS([m4]) + dnl kernel style compile messages m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) diff --git a/openbsc/m4/README b/openbsc/m4/README new file mode 100644 index 0000000..92eb30b --- /dev/null +++ b/openbsc/m4/README @@ -0,0 +1,3 @@ +We want to avoid creating too many external build-time dependencies +like this one to autoconf-archive. This directory provides a local +copy of required m4 rules. diff --git a/openbsc/m4/ax_check_compile_flag.m4 b/openbsc/m4/ax_check_compile_flag.m4 new file mode 100644 index 0000000..ca36397 --- /dev/null +++ b/openbsc/m4/ax_check_compile_flag.m4 @@ -0,0 +1,74 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) +# +# DESCRIPTION +# +# Check whether the given FLAG works with the current language's compiler +# or gives an error. (Warnings, however, are ignored) +# +# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on +# success/failure. +# +# If EXTRA-FLAGS is defined, it is added to the current language's default +# flags (e.g. CFLAGS) when the check is done. The check is thus made with +# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to +# force the compiler to issue an error when a bad flag is given. +# +# INPUT gives an alternative input source to AC_COMPILE_IFELSE. +# +# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this +# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. +# +# LICENSE +# +# Copyright (c) 2008 Guido U. Draheim +# Copyright (c) 2011 Maarten Bosmans +# +# 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, see . +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 4 + +AC_DEFUN([AX_CHECK_COMPILE_FLAG], +[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF +AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl +AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ + ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS + _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" + AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], + [AS_VAR_SET(CACHEVAR,[yes])], + [AS_VAR_SET(CACHEVAR,[no])]) + _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) +AS_VAR_IF(CACHEVAR,yes, + [m4_default([$2], :)], + [m4_default([$3], :)]) +AS_VAR_POPDEF([CACHEVAR])dnl +])dnl AX_CHECK_COMPILE_FLAGS -- To view, visit https://gerrit.osmocom.org/1692 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iacc1958b471ec3fc65307259039e1d496845f528 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel